[Solved] Options for HD 7.1 audio when DTS cannot be passthrough TV

Source: Raspberry Pi 4

Display: Samsung S90C

TV Audio Passthrough:
eARC: Dolby Atmos Over Dolby Digital Plus Yes
eARC: Dolby Digital Plus 7.1 Yes
eARC: Dolby TrueHD 7.1 Yes
eARC: LPCM Channels (Bitstream) 7.1
eARC: LPCM 7.1 Over Dolby MAT Yes
eARC: DTS:X Over DTS-HD MA No
eARC: DTS-HD Master Audio 7.1 No

Soundbar: Q800C
Soundbar audio support:
All Dolby codecs including Atmos
All DTS codecs including X
LPCM 7.1

Devices connection route:
RPI4 → TV HDMI #1
TV HDMI #3eARC SB

In addition, I also use a pair of rear wireless speakers that are 2.0.2 channel. In total this configuration would be 7.1.4.

The Samsung S90C supports all Dolby Digital options flawlessly. Unfortunately, it doesn’t support DTS formats at all, which is disappointing, as many UHD Blu-rays use DTS for their lossless audio tracks.

Given this setup what wold be the best system audio configuration in Kodi?

Of corse I would like to retain the audio quality as close as possible to the original source files. Finally, I would like to avoid routing the HDMI via soundbar; as that would mean I lose any high refresh rate and VRR capabilities of the display (for newer source hardware down the road).

I think it is covered fairly well in our wiki, but to directly answer your question, if you want to maintain as much of the audio quality as possible in this situation then channels set as 7.1 and passthrough for everything but the DTS formats would be what you want. With these settings, any of the non-passthrough enabled formats will be decoded and output as LPCM.

1 Like

Stream atmos versions, samsung and google are developing their own open source spatial audio. Dts will die off as blu rays do I imagine. Dolby vision too as better non proprietary versions come out.

Have you seen my post? I had been in a similar situation: neither arc or toslink was able to passthrough dts or truehd streams.
I was able to find a solution. Have a look here: Vero 5 - Optical out no DTS - #15 by zatarra77

@darwindesign I went through those docs on several occasions. They are well written and descriptive. Sadly I could not get it to work properly.

In essence I’ve configured: HDMI audio device output, 7.1, best match, allow passthrough for everything except DTS & DTS-HD. This does indeed transcode DTS to LPCM, and its read by the SB as multichannel PCM, but
The DTS transcoded content (now LPCM) looses surround channels for some reason. The side and rear speakers are not used at all (some noise can be heard but it seems like very low volume stereo upmixing, bearly audible).
I have confirmed this using the DTS 7.1 speaker mapping demos (i.e. Dredd, and generic DTS speaker test video). If I play a raw LPCM 5.1/7.1 test video, native LPCM plays as expected on the SB; correctly across all speakers. :person_shrugging: :thinking:

I also tried to approach the problem from a different angle. Transcode DTS to DolbyDigital. Settings: HDMI audio device, 2.0, best match, allow passthrough for everything except DTS & DTS-HD, enable Dolby Digital AC3 transcoding. This works, surround channels are heard and the SB confirms the source is DD; but as said, I would like to obtain the audio quality of the source material, so LPCM is a preferred option, and this workaround is a last resort :frowning:

@mark22 I don’t want to go into any politics or future what ifs; the fact is that the home theater community still relies on BluRays as the best obtainable source format. Streaming services will never match the quality of BD or at least not for a looooong time (while I am still alive). Therefore I need a solution / workaround for TODAY. Also saying DTS will die is a speculation. Many movies are still DTS only, including the latest movie hit Oppenheimer.

@zatarra77 I have not dismissed the option of using an HDMI splitter, however, I have not found any that will still support all of the features of the TV. Not even the FeinTech 2.1 splitter would meet my requirements (4K HDR VRR 120+ Hz) :frowning: These are mostly for the use case you had: an older AVR and a new TV; but in my case I have a 2023 model SB and TV, where only the TVs lack of DTS passthrough support causes headaches.

EDIT: Side note, when using DTS → DD AC3 transcoding, raw LPCM files are also transcoded to DD which is a shame (since my setup supports RAW LPCM passthroughs).

I had a bit of a play around to see if I could reproduce. I’m a bit too lazy to move around a bunch of hardware to emulate your setup but I figured feeding multichannel PCM to an AVR and relying on its remapping down to my 5.1 is close enough. My initial go around output only stereo and I figured out that was because I had rebooted that RPi with my AVR its connected to turned off. I rebooted My RPi with my AVR on and at that point Kodi started sending and playing 7.1.4 DTS MA with the channels routed to where they should be. I then started playing a varity of test files I found laying around on the interwebs and at some point something went sideways and the files that had been playing correctly started mapping the channels wrong or to stereo. I have no clue about this and another reboot of my RPi was then able to play all the various DTS files I have including ES and X as LPCM as intended.

Based on this I would say try rebooting your RPi and see if that changes things. If that doesn’t get you to your happy place then I suspect that your TV may not be forwarding the channel maps the same or some such which may lend you to the best option being to directly attach to your soundbar. I’d welcome input from @grahamh if he has other thoughts.

For a start, I’m not clear how those extra speakers are connected so as to get 7.1.4. Are they all part of the SB system?

The Q800C is advertised and 5.1.2 but from what you say I assume it accepts a 7.1 signal.

