koying / SPMC

fork of xbmc/kodi
Other
634 stars 257 forks source link

DTS audio passthru gets put out als PCM on Sony Bravia #370

Open mbooij opened 7 years ago

mbooij commented 7 years ago

While Dolby Digital works fine with SPMC on my new Sony Bravia 2015 Android TV, DTS surround only is received as PCM stereo on in Sony receiver. Dolby Digital /DTS HD does not pass thru at all.

Detail: i am using digital audio out from my TV to my receiver. i am using the auto 2 passthru function

I tested this on SPMC 6.3.0 with Android TV 5.1.1 on a Sony Bravia

mbooij commented 7 years ago

A little update: i tested DD5.1 and DTS5.1 files on both the native videoplayer on the Sony Android TV and Kodi on PC connected to HDMI and using the same optical out. In both cases DTS works great. Only in Kodi /SPMC on Android the DTS passthru causes problems. This comfirms to me that this is an software issue of Kodi / SPMC. Hopeing for an update soon since this same issues was fixed for the Shield TV with a previous version of SPMC.

fabioneves commented 7 years ago

DD51 was working with android raw passthrough for me but DTS no sound, when I changed to android iec passthrough both worked!

koying commented 7 years ago

No DTS RAW on Android 5. Should gracefully fall back to IEC, though... Yep, works for me

mbooij commented 7 years ago

Sadly this does not work for me with an Sony Android TV using the optical output and a Sony receiver. When using IEC i only hear static with DD and DTS. With RAW 5.1 DD is good but 5.1 DTS is converterd to stereo PCM.

mbooij commented 7 years ago

I had a small hope that the laters 16.4 release would help, it did not. I am using the auto 2 audio out option in my Sony Android TV. Using auto 1 does not output DD and using PCM only outputs stereo PCM.

I like to remind that both DTS and DD work fine from withing the native video player with my Sony Receiver and the auto 2 option.

When using my old HTPC connected with HDMI to the TV audio also gets put thru corectly by the TV with the optical out in DTS, DD, and DTS+ / DD-HD.

When using SPMC i get these results: RAW: DD is OK, DTS is output as stereo PCM. IEC: DD and DTS is output as static noise. No passthru: stereo PCM

Hoping for a sollution from @koying since this is clearly a software problem. Can i provide any type of logging when playing back DTS?

NVSantos commented 7 years ago

I can confirm @mbooij problem. I also own a Sony Bravia X850C with passthrough via optical SPDIF and with Auto 2 selected on the TV. Other apps, like Netflix pass multichanel AC3 correctly with Auto 2.

When using SPMC with RAW I get DD passed but DTS outputs stereo PCM. With IEC both output static noise.

The Bravia X850C has Android 5.1

We're one step away of perfectness. DD works with RAW, we just need DTS working with RAW too.

I am available to test any special builds to help identifying this problem.

NVSantos commented 7 years ago

My last comment was for 16.3.0 I've installed 16.4.0 and the DD passthrough now is passed as stereo pcm, like DTS.

I've uninstalled 16.4 and installed 16.3.0 again and DD passthrough works fine again, so there is some kind of regression with 16.4.0

@mbooij does this happen in your Bravia too?

mbooij commented 7 years ago

@NVSantos manualy upgrading tot 16.4 via APK gave multiple issues with my SPMC installation so i had to reinstall via Play Store. When i used it i found no trouble with DD audio playback. I can reproduce it for u when 16.4 is available via Play Store. That should be any time now.

mbooij commented 7 years ago

Even with 16.4.2 the problem persists. Like NVSantos noted in 16.3 DD worked fine, it is now also broken and only static is heard. Is there any chance this get fixed with Android 5.1.1?

BidiM commented 7 years ago

DD and DTS via raw passthrough HDMI working fine for me on 16.4.2 installed via play store on X850C latest fw. AV receiver reporting DD and DTS respectively. DTS HD MA only very low volume noise, nothing else. Dont see any DTS HD capable receiver option in SPMC either. Note that i have pcm audio volume on max and channels on 2.0 (spdif used to require this for multi channel decode). Did not test with 5.1 speaker config. Did not see any audio1/2/pcm in advanced sound tv config either while running spmc. Anyone know how to get dts hd capable receiver option?

