Bluetooth Audio under Raspbmc
#1
Hi there!

Setup:
XBMC nightly 13-20130724 (but I also tried earlier nightlies and the default version of XBMC that comes with Raspian 12-20130504)
Raspbmc
Raspberry PI B rev. 2
Addons: Raspbmc settings
Raspbmc has a setting to enable/disable AudioEngine. I tried both (not sure if this actually does anything, I didn't notice any difference)

Issue:
I have a Bluetooth Speaker which I can connect to my Pi. It gets picked up by blueman and set as an audio device, at which point I can make it known to ALSA with the following /etc/asound.conf

Code:
pcm.!default {
        type bluetooth
            device 00:02:3C:26:BA:87 # change this MAC address using the command "hcitool scan"
            profile "auto"}

Pulseaudio does not pick it up, because there is some weird permission problem with the bluetooth module and I cannot make it use ALSA as a sink, because the module-alsa-sink fails with a non-descriptive error message.

Yet, I can make mplayer use the ALSA configuration with
Code:
mplayer -ao alsa http://robtowns.com/music/blind_willie.mp3
or if I remove pulesaudio with
Code:
mplayer http://robtowns.com/music/blind_willie.mp3

Unfortunately, XBMC does not pick this up at all.

In the audio menu, I only have two options: Analog and HDMI. They output to the headphone jack and (probably) the HDMI, but not to my bluetooth speakers. Also, I saw in some screenshots on the net that there are supposed to be more settings in the audio output settings screen (like here: http://askubuntu.com/questions/145052/xb...-and-pulse), but my dialog only has the topmost option, which chooses between Analog and HDMI.

I also tried using advancedsettings.xml to that end, but to no avail:
Code:
<advancedsettings>
<audiooutput>
        <audiodevice>ALSA:beide</audiodevice>
        <passthroughdevice>ALSA:beide</passthroughdevice>
    </audiooutput>
</advancedsettings>

Is there any way to tell XBMC to use my default ALSA device, which is a bluetooth speaker? Or does XBMC ignore ALSA completely?

Any help would be greatly appreciated! :-)
Reply
#2
Guess we are in the same boat here... I had posted something very similar.
One thing that you can probably do is specify your device as audio out on omxplayer command line - I would think that you would have to this from somewhere in xbmc configuration file. I am stuck here as well - please let me know if you find something that works
Reply
#3
Welcome then, shipmate ;-)

I tried to do that as well, but OMXPlayer seems to be compiled directly into XBMC, so there is no way to specify any command line options. Plus OMXPlayer doesn't seem to have any global config file like mplayer.

Using an external player (e.g. mplayer) might be an option, but then I think we'd lose the nice integration with XBMC (play, pause, progress bar etc.), so I'd like to avoid that if possible.
Reply
#4
With external player you also loose hardware decoding abilities for video -people who tried it reported laggy video playback. But if you intend to play just audio, external player might just do the job for you.
Reply
#5
ah, good to know! no, I'd like it for both video and audio. After all: a movie without sound is kind of pointless Tongue (except for a few black-and-white ones ;-))

So do we know if XBMC uses pulseaudio or alsa or anything similar? I don't want to spend a lot of time on trying to fix pulseaudio when XBMC isn't actually using it.
Reply
#6
Xbmc on rpi does not use pulse or alsa. You could try an analogue to Bluetooth convertor.
Reply
#7
That's no good, I can already plug the thing into the audio jack (it has an analog in), but the sound quality is drastically worse.

What about this: https://github.com/xbmc/xbmc/tree/master...es/PulseAE
And this: https://github.com/xbmc/xbmc/tree/master...gine/Sinks

There seems to be code for both Alsa and PulseAudio here?
Reply
#8
I see now. After some more googling, I came across these pages:

http://www.raspberrypi.org/phpBB3/viewto...70&t=33101
Apparently XBMC exclusively uses OpenMAX on the RPi, not Alsa nor Pulse. And the non-OpenSource Broadcom implementation of OpenMAX as that, since it supports HW acceleration on the RPi.

https://github.com/raspberrypi/userland/issues/70
There is no ALSA sink for the broadcom implementation.
There is one for the bellagio implementation, but that has no HW acceleration.

http://forum.stmlabs.com/showthread.php?tid=1052
There's this dirty hack, which sort of works and sort of not :/

All in all: no luck with ALSA ;-)
Reply
#9
Which is what I said above
Reply
#10
Exactly, I was trying to understand why as well ;-)
Reply
#11
Guys joining this party very late but despite of searching the net and scouring this forum I couldn't find a way to send sound from raspbmc to my bluetooth speaker.
Context:
I have an acer K11 projector which I have connected to my raspbmc. This setup allows me to access my nas media center through my raspbmc wirelessly and project it on my wall using my projector. The whole setup works pretty neatly since the raspbmc is powered through my acer kqq USB port. Tunis means that when I start up my projector my raspbmc boots up and presents a nice display. Now the problem is that the acer k11 projector has very teeny speakers (2watts) which are no good. I can hook up a small speaker to my raspbmc via the audio Pitt but it would mean hooking up my speakers next to my projector, I would rather have raspbmc send. Audio wirelessly to my bluetooth speakers placed next to my projection wall to give the cinematic experience. In worst case scenario I would run a wire across the room, but don't want to give up so soon. Hopefully I can find a solution for streaming audio via bluetooth to my sony bluetooth speakers. Please don't give suggestion to use analog to bluetooth adapters on raspbmc, I am hell bent on hooking up a bluetooth dingle in raspbmc and transmitting audio via bluetooth.
Reply
#12
Read post #8 (3 above yours).
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#13
Hello,
Have been implemented also or pulseaudio in Kodi?. I have seen in audio ouptsettings that ppalyback pulse audio appears, but I was not able to get audio form my headset, and I was able to pair them, I was only able to send music to my headset via aplay -D bluetooth command.

Does anyone how to insytall pulseaudio, start this service and add headset bluettoth in the raspberry?. i think that is not working in kodi because something is missing in my pulseaudio configuration or the service did not started.

Thanks
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Bluetooth Audio under Raspbmc00