First we need to know where the HDMI output is on our hardware. Let’s use the aplay command:
This will return something like the following lines:
card 0 ... device 0: ... Analog ... ... card 0 ... device 1: ... Digital ... ... card 0 ... device 3: ... HDMI ... ...
In my hardware configuration I found that my integrated onboard audio card “0” uses the “3”rd device as HDMI out.
In my “retroarch.cfg” file I wrote the following (notice the mysterious “audio_device” parameter):
audio_enable=true audio_out_rate=44100 audio_driver=alsa audio_device=hw:0,3 audio_sync=true
I noticed that the out rate parameter at 44100 is mandatory. With another values (i.e. 22100) the audio was not working.
The only issue is that when the emulator runs at < 100% the audio is glitchy. I can try disabling rewind: it seems emulation runs faster this way.
Some user reported that this problem doesn’t exist using SDL (not yet tried).