Kodi Community Forum
[WINDOWS][PATCH]Bitstream output of HD audio formats - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+--- Thread: [WINDOWS][PATCH]Bitstream output of HD audio formats (/showthread.php?tid=121877)



- Dixon Butz - 2012-02-08

a11599 Wrote:You can try the build in my signature (this is what I use on my HTPCs). It is supposed to fix this issue (it also has some other nice patches Wink). It is based on 29 Dec master (~ Eden beta 1). So don't be surprised if you see an older version of your library after setup.



I installed this over danielae's. And the skipping in the video is gone on DTS-MA. I think the sync was good. Can't really test it ATM.

All the audio settings were still there from danielae's.

Just one question, is this the right build number for your version:
XBMC 11.0-PRE Git:20120204-58dac03 (Compiled : Feb 4 2012)

Keeping this thx!


- Senthil - 2012-02-08

DDDamian Wrote:This is not a debug log - enable debugging first. It appears the error is obvious but we're missing information...

thanks DDDamian, Sorry!! thats my bad... i will post actual debug log... soon


- Mati24 - 2012-02-08

I just realise that when I show information (O), it's DTS HD but with 1516 kbps like the normal DTS.
Is it normal ?
Thank you


- a1sy - 2012-02-09

bluray Wrote:Actually, I am very familiar with your 9600GT GPU because I helped my friend installed it in his HTPC. It's older card, but it is a very good card. If I remember correctly, I used DVI to HDMI cable (AmazonBasics HDMI to DVI Adapter Cable). Your 9600GT should come with the (2-Pin/2-Pin SPDIF Audio Cable), and it is known as SPDIF header. It have been a long time since I installed it. If you check your manual, it should have an instruction to install SPDIF header cable. If you install it right, you'll have both audio/video over DVI to HDMI cable. It'll be easier to make it work with XBMC, because it'll work the same way as HDMI to HDMI cable. Since it is SPDIF over DVI to HDMI, you're limited to SPDIF capability!

Blueray, I decided to order GT430 and remove 9609GT+Xonar. Will know by next week when card will arrive.
Thank you for making me spend some money for upgrade :-)


Xonar HDAV 1.3 and Dts hd MA... - Senthil - 2012-02-09

DDDamian Wrote:This is not a debug log - enable debugging first. It appears the error is obvious but we're missing information...

Hi DDDamian.. i think i got the proper debug log.. can you please assist me on this... please let me know if you need anymore info...thanks


here is my debug log...

http://pastebin.com/raw.php?i=Yd81Gyga


looks problem here...

18:27:56 T:3728 NOTICE: Creating audio device with codec id: 86020, channels: 2, sample rate: 48000, pass-through
18:27:56 T:3728 DEBUG: CWin32WASAPI::Initialize: endpoint device S/PDIF Pass-through Device (ASUS Xonar HDAV 1.3 Audio Device)
18:27:56 T:3728 DEBUG: CAudioContext::SetActiveDevice - SetActiveDevice from 2 to 0
18:27:56 T:3728 DEBUG: CAudioContext::RemoveActiveDevice - Removing device 2
18:27:56 T:3728 DEBUG: CGUIAudioManager:Big GrineInitialize
18:27:56 T:3728 ERROR: CWin32WASAPI::Initialize: Audio format not supported by the WASAPI device. Channels: 8, Rate: 192000, Bits/sample: 16.
18:27:56 T:3728 ERROR: CWin32WASAPI::Initialize: WASAPI initialization failed.
18:27:56 T:3728 DEBUG: CAudioContext::SetActiveDevice - SetActiveDevice from 0 to 2
18:27:56 T:3728 DEBUG: CAudioContext::RemoveActiveDevice - Removing device 0



- a11599 - 2012-02-09

voip-ninja Wrote:Does it include this HD audio patch? Any chance you will be building one with this new HD audio patch as well as building on Eden 2?

Ofcourse it does. Otherwise I wouldn't suggest you to try it. Smile I am not planning to update the build before final Eden comes out.


- a11599 - 2012-02-09

Dixon Butz Wrote:Just one question, is this the right build number for your version:
XBMC 11.0-PRE Git:20120204-58dac03 (Compiled : Feb 4 2012)

Thanks for testing. That's the version it tells, but actually it was compiled on 8 Feb and the installer version is 20120208-8dcbffd. I think the version is wrong because I just did a quick compile on 8 Feb and the version string was not updated since 4 Feb.


