Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
v21 Ubuntu 24.04 Passthrough - Passthrough device available but clicks during play
#1
Hello,

I am on ubuntu Ubuntu 24.04.1 with wireplumber 0.4.17 and kodi flatpak version 21.1

In ~/.config/wireplumber/main.lua.d, I have the following
Quote:rule = {
  matches = {
    {
      { "node.name", "matches", "alsa_output.*" },
    },
  },
  apply_properties = {
    ["iec958.codecs"] = "[PCM DTS AC3 MPEG MPEG2-AAC EAC3 TRUEHD DTSHD]",
  },
}

table.insert(alsa_monitor.rules, rule)


When I run kodi with
Quote:flatpak run tv.kodi.Kodi --audio-backend=alsa

I can see the passthrough devices and select the correct one. (While navigating in the interface, I can hear the 'interface sound', this will have some importance afterwards)
However when I play a movie, the sound is not sent to my device in the correct encoding (I see that `Multi channel PCM` is still used) and my amplifier plays some clicks.
Kodi.log
 


Now if, before running kodi, I launch on another terminal wireplumber (stdout is filled with wireplumber logs) then I launch kodi with the same options. I navigate (without any interface sound clicks), launch the same move and here the passthrough is done and sound is OK
However, this seems not stable (for instance, kodi closing shall be forced with a kill -9)

kodi.log

Any hints on why the first configuration is not working as expected and why running wireplumber in a terminal seems to patch my passthrough ?
Setup :
- NAS running Kodi on Ubuntu with Celeron G1840 (Haswell)
- AVR Denon AVR 3700 H
- TV Samsung UE85AU8005K
Reply
#2
Your problem is that you try to use ALSA while PulseAudio or PipeWire is running. For the GUI sounds it goes through the ALSA compatibility layer of the sound server, so that still works:
Code:
2024-10-06 22:34:36.780 T:16 warning <general>: ValidateOutputDevices: audio output device setting has been updated from 'ALSA:default|Default ALSA Output (currently PulseAudio Sound Server)' to 'ALSA:default|Default ALSA Output (currently PulseAudio Sound Server) ()'
Passthrough on the other hand tries to talk to the ALSA device directly:
Code:

2024-10-06 22:34:36.782 T:16 warning <general>: ValidateOutputDevices: passthrough output device setting has been updated from 'ALSA:hdmi:CARD=PCH,DEV=0|HDA Intel PCH' to 'ALSA:hdmi:CARD=PCH,DEV=0|HDA Intel PCH (PCH)'
The sound server and Kodi will then fight over the device resulting in all kind of weird behaviour like no sound or distortions.
Reply
#3
Just fyi, if you run

systemctl --user stop pipewire.socket

that will disable pipewire.  If you then start Kodi from the command line using

flatpak run tv.kodi.Kodi --audio-backend=alsa &

That will cause Kodi to use only ALSA and not pipewire.  You'll probably need to re-select your audio device in Kodi's settings but you can get good passthrough audio if you do that.  Remember that once you stop pipewire it won't work for any other program on your computer unless you restart it or reboot.

You can create a bash script that runs both of those commands and start Kodi that way (more info in Step 4 here).
Reply
#4
Thanks @oldtvwatcher & @Neo1973

Stopping pipewire solved the issue Love
Setup :
- NAS running Kodi on Ubuntu with Celeron G1840 (Haswell)
- AVR Denon AVR 3700 H
- TV Samsung UE85AU8005K
Reply

Logout Mark Read Team Forum Stats Members Help
Ubuntu 24.04 Passthrough - Passthrough device available but clicks during play0