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


- eternalsword - 2011-12-18

elite1967, you are using a version of json from git, which likely has API changes from the version pulseaudio is built against. configure would simply check for a minimum version requirement, and not a maximum. this is why it passes during configuration and fails during build.


- AbMagFab - 2011-12-18

I've been using the DSPlayer version on Windows in order to get full HD audio - TrueHD, DTS HD, and LPCM bitstreaming.

However I'd really prefer to use Ubuntu/Linux. Does this version fully support all HD audio codecs, without any stutter or hiccups in 24p video?

I'm using a Radeon 6900, although I also have ION2s (which I'm pretty sure don't support HD audio).

Thanks in advance!


- koko1967k - 2011-12-18

eternalsword Wrote:elite1967, you are using a version of json from git, which likely has API changes from the version pulseaudio is built against. configure would simply check for a minimum version requirement, and not a maximum. this is why it passes during configuration and fails during build.

eternalsword,
with the version suggested by cbxbiker61 it built perfectly.

i am almost there... Nod So far, I have compiled, build and installed pulseaudio (with patch), audiofilter and xbmc.

But if I run the command: ./src/pulseaudio -n -F src/default.pa -p $(pwd)/src/.libs/ I get a lot of errors.

Also in XBMC I do not have the pulseaudio options in the System - Settings - Audio Output - Passthrough output device section. I only have "hdmi (ALSA)".

What am I missing?
How can I force the usage of pulseaudio?
Maybe it's not loaded?

Code:
[email protected]:~/source/pulseaudio-1.1$ ./src/pulseaudio -n -F src/default.pa -p $(pwd)/src/.libs/

N: [lt-pulseaudio] daemon-conf.c: Detected that we are run from the build tree, fixing search path.
E: [lt-pulseaudio] hal-util.c: Couldn't find devices: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Hal was not provided by any .service files
E: [lt-pulseaudio] hal-util.c: Couldn't find devices: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Hal was not provided by any .service files
E: [lt-pulseaudio] hal-util.c: Couldn't find devices: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Hal was not provided by any .service files
E: [lt-pulseaudio] module-jackdbus-detect.c: Unable to contact D-Bus session bus: org.freedesktop.DBus.Error.Spawn.ExecFailed: //bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.
E: [lt-pulseaudio] module.c: Failed to load module "module-jackdbus-detect" (argument: ""): initialization failed.
E: [lt-pulseaudio] main.c: Module load failed.
W: [lt-pulseaudio] server-lookup.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.Spawn.ExecFailed: //bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.
W: [lt-pulseaudio] main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.Spawn.ExecFailed: //bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.

Also:
/usr/include/pulse/version.h indicates a version number 0.9.22

Finally:
if I run pulseaudio -k I get the following:
Code:
[email protected]:~/source/pulseaudio-1.1$ pulseaudio -k
E: [pulseaudio] main.c: Failed to kill daemon: No such process



- sjongele - 2011-12-18

To get PulseAudio to run correctly under Ubuntu 11.10, I needed to use:
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var

Otherwise, PulseAudio would use the wrong state dir. Maybe this works for you as well?


- koko1967k - 2011-12-19

Unfortunalety I couldn't get it to work.

So, here are the steps I do:
1) wget http://freedesktop.org/software/pulseaudio/releases/pulseaudio-1.1.tar.gz
2) tar –xf pulseaudio-1.1.tar.gz
3) cd pulseaudio-1.1
4) apply patch (patch -p0 < "patchFile")
5) compile JSON (as per instructions)
6) sudo apt-get build-dep pulseaudio
7) ./bootstrap.sh
8) CFLAGS="$CFLAGS -g -O0" ./configure --sysconfdir=/etc --localstatedir=/var --prefix=/usr --enable-force-preopen "$@"
9) make -j2
10) sudo make install

but when I launch the command:
./src/pulseaudio -n -F src/default.pa -p $(pwd)/src/.libs/

