Kodi Community Forum
XBMC PulseAudio passthrough support (including Nvidia) is available - 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: XBMC PulseAudio passthrough support (including Nvidia) is available (/showthread.php?tid=96316)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18


- sjongele - 2011-11-16

cbxbiker61, just to try it out I have completely disabled Pulse (autospawn=0, processes killed). The Pulse devices are gone, as expected. With the passthrough device configured as "HDA Nvidia hdmi (ALSA)" again, the behavior is exactly the same as with Pulse switched on. Are you sure the bandwidth problem is really in Pulse?


- cbxbiker61 - 2011-11-17

sjongele Wrote:cbxbiker61, just to try it out I have completely disabled Pulse (autospawn=0, processes killed). The Pulse devices are gone, as expected. With the passthrough device configured as "HDA Nvidia hdmi (ALSA)" again, the behavior is exactly the same as with Pulse switched on. Are you sure the bandwidth problem is really in Pulse?

No, it may not be a Pulse issue. I'm working right now on getting the DTS-HD (some movies) issue sorted. I've done some preliminary tests without XBMC and I've got the bandwidth issue sorted. Now it's just a matter of rolling it into XBMC.


DTS-HD is fixed! - cbxbiker61 - 2011-11-18

For those of you that have waited patiently for DTS-HD to work properly with pretty much any file you throw at it, the wait is over. I have updated my AudioFilter and Xbmc repositories with the changes. To handle the higher data rates I also had to make a patch for PulseAudio (1.1 in particular). So here is the patch.

Configure xbmc with "Digital Surround 7.1 (HDMI)" selected in System Settings/Audio as passthrough device.

Code:
--- ./src/modules/alsa/mixer/profile-sets/default.conf.orig    2011-10-20 06:54:16.000000000 -0600
+++ ./src/modules/alsa/mixer/profile-sets/default.conf    2011-11-17 02:16:00.038900536 -0700
@@ -173,6 +173,12 @@ channel-map = left,right
priority = 4
direction = output

+[Mapping hdmi-surround-71]
+device-strings = hdmi:%f
+channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
+priority = 5
+direction = output
+
; An example for defining multiple-sink profiles
#[Profile output:analog-stereo+output:iec958-stereo+input:analog-stereo]
#description = Foobar
--- ./src/modules/alsa/alsa-mixer.c.orig    2011-10-20 06:54:16.000000000 -0600
+++ ./src/modules/alsa/alsa-mixer.c    2011-11-17 02:15:38.168035216 -0700
@@ -3700,7 +3700,8 @@ static int mapping_verify(pa_alsa_mappin
         { "iec958-passthrough",     N_("Digital Passthrough  (IEC958)") },
         { "iec958-ac3-surround-40", N_("Digital Surround 4.0 (IEC958/AC3)") },
         { "iec958-ac3-surround-51", N_("Digital Surround 5.1 (IEC958/AC3)") },
-        { "hdmi-stereo",            N_("Digital Stereo (HDMI)") }
+        { "hdmi-stereo",            N_("Digital Stereo (HDMI)") },
+        { "hdmi-surround-71",       N_("Digital Surround 7.1 (HDMI)") }
     };

     pa_assert(m);



- neoflex - 2011-11-18

7.1 ? even if you have a 5.1 system ?


- sjongele - 2011-11-18

Wow, great work!
And again, Pulse disabled and passthrough set to "HDA Nvidia hdmi (ALSA)" does the job as well :-)
Thanks!


- cbxbiker61 - 2011-11-19

neoflex Wrote:7.1 ? even if you have a 5.1 system ?

Yeah, it's a bit confusing.

When you do pass-through the audio amplifier decides what to do with the multiple channels. So the PC-side configuration will always be set to an 8 (7.1) channel configuration. Your amp setup should have a configuration for your speaker layout.


- ZyntaX - 2011-11-19

I feel very stupid but how do i apply the patch? Make a .patch file and run patch in git folder? But what command? patch -?

Edit: Thank you sjongele for the answer!


- sjongele - 2011-11-19

There seems to be a little regression; DTS-HD MA and DTS-HRA work. Normal DTS and Dolby Digital lead to stuttering video and no sound (at least in my setup).
This is with the patch applied, using the "GF108 High Definition Audio Controller Digital Surround 7.1 (HDMI) (PulseAudio)" passthrough device, as well as with "HDA Nvidia hdmi (ALSA)".


- sjongele - 2011-11-19

ZyntaX, from the pulseaudio source dir, patch -p0 < patch_file would be a good starting point. patch complains when it cannot find the correct files.


- neoflex - 2011-11-19

sjongele Wrote:There seems to be a little regression; DTS-HD MA and DTS-HRA work. Normal DTS and Dolby Digital lead to stuttering video and no sound (at least in my setup).
This is with the patch applied, using the "GF108 High Definition Audio Controller Digital Surround 7.1 (HDMI) (PulseAudio)" passthrough device, as well as with "HDA Nvidia hdmi (ALSA)".
same pb for me with DTS and Dolby Digital, no sound.
ion platform


Regression fix - cbxbiker61 - 2011-11-21

sjongele Wrote:There seems to be a little regression; DTS-HD MA and DTS-HRA work. Normal DTS and Dolby Digital lead to stuttering video and no sound (at least in my setup).
This is with the patch applied, using the "GF108 High Definition Audio Controller Digital Surround 7.1 (HDMI) (PulseAudio)" passthrough device, as well as with "HDA Nvidia hdmi (ALSA)".

The regression is fixed in my repository. It's been working great for me for a day and a half.


- sjongele - 2011-11-21

Based on a first few tests: better, but unfortunately not good on my system. Dolby Digital works OK sofar, DTS-HD also seems to be OK so far.

When using DTS I have observed two types of behavior:
* for some movies, when starting, video stops a few msecs every few secs. After about 15 sec, everything is fine.
* for other moves: video speed is not constant (too slow, too fast, jumps) and sound jumps as well.

Is there something I can try to help you solve this?


- cbxbiker61 - 2011-11-21

sjongele Wrote:Based on a first few tests: better, but unfortunately not good on my system. Dolby Digital works OK sofar, DTS-HD also seems to be OK so far.

When using DTS I have observed two types of behavior:
* for some movies, when starting, video stops a few msecs every few secs. After about 15 sec, everything is fine.
* for other moves: video speed is not constant (too slow, too fast, jumps) and sound jumps as well.

Is there something I can try to help you solve this?

I have to rip a movie with DTS core to do some testing. I think all of my rips are DTS-HD. If I can't reproduce the problem with my rips, I might need a sample.


DTS-core fixed - cbxbiker61 - 2011-11-22

cbxbiker61 Wrote:I have to rip a movie with DTS core to do some testing. I think all of my rips are DTS-HD. If I can't reproduce the problem with my rips, I might need a sample.

OK, the fix has been commited. I had a misplaced frequency division. A simple one line fix.

Ever since I got DTS-HD working, I've been ripping with the DTS-HD track in place. So my DTS-core code wasn't getting tested. Anyway, it's fixed now.


- GreenEyez - 2011-11-22

Nice job, i`m gonna try this on my test machine to see how it works. Any chance of porting your modified AudioFilter to Windows so we can get HD bitstreaming audio support with your branch until Audio Engine gets done?


This forum uses Lukasz Tkacz MyBB addons.