Audio problems on RPI3B
-
Pi Model or other hardware: Raspberry Pi 3 Model B
Power Supply used: Charger 5V 2A 2.5A 3A 3.5A for Raspberry Pi 3 2 B+ Power Supply Adapter
RetroPie Version Used (eg 3.6, 3.8.1, 4.1 - do not write latest): 4.6
Built From: Pre made SD Image on RetroPie website
USB Devices connected: Wireless keyboard, USB game controller
Controller used: Wired Controller for Nintendo Switch - Chrome Metroid
Error messages received: lvl10: VolumeControl: :into() - Failed to attach to default card
Log found in /dev/shm/runcommand.log (if relevant): N/A
Guide used: https://retropie.org.uk/docs/Sound-Issues/
File: (File with issue - with FULL path)
Emulator: NES and SNES
Attachment of config files: https://pastebin.com/eqipnXbk
How to replicate the problem: Any time I load a game ROM the audio does not play correctly.I originally set up RetroPi with an old monitor and a 3.5mm audio speaker. Worked pretty well. However, I decided I wanted to simplify things and just use the HDMI port for audio and video. I picked up a Roku TV and made the hardware changes, unplugging the speaker and just using the HDMI cable to the TV. The Pi was unplugged when I did this.
I am getting almost no sound when playing games. There is some, but it's very sporadic. Almost as if music doesn't play but some sound effects do. I have cranked the audio on the TV up to max. I have tried multiple games and multiple emulators.
I have tried multiple HDMI cables (different brands) and I have tried HDMI1 and HDMI2 connections on the TV. Same result every time.
When I load a game I get this error:
ALSA lib control.c:1375:(snd_ctl_open_noupdate) Invalid CTL hdmi
1v10: VolumeControl::init() - Failed to attach to default card!I searched around and made some changes but nothing has changed.
/boot/config.txt
# uncomment to force a HDMI mode rather than DVI. This can make audio work in # DMT (computer monitor) modes hdmi_drive=2 # Setting hdmi_force_hotplug to 1 pretends that the HDMI hotplug signal is asse$ hdmi_force_hotplug=1 # Pretends all audio formats are supported by display, allowing passthrough of $ # May not be needed for all HDMI devices hdmi_force_edid_audio=1
In EmulationStation I have:
Sound Settings > Audio Card > HDMI
Sound Settings > Audio Device > PCM
Sound Settings > OMX Player Audio Device > HDMII am able to run the following commands from the command line and the sound files play just fine.
aplay /usr/share/sounds/alsa/Front_Center.wav speaker-test -c 2 -s 1 -t wav -W /usr/share/sounds/alsa -w Front_Center.wav
But I can't play any games and correctly hear the audio.
I got into alsamixer and increased the volume there but that doesn't seem to have done anything.
-
-
I added "HDMI" to AudioDevice in /configs/all/emulationstation/es_settings.cfg and rebooted but I am still having the same issue.
-
The correct settings for EmulationStation would be
- Sound Settings > Audio Card > Default
- Sound Settings > Audio Device > HDMI (via configuration file)
- Sound Settings > OMX Player Audio Device > HDMI
But EmulationStation settings do not influence how emulator's picked the sound card, so that's another story.
Use the Audio menu in RetroPie and set the audio to HDMI, then re-try the audio by in emulators/games.
-
I made the changes in EmulationStation to match above. The "Invalid CTL hdmi" error went away but I am still getting the "Failed to attach to default card!" error message and the audio is still not working correctly.
-
@yaksha42 Did you entered
hdmi
in the configuration file ? Try to enter it as uppercase - HDMI. -
I entered it all in caps when I did the initial change.
<string name="AudioDevice" value="HDMI" />
-
I just tried.
sudo apt update sudo apt full-upgrade
And now I have no sound at all. I checked all the configs and everything still seems to be set correctly. It's a fairly new install of RetroPie so maybe it's a good idea to just re-image the SD card and start again?
-
Can you run
aplay -l
and post the output ?
-
**** List of PLAYBACK Hardware Devices ****
card 0: b1 [bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1]
Subdevices: 4/4
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
card 1: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
Subdevices: 4/4
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3 -
Ok, so this shows you're using the latest Raspbian updates, which changed the audio setup. If you've chosen
HDMI
in the Audio menu, then a configuration file should have been created in$HOME/.asoundrc
, where HDMI should be set as default audio card. The contents of the file should look like this:pcm.!default { type asym playback.pcm { type plug slave.pcm "output" } capture.pcm { type plug slave.pcm "input" } } pcm.output { type hw card 0 } ctl.!default { type hw card 0 }
If you don't have this file, then update RetroPie-Setup to the latest version and re-configure the Audio menu from in the RetroPie system (not in EmulationStation). Try again and see if your games have sound.
-
I didn't have the file so I updated the RetroPie-Setup. I configued the Audio menu in RetroPie to be "HDMI 1". I am still getting no sound in any games.
-
Does
speaker-test
produce any sound ? Make sure the volume is up (usealsamixer
to check/modify it). If that doesn't work, then I don't think is a software/configuration issue. -
I couldn't get speaker-test to work, or aplay. alsamixer had volume.
I ended up just re-imaging the SD card with a fresh copy of RetroPie. This fixed my issue. All ROMs I've played have had appropriate audio.
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.