I get the following error messages:
Code:
[email protected]:~/source/pulseaudio-1.1$ ./src/pulseaudio -n -F src/default.pa -p $(pwd)/src/.libs/
N: [lt-pulseaudio] daemon-conf.c: Detected that we are run from the build tree, fixing search path.
E: [lt-pulseaudio] module-jackdbus-detect.c: [color=red]Unable to contact D-Bus session bus: org.freedesktop.DBus.Error.Spawn.ExecFailed: //bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.[/color]
E: [lt-pulseaudio] module.c: [color=red]Failed to load module "module-jackdbus-detect" (argument: ""): initialization failed.[/color]
E: [lt-pulseaudio] main.c: [color=red]Module load failed.[/color]
W: [lt-pulseaudio] server-lookup.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.Spawn.ExecFailed: //bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.
W: [lt-pulseaudio] main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.Spawn.ExecFailed: //bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.

Can someone help me?


- sjongele - 2011-12-19

Quote:org.freedesktop.DBus.Error.Spawn.ExecFailed: //bin/dbus-launch

Are you sure the path to dbus-launch is correct?
I don't see a
--prefix=/usr

in your configure statement.


- koko1967k - 2011-12-20

sjongele Wrote:Are you sure the path to dbus-launch is correct?
I don't see a
--prefix=/usr

in your configure statement.

Hi,
sorry it was a typo in my post. The ./configure actually included --prefix=/usr as you suggested.
But just to be sure I did it over again this morning from scratch.

Here is the path to dbus-launch:
Code:
[email protected]:~/source/pulseaudio-1.1$ sudo find / -iname dbus-launch
/usr/bin/dbus-launch

This is my config.log: config.log @ pastebin.com

The error message is always the same:
Code:
[email protected]:~/source/pulseaudio-1.1$ ./src/pulseaudio -n -F src/default.pa -p $(pwd)/src/.libs/
N: [lt-pulseaudio] daemon-conf.c: Detected that we are run from the build tree, fixing search path.
E: [lt-pulseaudio] hal-util.c: Couldn't find devices: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Hal was not provided by any .service files
E: [lt-pulseaudio] hal-util.c: Couldn't find devices: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Hal was not provided by any .service files
E: [lt-pulseaudio] hal-util.c: Couldn't find devices: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Hal was not provided by any .service files
E: [lt-pulseaudio] module-jackdbus-detect.c: Unable to contact D-Bus session bus: org.freedesktop.DBus.Error.Spawn.ExecFailed: //bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.
E: [lt-pulseaudio] module.c: Failed to load module "module-jackdbus-detect" (argument: ""): initialization failed.
E: [lt-pulseaudio] main.c: Module load failed.
W: [lt-pulseaudio] server-lookup.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.Spawn.ExecFailed: //bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.
W: [lt-pulseaudio] main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.Spawn.ExecFailed: //bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.

I know I am missing something really stupid, but I cannot find out what it is...
Any help would be really appreciated.


- cbxbiker61 - 2011-12-20

My system's don't have hal installed any longer, since hal has been deprecated.

When you configure PulseAudio you may use the following options to disable hal support. This should get you past the errors you're encountering. Also make sure you're not using old pulse config files in /etc/pulse.

--disable-hal
--disable-hal-compat


- koko1967k - 2011-12-21

cbxbiker61 Wrote:My system's don't have hal installed any longer, since hal has been deprecated.

When you configure PulseAudio you may use the following options to disable hal support. This should get you past the errors you're encountering. Also make sure you're not using old pulse config files in /etc/pulse.

--disable-hal
--disable-hal-compat

Hi,
thanks for the tip. This reduced the number of errors... but did not resolved!
Here is the command I have used:
Code:
CFLAGS="$CFLAGS -g -O0" ./configure --sysconfdir=/etc --localstatedir=/var --prefix=/usr --disable-hal --disable-hal-compat --enable-force-preopen "$@"

And here is the new error list:
Code:
[email protected]:~/source/pulseaudio-1.1$ ./src/pulseaudio -n -F src/default.pa -p $(pwd)/src/.libs/
N: [lt-pulseaudio] daemon-conf.c: Detected that we are run from the build tree, fixing search path.
E: [lt-pulseaudio] module-jackdbus-detect.c: Unable to contact D-Bus session bus: org.freedesktop.DBus.Error.Spawn.ExecFailed: //bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.
E: [lt-pulseaudio] module.c: Failed to load module "module-jackdbus-detect" (argument: ""): initialization failed.
E: [lt-pulseaudio] main.c: Module load failed.
W: [lt-pulseaudio] server-lookup.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.Spawn.ExecFailed: //bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.
W: [lt-pulseaudio] main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.Spawn.ExecFailed: //bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.