herrde commented 7 years ago

I'm just wondering if any further progress has been made yet to resolve the DTS passthrough problem?

I also own a Sony X8505c and can confirm the exact above issues described by mbooij when using the optical output, and I can also confirm that the native video player of the Sony TV has no problem doing the DTS passthrough.

So, to sum it all up, what do I have to do in order to get at least the DD5.1 passthrough to work with SPMC (which would at least be a small advantage for me)?

Is the above still correct? Did I miss anything here?

herrde commented 7 years ago

OK, played around with this over the weekend. Result: on my X8505c, passthrough via optical output works flawlessly when streaming DD5.1 using SPMC 16.4.2 (AFAIK still the latest official version). No proper DTS passthrough though (still the "PCM problem"), as opposed to the native Video App where DTS passthrough works (but which has a lot of other disadvantages). So one has to convert the audio track to DD5.1 prior to watching if dealing with DTS audio - which can be done very fast by using a tool like e.g. Xmedia Recode.

On a side note: my Sony was and is set to "Auto 1" in the TV audio out options, no need to change this setting.

I really hope that DTS passthrough will work in a future SPMC version. For me, SPMC would be perfect then.

juscelinofs commented 7 years ago

What if using kodi version 17 (Kryton)? Anyone has already tested?

herrde commented 7 years ago

Don't have a version 17 installed yet. But it definitely doesn't work with 16.1., Passthrough doesn't even work with Dolby Digital 5.1. on 16.1. I think this is related to not being able to change the pass-through method. As opposed to SPMC, on Kodi, Audio-out is fixed on "android, audiotrack". On SPMC, you can set this to "Raw", and then at least the Passthrough works with DD 5.1

niko3d commented 7 years ago

I can confirm same results with DTS through my Sony gear, static noise etc. Need to drop down to stereo, dolby digital works no problem at 5.1 for me since using spmc.

yostyle commented 7 years ago

Same problem on Philips Android TV. Dolby Digital works but not DTS (static noise). juscelinofs, on kodi krypton you can't set up DTS. You can't disable DTS passthrough and you have no sound. RAW for DTS only work as of Android API 23 (6.0 Marshmallow).

herrde commented 7 years ago

RAW for DTS only work as of Android API 23 (6.0 Marshmallow).

This can't be true actually, as the standard Video app on my Sony X8505c TV (running on Android 5.x) is able to passthrough DTS audio perfectly (but has a lot of other disadvantages). That's exactly the strange thing about all of this! If the standard Video app can do it, why can't either Kodi or SPMC?

yostyle commented 7 years ago

It's a good question. Perhaps Sony created their own API for DTS passthrough. There is an important difference between Kodi App and Sony Player App. Second have System permission and Kodi App can't get this permission.

herrde commented 7 years ago

I see, you might be right, but this means that it should be possible for the Kodi/SPMC teams to develop their own DTS passthrough routine.... or am I wrong here?

yostyle commented 7 years ago

It's true if Sony share their own API. If this API require System permission Kodi/SPMC teams can't use this. Other apps, like Netflix pass multichanel AC3 correctly. Sony or Philips does not provide documentation. We have same problem on Philips Android TV. Android 6.0 API 23 include DTS encoding : https://developer.android.com/reference/android/media/AudioFormat.html#ENCODING_DTS

yostyle commented 7 years ago

Can you confirm that DTS passthrough works with Netflix App ? I analyzed Netflix Android TV APK. It uses their own player : JPlayer. For legal reason i can't publish source code but you can see old version here : https://github.com/pankajk87/CompSecurity/tree/master/NetFlix_source/src/com/netflix/mediaclient/media/JPlayer

dmillerzx commented 7 years ago

I've been playing with this all weekend and appear more confused now than ever. I have both DTS and DD pass-through working via Kodi (play store). The caveat is that my Xbox 1 must be turned on and active. I can't explain why, but on another form I saw another user mention that they had a similar circumstance and their pass-through would only work when their receiver (via HDMI) was again on.

