XBMC PulseAudio passthrough support (including Nvidia) is available

  Thread Rating:
  • 3 Votes - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
cbxbiker61 Offline
Senior Member
Posts: 172
Joined: Nov 2010
Reputation: 2
Post: #31
shadow Wrote:I was in /usr/local

Although I noticed that I I am only at 20 not 21. (stock ubuntu PA was 16)
Am I still having problems or did you miss type?

Recompiling xbmc now.

They must've lowered their protocol version in version.h. I see it at 20 in git now. Anyway I've lowered the required version. "git pull" on your xbmc source and you should be good to go after a recompile.
find quote
shadow Offline
Senior Member
Posts: 173
Joined: Jan 2011
Reputation: 3
Post: #32
I think I figured it out, you forgot to mention to change to the passthrough branch of the Pulse audio git. I am trying to compile that now.
find quote
cbxbiker61 Offline
Senior Member
Posts: 172
Joined: Nov 2010
Reputation: 2
Post: #33
shadow Wrote:I think I figured it out, you forgot to mention to change to the passthrough branch of the Pulse audio git. I am trying to compile that now.

Good catch! I use scripts to build my code....so I forgot that one minor detail.
find quote
shadow Offline
Senior Member
Posts: 173
Joined: Jan 2011
Reputation: 3
Post: #34
I have it giving me the Pulse options in xbmc but I am having another problem that stops the sound from working but is not likely your problem.

For some reason this version of PA is ignoring my custom "load-module module-alsa-sink device=hdmi:1,3" line in /etc/pulse/default.pa so I can't get audio going to the right pin.

Not even stereo sound from other audio that worked before.
find quote
cbxbiker61 Offline
Senior Member
Posts: 172
Joined: Nov 2010
Reputation: 2
Post: #35
shadow Wrote:I have it giving me the Pulse options in xbmc but I am having another problem that stops the sound from working but is not likely your problem.

For some reason this version of PA is ignoring my custom "load-module module-alsa-sink device=hdmi:1,3" line in /etc/pulse/default.pa so I can't get audio going to the right pin.

Not even stereo sound from other audio that worked before.

You probably want to use something along these lines to mask the available audio devices:

options snd-hda-intel probe_mask=-1,0xa in a file such as /etc/modprobe.d/snd_hda_intel.conf

You might want to google that to get the correct options for your config. That works with my internal audio and nvidia gtx460.
find quote
shadow Offline
Senior Member
Posts: 173
Joined: Jan 2011
Reputation: 3
Post: #36
It works! I could not find a probe_mask that works but I found out how to get that sink working in pulseaudio without the config file. I killed pulseaudio then loaded it with "pulseaudio --load="module-alsa-sink device=hdmi:1,3""

My receiver has reported "7.1ch DTS-HD MSTR" among others like one movie I clicked on reported "6.1ch DTS-HD HI RES"


I just have to figure out why PA doesn't use the config file or a way to have that command used at normal load instead of manually restarting PA.
find quote
cbxbiker61 Offline
Senior Member
Posts: 172
Joined: Nov 2010
Reputation: 2
Post: #37
AudioFilter git has been updated with a fix for a problem that could cause Xbmc to segfault. It also handles dts-hd better.
find quote
cbxbiker61 Offline
Senior Member
Posts: 172
Joined: Nov 2010
Reputation: 2
Post: #38
Philmatic Wrote:Those drop-outs are happening on Boxee's bitstreaming code too.. they haven't been fixed yet and they're proving to be quite hard to troubleshoot.

My latest update to AudioFilter seems to have eliminated it here.
find quote
cbxbiker61 Offline
Senior Member
Posts: 172
Joined: Nov 2010
Reputation: 2
Post: #39
Updated xbmc git with work-around to prevent drop-outs playing music. The drop-out problem doesn't happen with the same code on Dharma. I'd say it probably has to do with sleep time calculations.
find quote
shadow Offline
Senior Member
Posts: 173
Joined: Jan 2011
Reputation: 3
Post: #40
Is it possible until you have time to add TrueHD support to at least send the ac3 core? Whenever I try to watch a TrueHD movie my receiver only receives 2 channel pcm.
find quote
shadow Offline
Senior Member
Posts: 173
Joined: Jan 2011
Reputation: 3
Post: #41
I thought it would be nice to make a quick script people could use to try this out. So here it is.