Here is the list of /etc/pulse:
Code:
[email protected]:~/source/pulseaudio-1.1$ ls -l /etc/pulse
total 20
-rw-r--r-- 1 root root 1269 2011-12-21 19:50 client.conf
-rw-r--r-- 1 root root 2299 2011-12-21 19:50 daemon.conf
-rw-r--r-- 1 root root 5549 2011-12-21 19:50 default.pa
-rw-r--r-- 1 root root 2284 2011-12-21 19:50 system.pa

What I need to understand is where the problem is: is it a problem of my compilation process, of my system configuration, or something else that I am missing?
i do not understand the error message, and also googling did not help.

Any help from you will be very appreciated.


- cbxbiker61 - 2011-12-22

elite1967 Wrote:Hi,
thanks for the tip. This reduced the number of errors... but did not resolved!
Here is the command I have used:
Code:
CFLAGS="$CFLAGS -g -O0" ./configure --sysconfdir=/etc --localstatedir=/var --prefix=/usr --disable-hal --disable-hal-compat --enable-force-preopen "$@"

And here is the new error list:
Code:
[email protected]:~/source/pulseaudio-1.1$ ./src/pulseaudio -n -F src/default.pa -p $(pwd)/src/.libs/
N: [lt-pulseaudio] daemon-conf.c: Detected that we are run from the build tree, fixing search path.
E: [lt-pulseaudio] module-jackdbus-detect.c: Unable to contact D-Bus session bus: org.freedesktop.DBus.Error.Spawn.ExecFailed: //bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.
E: [lt-pulseaudio] module.c: Failed to load module "module-jackdbus-detect" (argument: ""): initialization failed.
E: [lt-pulseaudio] main.c: Module load failed.
W: [lt-pulseaudio] server-lookup.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.Spawn.ExecFailed: //bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.
W: [lt-pulseaudio] main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.Spawn.ExecFailed: //bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.

Here is the list of /etc/pulse:
Code:
[email protected]:~/source/pulseaudio-1.1$ ls -l /etc/pulse
total 20
-rw-r--r-- 1 root root 1269 2011-12-21 19:50 client.conf
-rw-r--r-- 1 root root 2299 2011-12-21 19:50 daemon.conf
-rw-r--r-- 1 root root 5549 2011-12-21 19:50 default.pa
-rw-r--r-- 1 root root 2284 2011-12-21 19:50 system.pa

What I need to understand is where the problem is: is it a problem of my compilation process, of my system configuration, or something else that I am missing?
i do not understand the error message, and also googling did not help.

Any help from you will be very appreciated.

Here's a list of dbus processes on a working system. Notice there's a process started with "--system" and one started with "--session". I don't think your "--session" dbus is being started based on your errors.

Are you running in a windowing environment like Kde/Gnome/Xfce? Those environments have the responsibility of starting the "--session" dbus. A standard PulseAudio installation requires that the "--session" dbus is running.

ps aux | grep dbus
81 1984 0.2 0.0 20148 2036 ? Ss Dec19 8:53 /usr/bin/dbus-daemon --system --address=systemd: --nofork --systemd-activation
jammin 2471 0.0 0.0 26412 840 ? S Dec19 0:00 dbus-launch --sh-syntax --exit-with-session
jammin 2475 0.0 0.0 21368 2072 ? Ss Dec19 0:20 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session


- koko1967k - 2011-12-22

cbxbiker61 Wrote:Here's a list of dbus processes on a working system. Notice there's a process started with "--system" and one started with "--session". I don't think your "--session" dbus is being started based on your errors.

Are you running in a windowing environment like Kde/Gnome/Xfce? Those environments have the responsibility of starting the "--session" dbus. A standard PulseAudio installation requires that the "--session" dbus is running.

