Linux v2.How to Setup Dolby Atmos, DTS-X, TrueHD, DTS-HD MA, Passthrough On Kodi (Linux)
#31
Would that also work for Android device (e.g. FireTV 4K)? just installed 19.0, strangely pass-though seems need to be disabled for HD audios ( e.g. DB 5.1 or DTS etc.)
Kodi 20.4(Nexus) / FireTV 4K
Reply
#32
(2021-05-09, 11:47)stein Wrote: Would that also work for Android device (e.g. FireTV 4K)? just installed 19.0, strangely pass-though seems need to be disabled for HD audios ( e.g. DB 5.1 or DTS etc.)

This guide is targeted specifically for Linux, although android is technically Linux under the hood (Linux kernel) it works quite differently to a dedicated Linux box, i.e its easier to load scripts to kodi on a Linux box, regarding the FireTV 4k and pass-through it should be straight forward to set HD audio pass-through when kodi is loaded, you may need to check your settings are correctly adjusted between your TV, Amp, and FireTV 4k
Reply
#33
My problem is along these lines but differs slightly.
I have two computers both running Ubuntu 18.04 with Pulseaudio disabled and both are tied via HDMI into a Sony dn-840 AVR. Kodi 18.9 Leah is loaded and working on one computer. All forms of HD audio play over the AVR  with no problem whatsoever. In the system configuration for audio all the HD options are listed under the Passthrough checkbox. On the other computer, which is running 19.1 Matrix, those options are missing. The Passthrough checkbox is present as is the Passthrough device but that's all that's there. The AVR outputs only PCM 2.0 and ignores any HD audio encoding from any movie so encoded. Where's the problem here? Is it me or something else?
Reply
#34
(2021-05-21, 13:53)Tonytitan2031 Wrote: Where's the problem here? Is it me or something else?

Dunno.  Suggest you start a new thread and post a link to a debug log (wiki) captured from start-up which might reveal whats going on.
Learning Linux the hard way !!
Reply
#35
Thanks for the guide and the discussion it sparked.  You might want to mention that for Arch, none of the hacky scripts are needed (disable pulse audio, define the environment variable,start kodi etc) are needed if running kodi-standalone-service.  It can pass env vars to the service as needed.  I also think you should incorporate the info @fritsch mentioned in his post or at least reference it.
Need help programming a Streamzap remote?
Reply
#36
Hi Everyone...Appreciate the insights. I am using an older Dell Optiplex 690 with no HDMI, and I suspect that may be the issue.

I upgraded to Kodi 19 thinking I may be able to implement Dolby/Passthru to my Yamaha decoder. However when I click on Settings/System/Audio/Output device my system doesn't return the list of available "chained" devices. I also have run the script and while more options appear under output device I still don't see a list of available decoders.

I suppose this may imply that my system is too "mature" (read no HDMI) or there is another step I am not aware of to make this list of decoders available?

And when I run the script, I see a option for PCM HDMI (no PulseAudio choice), when I set channels to "2", passthru does become available, but no Dolby. I am using my local network to connect...Computer Dell (with Kodi 19.1), to Firestick (with Dolby enabled and works with Plex), to my Yamaha decoder, to TV

Thanks
Reply
#37
(2021-09-20, 17:09)RikiTakeyama Wrote: Hi Everyone...Appreciate the insights. I am using an older Dell Optiplex 690 with no HDMI (Ubuntu 20.04LTS), and I suspect that may be the issue.

I upgraded to Kodi 19 thinking I may be able to implement Dolby/Passthru to my Yamaha decoder. However when I click on Settings/System/Audio/Output device my system doesn't return the list of available "chained" devices. I also have run the script and while more options appear under output device I still don't see a list of available decoders.

I suppose this may imply that my system is too "mature" (read no HDMI) or there is another step I am not aware of to make this list of decoders available?

And when I run the script, I see a option for PCM HDMI (no PulseAudio choice), when I set channels to "2", passthru does become available, but no Dolby. I am using my local network to connect...Computer Dell (with Kodi 19.1), to Firestick (with Dolby enabled and works with Plex), to my Yamaha decoder, to TV

Thanks
Reply
#38
Awesome write-up with very clear instructions. Thanks so much!
Reply
#39
Hello everyone,

Thanks a lot for this thread, I can now enable passthrough for HD formats.

However, I am now facing another problem. DTS-HD and Dolby TrueHD are passed-through, but it seems the AV cannot interpret what it gets.
Important information: my AV is an Onkyo NR545 and it is compatible with these formats. Indeed I get DTS-HD or True HD from the bluray player.

