Sorry to revive an old post but this may help someone else… As my searches kept taking me here.
This may not be the best way to do it - so if someone has better direction on where to make the change I’m all ears.
This is partially covered in the Troubleshooting of… Batocera Wiki…
https://wiki.batocera.org/troubleshooting
However they don’t change the default in there version of the guide which is needed to make the multimedia keys work… At least in my case…
ssh in and edit the file
As per there Wiki
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
—The part missing from the Wiki—
Edit in my case the last line… It looks like this.
ctl.!default { type hw card 1 }
Change the 0 to a 1 in my case. Will vary you can discover what to put in using Alt+F4 from the GUI also…
reboot, it worked.