No HDMI audio on LibreELEC 10, 11 and 12

  • Hi everyone,

    I'm been through some hard times with my libreELEC installation and would like to share it with you - maybe anyone has an idea.

    I've been running an older LibreELEC install for years, and finally needed an upgrade before the Superbowl, because the PVR I wanted to install wasn't compatible with my Kodi version. Long story short, in the end I missed most of the Superbowl and spent my head banging against my Raspberry Pi 4, trying to get Audio via HDMI to work, but couldn't - the speakers just remained silent.

    24 frustrating hours later, I went back to Libreelec 9 which is the last version that works for me. When I upgrade to 10, I get the message that an incompatible version of config.txt was found and it will be replaced with the default - and that's where I know it's not gonna end well.

    The basic symptoms are that HDMI audio just won't be recognized. With libreelec 9 and Kodi 18 I have plenty of audio options, then I need to fix config.txt and I'm good to go. With 10+19 and 11+20 there's no passthrough available, and no audio choices except for Bluetooth via PULSEAUDIO (but I don't use Bluetooth). In the current version, I could at least choose HifiBerry as output option, but there's no HDMI to choose from either.

    Boot log shows this:
    CAESinkALSA - Unable to open device "default" for playback
    CAESinkALSA - Unable to open device "sysdefault" for playback
    CAESinkALSA - Unable to open device "sysdefault:CARD=vc4hdmi0" for playback
    CAESinkALSA - Unable to open device "hdmi:CARD=vc4hdmi0,DEV=0" for playback
    CAESinkALSA - Unable to open device "sysdefault:CARD=vc4hdmi1" for playback
    CAESinkALSA - Unable to open device "hdmi:CARD=vc4hdmi1,DEV=0" for playback

    Speaker Test:
    LibreELEC:~ # speaker-test -D hdmi:CARD=vc4hdmi0,DEV=0
    speaker-test 1.2.11
    Playback device is hdmi:CARD=vc4hdmi0,DEV=0
    Stream parameters are 48000Hz, S16_LE, 1 channels
    Using 16 octaves of pink noise
    Playback open error: -524,Unknown error 524

    LibreELEC:~ # aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: vc4hdmi0 [vc4-hdmi-0], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 1: vc4hdmi1 [vc4-hdmi-1], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
    Subdevices: 1/1
    Subdevice #0: subdevice #0

    LibreELEC:~ # 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

    To get audio to work, I think I've really done the sensible and the irrational, I've scraped the Interwebs for solutions, scraped the bottom of the barrel once again, just nothing worked. This includes:

    - Tried different ports
    - Got a different HDMI cable
    - Libreelec 10, 11 and 12
    - Tried countess configuration options.
    - Tried resetting to default
    ...and a ton of other stuff I can't recall right now due to sleep deprivation.

    For the moment, Libreelec 9 works fine with me, but for many good reasons, it would be great to run the most recent version. Any ideas what might be going on, and what I could try? Thanks!

  • There are no known HDMI audio problems in recent images (and we have a large RPi4/RPi5 userbase) but HDMI audio depends on the EDID data on the HDMI connection. No EDID or bad EDID or connecting to a monitor with no speakers or using HDMI adapters or bad HDMI cables or bad config.txt/cmdline.txt are the cause of most audio problems.

    • Ensure the board is running updated RPi firmware (done via LE settings)
    • Ensure the HDMI cable is a proper micro-HDMI to HDMI one (adapters frequently cause issues)
    • Ensure the cable is connected to HDMI-A-1 (socket nearest the power connector)
    • Connect the RPi directly to the TV (no AVR in the chain) then remove the SD card and power on. The board will boot to a status screen and you should see 'EDID = okay' against the active HDMI connection
    • Create a new/clean SD card using LE12.2 or a current LE13 nightly to ensure no old/existing config causes issues

    If still seeing a problem, put Kodi into debug mode, reboot to get a clean and complete debug log, then run "pastekodi" and share the log URL so we can see the output.

  • Thanks for the quick reply,

    I had done all of that already (like I said, I tried pretty much everything):
    - Updated the firmware
    - Bought a new cable
    - Switched connections
    - Installed LE12.2 from scratch

    Connecting directly to the "TV" isn't possible, as the "TV" is a beamer without speakers.

    And here's the thing: As a former sysadmin, I do a lot of troubleshooting, and when I'm entirely clueless (as is in this situation), I apply what I call "divide and conquer", i.e. I try to create a scenario where what I want to achieve works and one where it doesn't. Then I drill down to the differences, and ultimately find the culprit.

    Here, I have that information already: HDMI audio works with LE9 and fails with the changes done in LE10, which, among other things, render the previous configuration file invalid. So in my world, this would clearly point to a software problem. The fact that so many RPi4 users don't have the problem suggests I may have an unusual setup, but if the only change between "works" and "doesn't work" is a software change, then it still points to a software problem.

    I understand that things may be more complicated: It may be a combination of serveral things, including the hardware. Maybe it's not a bug, but a "feature" - possibly, version 10 onwards requires different hardware, but then the key to solving the problem is the software anyway, by figuring out what those requirements are. Unfortunately, as a user, my insight is limited.

    I am mentioning this because you asked me to test without LE10+ SD card. But I did that already by running it with an LE9 SD card, where EDID works fine (if HDMI audio works fine and it depends on EDID, that's the only logical conclusion - or am I missing something?).

    Speaking of unusal setup: I've mentioned it, but want to make sure it doesn't get lost in the mix. My RPi4 has Hifiberry Amp2 installed, which most users probably don't have. And I've mentioned that LE12 can see it (as in: I can choose it in the audio options), while LE10 and LE11 don't. Even though I don't need that audio option, maybe it would give us some clues. Not sure if that one depends on EDID as well, but since the issue is about LE not seeing audio options (or making them available), it might help to know WHY some newer versions of LE can't deal with this either, while some can.

    I already had the log file from a fresh LE12.2 install yesterday, so I'm simply attaching it - hope that's alright.

  • LE10+ uses a completly different (ground up rewrite) display pipeline to LE9.2, so yes there is a HUGE software difference. The main way this manifests for users is that almost all config.txt tweaks for forcing video and audio output used in the older display pipeline are no longer supported using config.txt, and are now achieved using standard Linux DRM methods/properties.

    It would be helpful if you described how everything is physically cabled/connected, and please share the "pastekodi" URL taken from the LE9.2 and a clean-install LE12.2 (or LE13 nightly) image so we can see kodi/kernel and various bits of config from the systems; the kodi.log on its own isn't giving us the full picture. If the RPi4 is connected to the projector using the HDMI socket nearest the power connector, please also run edid-decode /sys/devices/platform/axi/axi:gpu/drm/card1/card1-HDMI-A-1/edid | paste and share that URL too.

  • Thanks for the explanations. Getting things to work with LE9.2 is a two-step process. #1 I need to select HDMI in the audio options. #2 I need to tweak config.txt. In 10-12, HDMI never shows up as an audio option in the first place, so config.txt isn't a problem (yet).

    Physical connections (in all details): The RPi4 is directly attached to the Hifiberry Amp2. Power is provided by a 19V/3.42A AC adapter via Hifiberry. Internet via Ethernet cable. LE on a 4GB SD card (but also tested an 8GB USB stick with the same outcome). Signal goes out via a dedicated micro HDMI/HDMI cable to the AV receiver (tried both HDMI sockets on the RPi4 with the same result). Loudspeakers are directly attached to the receiver via cable. Video signal travels from the receiver to the projector via a HDMI/DVI adapter (it's an older projector with DVI only).

    I will follow up with the pastekodi URLs later (probably tonight).