It works fine for non HD format such as DTS or Dolby Digital. But HD ones output no sound and the AV displays "ANALOG".

If I look at the logs, I see something odd (playing a mkv containing a Dolby TrueHD track) :

Code:

2022-05-03 16:41:46.829 T:1033    DEBUG <general>: CActiveAESink::OpenSink - trying to open device ALSA:hdmi:CARD=PCH,DEV=1
2022-05-03 16:41:46.829 T:1033     INFO <general>: CAESinkALSA::Initialize - Attempting to open device "hdmi:CARD=PCH,DEV=1"
2022-05-03 16:41:46.832 T:1033     INFO <general>: CAESinkALSA::Initialize - Opened device "hdmi:CARD=PCH,DEV=1,AES0=0x06,AES1=0x82,AES2=0x00,AES3=0x09"
2022-05-03 16:41:46.832 T:1033    DEBUG <general>: CAESinkALSA::InitializeHW - Request: periodSize 9600, bufferSize 38400
2022-05-03 16:41:46.849 T:1033    DEBUG <general>: CAESinkALSA::InitializeHW - Got: periodSize 9600, bufferSize 38400
2022-05-03 16:41:46.849 T:1033    DEBUG <general>: CAESinkALSA::InitializeHW - Setting timeout to 200 ms
2022-05-03 16:41:46.852 T:1033    DEBUG <general>: CAESinkALSA::GetChannelLayout - Input Channel Count: 8 Output Channel Count: 8
2022-05-03 16:41:46.852 T:1033    DEBUG <general>: CAESinkALSA::GetChannelLayout - Requested Layout: RAW, RAW, RAW, RAW, RAW, RAW, RAW, RAW
2022-05-03 16:41:46.852 T:1033    DEBUG <general>: CAESinkALSA::GetChannelLayout - Got Layout: RAW, RAW, RAW, RAW, RAW, RAW, RAW, RAW (ALSA: none)
2022-05-03 16:41:46.852 T:1033    DEBUG <general>: CActiveAESink::OpenSink - ALSA Initialized:
2022-05-03 16:41:46.852 T:1033    DEBUG <general>:   Output Device : HDA Intel PCH
2022-05-03 16:41:46.852 T:1033    DEBUG <general>:   Sample Rate   : 192000
2022-05-03 16:41:46.852 T:1033    DEBUG <general>:   Sample Format : AE_FMT_S16NE
2022-05-03 16:41:46.852 T:1033    DEBUG <general>:   Channel Count : 8
2022-05-03 16:41:46.852 T:1033    DEBUG <general>:   Channel Layout: RAW, RAW, RAW, RAW, RAW, RAW, RAW, RAW
2022-05-03 16:41:46.852 T:1033    DEBUG <general>:   Frames        : 9600
2022-05-03 16:41:46.852 T:1033    DEBUG <general>:   Frame Size    : 16

Why is the sample format set to AE_FMT_S16NE ? Should not it be AE_FMT_RAW ?
TrueHD is supposed to be 24 bits. And it is written 24 bits in the debug log for the file I'm trying to play :

Code:

