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


- cbxbiker61 - 2011-06-20

Just wanted to let you guys know that I'm working getting it rolling with the latest xbmc git. They've patched quite a few things that I had previously patched in my version, so my new patch set is a lot simpler. I've got one hurdle to overcome and then I'll be ready to release the newer version.


- cbxbiker61 - 2011-06-20

eternalsword Wrote:As I mentioned in a previous post, as is your version doesn't work with my setup using nvidia gtx590 on gentoo with git-sources kernel version 2.6.39-rc7. I can see the hdmi (Pulse) option but it doesn't play anything. It may be an issue with detecting the correct device. Since it is dual-gpu (first one ever from nvidia) it shows up as two connections but only one of the two actually works.

The built-in audio on the motherboard is hw0. hw1 is from the nvidia card but is the blank one. hw2 is the one that works, specifically hw2,9. Let me know of any info I can provide that might help.

Thanks

It'd be interesting to know what your output from "pactl list" is. Also, can you get paplay to output through your gtx590?


- cbxbiker61 - 2011-06-20

eternalsword Wrote:Here's my patch. Patch is applied before bootstrapping. Switched version to 0.9.999 Not sure what the closest version is to the current state of your repo. Should probably replace with that version. By the way, I'll probably set up an overlay for gentoo to automate using your stuff for anyone interested. I have the pulse ebuild working. Will need to set up audiofilter and xbmc.

Code:
diff --git a/git-version-gen b/git-version-gen
index 6181ad9..0fdb31f 100755
--- a/git-version-gen
+++ b/git-version-gen
@@ -133,23 +133,23 @@ then
#    v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`;
     :
else
-    v=UNKNOWN
+    v=0.9.999
fi

v=`echo "$v" |sed 's/^v//'`

# Don't declare a version "dirty" merely because a time stamp has changed.
-git status > /dev/null 2>&1
+#git status > /dev/null 2>&1

-dirty=`sh -c 'git diff-index --name-only HEAD' 2>/dev/null` || dirty=
-case "$dirty" in
-    '') ;;
-    *) # Append the suffix only if there isn't one already.
-    case $v in
-      *-dirty) ;;
-      *) v="$v-dirty" ;;
-    esac ;;
-esac
+#dirty=`sh -c 'git diff-index --name-only HEAD' 2>/dev/null` || dirty=
+#case "$dirty" in
+#    '') ;;
+#    *) # Append the suffix only if there isn't one already.
+#    case $v in
+#      *-dirty) ;;
+#      *) v="$v-dirty" ;;
+#    esac ;;
+#esac

# Omit the trailing newline, so that m4_esyscmd can use the result directly.
echo "$v" | tr -d '\012'

This patch fixes quite a few compilation issues with other multimedia apps such as Vlc. Although changing the version to 1.0.0 was necessary to get Vlc to detect a proper version. I don't think they'll roll this into their git version, but you could ask on the pulseaudio mailing list.


- shadow - 2011-06-20

eternalsword Wrote:As I mentioned in a previous post, as is your version doesn't work with my setup using nvidia gtx590 on gentoo with git-sources kernel version 2.6.39-rc7. I can see the hdmi (Pulse) option but it doesn't play anything. It may be an issue with detecting the correct device. Since it is dual-gpu (first one ever from nvidia) it shows up as two connections but only one of the two actually works.

The built-in audio on the motherboard is hw0. hw1 is from the nvidia card but is the blank one. hw2 is the one that works, specifically hw2,9. Let me know of any info I can provide that might help.

Thanks
Try killing pulseaudio then restarting it with this command it should add a new sink for hw2,9 it will look the same but not say anything about stereo.

pulseaudio --load="module-alsa-sink device=hdmi:2,3"

p.s. I know I put a 3 but hdmi goes 0-3 not 3, 7, 8, and 9


- Taravel - 2011-07-02

is this patch compatible with new pulseaudio 0.9.23? if not what is the version that will be?


- cbxbiker61 - 2011-07-03

Taravel Wrote:is this patch compatible with new pulseaudio 0.9.23? if not what is the version that will be?

Official passthrough support should show up in pulseaudio 1.0.


- eternalsword - 2011-08-08

I did manage to get things working. My problem was pulse's autodetection through udev was overwriting my choice to use hw2,9. It's autodetection for the gtx590 must be incorrect.

I am having one issue with about 200ms of static during transition to passthrough.

Could be my setup which is a little weird. I have a sony receiver with hdmi audio in. I have it set to send sound to amp and tv. TV has optical out to my wireless headset transmitter. I have the popping in my headset. amp is currently muted so I don't bother my parents since it's the middle of the night. Will test amp output later.

All things considered, well worth that blip of static. Haven't tested any HD audio. Will provide further feedback as I test more.


- jomo - 2011-08-11

Hello everyone,