- a11599 - 2012-02-09

Interesting. With ATI HD6570 DTS-MA passthrough the audio is opened as 2ch 768000 Hz:

NOTICE: Creating audio device with codec id: 86020, channels: 2, sample rate: 768000, pass-through
DEBUG: CWin32WASAPI::Initialize - Channels: 2 - SampleRate: 768000 - SampleBit: 16 - Resample false - IsMusic false - IsPassthrough 6 - audioDevice: AMD HDMI Output (AMD High Definition Audio Device)

In your case, for some reason the card is opened for 8 ch 192000 Hz.


Xonar HDAV 1.3 and Dts hd MA... - Senthil - 2012-02-09

a11599 Wrote:Interesting. With ATI HD6570 DTS-MA passthrough the audio is opened as 2ch 768000 Hz:

NOTICE: Creating audio device with codec id: 86020, channels: 2, sample rate: 768000, pass-through
DEBUG: CWin32WASAPI::Initialize - Channels: 2 - SampleRate: 768000 - SampleBit: 16 - Resample false - IsMusic false - IsPassthrough 6 - audioDevice: AMD HDMI Output (AMD High Definition Audio Device)

In your case, for some reason the card is opened for 8 ch 192000 Hz.

yes it is... i have no idea... but when i use just my HD5850... everything works great... just this xonar hdav1.3 doesnt like the dts-hd.. mm Eek


- Kerbys - 2012-02-09

WORKING GREAT!! seriously great work!


- a11599 - 2012-02-09

DanielaE Wrote:Thanks for testing! While I have cherry-picked your patch into my repo to play with it for a while, I came to the conclusion that neither the original code nor your fix is correct - for two reasons: [...]

Your argument sounds reasonable, however the current solution should still work correctly. Muxer output should have the same duration as the encoded packet to stay IEC compliant (the audio clock must be kept in sync with the decoded audio).

However, my patch was not working correctly (it broke decoding) and was implemented in the wrong place (should not be in CDVDPlayerAudio). I had some time to track down the issue. The root cause is that duration is calculated from codec samplerate and not the muxed samplerate. dts-ma is muxed into 2 ch 768 kHz while dts core is 2 ch 48 kHz, that's where the 16x duration diff comes from. The new patch returns the correct muxer rate for dts-ma.


- a11599 - 2012-02-09

And by the way, thanks for this magnificent patch! Smile


- DDDamian - 2012-02-09

Senthil Wrote:yes it is... i have no idea... but when i use just my HD5850... everything works great... just this xonar hdav1.3 doesnt like the dts-hd.. mm Eek

Hi Senthil - went through your log and the data (at least as far as shown in the log) is correct - meaning it tries to initialize the card with the correct number of channels, frequency, bitdepth, etc.

First off I would go here and check that you have the latest driver. Pls double-check whether you have the deluxe version or not. The link provided is for the non-deluxe Win 7 x64 driver per your log. Either way compare your driver to the latest revision on the AsusTek page and upgrade if necessary.

If that fails, the issue is just with the ASUS driver, as I can see by the WAVEFORMATEXT data that the WASAPI sink should initialize. I know that the Xonar was pretty closely tied to TMT as a player, and had to match up with specific versions of it. I'm not sure if there is some non-standard handshake that has to occur as apparently happens with TMT/Xonar.

If that driver update doesn't fix it you may have two options: use your I7's onboard graphics or replace the Xonar with a newer GPU w/HDMI. I'd recommend anything recent by ATI - just pick a level based on whether this is a pure HTPC or also a gaming rig.

You may be fondly attached to the Xonar and in the dark ages (a few years ago lol) it was one of the first ways to get good audio from a PC, but this card is a little famous for only working well with TMT for HD audio.


- bluray - 2012-02-09

a1sy Wrote:Blueray, I decided to order GT430 and remove 9609GT+Xonar. Will know by next week when card will arrive.
Thank you for making me spend some money for upgrade :-)
If you want to order a new GPU, I was going to suggest AMD for Windows instead. It seem to work better with W7+XBMC. This $35 (SAPPHIRE 100322L Radeon HD 6450 1GB) should be able to playback BD in full 1080P video, bitstreaming DTS-HD/TrueHD and 3D too!


- DDDamian - 2012-02-09

@Senthil - I can't check without a card, but one other thing I note is that the driver indicates it's setup for spdif - can you verify (after checking your drivers) that it's set for HDMI, 8 ch, 192000hz?