2022-05-03 16:41:46.590 T:1259    DEBUG <general>: Open - avformat_find_stream_info starting
2022-05-03 16:41:46.599 T:1259    DEBUG <general>: Open - av_find_stream_info finished
2022-05-03 16:41:46.599 T:1259     INFO <general>: ffmpeg[0x59f2130X]: Input #0, matroska,webm, from 'smb://192.168.1.250/video/Divers/DOLBY/Dolby_Amaze_Lossless-ATMOS-thedigitaltheater.mkv':
2022-05-03 16:41:46.599 T:1259     INFO <general>: ffmpeg[0x59f2130X]:   Metadata:
2022-05-03 16:41:46.599 T:1259     INFO <general>: ffmpeg[0x59f2130X]:     encoder         : libebml v1.3.1 + libmatroska v1.4.2
2022-05-03 16:41:46.599 T:1259     INFO <general>: ffmpeg[0x59f2130X]:     creation_time   : 2015-08-29T18:05:24.000000Z
2022-05-03 16:41:46.599 T:1259     INFO <general>: ffmpeg[0x59f2130X]:   Duration: 00:01:03.50, start: 0.000000, bitrate: 18435 kb/s
2022-05-03 16:41:46.600 T:1259     INFO <general>: ffmpeg[0x59f2130X]:     Stream #0:0(eng): Video: h264 (High), yuv420p(progressive), 1920x1080, SAR 1:1 DAR 16:9, 24 fps, 24 tbr, 1k tbn, 48 tbc (default)
2022-05-03 16:41:46.600 T:1259     INFO <general>: ffmpeg[0x59f2130X]:     Metadata:
2022-05-03 16:41:46.600 T:1259     INFO <general>: ffmpeg[0x59f2130X]:       BPS             : 11687041
2022-05-03 16:41:46.600 T:1259     INFO <general>: ffmpeg[0x59f2130X]:       BPS-eng         : 11687041
2022-05-03 16:41:46.600 T:1259     INFO <general>: ffmpeg[0x59f2130X]:       DURATION        : 00:01:03.417000000
2022-05-03 16:41:46.600 T:1259     INFO <general>: ffmpeg[0x59f2130X]:       DURATION-eng    : 00:01:03.417000000
2022-05-03 16:41:46.600 T:1259     INFO <general>: ffmpeg[0x59f2130X]:       NUMBER_OF_FRAMES: 1522
2022-05-03 16:41:46.600 T:1259     INFO <general>: ffmpeg[0x59f2130X]:       NUMBER_OF_FRAMES-eng: 1522
2022-05-03 16:41:46.600 T:1259     INFO <general>: ffmpeg[0x59f2130X]:       NUMBER_OF_BYTES : 92644638
2022-05-03 16:41:46.600 T:1259     INFO <general>: ffmpeg[0x59f2130X]:       NUMBER_OF_BYTES-eng: 92644638
2022-05-03 16:41:46.600 T:1259     INFO <general>: ffmpeg[0x59f2130X]:       _STATISTICS_WRITING_APP: mkvmerge v8.3.0 ('Over the Horizon') 64bit
2022-05-03 16:41:46.600 T:1259     INFO <general>: ffmpeg[0x59f2130X]:       _STATISTICS_WRITING_APP-eng: mkvmerge v8.3.0 ('Over the Horizon') 64bit
2022-05-03 16:41:46.600 T:1259     INFO <general>: ffmpeg[0x59f2130X]:       _STATISTICS_WRITING_DATE_UTC: 2015-08-29 18:05:24
2022-05-03 16:41:46.600 T:1259     INFO <general>: ffmpeg[0x59f2130X]:       _STATISTICS_WRITING_DATE_UTC-eng: 2015-08-29 18:05:24
2022-05-03 16:41:46.600 T:1259     INFO <general>: ffmpeg[0x59f2130X]:       _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
2022-05-03 16:41:46.600 T:1259     INFO <general>: ffmpeg[0x59f2130X]:       _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
2022-05-03 16:41:46.600 T:1259     INFO <general>: ffmpeg[0x59f2130X]:     Stream #0:1: Audio: truehd, 48000 Hz, 7.1, s32 (24 bit) (default)
2022-05-03 16:41:46.600 T:1259     INFO <general>: ffmpeg[0x59f2130X]:     Metadata:
2022-05-03 16:41:46.600 T:1259     INFO <general>: ffmpeg[0x59f2130X]:       BPS             : 6693961
2022-05-03 16:41:46.600 T:1259     INFO <general>: ffmpeg[0x59f2130X]:       BPS-eng         : 6693961
2022-05-03 16:41:46.600 T:1259     INFO <general>: ffmpeg[0x59f2130X]:       DURATION        : 00:01:03.500000000
2022-05-03 16:41:46.600 T:1259     INFO <general>: ffmpeg[0x59f2130X]:       DURATION-eng    : 00:01:03.500000000
2022-05-03 16:41:46.600 T:1259     INFO <general>: ffmpeg[0x59f2130X]:       NUMBER_OF_FRAMES: 76200
2022-05-03 16:41:46.600 T:1259     INFO <general>: ffmpeg[0x59f2130X]:       NUMBER_OF_FRAMES-eng: 76200
2022-05-03 16:41:46.600 T:1259     INFO <general>: ffmpeg[0x59f2130X]:       NUMBER_OF_BYTES : 53133320
2022-05-03 16:41:46.600 T:1259     INFO <general>: ffmpeg[0x59f2130X]:       NUMBER_OF_BYTES-eng: 53133320
2022-05-03 16:41:46.600 T:1259     INFO <general>: ffmpeg[0x59f2130X]:       _STATISTICS_WRITING_APP: mkvmerge v8.3.0 ('Over the Horizon') 64bit
2022-05-03 16:41:46.600 T:1259     INFO <general>: ffmpeg[0x59f2130X]:       _STATISTICS_WRITING_APP-eng: mkvmerge v8.3.0 ('Over the Horizon') 64bit
2022-05-03 16:41:46.600 T:1259     INFO <general>: ffmpeg[0x59f2130X]:       _STATISTICS_WRITING_DATE_UTC: 2015-08-29 18:05:24
2022-05-03 16:41:46.600 T:1259     INFO <general>: ffmpeg[0x59f2130X]:       _STATISTICS_WRITING_DATE_UTC-eng: 2015-08-29 18:05:24
2022-05-03 16:41:46.600 T:1259     INFO <general>: ffmpeg[0x59f2130X]:       _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
2022-05-03 16:41:46.600 T:1259     INFO <general>: ffmpeg[0x59f2130X]:       _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
2022-05-03 16:41:46.600 T:1259    DEBUG <general>: CDVDDemuxFFmpeg::AddStream ID: 0
2022-05-03 16:41:46.600 T:1259    DEBUG <general>: CDVDDemuxFFmpeg::AddStream ID: 1
2022-05-03 16:41:46.600 T:1259    DEBUG <general>: CDVDInputStreamFile::SetReadRate - set cache throttle rate to 2534863 bytes per second

