Lakka Nightly 20220711 aarch64 on RPi4 no HDMI Audio

First of all hello to everyone I’m new to this forum!

I used retroarch/retropie before but read that the easiest way to get Retroarch running on a RPi4 is using Lakka… so I flashed the following build to my M.2 SSD and everything runs smooth except audio.

used image -> [Lakka-RPi4.aarch64-nightly-v4.x-20220711-d437ad2.img.gz]

The RPi4 is connected to my AV-Receiver and the AV-Receiver is connected to my TV.

I read a lot about setting up audio via /flash/config.txt but with no luck so far…

What I tried so far:

get my audio devices with aplay -L

null
Discard all samples (playback) or generate zero samples (capture)
default
Default Audio Device
sysdefault
Default Audio Device
default:CARD=vc4hdmi0
vc4-hdmi-0, MAI PCM i2s-hifi-0
Default Audio Device
sysdefault:CARD=vc4hdmi0
vc4-hdmi-0, MAI PCM i2s-hifi-0
Default Audio Device
hdmi:CARD=vc4hdmi0,DEV=0
vc4-hdmi-0, MAI PCM i2s-hifi-0
HDMI Audio Output
default:CARD=vc4hdmi1
vc4-hdmi-1, MAI PCM i2s-hifi-0
Default Audio Device
sysdefault:CARD=vc4hdmi1
vc4-hdmi-1, MAI PCM i2s-hifi-0
Default Audio Device
hdmi:CARD=vc4hdmi1,DEV=0
vc4-hdmi-1, MAI PCM i2s-hifi-0
HDMI Audio Output
default:CARD=Headphones
bcm2835 Headphones, bcm2835 Headphones
Default Audio Device
sysdefault:CARD=Headphones
bcm2835 Headphones, bcm2835 Headphones
Default Audio Device

So I picked this entry

hdmi:CARD=vc4hdmi0,DEV=0

because I read HDMI audio is just available on this port (next to the USB-C power jack)

I stopped the retroarch service via

systemctl stop retroarch

then remounted the flash volume read/write and added this line at the end of config.txt

audio_device = "hdmi:CARD=vc4hdmi0,DEV=0"

and rebooted the system…

nothing changed so I tried to set the audio device via UI Settings/Audio/Output/Device I typed in hdmi:CARD=vc4hdmi0,DEV=0 without any quotes and rebooted the device. still no change (tested with games and with enabling menu sounds).

in UI alsathread is selected as audiodriver, I also tried the other available options (alsa, tinyalsa, oss, null) and rebooted after every changed but I still get no audio.

Is there a known bug with RPi4 audio or am I missing something? Any help appreciated - I don’t know where to start debugging this…

cheers & thanks in advance,

Dan

Hi,

First of all, you should use by default the hdmi0 which is the left one so you are correct to use the one next to the USB-C power jack.

You can change directly from the GUI the audio device using left/right keys, you will have to stop and start the Libretro core or restart RetroArch so that the change can take effect.

If it is not working you can edit manually the configuration file. You don’t need to reboot you can just restart RetroArch with systemctl start retroarch.

You should keep alsathread audio driver to get better performance.

The audio device you selected seems ok. Did you try to enable in config.txt hdmi_drive=2 ?

Thank you.

hi gouchi,

I actually downgraded to Lakka 4.2 stable build for RPi4

same issues remain… good to know that no full reboot is neccesary to apply changes to RA… I tried your advice to change the device with left/right buttons but there are no devices to choose from beside the one I entered manually hdmi:CARD=vc4hdmi0,DEV=0 maybe that is the main problem that RA is not able to list the devices shown when using aplay -L but I never changed any permissions on the file system.

I already manually edited the config.txt and added this line audio_device = "hdmi:CARD=vc4hdmi0,DEV=0" to the end as I already wrote :wink:

now I added the hdmi_drive=2 to the config.txt but still not working - I’m trying to avoid reflashing the whole drive, because all my roms are uploaded already and this took ages to finish :wink:

this all seems very strange… maybe a hdmi vesion problem? my receiver is capable of hdmi2 as far as I remember but the port from the RPi4 should be compatible to older hdmi version imo???

another step is to see if changing the cable brings any change - but there is no other lying around at the moment :confused:

maybe you have another idea? thanks!

Dan

Ok

here’s an update… I added this to my cmdline.txt in /flash folder

snd_bcm2835.enable_headphones=1 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_compat_alsa=0

now I can choose from UI which device to use with the arrow keys like described here

now I got sound!

these are the (hdmi0) entries to choose from:

default
sysdefault
default:CARD=vc4hdmi0
sysdefault:CARD=vc4hdmi0
hdmi:CARD=vc4hdmi0,DEV=0

I’m not sure if the last entry is the one I added manually, before I was able to choose via UI.

I choosed

sysdefault:CARD=vc4hdmi0

thanks

1 Like