2020-08-11, 16:58
Updated Guide.. v2
---------------------------------------------
Hopefully this guide should help those users of Linux who are new or unsure on how to enable Dolby Atmos, DTS-X, TrueHD, DTS-HD Master Audio, Passthrough on Linux, this should hopefully work on Debian/Ubuntu and Arch based distributions, this guide will bypass PulseAudio Sound server and temporarily disable the sound server and use ALSA instead without having to make any permanent changes to your system and allow Kodi to Passthrough Dolby Atmos, DTS-X, TrueHD, DTS-HD Master Audio, to your AV Receiver to decode.
Background story..
So i upgraded my system to the new 20.04 package stack of Ubuntu and straight away i lost my ability to pass-through High definition audio and object based audio, weirdly enough it took me hours to (a. figure out what the actual problem was) and (b. how to resolve it) so let me save you the time and the headache, just follow my guide below and you should hopefully be up and running in no time on the latest Linux distro's, this should hopefully work for the newer 20.04 and above and Ubuntu/Debian and Arch based distro's.
---------------------------------------------------------------------------
This should work for the following AV Receiver's:
---------------------------------------------------------------------------
------------------------------------------------------------------------------
Creating a Simple Bash Script & .Desktop File.. (Updated)
------------------------------------------------------------------------------
Creating the #bash script..
First we will add the command below to a bash script to allow us to use ALSA within Linux as PulseAudio at the moment cannot passthrough Dolby Atmos, DTS-X, TrueHD, DTS-HD Master Audio etc, so now open gedit or your text editor of choice and paste the following below corresponding to your version of Kodi into a new document;
(1) - Kodi - Main Repository package - #bash script code (Older Builds)
(2) - Kodi - Main Repository package - #bash script code (Newer Builds)
(3) - Kodi - Flatpak package - #bash script code (Latest Stable)
- This new bash script code should work on any of the latest stable versions
Of the Kodi Flatpak packages Installed in the default directory on any distro.
- Quick Tip: If your using a Kodi Flatpak package on Fedora change all instances of pulseaudio in the script to pipewire
Now save this to your /home folder as kodi.sh
Now right click on this file and go to properties then permissions and check the box allow executing file as a program
Creating the .desktop file..
Now make another new text file using your text editor and paste this in to the file
Now Save it and name it as whatever and where ever you like but end the file name with .desktop
Now right click this file and go to properties then permissions and check allow executing file as a program
-------------------------------------------------------------------
Setup: Kodi.. Part B
-------------------------------------------------------------------
Now to finish off the rest of the setup we need to change the following settings in Kodi;
-------------------------------------------------------------------------
Please see below how to change these settings: (Click Image to Enlarge)
-------------------------------------------------------------------------
-------------------------------------------------------------------------
Conclusion..
-------------------------------------------------------------------------
Hopefully If everything went well you should now be able to Passthrough Dolby Atmos, DTS-X, TrueHD, DTS-HD Master Audio, on Linux.
---------------------------------------------
Hopefully this guide should help those users of Linux who are new or unsure on how to enable Dolby Atmos, DTS-X, TrueHD, DTS-HD Master Audio, Passthrough on Linux, this should hopefully work on Debian/Ubuntu and Arch based distributions, this guide will bypass PulseAudio Sound server and temporarily disable the sound server and use ALSA instead without having to make any permanent changes to your system and allow Kodi to Passthrough Dolby Atmos, DTS-X, TrueHD, DTS-HD Master Audio, to your AV Receiver to decode.
Background story..
So i upgraded my system to the new 20.04 package stack of Ubuntu and straight away i lost my ability to pass-through High definition audio and object based audio, weirdly enough it took me hours to (a. figure out what the actual problem was) and (b. how to resolve it) so let me save you the time and the headache, just follow my guide below and you should hopefully be up and running in no time on the latest Linux distro's, this should hopefully work for the newer 20.04 and above and Ubuntu/Debian and Arch based distro's.
Quote:Please make sure before following this guide all your hardware in the chain is capable of passing high definition and object based audio i.e Dolby Atmos, DTS-X, TrueHD, DTS-HD Master Audio.
---------------------------------------------------------------------------
This should work for the following AV Receiver's:
---------------------------------------------------------------------------
- Denon
- Marantz
- Yamaha
- Onkyo
- Nad
- Arcam
- Anthem
- Sony
- Pioneer
- Trinnov
------------------------------------------------------------------------------
Creating a Simple Bash Script & .Desktop File.. (Updated)
------------------------------------------------------------------------------
Creating the #bash script..
First we will add the command below to a bash script to allow us to use ALSA within Linux as PulseAudio at the moment cannot passthrough Dolby Atmos, DTS-X, TrueHD, DTS-HD Master Audio etc, so now open gedit or your text editor of choice and paste the following below corresponding to your version of Kodi into a new document;
(1) - Kodi - Main Repository package - #bash script code (Older Builds)
- Krypton v17
Code:
#!/bin/bash
AE_SINK=ALSA kodi
(2) - Kodi - Main Repository package - #bash script code (Newer Builds)
- Leia v18 > Matrix v19 > Nexus v20
Code:
#!/bin/bash
systemctl --user stop pulseaudio.socket
systemctl --user stop pulseaudio.service
KODI_AE_SINK=ALSA kodi
systemctl --user start pulseaudio.socket
systemctl --user start pulseaudio.service
(3) - Kodi - Flatpak package - #bash script code (Latest Stable)
- This new bash script code should work on any of the latest stable versions
Of the Kodi Flatpak packages Installed in the default directory on any distro.
- Quick Tip: If your using a Kodi Flatpak package on Fedora change all instances of pulseaudio in the script to pipewire
Code:
#!/bin/bash
systemctl --user stop pulseaudio.socket
systemctl --user stop pulseaudio.service
KODI_AE_SINK=ALSA /usr/bin/flatpak run --branch=stable --arch=x86_64 --command=kodi tv.kodi.Kodi
systemctl --user start pulseaudio.socket
systemctl --user start pulseaudio.service
Quote:Note: For Kodi 18 (Leia) and above PulseAudio sound server will now temporarily be suspended and block access to other audio devices while ALSA is being used for kodi in the new updated bash script. But Pulseaudio sound server will be re-established once you exit kodi, Be warned as this may interfere with your Desktop sounds while using Kodi.
Now save this to your /home folder as kodi.sh
Now right click on this file and go to properties then permissions and check the box allow executing file as a program
Creating the .desktop file..
Quote:You must change *USER* in the EXEC= line to your username and remember to change the *FOLDER/FILE PATH* to the location of your folder or file where the script is located and also do the same if you want to save it to a different location for example, or it wont work.
Example = Exec=/home/myusername/kodi-custom/kodi.sh
Now make another new text file using your text editor and paste this in to the file
Code:
[Desktop Entry]
Type=Application
Exec=/home/*USER*/*FOLDER/FILE PATH*/kodi.sh
Terminal=False
Name=Custom Kodi launcher
Comment=Any comment you want here
Icon=/path/to/icon/you/want
Now Save it and name it as whatever and where ever you like but end the file name with .desktop
Now right click this file and go to properties then permissions and check allow executing file as a program
-------------------------------------------------------------------
Setup: Kodi.. Part B
-------------------------------------------------------------------
Now to finish off the rest of the setup we need to change the following settings in Kodi;
Quote:Make sure you toggle off Sync Playback to Display otherwise you wont be able to Allow Passthrough.
- Audio Output Device = Change this to your AV Receiver .. i.e Denon, Yamaha, Marantz, etc.
- Output Configuration = Best or Optimized your choice
- Allow Passthrough = Toggle this to On
- Passthrough Output Device = Same as your Receiver
-------------------------------------------------------------------------
Please see below how to change these settings: (Click Image to Enlarge)
-------------------------------------------------------------------------
-------------------------------------------------------------------------
Conclusion..
-------------------------------------------------------------------------
Hopefully If everything went well you should now be able to Passthrough Dolby Atmos, DTS-X, TrueHD, DTS-HD Master Audio, on Linux.