Kodi - Debian - No passthrough
#1
Hello,

I've "freshly" installed Kodi 20.1 on a Debian distribution with a desktop.

It seems that I can't set an audio passthrough and every audio tracks are played in PCM
In System -> Audio -> Audio Passthough there is nothing to set.

My settings :
Player -> Videos -> Playback -> Sync playback to display -> No
System -> Audio -> Audio decoder -> Number of channel -> 5.1
System -> Audio -> Audio decoder -> Output configuration -> Best match (or Fixed)


I read that this issue can be caused by Pulse audio. So, I tried to configure Pulse Audio via pavucontrol, I've enable for example DTS for my HDMI output, but the videos stutter after that.
Should I remove Pulse Audio to use ALSA instead ? I also tried to remove pavucontrol

I tried to launch Kodi with this command line : KODI_AE_SINK=ALSA kodi
But this time, even if I see something in System -> Audio -> Audio Passthough, when I playback a video I have a lot of "noise". 

I also tried to set "autospawn = no" in /home/myusername/.config/pulse/client.conf

Can someone help me on this please ?
Reply
#2
see if this thread is helpful - https://forum.kodi.tv/showthread.php?tid=356360
Reply
#3
Ok, really weird.. I made it work yesterday, and today, it's not working : I have noises or crackles  Huh

I had this messages too yesterday, but when I launch the "custom kodi script" to launch kodi with Alsa, there is several error messages :
"Failed to stop pulseaudio.socket: Unit pulseaudio.socket not loaded"
"Failed to stop pulseaudio.service: Unit pulseaudio.service not loaded"
"Cannot connect to server socket err = No such file or directory"
"Cannot connect to server request channel"
"jack server is not running or cannot be started"

From my understanding, even if we fix this audio issue in Kodi, I won't be able to use audio correctly "outside Kodi" ? 
Because I have Spotify running, and sometimes I launch music from my phone. It will interfere with Kodi ? 

I didn't succeed to install Spotify in Kodi. I was previously running Kodi with LibreElec and the integration was perfect with "Librespot" but it seems that it does not work in Kodi on Debian

I've seen that Kodi 21 will fix some audio issues but I didn't understand what exactly.

