TrueHD and DTS-HD MA passthrough under Linux
#1
This is just a quick note for those running Kodi on Linux who need full audio passthrough functionality via HDMI. Kodi 17.6 passthrough works beautifully on Linux, you simply have to launch it with a script that disables PulseAudio on entry and reenables it on exit. I run Manjaro (a bit easier to use derivative of Arch), and used to run Ubuntu, so here are the scripts I use for launching Kodi with full passthrough capability. There are three scripts - pulseaudio_start, pulseaudio_stop, and kodi_launch. The start and stop scripts are different depending upon the Linux distro you're using, while the kodi_launch script is the same for all. Simply create the appropriate scripts and place them in /usr/local/bin, make them executable, and then change your Kodi launcher to execute "kodi_launch" instead of "kodi."

~~~~~~~~~~~~
Arch/Manjaro
~~~~~~~~~~~~

pulseaudio_stop
--------------------
#! /bin/bash
systemctl --user stop pulseaudio.socket
systemctl --user stop pulseaudio.service

pulseaudio_start
---------------------
#! /bin/bash
systemctl --user start pulseaudio.socket
systemctl --user start pulseaudio.service


~~~~~~
Ubuntu
~~~~~~

pulseaudio_stop
--------------------
#! /bin/bash
echo autospawn = no > $HOME/.config/pulse/client.conf
pulseaudio --kill > /dev/null 2>&1

pulseaudio_start
---------------------
#! /bin/bash
rm $HOME/.config/pulse/client.conf > /dev/null 2>&1
pulseaudio --start > /dev/null 2>&1


~~~~~~~~~~~~~~
All Distributions
~~~~~~~~~~~~~~

kodi_launch
---------------
#! /bin/bash
pulseaudio_stop
kodi
pulseaudio_start


I hope this helps some of those who love Linux but absolutely must have that passthrough (like me)! Smile
Reply
#2
What system are you running on?
Reply
#3
I created an account on this forum just to leave this comment saying how helpful OP's scripts are - I moved my HTPC from Windows to Ubuntu for stability, was disappointed to find out about the DTS:HD/TrueHD issue.  OP's solution is the cleanest I've found so far.
Reply
#4
I know this is an older thread, but I've used OP's scripts on my (k)ubuntu 18.04 system for a while now. I agree with the other response that this is the cleanest method for this.

I recently upgraded to 20.04 and had to modify the scripts a bit since pulseaudio kept respawning after I upgraded.

I ended up with something similar to OP's Arch scripts. Just tought I'd share this to hopefully help anyone upgrading to 20.04.


pulseaudio_stop
--------------------
bash:
#! /bin/bash
systemctl --user mask pulseaudio.socket
systemctl --user stop pulseaudio


pulseaudio_start
---------------------
bash:
#! /bin/bash
systemctl --user unmask pulseaudio.socket
systemctl --user start pulseaudio
Reply

Logout Mark Read Team Forum Stats Members Help
TrueHD and DTS-HD MA passthrough under Linux0