No sound from Hifiberry DAC2 Pro

Hello,

I bought a Hifiberry DAC2 Pro to use with my Rpi 3 and balenaSound but cannot get the sound working.

According to the datasheet (https://www.hifiberry.com/docs/data-sheets/datasheet-dac2-pro/), the dtoverlay should be set to hifiberry-dacplus.

I configured the device accordingly:

Also, I changed AUDIO_OUTPUT from AUTO to DAC, but without result…

The logfile mentions that it cannot find the DAC:

13.01.21 20:27:00 (+0100)  audio  --- Audio ---
13.01.21 20:27:00 (+0100)  audio  Starting audio service with settings:
13.01.21 20:27:00 (+0100)  audio  - Pulse log level: NOTICE
13.01.21 20:27:00 (+0100)  audio  - Default output: DAC
13.01.21 20:27:00 (+0100)  audio  
13.01.21 20:27:00 (+0100)  audio  Detected audio cards:
13.01.21 20:27:00 (+0100)  audio  ---nosoundcards---  
13.01.21 20:27:00 (+0100)  audio  
13.01.21 20:27:00 (+0100)  audio  
13.01.21 20:27:11 (+0100)  audio  WARNING: No DAC found. Falling back to PulseAudio defaults.
13.01.21 20:27:12 (+0100)  audio  Setting audio routing rules. Note that this can be changed after startup.

Hope someone can help me out…

Kind regards,
Wouter

Hey @blancqua, could you provide the version of balenaOS you are running on your Rpi 3? For the most detail it would be helpful to log into your Host OS and run cat /etc/os-release and paste the output here.

Hey @klutchell,

Hereby the requested output.

root@734ee96:~# cat /etc/os-release
ID="balena-os"
NAME="balenaOS"
VERSION="2.58.3+rev1"
VERSION_ID="2.58.3+rev1"
PRETTY_NAME="balenaOS 2.58.3+rev1"
MACHINE="raspberrypi3"
VARIANT="Development"
VARIANT_ID="dev"
META_BALENA_VERSION="2.58.3"
RESIN_BOARD_REV="6a40e45"
META_RESIN_REV="eabb6e1"
SLUG="raspberrypi3"

Weirdly enough, when I do not specify the BALENA_HOST_CONFIG_dtoverlay, it detects the DAC and I also see the green light on the board itself is lit. However, there is still no sound when playing something:

14.01.21 13:35:00 (+0100)  audio  --- Audio ---
14.01.21 13:35:00 (+0100)  audio  Starting audio service with settings:
14.01.21 13:35:00 (+0100)  audio  - Pulse log level: NOTICE
14.01.21 13:35:00 (+0100)  audio  - Default output: DAC
14.01.21 13:35:00 (+0100)  audio  
14.01.21 13:35:00 (+0100)  audio  Detected audio cards:
14.01.21 13:35:00 (+0100)  audio  0 sndrpihifiberry HifiberryDacp-snd_rpi_hifiberry_dacplus

I tried flashing HifiBerryOS to see whether that works and I can confirm that the DAC produces sound from HifiBerryOS so this is not a hardware issue.

Kind regards,
Wouter

Hi there, from what I can see, for that OS version the hifiberry-dacplus dtoverlay should work… With that set as the dtoverlay, and after power cycling the board, could you do dmesg | grep hifi and dmesg | grep snd from the audio container and post what you get, thanks

Sure, here you go:

root@ad2cb36e6a2a:/usr/src# dmesg | grep hifi
[   13.588658] clk-hifiberry-dacpro clocks:dacpro_osc: Fail to register clock driver
[   13.605476] clk-hifiberry-dacpro: probe of clocks:dacpro_osc failed with error -17
[   13.846418] snd-rpi-hifiberry-dacplus soc:sound: ASoC: CODEC DAI pcm512x-hifi not registered - will retry
[   14.014451] snd-rpi-hifiberry-dacplus soc:sound: ASoC: CODEC DAI pcm512x-hifi not registered - will retry
[   14.127974] snd-rpi-hifiberry-dacplus soc:sound: ASoC: CODEC DAI pcm512x-hifi not registered - will retry
[   14.290759] snd-rpi-hifiberry-dacplus soc:sound: ASoC: CODEC DAI pcm512x-hifi not registered - will retry
[   14.358689] snd-rpi-hifiberry-dacplus soc:sound: ASoC: CODEC DAI pcm512x-hifi not registered - will retry
[   15.087934] snd-rpi-hifiberry-dacplus soc:sound: ASoC: CODEC DAI pcm512x-hifi not registered - will retry
[   15.112240] snd-rpi-hifiberry-dacplus soc:sound: ASoC: CODEC DAI pcm512x-hifi not registered - will retry
root@ad2cb36e6a2a:/usr/src# dmesg | grep snd
[   13.846418] snd-rpi-hifiberry-dacplus soc:sound: ASoC: CODEC DAI pcm512x-hifi not registered - will retry
[   14.014451] snd-rpi-hifiberry-dacplus soc:sound: ASoC: CODEC DAI pcm512x-hifi not registered - will retry
[   14.127974] snd-rpi-hifiberry-dacplus soc:sound: ASoC: CODEC DAI pcm512x-hifi not registered - will retry
[   14.290759] snd-rpi-hifiberry-dacplus soc:sound: ASoC: CODEC DAI pcm512x-hifi not registered - will retry
[   14.358689] snd-rpi-hifiberry-dacplus soc:sound: ASoC: CODEC DAI pcm512x-hifi not registered - will retry
[   15.087934] snd-rpi-hifiberry-dacplus soc:sound: ASoC: CODEC DAI pcm512x-hifi not registered - will retry
[   15.112240] snd-rpi-hifiberry-dacplus soc:sound: ASoC: CODEC DAI pcm512x-hifi not registered - will retry
root@ad2cb36e6a2a:/usr/src#

hmm - what happens if you set your dtoverlay to hifiberry-dacplushd, and then power cycle?

Hi, I just tried it. The behavior is the same as if I wouldn’t set dtoverlay. The LED is green continuously (while on HifiberryOS it’s only lit when sound is playing), it does find the DAC, but still no sound.

What does dmesg | grep hifi say in this case?

Here you go.

Progress!

The Hifiberry DAC2 Pro comes as well with RCA as with a headphone jack. Up until now I was using the headphone jack which was not producing sound when using Balena, but is producing sound in HifiberryOS.

I now discovered when using dtoverlay “hifiberry-dacplushd” and connecting the RCA instead of the headphone jack, I do have sound. Therefore, the issue is merely from the headphone jack not being enabled. I can also see that in HifiberryOS that it explicitly enables the headphone jack amp:

From HifiberryOS:

# dmesg | grep snd
[    0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 
snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 video=Composite- 1:720x480@60i vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  
root=/dev/mmcblk0p2 rootwait console=tty5 systemd.show_status=0 quiet splash
[    5.530855] snd-rpi-hifiberry-dacplus soc:sound: activating headphone amplifier
[    5.531356] snd-rpi-hifiberry-dacplus soc:sound: ASoC: failed to init link HiFiBerry DAC+: -517
[    5.545522] snd-rpi-hifiberry-dacplus soc:sound: ASoC: failed to init link HiFiBerry DAC+: -517
[    5.837975] snd-rpi-hifiberry-dacplus soc:sound: ASoC: failed to init link HiFiBerry DAC+: -517
[    5.867232] snd-rpi-hifiberry-dacplus soc:sound: ASoC: failed to init link HiFiBerry DAC+: -517
[    6.128636] snd-rpi-hifiberry-dacplus soc:sound: ASoC: failed to init link HiFiBerry DAC+: -517
[    6.148128] snd-rpi-hifiberry-dacplus soc:sound: ASoC: failed to init link HiFiBerry DAC+: -517
[    6.187143] snd-rpi-hifiberry-dacplus soc:sound: ASoC: failed to init link HiFiBerry DAC+: -517
[    6.215708] snd-rpi-hifiberry-dacplus soc:sound: ASoC: failed to init link HiFiBerry DAC+: -517
[    6.459587] snd-rpi-hifiberry-dacplus soc:sound: pcm512x-hifi <-> 3f203000.i2s mapping ok

Key is in the line:

activating headphone amplifier

I switched to RCA so for me this is solved, but it might be good to know for others.

Kind regards!

1 Like