I'm new to ubuntu dev but i'd like to give it a try.
I tried to compile using the script given by Shadow but i'm having an error msg at the "./bootstrap.sh" line.
It tells me that there's a problem with JSONLIB missing.
I'm sure the problem comes from me... ;-)

Someone nice to explain ?

Thx,
Jomo


- jomo - 2011-08-12

This is the error message i get :

checking for LIBJSON... configure: error: Package requirements ( json >= 0.9 ) were not met:

No package 'json' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBJSON_CFLAGS
and LIBJSON_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.


I tried to install many *json* packages but still the same message... I also tried "Import json"...


- eternalsword - 2011-08-12

jomo Wrote:This is the error message i get :

checking for LIBJSON... configure: error: Package requirements ( json >= 0.9 ) were not met:

No package 'json' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBJSON_CFLAGS
and LIBJSON_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.


I tried to install many *json* packages but still the same message... I also tried "Import json"...

please don't hijack threads.

that said, check the README.linux file for the build dependencies.


- jomo - 2011-08-14

Thx to cbxbiker61 for this wonderful thing !
Thx to shadow for the script which helped me so much
And finally thx to you eternalsword. My goal wasn't to hijack anything. Your answer made search harder and after hours (...) I finally found what I needed on the pulseaudio website !

I had no problem with your work cbxbiker61 : Everything works fine here.
Here's my configuration :
Acer Revo 3600
ION Platform (N230)
2Go RAM
Ubuntu 10.04


- cbxbiker61 - 2011-09-07

My git branch has been brought up to date with current xbmc master. I've been updating it about every two weeks or so. Everything seems to be working well.

I've just ordered an asus e35m1-i deluxe, so I've been testing xbmc with vaapi/xvba on my notebook with an mobile ati 4200. Seems to work OK on the mobile 4200, although the 4200 doesn't seem to have enough power to handle hardware decoding without some artifacting on high bandwidth blu-ray streams. It seems to work well enough that I though I'd give the e35m1-i's built in graphics a shot. If that doesn't work out well....then I'll just buy a low-profile GT430 and be done with it.


- aragorn - 2011-09-07

Just thaught i'd post with a success thread.

I built this last night and upon testing it i found XBMC rather unstable, crashing when navigating the menus and similar.

Turned out there was some bug (mentioned elsewhere on the forum) in the thumbnail loader, that was causing most of the problems.

I also had a few issues getting the pulseaudio output working, however this seemed to be related to my graphics card having 4 visible audio devices (3, 7, 8, 9) and Pulse was defaulting to 3 rather than the required 7. Prior to this build, i was running without pulseaudio at all, so that configuration had never been nailed down. Lots of messing to get the right configuration and quite a few reboots later and i had that working by adding a sink in the default.pa file and selecting the correct output in XBMC.

I did a git pull this morning which fixed the buggy thumbnail loader and rebuilt xbmc and thats now fixed, so i set to testing the passthru of DTS, and i'm pleased to say it worked perfectly. The Onkyo lit up with DTS-HD MSTR and seemed happy. I only played the movie for a few minutes for testing, but i'll probably watch it properly tonight and report back if there are any issues.

I need to get hold of a movie thats done in TrueHD and test that out as well.

The only problem i noticed, was that upon pressing stop, XBMC crashed. I tried playing an MKV and an AVI and those were fine, but as soon as i press stop on the m2ts file XBMC crashes.

Ofcourse this may well be nothing to do with the passthru, i'll need to do some more investigation as to whats going on.

For the record, my system specs are a Geforce GT220 (1GB), with a Sempron 3000 CPU and 1GB of RAM, and Ubuntu 10.04LTS


- cbxbiker61 - 2011-09-20

cbxbiker61 Wrote:My git branch has been brought up to date with current xbmc master. I've been updating it about every two weeks or so. Everything seems to be working well.

I've just ordered an asus e35m1-i deluxe, so I've been testing xbmc with vaapi/xvba on my notebook with an mobile ati 4200. Seems to work OK on the mobile 4200, although the 4200 doesn't seem to have enough power to handle hardware decoding without some artifacting on high bandwidth blu-ray streams. It seems to work well enough that I though I'd give the e35m1-i's built in graphics a shot. If that doesn't work out well....then I'll just buy a low-profile GT430 and be done with it.

Well it turns out the e35m1-i/vaapi/xvba doesn't work well enough to stream blu-ray content, so I put in a GT430 which is about $60. Now have a really nice "little" xbmc box. The Atheros 9285 that comes with the e35m1-i doesn't handle 5GHz wireless so I swapped it out for a 9280 that does, $15 on ebay. I had already bought one for my notebook, so I knew it worked well. The case is an Antec ISK 310-150, which is nice little case, only 2 1/2" disk drives and slim-line dvd/blu-ray are supported, but that's the price you pay for a small case.


- cbxbiker61 - 2011-09-30

PulseAudio 1.0 is out. It seems to work fine with my git branch.