Is this through the TV?
Could you post some logs after playing 1) an LPCM 7.1 source then 2) a DTS 7.1 source output as LPCM? There shouldn’t be any difference as far as the TV/SB is concerned but it’s just possible there’s a problem with the audio infoframe. If it is that then I can’t help as I don’t have a Pi4 or any knowledge of RPi audio handling. But others may know something.

I stream full blurays all the time i dont know why you’d say not in your lifetime, are you still on dial up?

The rear speakers are Samsung’s optional extra and not part of the Q800C set. The exact model is called “SWA-9500S” and they are wireless satellites.

Yes, by default the Q800C is 5.1.2 physical speaker layout. If opted and connected with SWA-9500S wirelessly, it sums up to 7.1.4 physical speaker layout. The Soundbar itself accepts LPCM 7.1 without any issues (at least from what I’ve tested).

Yes it is routed via the TV, and I would like to keep it like that. Since routing HDMI through the soundbar would sacrifice other HDMI 2.1 features :frowning:

Sure, I will post debug logs soon when I get a chance.

(Sorry for the unnecessary log spam, I just wanted to make sure I deliver as much as I can at once, so I used grab-logs -A with debug Kodi logs and audio component logging)

The logs are here:

Hmmm. I can’t see any difference in the logs between LPCM and DTS decoded to LPCM. In each case you get

2023-12-13 19:08:59.143 T:774     debug <general>: CActiveAESink::OpenSink - ALSA Initialized:
2023-12-13 19:08:59.143 T:774     debug <general>:   Output Device : vc4-hdmi-0 (vc4hdmi0)
2023-12-13 19:08:59.143 T:774     debug <general>:   Sample Rate   : 48000
2023-12-13 19:08:59.143 T:774     debug <general>:   Sample Format : AE_FMT_S24NE3
2023-12-13 19:08:59.143 T:774     debug <general>:   Channel Count : 8
2023-12-13 19:08:59.143 T:774     debug <general>:   Channel Layout: FL, FR, LFE, FC, UNKNOWN1, UNKNOWN1, UNKNOWN1, UNKNOWN1
2023-12-13 19:08:59.143 T:774     debug <general>:   Frames        : 2400
2023-12-13 19:08:59.143 T:774     debug <general>:   Frame Size    : 24

So the difference must be coming from how Kodi is interpreting your set-up for the DTS-LPCM conversion. The HDMI audio device reports only 6 channels, and the audio capabilities in the EDID has two LPCM devices - a stereo one (?TV) and a 6-channel one (soundbar). That suggests the soundbar is not inviting any more than 6 channels. But Kodi doesn’t know that. I’m guessing you will get better results by setting audio output in Kodi to 5.1 so that Kodi does the downmixing and doesn’t get confused. Dolby should still pass through OK.

Note that when it says Channel Count : 8, that’s a limitation of HDMI - it can only be set for 2 or 8 channels. With 3-7 channels, the unused ones should be muted.

Let us know how you get on.

1 Like

So if I understand correctly, the TV EDID reports the SB EARC audio output as 5.1 channel only, even though rear speakers are connected, and in turn does not allow proper 7.1?

That kind of makes sense and also explains why I had strange behavior across different applications. For example, explicitly using 7.1 channel audio config never worked on Moonlight-QT’s ALSA stack, while 5.1 works just fine. At first, I did not suspect that these two issues are caused by the same root cause (Samsung EDID misinformation).

For now, I have adjusted the settings to 5.1, best match, passthrough everything except DTS (& DTS HD-MA).
It is still early impressions, but it seems this will be as good as it gets for my particular setup. I will update and close the thread once I spend some time testing different scenarios (movies, music, codecs, channels, etc).

It seems you are correct. Initial quick passthrough testing still works as actual/native 7.1 for Dolby codecs.

Thanks for taking the time to help me out! Cheers :beers:

(I will also try waking the SB before the TV to see if the EDID changes to 7.1. Maybe HDMI CEC Soundbar wakeup signal causes the rear speakers to handshake after the EDID was reported as 5.1)

1 Like

After spending some time to test out various combinations, I am posting my conclusions here for anyone unfortunate enough to have similar issues.

Hardware

  • Raspberry Pi 4
  • 2023 Samsung S90C TV
  • 2023 Samsung Q800C Soundbar
  • 2021 Samsung rear wireless speakers SWA-9500S

Problems

DTS

  • DTS passthrough not working for Samsung TVs. What are the best Kodi audio settings for this configuration in order to preserve highest audio quality and channel mappings?

7.1 Surround

  • Samsung Q800C with optional rear speakers SWA-9500S sometimes does not work as expected (7.1 audio behavior is inconsistent).

Solutions

DTS

  • Samsung TVs (since 2018) cannot passthrough DTS content, so even though downstream devices do have native support, the codec will not be forwarded to the AVR/Soundbar. It should be decompressed and sent as LPCM by Kodi (if the audio hardware supports LPCM, else use Dolby AC3 transcoding option).

7.1 Surround

  • (in my case) Samsung EDID does not report correct (updated) audio output channels count metadata from the Samsung Soundbar once equipped with the optional rear speakers. It keeps reporting the device as a 5.1 system instead of 7.1 (not sure if EDID is misreported by TV or SB). Meaning that only natively supported passthrough content (Dolby codecs) will play in 7.1.4, while other codecs that cannot be passthrough natively (DTS) will be output as 5.1 LPCM (and upmixed to 7.1 by the soundbar).
1 Like