Audio channels avr hdmi-passthrough

  • Hi,

    I have following: RPi4* -> Yamaha V6A -> LG OLED65E.

    Start up RPi4 and TV, gets 2.0 sound, which is correct. Yamaha V6A is off and HDMI pass-through is active. Now when I turn on the V6A I still get 2.0. I would like 5.1!

    cat /proc/asound/card0/pcm0p/sub0/hw_params indicates 2.0, systemctl restart kodi still only 2.0, dmesg nothing indicates V6A has started…

    After a reboot it becomes 5.1, seems like everything detected during startup is what applies.

    Can I get a transition between 2.0 and 5.1 when the V6A is turned on and off?

    * LibreELEC (community): devel-20231112094654-0e333d7 11.0.4, Kodi (20.2 (20.2.0) Git:20.2-Nexus)

  • After some digging...

    Everything at OS level works as expected. Adding following restarts Kodi when Yamaha V6A is turned on and off.

    Code
    /storage/.config/udev.rules.d/75-hdmi-hotplug.rules:
    SUBSYSTEM=="drm", ACTION=="change", DEVPATH=="/devices/platform/gpu/drm/card[0-9]", RUN+="/storage/.config/hotplug-monitor"
    
    /storage/.config/hotplug-monitor:
    #!/usr/bin/bash
    STATUS=$(cat /sys/devices/platform/gpu/drm/card0/card0-HDMI-A-1/status)
    [[ "${STATUS}" == "connected" ]] && systemctl --no-block restart kodi

    Not the nicest solution but it works!

    Just for clearance, this issue has nothing to do with Kodi "Audio settings/Allow passthrough"

  • Kodi audio settings depend on the EDID data read from HDMI only during Kodi startup; hence the restart after the AVR is turned on results on 5.1 being detected. Unless someone implements HDMI hotplug support in Kodi so audio properties are updated when the HDMI sink changes, the workaround that you've done is the right solution.