Code:
#!/bin/sh

#Requires a xbmc ppa to get all xbmc build dependencies.
sudo apt-get build-dep pulseaudio xbmc

git clone git://git.collabora.co.uk/git/user/arun/pulseaudio.git
git clone git://github.com/cbxbiker61/audiofilter.git
git clone git://github.com/cbxbiker61/xbmc.git

cd pulseaudio
git checkout passthrough
./bootstrap.sh
./configure --prefix=/usr --sysconfdir=/etc
make -j`grep 'processor' /proc/cpuinfo | wc -l`
sudo make install
pulseaudio -k

cd ../audiofilter/gnu/
make -j`grep 'processor' /proc/cpuinfo | wc -l`
sudo make install

cd ../../xbmc
./bootstrap
./configure
make -j`grep 'processor' /proc/cpuinfo | wc -l`
sudo make install
cd ..
find quote
cbxbiker61 Offline
Senior Member
Posts: 172
Joined: Nov 2010
Reputation: 2
Post: #42
shadow Wrote:Is it possible until you have time to add TrueHD support to at least send the ac3 core? Whenever I try to watch a TrueHD movie my receiver only receives 2 channel pcm.

I'm fixin to dig into true-hd right about now. I only have one blue-ray (so far) that seems to be true-hd. Since I haven't dug into the code yet, I'll just say it'll probably be a week.
find quote
cbxbiker61 Offline
Senior Member
Posts: 172
Joined: Nov 2010
Reputation: 2
Post: #43
shadow,

I've tried to get ffmpeg to spdif my truehd test file and it fails. You wouldn't happen to have a working command. I'm not sure that ffmpeg's handling of truehd is well debugged.

ffmpeg -i Gattaca.truehd -f spdif -acodec copy Gattaca.truehd.spdif


FFmpeg version git-N-28432-g4786076, Copyright © 2000-2011 the FFmpeg developers
built on Mar 14 2011 17:51:24 with gcc 4.5.2
configuration: --prefix=/usr --libdir=/usr/lib64 --datadir=/usr/share --mandir=/usr/share/man --enable-pic --enable-vdpau --enable-gpl --enable-postproc --enable-shared --enable-libvorbis --enable-libtheora --enable-libgsm --enable-libfaac --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-nonfree --enable-debug --disable-stripping
libavutil 50. 39. 0 / 50. 39. 0
libavcodec 52.114. 0 / 52.114. 0
libavformat 52.103. 0 / 52.103. 0
libavdevice 52. 3. 0 / 52. 3. 0
libavfilter 1. 76. 0 / 1. 76. 0
libswscale 0. 12. 0 / 0. 12. 0
libpostproc 51. 2. 0 / 51. 2. 0
Gattaca.truehd: Invalid data found when processing input
find quote
shadow Offline
Senior Member
Posts: 173
Joined: Jan 2011
Reputation: 3
Post: #44
That should of worked, it is the same command I have used to successfully pass through Truehd. Maybe your input is corrupt. You can get some samples online. I will post the link when I get home. It was called demo world or something.

Never mind I found it.
http://www.demo-world.eu/trailers/high-d...ailers.php
(This post was last modified: 2011-03-24 10:04 by shadow.)
find quote
MrBump Offline
Member
Posts: 74
Joined: Dec 2008
Reputation: 0
Post: #45
shadow Wrote:Is it possible until you have time to add TrueHD support to at least send the ac3 core? Whenever I try to watch a TrueHD movie my receiver only receives 2 channel pcm.

Shadow, i had the exact same problem until yesterday. Found out it was my old nvidia drivers, you might have the same issues.

i posted a thread here where someone helped me out, and my problem is now fixed.

Maybe give that a shot.
find quote
Post Reply