ps aux | grep dbus
81 1984 0.2 0.0 20148 2036 ? Ss Dec19 8:53 /usr/bin/dbus-daemon --system --address=systemd: --nofork --systemd-activation
jammin 2471 0.0 0.0 26412 840 ? S Dec19 0:00 dbus-launch --sh-syntax --exit-with-session
jammin 2475 0.0 0.0 21368 2072 ? Ss Dec19 0:20 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session

Hi,
thanks for your reply.

I am running a fresh installation of Ubuntu 11.04 server 64 bit.
On top of that I just installed a compiled version of XBMC from your git, audiofilter and pulseaudio.

Nothing more.

Here is my ps aux | grep after a fresh reboot:
Code:
[email protected]:~$ ps aux | grep dbus
106        731  0.0  0.0  23888  1232 ?        Ss   12:29   0:00 dbus-daemon --system --fork --activation=upstart

Then after *manually* launching: dbus-launch --sh-syntax --exit-with-session
Code:
[email protected]:~$ dbus-launch --sh-syntax --exit-with-session
DBUS_SESSION_BUS_ADDRESS='unix:abstract=/tmp/dbus-GoGW2caFNX,guid=3151edee5d47dd89a2df6cb900000078';
export DBUS_SESSION_BUS_ADDRESS;
DBUS_SESSION_BUS_PID=1507;

Now ps aux is:
Code:
[email protected]:~$ ps aux | grep dbus
106        731  0.0  0.0  23888  1232 ?        Ss   12:29   0:00 dbus-daemon --system --fork --activation=upstart
xbmc      1506  0.0  0.0  17968   380 pts/0    S    12:31   0:00 dbus-launch --sh-syntax --exit-with-session

But still the same error:
Code:
[email protected]:~/source/pulseaudio-1.1$ ./src/pulseaudio -n -F src/default.pa -p $(pwd)/src/.libs/
N: [lt-pulseaudio] daemon-conf.c: Detected that we are run from the build tree, fixing search path.
E: [lt-pulseaudio] module-jackdbus-detect.c: Unable to contact D-Bus session bus: org.freedesktop.DBus.Error.Spawn.ExecFailed: //bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.
E: [lt-pulseaudio] module.c: Failed to load module "module-jackdbus-detect" (argument: ""): initialization failed.
E: [lt-pulseaudio] main.c: Module load failed.
W: [lt-pulseaudio] server-lookup.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.Spawn.ExecFailed: //bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.
W: [lt-pulseaudio] main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.Spawn.ExecFailed: //bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.

Any other suggestion?
Should you have time, you can SSH into my machine to see if there any problem with it.

EDIT: one more thing: in tty7 (the XBMC) after shutting down XBMC, I get the following line:
* PulseAudio configured for per-user sessions
(the asterisk is yellow)


- cbxbiker61 - 2011-12-23

elite1967 Wrote:Hi,
thanks for your reply.

I am running a fresh installation of Ubuntu 11.04 server 64 bit.
On top of that I just installed a compiled version of XBMC from your git, audiofilter and pulseaudio.

Nothing more.

Here is my ps aux | grep after a fresh reboot:
Code:
[email protected]:~$ ps aux | grep dbus
106        731  0.0  0.0  23888  1232 ?        Ss   12:29   0:00 dbus-daemon --system --fork --activation=upstart

Then after *manually* launching: dbus-launch --sh-syntax --exit-with-session
Code:
[email protected]:~$ dbus-launch --sh-syntax --exit-with-session
DBUS_SESSION_BUS_ADDRESS='unix:abstract=/tmp/dbus-GoGW2caFNX,guid=3151edee5d47dd89a2df6cb900000078';
export DBUS_SESSION_BUS_ADDRESS;
DBUS_SESSION_BUS_PID=1507;

Now ps aux is:
Code:
[email protected]:~$ ps aux | grep dbus
106        731  0.0  0.0  23888  1232 ?        Ss   12:29   0:00 dbus-daemon --system --fork --activation=upstart
xbmc      1506  0.0  0.0  17968   380 pts/0    S    12:31   0:00 dbus-launch --sh-syntax --exit-with-session

