0

New Pi4 but DAC+ADC CODEC not registered

Hi,

I recently purchased a new Pi4 and HiFiberry DAC+ADC. And I am following the tutorials listed here in order to play test sounds:

https://www.hifiberry.com/docs/software/configuring-linux-3-18-x/ 

https://www.hifiberry.com/docs/software/playing-test-sounds/ 

Unfortunately, I immediately ran into problems.

play -n synth sine 1000
play FAIL sox: Sorry, there is no default audio device configured

aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sndrpihifiberry [snd_rpi_hifiberry_dacplusadc], device 0: HiFiBerry DAC+ADC HiFi multicodec-0 [HiFiBerry DAC+ADC HiFi multicodec-0]
Subdevices: 1/1
Subdevice #0: subdevice #0

dmesg | grep hifi
[ 3.800783] snd-rpi-hifiberry-dacplusadc soc:sound: ASoC: CPU DAI (null) not registered - will retry
[ 3.842107] snd-rpi-hifiberry-dacplusadc soc:sound: ASoC: CPU DAI (null) not registered - will retry
[ 3.866653] snd-rpi-hifiberry-dacplusadc soc:sound: ASoC: CODEC DAI pcm512x-hifi not registered - will retry
[ 4.171349] snd-rpi-hifiberry-dacplusadc soc:sound: ASoC: CODEC DAI pcm512x-hifi not registered - will retry
[ 4.193711] snd-rpi-hifiberry-dacplusadc soc:sound: ASoC: CODEC DAI pcm512x-hifi not registered - will retry
[ 4.340127] snd-rpi-hifiberry-dacplusadc soc:sound: ASoC: CODEC DAI pcm512x-hifi not registered - will retry
[ 4.340801] snd-rpi-hifiberry-dacplusadc soc:sound: ASoC: CODEC DAI pcm512x-hifi not registered - will retry
[ 4.883929] snd-rpi-hifiberry-dacplusadc soc:sound: multicodec <-> fe203000.i2s mapping ok

