Let me understand audio passthrough please
#16
(2021-12-04, 19:23)jarosujo Wrote: It seems you are right. The only standards for PCM are 2.0, 5.1, or 7.1 channels. So no HD Dolby Atmos / DTS:X over PCM.

Not strictly true.

Pure LPCM supports fixed channel layouts only so it can't normally carry the object metadata that Atmos/DTS:X contain. For example an 7.1.4 Atmos file only the 7.1 portion will be decoded to LPCM 7.1, so if you have height speakers the AVR won't have any direct data to send to them, so it would be up to the AVR to create height effects on the fly from the 7.1.

However there is a format call Dolby MAT that is basically LPCM with Atmos metadata embedded, this is used in devices that need the Atmos audio metadata to be dynamically encoded. For example the AppleTV uses Dolby MAT so it can mix system sounds in LPCM with Atmos from the content apps. However Kodi does not support Dolby MAT so we can only send pure LPCM.
Reply
#17
(2021-12-04, 20:53)gibxxi Wrote: Correct me if I'm wrong here, but I've always been under the impression that the 'number of channels' option has no effect on the passthrough portion of how Kodi handles audio, since the audio is being passed through unmodified in any way shape or form (including channel count).

Correct Number of Channels only applies to decoded audio that is sent as LPCM, it has zero effect on passthrough.

(2021-12-04, 20:53)gibxxi Wrote: Also, setting 5.1/7.1 sound on non - digital sources (DTS, Dolby Digital, etc, etc.) will force Kodi to process / upmix to the set channel count specified, thus probably preventing the AVR from itself upmixing stereo content via standards like Dolby ProLogic and DTS: Neo, etc.

For LPCM Kodi will send the specified channel layout so yes you're right from that point of view, however Kodi will only fill the channels with audio depending on what's contained in the source, so for example if 7.1 is specified then AVR will show it receives 7.1 laypout but if the source contains stereo audio then Kodi will only 2.0 and the AVR should report as PCM. So you should only see Multichannel on your AVR if Kodi is sending anything more than 2.0.

However some of this is device dependant, as some devices can do strange things to LPCM such as mix up channels for Multichannel LPCM.
Reply
#18
(2021-12-06, 15:34)jjd-uk Wrote: For LPCM Kodi will send the specified channel layout so yes you're right from that point of view, however Kodi will only fill the channels with audio depending on what's contained in the source, so for example if 7.1 is specified then AVR will show it receives 7.1 laypout but if the source contains stereo audio then Kodi will only 2.0 and the AVR should report as PCM. So you should only see Multichannel on your AVR if Kodi is sending anything more than 2.0.

However some of this is device dependant, as some devices can do strange things to LPCM such as mix up channels for Multichannel LPCM.

In the case of my Onkyo, I can confirm that the 'passthrough' portion of Kodi works as expected though. If it's 2.0 Stereo being output, The Dolby ProLogic II icon will light, if it's true HD the 'DTS' or 'DD' (Dolby Digital) icon will light up, but the 'PCM' icon is always illuminated.

Dan / Gib.
Image
Reply
#19
(2021-12-04, 19:23)jarosujo Wrote: It seems you are right. The only standards for PCM are 2.0, 5.1, or 7.1 channels. So no HD Dolby Atmos / DTS:X over PCM.

Multichannel PCM supports alot more than just 2.0, 5.1, and 7.1, it is just audio driver support (At least in Windows) and AVR support is much patchier. @black_eagle added a patch that is in current dev branch which allows Kodi to support the channel mappings that can come with multi channel PCM files. For my Intel Windows setup for example 3.1 multi-channel PCM works. Support with a Linux running Kodi is generally much better with 1.0, 4.0, 4.1, 6.1 and others all supported. No idea what support is like with SOC and Android devices.
Reply
#20
Yeah, originally the code would get the No. of channels and then ask FFmpeg for a layout corresponding to that number.  So if you had FL, FC, FR it would ask for a 3 channel layout and FFmpeg would give it FL, FR, LFE because that's the first 3 channel layout in its list.  Obviously, that was wrong!

So now, it checks that the layout obtained includes at least the same channels as in the file.  That's before any platform dependant stuff.  So the code would refuse the FL, FR, LFE layout as there is no centre channel and get the next 3 channel layout, which is FL, FC, FR - correct!

Once we get to the platform dependant stuff, Kodi asks the audio driver for a matching layout.  If we get one, great.  If not, it asks for a layout that includes at least the channels we want.  This can mean that if we want FL, FC, FR but the audio driver doesn't support that, we could end up with a full 5.1 layout but Kodi will output silence on the extra channels.  The upshot of all this is that what you hear should always come out of the correct channels, but your AVR may well show a different channel layout to what you were expecting to see.  This is 100% down to the audio driver that is installed, and so will vary between platforms (and most likely motherboards too).
Learning Linux the hard way !!
Reply
#21
(2021-12-12, 14:11)black_eagle Wrote: Yeah, originally the code would get the No. of channels and then ask FFmpeg for a layout corresponding to that number.  So if you had FL, FC, FR it would ask for a 3 channel layout and FFmpeg would give it FL, FR, LFE because that's the first 3 channel layout in its list.  Obviously, that was wrong!

So now, it checks that the layout obtained includes at least the same channels as in the file.  That's before any platform dependant stuff.  So the code would refuse the FL, FR, LFE layout as there is no centre channel and get the next 3 channel layout, which is FL, FC, FR - correct!