But still the same error:
Code:
[email protected]:~/source/pulseaudio-1.1$ ./src/pulseaudio -n -F src/default.pa -p $(pwd)/src/.libs/
N: [lt-pulseaudio] daemon-conf.c: Detected that we are run from the build tree, fixing search path.
E: [lt-pulseaudio] module-jackdbus-detect.c: Unable to contact D-Bus session bus: org.freedesktop.DBus.Error.Spawn.ExecFailed: //bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.
E: [lt-pulseaudio] module.c: Failed to load module "module-jackdbus-detect" (argument: ""): initialization failed.
E: [lt-pulseaudio] main.c: Module load failed.
W: [lt-pulseaudio] server-lookup.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.Spawn.ExecFailed: //bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.
W: [lt-pulseaudio] main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.Spawn.ExecFailed: //bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.

Any other suggestion?
Should you have time, you can SSH into my machine to see if there any problem with it.

EDIT: one more thing: in tty7 (the XBMC) after shutting down XBMC, I get the following line:
* PulseAudio configured for per-user sessions
(the asterisk is yellow)

First option:
"dbus-launch --sh-syntax --exit-with-session" should be run from your xinitrc (it expects to be started in an x session). That's the reason why your not getting a "dbus-daemon --session" started. So add that to your xinitrc.

Second option:
If this is going to be a dedicated Xbmc box (without a display manager such as kdm or gdm), you can run with straight Alsa since PulseAudio isn't really adding much advantage on a dedicated box.

Third option:
Change your PulseAudio configuration to run system-wide, rather than per session.


- koko1967k - 2011-12-24

cbxbiker61 Wrote:First option:
"dbus-launch --sh-syntax --exit-with-session" should be run from your xinitrc (it expects to be started in an x session). That's the reason why your not getting a "dbus-daemon --session" started. So add that to your xinitrc.
1) All right. Adding the command to xinitrc solved the error!
But I do not have audio from the speakers. And still do not have the option "Digital Surround 7.1 (HDMI)" in XBMC.
Will check that now.

cbxbiker61 Wrote:Second option:
If this is going to be a dedicated Xbmc box (without a display manager such as kdm or gdm), you can run with straight Alsa since PulseAudio isn't really adding much advantage on a dedicated box.
2) YES! I will use it headless only for XBMC. But, can I have HD Audio with ALSA? I was under the impression that I could have HD Audio only with PulseAudio at the moment.

cbxbiker61 Wrote:Third option:
Change your PulseAudio configuration to run system-wide, rather than per session.
3) How can I do that? It would be much simpler.


- cbxbiker61 - 2011-12-24

Quote:1) All right. Adding the command to xinitrc solved the error!
But I do not have audio from the speakers. And still do not have the option "Digital Surround 7.1 (HDMI)" in XBMC.
Will check that now.

If you applied the 7.1 patch earlier in the thread it should show up (if Pulse is installed in the standard location, i.e. prefix=/usr).

Quote:2) YES! I will use it headless only for XBMC. But, can I have HD Audio with ALSA? I was under the impression that I could have HD Audio only with PulseAudio at the moment.

No, Alsa can handle the high-def just as well as Pulse. Pulse's advantages are really in handling multiple streams at the same time, which is not necessary for a dedicated box. There are discussions earlier in the thread about how to configure the pass-through device with straight Alsa.

Quote:3) How can I do that? It would be much simpler.

It's configured in the /etc/pulse files. Read the doc.


- kingmob - 2012-01-04

cbxbiker61 Wrote:It really sounds to me like you might be better off waiting for "official" support. Sorry, but this thread wasn't really intended to be a training manual. It is a development thread.
I think you misinterpret me. I don't need training, I need clarity. It is of course up to you to provide it or not.

It is just that the start post is really confusing, since it seems to have long since been surpassed by new information, but it HAS been updated sometime. If one didn't start from the beginning or has intimate knowledge of the inner workings, I doubt anyone can make sense of this.
Several things appear to be contradicting each other and it is confusing the hell out of me. The fact that the sound system in linux appears to be a perfect example of unnecessary complexity for the end user doesn't help either, but that is a different rant ;-).

I'm not a linux noob nor a programming noob, people just can't understand everything. Wouldn't it be better to have more users for you?

I already have passtrough working for instance, I would just like it to be more easily set up, which is why this looked good to me.


This forum uses Lukasz Tkacz MyBB addons.