Hifiberry AMP2 / DAC+ Issues - No Sound
-
tldr; Hifiberry AMP2 works fine on the stock Retropie image, but gives no sound on other images.
I know this may not strictly be a Retropie stock issue, but this is driving me nuts and hoping someone can help. Mods please delete if not allowed.
I bought a Hifiberry AMP2 HAT for my bartop build. This was a tad on the pricey side for the quality needed for retro gaming, but the Pi sound was pretty terrible and it tidied up my cabinet quite a bit as:
- It runs off 12V DC and powers the Pi, so I got rid of the Pi power adapter
- It has a solid barrel style connector, which feels safer than the MicroUSB one
- I was able to reuse the power adapter from my old amp, and remove the old amp itself
- There is a 12V out on the HAT, so I am able to power my cabinet lights and LED buttons off that (Bonus!) so I was able to ditch another adapter
Anyway, I can't get any sound out of it with the Motion Blue Unified image or any other pre-built images I have tried.
It does work fine with the current Retropie image on the website: retropie-4.4-rpi2_rpi3.img.gz
With that all I need to do is make the following changes in the /etc/config.txt file:
# Adding support for Hifiberry AMP2 # dtparam=audio=on dtparam=audio=off dtoverlay=hifiberry-dacplus
These are as per the manufacturer's instructions, and the instructions on the Retropie website.
I've also followed their instructions for the ALSA configuration in /etc/asound.conf (although not sure I need it):
pcm.!default { type hw card 0 } ctl.!default { type hw card 0 }
So with the Retropie stock image, it boots up with good sound out of the connected speakers. However with any other image (including this one: retropie_unified_baseimage.img) it boots with the splash screen sound coming over HDMI, then nothing. Dropping back to a Rasbian Stretch command line, everything seems normal in aplay:
pi@retropie:~ $ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: sndrpihifiberry [snd_rpi_hifiberry_dacplus], device 0: HiFiBerry DAC+ HiFi pcm512x-hifi-0 [] Subdevices: 0/1 Subdevice #0: subdevice #0 pi@retropie:~ $ aplay -L null Discard all samples (playback) or generate zero samples (capture) default sysdefault:CARD=sndrpihifiberry snd_rpi_hifiberry_dacplus, Default Audio Device dmix:CARD=sndrpihifiberry,DEV=0 snd_rpi_hifiberry_dacplus, Direct sample mixing device dsnoop:CARD=sndrpihifiberry,DEV=0 snd_rpi_hifiberry_dacplus, Direct sample snooping device hw:CARD=sndrpihifiberry,DEV=0 snd_rpi_hifiberry_dacplus, Direct hardware device without any conversions plughw:CARD=sndrpihifiberry,DEV=0 snd_rpi_hifiberry_dacplus, Hardware device with all software conversions
speaker-test appears to be doing it's thing, but no noise comes out when its sending white noise to the left and right speakers.
dmesg shows this, but I'm not sure if it's normal or not?
pi@retropie:~ $ dmesg | grep hifi [ 4.162912] snd-rpi-hifiberry-dacplus soc:sound: ASoC: CPU DAI (null) not registered - will retry [ 4.165936] snd-rpi-hifiberry-dacplus soc:sound: ASoC: CODEC DAI pcm512x-hif not registered - will retry [ 4.374799] snd-rpi-hifiberry-dacplus soc:sound: ASoC: CODEC DAI pcm512x-hif not registered - will retry [ 4.393846] snd-rpi-hifiberry-dacplus soc:sound: ASoC: CODEC DAI pcm512x-hif not registered - will retry [ 4.561078] snd-rpi-hifiberry-dacplus soc:sound: pcm512x-hifi <-> 3f203000.i2s mapping ok
Also, when going from Emulationstation to one of the text based configuration menus, the following error flashes up on the screen briefly:
lv10: VolumeControl ::init() failed to find mixer elements
Any ideas? Have people run into issues similar to this on the stock images? Maybe related to the GPIO power button? Does anyone have this working, or the same config and could test an image for me?
Theory #1: These images have slightly different versions of the driver, or ALSA or the mixer or something? I've tried an apt-get update and apt-get upgrade.
Theory #2: Something like the shutdown.py script on this image is holding GPIO pin 5 (which is also the I2C pin which is reserved by the Hifiberry) high or low, and causing issues. I have moved it from GPIO pin 3 to pin 13 in /home/pi/scripts/shutdown.py.
Theory #3: Kodi/Jukebox, or the background music additions or something else is keeping the audio hardware busy for some reason and I'm not getting an error message for some reason?
Thanks in advance.
-
We don't offer support for 3rd party images - https://retropie.org.uk/forum/topic/3/read-this-first.
-
@Zilch said in Hifiberry AMP2 / DAC+ Issues - No Sound:
It does work fine with the current Retropie image on the website: retropie-4.4-rpi2_rpi3.img.gz
This is a great example of why third party images are not supported. Most are illegal, poorly configured and cause nothing but problems for those using them. If it works with the official image from this site, you are sorted!
-
Instead of writing "mods delete if not allowed", how about reading the sticky topics you agreed to read when registering BEFORE posting.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.