What I would like to do is :
- Play my movie in HD audio
- Have a Spotify Connect receiver like Librespot to send music from my phone (or my little program using NFC, that's partly why I quit LibreElec)
Reply
#4
So, what I did was just rename the pulseaudio binaries!!  Not really recommended but it stops any scripts (systemd, init etc) from starting pulse in the first place.   Means I can have Kodi using my nVidia HDMI port for output to my AVR and onwards to my TV with HD audio.  I can also (at the same time) use a browser to play youtube videos on the headphone output on the motherboard, or use a second instance of Kodi running in portable mode to also output to the headphone socket.   If I wanted to output to the HDMI port I could use dmix to output two (or more) inputs to it.

These links are quite old because most people just accept pulse but they are well worth reading as alsa is extremely flexible. 

https://wiki.debian.org/ALSA

https://www.alsa-project.org/wiki/Asoundrc

https://wiki.archlinux.org/title/Advance...chitecture
Learning Linux the hard way !!
Reply
#5
So you mean there is no "clean" way to have HD sound ?
I have to pause or kill pulse audio ?

But it seems that pulse audio is not running on my PC :
"Failed to stop pulseaudio.socket: Unit pulseaudio.socket not loaded"
"Failed to stop pulseaudio.service: Unit pulseaudio.service not loaded"
Reply
#6
It is easy to mess with pulseaudio and it can be quite trick to get it back up. I feel you might need to go through a steep learning curve.

Pulseaudio is much better than it's reputation, however one reason for it's bad reputation is it's complexity and most people really don't want to deal with this.
Alsa is certainly more easy to configure, however has it's shortcomings on desktops.

In general pulseaudio does support passthrough, how well this is working with Kodi (once you configured it correctly), I don't know, I am not using it.

To check if pulseaudio is running, you can run
Code:
pacmd info

# you might get something like this
No PulseAudio daemon running, or not running as session daemon.

# if pulseaudio is running, you will get the list of loaded modules, sinks and sources.

Another way is to check if the service is running.
Code:
ps -ef | grep pulse
If pulse is running, you will see the process similar like this.
Code:
user 1166 1099 0 Oct02 ? 00:55:02 /usr/bin/pulseaudio --daemonize=no --log-target=journal
user 542285 542149 0 10:04 pts/1 00:00:00 grep --color=auto pulse

To stop pulseaudio temporary you can run
Code:

systemctl --user stop pulseaudio.service
systemctl --user stop pulseaudio.socket

To avoid that it is started on next login can run
Code:

systemctl --user disable pulseaudio.service
systemctl --user disable pulseaudio.socket

On some systems you might need to mask it in order to prevent it's start. No need to rename binaries.
Code:

systemctl --user mask pulseaudio.service
systemctl --user mask pulseaudio.socket

you can undo all this with unmask, enable or start.
Reply
#7
Sorrry for the late reply.

Here are the result of the commands =>
 
Code:
pacmd info
> pacmd : command not found


Code:
ps -ef | grep pulse
> [...] /usr/bin/pipewire-pulse
​​​​​​​


​​​​​​​
Code:
systemctl --user stop pulseaudio.service
> Failed to stop pulseaudio.service : Unit pulseaudio.service not loaded

systemctl --user stop pulseaudio.socket
> Failed to stop pulseaudio.socket : Unit pulseaudio.socket not loaded
​​​​​​​

It seems that Pulse is not running but Pipewire instead ?
Reply
#8
Pipewire in Kodi nightlies has full support for all HD formats IF host side is properly configured.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#9
Recently I also had to migrate from Pulse to Pipewire on my Debian testing. I dont use it with Kodi HTPC though. I can post instructions how to migrate.
Maintainer of Kodi from Debian | Got an issue with Kodi from Debian? Report it here: Kodi from Debian - Support Thread
Reply
#10
(2023-10-14, 17:23)basilgello Wrote: Recently I also had to migrate from Pulse to Pipewire on my Debian testing. I dont use it with Kodi HTPC though. I can post instructions how to migrate.

 
I would like to ! I as going to search how to install nightlies.

What do you mean by "Kodi HTPC" ? A PC entirely dedicated to Kodi ?
 

Thank to both of you !
Reply
#11
Quote:I would like to ! I as going to search how to install nightlies.

In Debian, I suggest you to update to testing as this opens the following possibilities:

1. You have latest stable Kodi (20.2 for now, for example)
2. You can add experimental repository and get next stable (21.0 - I will upload starting beta1).

As for migration:

1. Go root
2. apt install wireplumber pipewire-media-session libspa-0.2-bluetooth
3. apt --purge autoremove pulseaudio*
4. Reboot

Sound should be after reboot and Kodi will report PIPEWIRE in audio settings.
Quote:What do you mean by "Kodi HTPC" ? A PC entirely dedicated to Kodi ?
Yep!
Maintainer of Kodi from Debian | Got an issue with Kodi from Debian? Report it here: Kodi from Debian - Support Thread
Reply
#12
Thanks !

Do you advise first to give it a try with Pulse audio removed ? Or to install one of the next releases ?

By the way, do you have a procedure to install latest or next stable release ?
And if everything is broken, how can I go back to Kodi 20.1 ?
Reply
#13
Hello,

I'm digging this topic because I'm still having this issue after a fresh update of Kodi Omega 21.0 via Flatpak (by the way the update was smooth, well done everyone !!!).

Let's sum up.

My environment :
Debian 12 / Gnome Desktop / Kodi 21.0 via Flatpak

In Kodi (using Aeon Nox) / System / System / Audio
=> The passthrough menu has disappeared !!
=> Audio output device is set to something like "Internal audio Surround 5.1, HDMI / DisplayPort (PULSEAUDIO)" (or something like that, i'm translating from french)

I thought that with Kodi 21.0 audio would be better, that's why I waited the new version.

I thing I'm using Pipewire, because, in a terminal :
> alsamixer
=> On the top left I have "Pipewire"

Also, I don't know if it is useful :
> flatpak run tv.kodi.Kodi
'this->recurse > 0' failed at ../src/pipewire/thread-loop.c:62 do_unlock()

What do you think ?
Thanks for your help !
Reply
#14
I don't understand why audio output is only in PCM
Is there a good soul to help me please ?  Laugh
Reply
#15
(2024-04-08, 08:51)Capslock Wrote: My environment :
Debian 12 / Gnome Desktop / Kodi 21.0 via Flatpak

In Kodi (using Aeon Nox) / System / System / Audio
=> The passthrough menu has disappeared !!
=> Audio output device is set to something like "Internal audio Surround 5.1, HDMI / DisplayPort (PULSEAUDIO)" (or something like that, i'm translating from french)

While I am not using Debian, on Fedora I need to update the Kodi flatpak permissions to disable the PulseAudio Sound Server.  This allows me to choose a audio device that supports pass through.   In my case, that's my receiver on HDMI port 0.   I change flatpak permissions with FlatSeal gui application.
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi - Debian - No passthrough0