Once we get to the platform dependant stuff, Kodi asks the audio driver for a matching layout.  If we get one, great.  If not, it asks for a layout that includes at least the channels we want.  This can mean that if we want FL, FC, FR but the audio driver doesn't support that, we could end up with a full 5.1 layout but Kodi will output silence on the extra channels.  The upshot of all this is that what you hear should always come out of the correct channels, but your AVR may well show a different channel layout to what you were expecting to see.  This is 100% down to the audio driver that is installed, and so will vary between platforms (and most likely motherboards too).
I'm not sure if the Kodi dev team has anyone within Intel Graphics team they could ask but I did register an issue with the lack of PCM channel layout supporting the Intel HDMI audio driver for Windows here:
https://community.intel.com/t5/Graphics/...-p/1316560

Not essential but if Intel fixed their driver support the Kodi change you put in would be more useful for Windows users.
Reply
#22
Bit of an old thread, but still.

I would like to know what Kodi does with simple stereo (like from a ripped cd). That's not HD audio, of course. Hence, can it still be parsed as simply passthrough, thru HDMI?
Reply
#23
Yes, it just passes a CD in its original 16/44 PCM format over HDMI (This format is pretty much universally supported by HDMI). You can fix the sampling rate to something higher using the audio settings but it does not really change the quality.
Reply
#24
The first thing to understand is that digital audio in it's rawest form is always PCM.

You then have 2 types of containers for storing the PCM data.

Simply compression formats such as mp3, flac, ape, aac etc. These formats are storage formats and when played back the PCM data is unpacked and sent by Kodi as PCM.

Encoded formats that re-encode the PCM audio for greater compression, it is these are generally meant when passthrough is talked about, as this include the variuos form of Dolby & DTS formats. With these Kodi can do the decoding and send as PCM, or passthrough for decoding from DD/DTS to PCM on the soundbar/AVR.

So when it comes to CD rips, it all depends what format you rip to, but generally this will one of the simple storage formats which produces PCM when played by Kodi, so passthrough does not applied. The properties of the PCM audio sent by Kodi, in terms of things like sample rate, will depend on the audio capabilities of the device you are running Kodi on.
Reply
#25
I seem to recall the idea of digital passthrough was to avoid resampling and loss of quality inevitably associated with every resampling. Meaning purists should not do any digital processing (volume, equalizer, compressor, whatnot) before DAC. Now try to explain to an average user you can't have volume control in your app because you use digital output ...  Nerd
Reply
#26
At least for Windows if you are using WASAPI and have the volume at 100 then it does do bit perfect PCM output (Both DTS CD and Auro Native work with it). Nvidia Shield and some other Android devices do not deliver bit perfect PCM.
Reply
#27
Saludos y gracias. Uso xiaomi mi box s, con kodi y un equipo de audio Harman kardon. Reproduzco pelicula en Vlc y la pantalla del equipo de audio me indica, dolby digital, la reproduzco con kodi y no me dice lo mismo, con vlc tambien me indica Dts, dependiendo de la pelicula. Activado el traspaso en kodi,no sé si hay alguna otra configuración. Usaba Kodi Leia y no tenia ese problema, pero hace poco de actualizo a Matrix y ahí empezó el calvario.
Reply
#28
@Franchico  - welcome

This is an English language only forum. Please write forum posts in English. If you are require assistance to do so then please use a service like Google Translate.
Always read the Wiki, FAQ and search the forum before posting.
Read/follow the forum rules.
Reply
#29
I’m also having trouble with multichannel music. As you can see from this album:

https://www.nativedsd.com/product/aanyot...khz-32-bit

It is encoded in 9.1ch Discrete DXD (WAV, 32bit 384 kHz).

I stored the album in NAS and played it through KODI on FireTV Cube Gen 3 and might want to try on Shield TV Pro. I have echo studio theater set-up with my FireTV and Marantz AVR to the Shield TV. While I first tried to play the album by VLC/Audirvana from my Macbook, I have tried multichannel in/ multichannel stereo/ Auro-3D on my AVR and monitor the amplifier output from marantz app on my iPad. Of course, due to the limitation of DAC on the AVR, 24/192 on each channel will be best expected. The listening experience actually isn’t exceptionally better than the 24/96 encoding on Auro-3D.

From mac to AVR, ceiling speakers are not playing by multi-channel in.

How can Kodi handle 9.1 discrete file? Would like to know.

cheers
Reply
#30
(2022-12-11, 12:59)reyataTom Wrote: I’m also having trouble with multichannel music. As you can see from this album:

https://www.nativedsd.com/product/aanyot...khz-32-bit

It is encoded in 9.1ch Discrete DXD (WAV, 32bit 384 kHz).

I stored the album in NAS and played it through KODI on FireTV Cube Gen 3 and might want to try on Shield TV Pro. I have echo studio theater set-up with my FireTV and Marantz AVR to the Shield TV. While I first tried to play the album by VLC/Audirvana from my Macbook, I have tried multichannel in/ multichannel stereo/ Auro-3D on my AVR and monitor the amplifier output from marantz app on my iPad. Of course, due to the limitation of DAC on the AVR, 24/192 on each channel will be best expected. The listening experience actually isn’t exceptionally better than the 24/96 encoding on Auro-3D.

From mac to AVR, ceiling speakers are not playing by multi-channel in.

How can Kodi handle 9.1 discrete file? Would like to know.

cheers

I would expect the Auro encoded version to be better as I dont think there is any way to transfer 9 channel encoded PCM from any of those devices meaning you will probably be missing 2 channels with the DXD.
Reply

Logout Mark Read Team Forum Stats Members Help
Let me understand audio passthrough please0