Moreover I can see the driver is supposed to support plenty of formats :

Code:

2022-05-03 18:34:53.794 T:1032     INFO <general>:     Device 4
2022-05-03 18:34:53.794 T:1032     INFO <general>:         m_deviceName      : hdmi:CARD=PCH,DEV=1
2022-05-03 18:34:53.794 T:1032     INFO <general>:         m_displayName     : HDA Intel PCH
2022-05-03 18:34:53.794 T:1032     INFO <general>:         m_displayNameExtra: SNY SONY TV  *30 on DisplayPort #1
2022-05-03 18:34:53.794 T:1032     INFO <general>:         m_deviceType      : AE_DEVTYPE_HDMI
2022-05-03 18:34:53.794 T:1032     INFO <general>:         m_channels        : FL, FR, LFE, FC, BL, BR
2022-05-03 18:34:53.794 T:1032     INFO <general>:         m_sampleRates     : 32000,44100,48000,88200,96000,176400,192000
2022-05-03 18:34:53.794 T:1032     INFO <general>:         m_dataFormats     : AE_FMT_RAW,AE_FMT_S16NE,AE_FMT_S16LE,AE_FMT_RAW
2022-05-03 18:34:53.794 T:1032     INFO <general>:         m_streamTypes     : STREAM_TYPE_AC3,STREAM_TYPE_DTSHD,STREAM_TYPE_DTSHD_MA,STREAM_TYPE_DTSHD_CORE,STREAM_TYPE_DTS_1024,STREAM_TYPE_DTS_2048,STREAM_TYPE_DTS_512,STREAM_TYPE_EAC3,STREAM_TYPE_TRUEHD

My guess it that Kodi does not choose the right stream type or format for true HD and DTS-HD passthrough. But I might be on a wrong lead I don't know ...

You'll find the complete log here: http://ix.io/3WTh

Notice: you'll see a Sony device in the log, and not the Onkyo : this is because I'm connected to the TV, that passthrough to the AV via a eArc device. OF course, I tested directly on the AV first and got the same problem.

Thank you or your help !

Benjamin
Reply
#40
Sorry, I forgot another important piece of information. Passthrough works fine on the same PC and Kodi using Windows. So the PC itself is able to passthrough. It is not a hardware issue.
Reply
#41
Sad 
Hi I'm new to linux and I'm currently using Linux mint 21 and Kodi matrix
After running custom Kodi launcher.desktop I'm getting an error
So i tried running the bash script but it disables pulse audio for only 2 secs after that it restarts
Pls help 🥲
Reply
#42
For the 16 bit Endian Format:

DTS-HD / TrueHD etc. is a virtual format. It is send in IEC frames towards the AVR. Those frames are transmitted via 16 bit 192 khz and 8 channels. You cannot hear that sound (fancy noise) on analog output as it is a digital stream and the audio confguration is only used to match the bandwidth. You can imagine it like a British Mail bus. You see the bus, you know it includes packets, you even know how much it can carry, but you have no idea what is in there :-)
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#43
Hi

Is this still relevant for Fedora 37 Pipewire? I am struggling to play TrueHD in my PC connected to HK amp/TV. Before upgrading to 37 from 35, I use to use run Kodi using pasuspender. But that's not working anymore.

Thanks
Reply
#44
With kodi's v21 nightlies pipewire sink has support for all formats, when system is configured properly.
Stable Nexus only has bare minimum pipewire support.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#45
Great new thanks Team Kodi.
Can I install the nightly build in Fedora 38? Tried the flathub beta, but couldn't find Kodi 21 package.
Reply

Logout Mark Read Team Forum Stats Members Help
v2.How to Setup Dolby Atmos, DTS-X, TrueHD, DTS-HD MA, Passthrough On Kodi (Linux)0