sudo vcd log msg
003072.409: arasan: arasan_emmc_open
003072.588: arasan: arasan_emmc_set_clock C0: 0x00000000 C1: 0x000e7187 emmc: 250000000 actual: 200000 div: 0x00000271 target: 200000 min: 100000 max: 400000 delay: 10
003177.363: arasan: arasan_emmc_set_clock C0: 0x00000000 C1: 0x000e7187 emmc: 250000000 actual: 200000 div: 0x00000271 target: 200000 min: 100000 max: 400000 delay: 10
003177.524: arasan: arasan_emmc_set_clock C0: 0x00000f00 C1: 0x000ec2c7 emmc: 250000000 actual: 129937 div: 0x000003c2 target: 130000 min: 100000 max: 400000 delay: 15
003236.764: arasan: arasan_emmc_set_clock C0: 0x00000f06 C1: 0x000e0307 emmc: 250000000 actual: 41666666 div: 0x00000003 target: 40000000 min: 0 max: 40000000 delay: 1
003519.520: brfs: File read: /mfs/sd/config.txt
003912.862: brfs: File read: 1861 bytes
003965.039: brfs: File read: /mfs/sd/config.txt
003971.617: brfs: File read: 1861 bytes
004465.352: gpioman: gpioman_get_pin_num: pin DISPLAY_DSI_PORT not defined
004467.834: *** Restart logging
004471.644: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
004507.661: HDMI0: hdmi_pixel_encoding: 300000000
004507.673: HDMI1: hdmi_pixel_encoding: 300000000
004509.900: Trying Device Tree file 'bcm2711-rpi-4-b.dtb'
004514.260: brfs: File read: /mfs/sd/bcm2711-rpi-4-b.dtb
004514.301: Loading 'bcm2711-rpi-4-b.dtb' to 0x100 size 0xa139
004561.152: dtdebug: delete_node(/__local_fixups__)
004576.180: brfs: File read: 41273 bytes
004589.506: dtdebug: using platform 'bcm2711'
004589.518: dtdebug: overlay map not loaded
004598.045: dtdebug: /aliases:i2c_vc=i2c0
004625.027: dtdebug: /__symbols__:i2c_vc=i2c0
004642.610: dtdebug: /__overrides__:i2c_vc=i2c0
004678.563: dtdebug: /__overrides__:i2c_vc_baudrate=i2c0_baudrate
004687.251: dtdebug: /aliases:i2c=i2c1
004727.431: dtdebug: /__symbols__:i2c=i2c1
004752.191: dtdebug: /__overrides__:i2c=i2c1
004763.448: dtdebug: /aliases:i2c_arm=i2c1
004800.667: dtdebug: /__symbols__:i2c_arm=i2c1
004825.555: dtdebug: /__overrides__:i2c_arm=i2c1
004876.678: dtdebug: /__overrides__:i2c_baudrate=i2c1_baudrate
004927.855: dtdebug: /__overrides__:i2c_arm_baudrate=i2c1_baudrate
004951.932: dtparam: uart0_clkrate=48000000
004971.605: dtdebug: /__overrides__ has no uart0_clkrate property
004971.625: Unknown dtparam 'uart0_clkrate' - ignored
004974.854: brfs: File read: /mfs/sd/config.txt
004975.775: brfs: File read: 1861 bytes
004980.788: dtdebug: Opened overlay file 'overlays/hifiberry-dacplusadc.dtbo'
004982.098: brfs: File read: /mfs/sd/overlays/hifiberry-dacplusadc.dtbo
005086.907: Loaded overlay 'hifiberry-dacplusadc'
005130.907: dtdebug: merge_fragment(/clocks,/fragment@0/__overlay__)
005157.002: dtdebug: merge_fragment(/clocks/dacpro_osc,/fragment@0/__overlay__/dacpro_osc)
005157.035: dtdebug: +prop(compatible)
005160.305: dtdebug: +prop(#clock-cells)
005163.776: dtdebug: +prop(phandle)
005167.215: dtdebug: merge_fragment() end
005167.251: dtdebug: merge_fragment() end
005208.664: dtdebug: merge_fragment(/soc/i2s@7e203000,/fragment@1/__overlay__)
005208.700: dtdebug: +prop(status)
005213.864: dtdebug: merge_fragment() end
005264.574: dtdebug: merge_fragment(/soc/i2c@7e804000,/fragment@2/__overlay__)
005264.609: dtdebug: +prop(#address-cells)
005269.085: dtdebug: +prop(#size-cells)
005273.611: dtdebug: +prop(status)
005300.453: dtdebug: merge_fragment(/soc/i2c@7e804000/pcm5122@4d,/fragment@2/__overlay__/pcm5122@4d)
005300.490: dtdebug: +prop(#sound-dai-cells)
005305.159: dtdebug: +prop(compatible)
005309.601: dtdebug: +prop(reg)
005314.171: dtdebug: +prop(clocks)
005318.805: dtdebug: +prop(AVDD-supply)
005324.733: dtdebug: +prop(DVDD-supply)
005330.678: dtdebug: +prop(CPVDD-supply)
005336.637: dtdebug: +prop(status)
005341.382: dtdebug: +prop(phandle)
005346.128: dtdebug: merge_fragment() end
005346.174: dtdebug: merge_fragment() end
005346.576: dtdebug: merge_fragment(/,/fragment@3/__overlay__)
005397.307: dtdebug: merge_fragment(/dmic,/fragment@3/__overlay__/dmic)
005397.340: dtdebug: +prop(#sound-dai-cells)
005404.936: dtdebug: +prop(compatible)
005412.298: dtdebug: +prop(num-channels)
005421.088: dtdebug: +prop(status)
005428.657: dtdebug: merge_fragment() end
005428.691: dtdebug: merge_fragment() end
005495.496: dtdebug: merge_fragment(/soc/sound,/fragment@4/__overlay__)
005495.531: dtdebug: +prop(compatible)
005498.849: dtdebug: +prop(i2s-controller)
005503.711: dtdebug: +prop(status)
005507.047: dtdebug: merge_fragment() end
005547.203: brfs: File read: 2008 bytes
005549.297: brfs: File read: /mfs/sd/cmdline.txt
005549.430: Read command line from file 'cmdline.txt':
005549.513: 'console=serial0,115200 console=tty1 root=/dev/mmcblk0p7 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles'
005595.941: dtparam: uart1=off
005615.226: dtdebug: found override uart1
005615.275: dtdebug: override uart1: string target 'status'
007070.670: dtparam: cam0-pwdn-ctrl=51
007089.971: dtdebug: found override cam0-pwdn-ctrl
007090.004: dtparam: cam0-pwdn=5
007109.369: dtdebug: found override cam0-pwdn
007109.410: dtparam: arm_freq=1500000000
007128.812: dtdebug: found override arm_freq
007128.844: dtparam: core_freq=500000000
007148.995: dtdebug: /__overrides__ has no core_freq property
007149.015: Unknown dtparam 'core_freq' - ignored
007167.606: dtparam: cache_line_size=64
007187.032: dtdebug: found override cache_line_size
007253.499: dtdebug: delete_node(/hat)
007290.224: brfs: File read: 160 bytes
008424.377: brfs: File read: /mfs/sd/kernel7l.img
008424.463: Loading 'kernel7l.img' to 0x8000 size 0x588460
008424.555: Device tree loaded to 0x2eff5800 (size 0xa755)
008425.305: gpioman: gpioman_get_pin_num: pin SDCARD_CONTROL_POWER not defined
012357.905: vchiq_core: vchiq_init_state: slot_zero = 0xf7580000, is_master = 1
012361.493: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
012369.026: TV service:host side not connected, dropping notification 0x00000002, 0x00000001, 0x00000010

I found other similar posts on the forum but I am lost since ALSA does detect the device and yet it still says no audio device configured. Any help is appreciated! 

EDITED1:

I also tried with alsa sound test

speaker-test -c2
Playback open error: -2, No such file or directory

EDITED2:

I followed the link that David provided and did the following:

export AUDIODEV=hw:0,0
export AUDIODRIVER=alsa

Then I was able to produce a sine wave using sox.

But I still don't understand what caused the "not registered" problem and why alsa speaker test still returns the same error after I manually set up the environment.

Thank you guys in advance!

10 comments

Please sign in to leave a comment.