Batocera

Batocera Pi2 - sound from jack.

changging this in the GUI doesn't seem to work.

SSH into the pi and enter the command below! all working !

amixer cset numid=3 1

Fix Video Snap Sound


If you have sound on EmulationStation, and in the emulators, but you can't hear the sound of the video snapshots, here are several steps that may help you:

  1. First, make sure you have enabled video snaps sounds in the menu SOUNDS SETTINGSENABLE VIDEO AUDIO

  2. Then, you can try to connect to Batocera through SSH and enter the following command:

wget -O /userdata/system/.asoundrc https://www.batocera.org/users/lbrpdx/asoundrc

This command will create an alsa config file as /userdata/system/.asoundrc. It should fix your video snap sounds for most SBC like Odroid Go Advance, but maybe not on a PC.

On a PC, depending on your hardware configuration, your GPU and audio chipset, it might be trickier to get it working.

First, through SSH, get the list of audio outputs with the command aplay -l. In my setup, I get:

# aplay -l

**** List of PLAYBACK Hardware Devices ****

card 0: PCH [HDA Intel PCH], device 0: ALC255 Analog [ALC255 Analog]

Subdevices: 1/1

Subdevice #0: subdevice #0

card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]

Subdevices: 0/1

Subdevice #0: subdevice #0

card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]

Subdevices: 1/1

Subdevice #0: subdevice #0

card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]

Subdevices: 1/1

Subdevice #0: subdevice #0

card 0: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3]

Subdevices: 1/1

Subdevice #0: subdevice #0

card 0: PCH [HDA Intel PCH], device 10: HDMI 4 [HDMI 4]

Subdevices: 1/1

Subdevice #0: subdevice #0

If I want to use the audio output from HDMI0, I can see that it is card 0 and device 3. So, to make audio work on my setup, I need to edit the /userdata/system/.asoundrc file and replace pcm “hw:0,0” with pcm “hw:0,3”, and then save and on reboot, it worked. This method might not work in 100% cases, but it's worth a try.

Worst case, if it doesn't work and you want to go back to the original state, just remove the file /userdata/system/.asoundrc (or \system\.asoundrc from the network share).


REF; https://wiki.batocera.org/troubleshooting