[RPi4] No HDMI Audio Passthrough in LibreELEC 12.0.2

  • 🔹 System Details:

    • Device: Raspberry Pi 4
    • AV Receiver: Denon AVR (connected to HDMI0)
    • LibreELEC Version: 12.0.2
    • Kodi Version: 21 (Omega)
    • Audio Output: HDMI (ALSA)

    After a fresh install of LibreELEC 12.0.2 onto a new SD Card, audio passthrough no longer works.
    My old LibreELEC 11 had no problems serving audio passthrough.
    Now, Kodi only outputs PCM, even though the AVR supports Dolby Digital, DTS, TrueHD, etc.

    I've had a little troubleshooting with ChatGPT and this is how we've got so far...


    🔎 Key Findings

    1️⃣ HDMI audio was initially disabled in the kernel:

    Code
    dmesg | grep -i hdmi

    showed this boot command:

    Code
    snd_bcm2835.enable_hdmi=0

    HDMI audio was disabled by default.
    → Changed to snd_bcm2835.enable_hdmi=1 in cmdline.txt, but this had no effect after reboot.

    2️⃣ ALSA now recognizes HDMI audio, but passthrough is still unavailable in Kodi:

    Code
    cat /proc/asound/card0/pcm0p/sub0/hw_params

    now returns:

    Code
    access: MMAP_INTERLEAVED
    format: IEC958_SUBFRAME_LE
    subformat: STD
    channels: 2
    rate: 48000 (48000/1)
    period_size: 2400
    buffer_size: 9600

    So ALSA is working, and the HDMI output is active.
    → But Kodi does not offer passthrough in settings.

    3️⃣ Kodi still detects Pulseaudio, even though ALSA is active:

    Code
    cat ~/.kodi/temp/kodi.log | grep -i audio
    Code
    warning <general>: Pulseaudio module module-allow-passthrough not loaded - opening PT devices might fail
    info <general>:         m_displayNameExtra: Bluetooth Audio (PULSEAUDIO)

    Pulseaudio is running, but should not be used for HDMI.
    Disabling Pulseaudio (systemctl stop pulseaudio) had no effect on passthrough.


    🆘 Questions for the Forum

    Why is passthrough unavailable in Kodi, even though ALSA now recognizes HDMI?
    Is there a known issue in LibreELEC 12.0.2 that prevents passthrough from working?
    Does LibreELEC 12 use a different approach for HDMI audio handling (e.g., changes in vc4-hdmi)?
    Any additional logs or tests I should run to troubleshoot this?


    Any help or insights would be greatly appreciated! 🎧🔥

  • I'm going to guess that Kodi settings is not in advanced/expert mode so while you enabled PT audio at the top level, you cannot see (and thus have not enabled) PT for individual audio formats like DTS, AC3, etc. so they are being correctly (as configured) sent as PCM audio.

  • You guessed wrong. Actually, I can't activate PT at all. There is no menu item for it in expert mode either.

    Only within the audio settings in PVR-Client Waipu.tv I can set Enable Passthrough. But this has no effect because it's disabled in System Audio configuration.

  • Put Kodi in debug mode, clean boot, then run "pastekodi" and share the URL, as it will be more useful than the image you pasted that doesn't render for some reason (but I can see it when trying to edit the post).

  • Hi antonvier ,

    it may not be directly related to your problem, but your power supply seems to be insufficient. You should try to fix that as the first step.

    Code
    RPi throttled=0x50000
    Feb 27 17:26:08.897568 LibreELEC kernel: hwmon hwmon0: Undervoltage detected!
  • antonvier Kodi detects audio capabilities based on the EDID data on the HDMI connection. It's also odd that the kernel detects the audio hardware, but Kodi then fails to open the device(s) to check properties. The very limited list of resolutions shown here would normally suggest a problem in the display chain. That can result in failure to detect normal 1080p/4K modes etc. but doesn't explain the lack of audio hardware.

    Code
    dtoverlay=vc4-kms-v3d
    max_framebuffers=2
    hdmi_enable_4kp60=1

    Comment the above ^ out in config.txt. Disabling 4K60 (which 99% of users don't need, 4K30 is enough) also reduces the power draw which might help with an inadequate PSU issue. That's the only real red-flag that I can see; insufficient stable power (under-rated for current normally) will sometimes manifest all kinds of weird issues. RPi4 needs 5V/3A to be stable. Recycled phone chargers or using USB ports on a TV/monitor generally won't work. Check the PSU out. Also check cables/ports, and if you inflicted self-punishment with an Argon case, remove the board from the case before retesting.

    Any difference?

  • Thank you, I did everything you suggested, but the problem persists. I find it strange - I'm a layman - that even after disabling wireless, the default device "PULSE:Default|Bluetooth Audio (PULSEAUDIO)" is still the only option. If I enable analog sound, the option appears, but nothing connected to HDMI ever appears.

    I'm going to buy a new adapter today, superior to the current one, which if I'm not mistaken is 2.5 amps, to find out if this could be the problem.

  • 5V/2.5A should be usable (esp. with 4K60 disabled). Before you purchase a replacement PSU, find a spare SD card and boot the latest RaspiOS image. If this also shows an issue with HDMI audio it points to a hardare issue. If it works, the issue is software.

  • Power up the RPi without the SD card, then you should see a diagnostic screen.

    Look for the "display" line, you should see "display: DISP0: HDMI HPD=1 EDID=ok".

    Likely you have HPD=0 or no EDID which is not good - appending video=... to cmdline.txt will give you video output but no audio if the EDID is missing.

    Check the display cable, if you use some adapter try with a straight micro-HDMI to HDMI cable, if you use an argon one case try without it.

    so long,

    Hias

  • Solution Found!

    Apologies for the delay in providing an update.
    As the original poster of this thread, I can now consider my issue resolved.

    After my last post but before chewitt requested the pastekodi informations, I even upgraded to a nightly build, but I still had no success.
    So, I decided to download the official 2025.01 release of LibreELEC 12.0.2 for RPi4 again and copied it onto a separate SD card, to be able to reproduce the state of my original post. My initial plan was to gather the data that chewitt had requested.

    After booting from the new SD card, I left everything at its default settings (language set to English – in my previous attempt, I had changed it to German) and went straight to the audio settings after the initial setup.
    And there it was – the "Audio Passthrough" section was immediately visible in the standard view (which I previously did not have).

    So, I set PT to enabled and activated all formats supported by my AVR in expert mode.
    After that, I copied the entire "audiooutput" section from the guisettings.xml of this fresh installation to my problematic installation (which was running the nightly build).
    Now, even the nightly build supports Audio Passthrough!

    However, I noticed something strange:
    The Audio Passthrough toggle was enabled, but it was visually different (somewhat "inactive").
    I clicked on it again, and after that, it changed to its normal color and was fully "active".

    I’m not sure what the exact cause of the issue was in the end.
    Nevertheless, thank you all for your help, especially chewitt!

    Best regards,
    Frank