When the X1 is not turned on the passthrough audio sources will only play static.

I am using a Sony X850D (fully updated | AUTO 2 setting) w/ Sony ht-ct390 sound bar (connected via HDMI/ARC). I cannot for the life of me understand why the passthrough is only working when my HDMI device (in this case an XBOX 1) is powered on and active.

mbooij commented 7 years ago

@dmillerzx Sadly i was not able te replicate this with my PS4. Analysing your discovery my thougths are that the problem must have someting to do with starting the DTS stream or keeping it alive, since your X1 is doing that for Kodi in your case.

mbooij commented 7 years ago

@yostyle It seems that the NetFlix app only uses DD5.1 for surround. I was not able to find a DTS title in there. The native video player does output DTS just fine. I will try some other players (like VLC) tonight.

mbooij commented 7 years ago

@koying After updating to version 16.5.4 (still was on 16.3 because 16.4 broke DD audio for me) this issue is now solved for my setup. DTS is being sent via pass-thru to my receiver as DD allready did. Even DTS/DD HD is being downscaled correctly.

My setup is a Sony Bravia Android TV (auto 2 setting) on Android 5.1.1 with audio thru toslink to my Sony receiver. Reading the release-notes since 16.3 i cant realy find the cause for this fix. Perhaps the API 21+? Its great that it works. Now my Pi can be used for other things.

Edit: Hold your horses. The problem is not fixed totally. After rebooting my TV the problem returned and DD also gives static (witch works gr8 in 16.3). With version 16.5.4 i was able to reproduce the situation @dmillerzx described. When my PS4 is on and i switch to SPMC DD and DTS work great. I can even shutdown the PS4 and keep watching in SMPC. Only when i exit the app i need to restart my PS4 to make DD and DTS possible. This does not work with my Wii-U so it has something to do with the DD stream the PS4 en X1 create. It is my guess this problem can be fixed by creating a DD/DTS stream when starting the app to recreate what de PS4 and X1 are doing for @dmillerzx and me.

yostyle commented 7 years ago

@mbooij Thanks for Netflix app information. What is the name and namespace of native sony video player ?

bostjanlaba commented 7 years ago

I have exact same situation like @dmillerzx

I have to have my hdmi1 device active, in my case it's stb for iptv, then passthrough works. I have bravia 65w928c

bostjanlaba commented 7 years ago

If it's important: my connection from tv to avr is thru HDMI/ARC and my avr is yamaha soundbar ysp-2700

mbooij commented 7 years ago

@yostyle its just called Video Player. I have no clue how to find its namespace. @koying Is it possible this problem gets some attention? DD worked just fine with version 15.3 of SPMC but is broken now. DTS and DD work fine with 15.4 but needs a workaround with an other audio source.

mbooij commented 7 years ago

Somehow the 16.0 version of Kodi runs some DTS streams just fine on my Android TV 5.1.1 Sony Bravia: http://mirrors.kodi.tv/releases/android/arm/old/kodi-16.0-Jarvis-armeabi-v7a.apk

Sadly this version does not support DD (where SPMC 15.3 does DD perfectly but lacks DTS) on my setup.

caveman60 commented 7 years ago

TV: Sony KDL55W755C running Android 5.1.1. Kodi version: 16.1 SPMC version: 16.5-5 Connected via optical SPDIF to a Sony 5.1 AV amp

Hi I am struggling to successfully access a proper DD5.1 audio stream with any settings using either the Kodi or SPMC versions listed above, so wondered if I could get help on settings.

With pass-through enabled; 2.0 channels selected and all almost any combination of audio out device (only selectable on the SPMC version) my sony AV amp lights up to show it is receiving multichannel audio but there is a subtle problem with the stream which makes it hard to watch: the best way I can describe it is that although there is sound from all 5+1 channels and some stereo separation, it is as though the centre channel is being played equally through all the speakers leaving the voice track diffuse and unfocussed.

