0

I want to stream audio to/via the RP using bluetooth. I found and followed a very nice tutorial. But, of course, what works for so many people falls completely apart once I give it a go. While trying to fix things, I noticed a problem with pulseaudio on (at least) KODI, but I am uncertain how/if I can fix it.

The problem

There is a version cocktail of version 2 and version 3 libs. Version 2 seems to be normal Debian issue, but I cannot explain where the version 3 stuff comes from. I think I once read that KODI ships and requires its own special pulseaudio. That's why I'm uncertain what I can change/upgrade.

The symptoms

While the actual pulseaudio service is present and works, after a fashion, controlling it is troublesome.

Startup

There is a /etc/init/pulseaudio.conf, as well as a /etc/init.d/pulseaudio and both are perfectly capable of managing a PA daemon. Notice however, that only /etc/init.d/pulseaudio honors /etc/default/pulseaudio and the default method raspian uses to bring up pulseaudio on system start is via upstart, i.e. the /etc/init/pulseaudio.conf method.

CLI

When logged into the RP using SSH, any call to pactl or pacmd will fail with

Assertion 'l' failed at pulsecore/flist.c:168, function pa_flist_pop(). Aborting.

Searching the Internet for this error yields a lot of RP related posts (search for "Assertion" on the pages). I'm very certain that this problem is library version related, because any pactl sub-command fails and pactl --version says:

pactl 2.0
Compiled with libpulse 2.0.0
Linked with libpulse 3.0.0

However, when module-native-protocol-tcp is loaded, and I do PULSE_SERVER=livingroompi.local:4713 pactl info on my laptop, I see details about the pa daemon running on the RP. On my laptop pactl --version says

pactl 4.0
Compiled with libpulse 4.0.0
Linked with libpulse 4.0.0

Files

There is /usr/lib/pulse-3.0/ but dpkg -S pulse-3.0 does not yield any packages. Apparently the pa daemon cannot load the modules in that directory. Which is why one has to manually install the zeroconf module (it's a separate package) and cannot expect the present module in that directory will do.

What's the Question?

Apparently there is something wrong with the pulseaudio installation on raspian, I'm not the only one with that problem, but it would seem it hasn't been resolved yet. While the problem does not affect "basic" RP usage, especially the use case of connecting bluetooth devices to the RP is affected, because shell scripts require pa* commands.

But I don't know if this is a Debian Wheezy, Raspian or PEBCAK related problem. Building pa version 2 but using some core lib in version 3 seems intentional. Still, using a remote pactl works, using the local one does not. I tried the unix socket as well as the tcp socket with the local version, the assertion fails in both cases.

I guess building and installing a more recent version of pulseaudio may be a good idea, but I recall that KODI has a special pulseaudio build and I'm afraid of beaking KODI by doing that.

What do I have to consider, when upgrading pulseaudio for KODI?

Could this issue arise from pa running in system mode on KODI?

My actual problem are the pa tools. The daemon itself works as expected. I get sound when playing media using KODI as well as when I stream it from my laptop.

  • "the default method raspian uses to bring up pulseaudio on system start is via upstart" -> Unlikely, since Raspbian does not by default use upstart at all -- it uses Debian style SysV init. Probably doesn't make much difference to your question though. I've wanted to find a pulseaudio dev I could seize by the throat before, BTW... – goldilocks Mar 22 '15 at 18:44
  • @goldilocks: I'm the last person to actually chose anything over sysv init. I'm pretty sure this is what raspbmc did/does .. or whatever this distro is actually called. Still, lsb_release -a says Debian Wheezy. This is one aspect why I am so cautions. – user1129682 Mar 22 '15 at 21:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.