The same set-up relays perfect DD 5.1 from off air Freeview transmissions, SKY and Netflix/Amazon Prime Video.

What am I doing wrong?

mbooij commented 7 years ago

@caveman60 You are not doing anything wrong. It seems that DTS is not supported for Android TV with SPMC since verssion 15.3 and higher when using SPDIF. DD is not supported since Kodi 16.0 with SPDIF. Its still unclear why this support is broken but works on the Shield and some HDMI receivers still seem to work with Android TV on a Sony tv.

caveman60 commented 7 years ago

Thanks mbooij! Out of interest, is the fuzzy play-back that I am describing (albeit triggering the "multi-channel" light on my Sony amp) what others call PCM stereo? To be honest, it is worse than that in my opinion as normally the Dolby Prologic MV setting does a pretty good job of extracting surround channels while keeping the dialogue track focussed...

mbooij commented 7 years ago

@caveman60 That would be my guess since Dolby Prologic remixes an Stereo source to a somewhat surround experience. If your receiver supports DD or DTS passtru u should use these. Dolby Prologic only works when the source is mixed as Dolby Prologic, such as some old movies and Wii/Wii-U games.

caveman60 commented 7 years ago

I leave my (old Sony STR-DE 598) amp on Dolby PLII MV all the time as it does a fair job on non DD stereo streams and automatically flips to DD5.1 or DTS (and lights up blue!) if it detects an encoded digital signal. It is this setting which gives me the "fuzzy" digital multichannel signal in Kodi and SPMC via SPDIF (but proper DD5.1 on Freeview, Sky and Netflix/Amazon on the Sony). For those who remember when it was working, should I have the Sony set on Auto 1, Auto 2 or PCM and should I select Pass-through device as "Raw" or "IEC" to give the best chance of receiving a DD5.1 stream on some upcoming SPMC/KODI bug-fix?

caveman60 commented 7 years ago

Sorry to be such an idiot, but just realised that pass-through is working fine (including DTS). Stupidly, I assumed that movies on SALTS would be in 5.1, so ignored the clear labelling of the streams as 2.0. Playing around with phoenix and Exodous I have found (a few) 5.1 and DTS encoded movies and they all work fine.

bostjanlaba commented 7 years ago

Caveman60, did you check audio bitrate on files that do work with passthru? In my case DD and DTS work if audio bitrate is not over 448 (640 bits give static noise...).

caveman60 commented 7 years ago

Not sure how to check bitrate on “off the peg” movie urls – all I can see easily is the designation (eg. DTS-HD) and what the AVamp displays (eg. DD, DTS etc..). Is there another way to check bit-rate?

From: bostjanlaba [mailto:notifications@github.com] Sent: 09 February 2017 07:37 To: koying/SPMC Cc: caveman60; Mention Subject: Re: [koying/SPMC] DTS audio passthru gets put out als PCM on Sony Bravia (#370)

Caveman60, did you check audio bitrate on files that do work with passthru? In my case DD and DTS work if audio bitrate is not over 448 (640 bits give static noise...).

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/koying/SPMC/issues/370#issuecomment-278568398 , or mute the thread https://github.com/notifications/unsubscribe-auth/AX5hE4XyRVPdb-9Ba9L6q-7tnOw-PUR5ks5rasIMgaJpZM4JLWqI . https://github.com/notifications/beacon/AX5hE1EVZRf8shvymiV4y4BqCc-wNdJdks5rasIMgaJpZM4JLWqI.gif

yueyehm commented 7 years ago

@dmillerzx Yes, same situation here, i have 65x85d, and one mi box and one yamaha sound bar connected as hdmi arc. Raw pass through and IEC passthrough are all work from my setup. But only one thing i need do is turn on my Mi box. If not, the soundbar only played the static. So, is there any better solution?

blshkv commented 6 years ago

Facing the same issue with Sony Bravia and Kodi 17.3. Sony runs Android 6.0.1 API level 23 patch 1 May 2017, build 3.885 (dts should be supported) The log is here: http://paste.ubuntu.com/25037074/

The workaround is to disable dts{hd} and enable ac3 transcoding.