Bluetooth Audio


aliking

Member
Joined
Dec 9, 2006
Messages
241
Age
46
Location
New York
Hi, I've not seen many people asking about this, but anyway I've been trying to pair a Jabra BT3030 stereo bluetooth headset with the Pandora for untethered tunes and I have some success.

The headset pairs no problem, but there is some more work needed to get sound coming out. Edit this file:

~/.asoundrc

and add this text inside:

pcm.bluetooth {
type bluetooth
}

Now you can do this in terminal:

#mplayer -ao alsa:device=bluetooth <file>

and sound is routed over bluetooth. Or even better, build a playlist in gnome-mplayer and run this:

#mplayer -ao alsa:device=bluetooth -playlist <file>

And that is all good. This is my first experience with bluetooth headset and it was sort of awesome to be able to do this on my commute while I was reading an ebook.

Obviously the ideal will be to have all audio route to bluetooth and have some sort of script to toggle that. I need to experiment a bit more to find how to do that.
 
Cool :D

Let me know when you find out how - I don't have a BT headset, so I can't try myself, but things like these should be included in the next HotFix / Firmware :D
 
Routing all audio to one device is usually done by setting said device as default device.
In this case something like this should be added to .asoundrc
Code:
pcm.!default {
  type plug
  slave { pcm "bluetooth" }
}

Although I don't know how toggling would work :D Does alsa support fallback configuration or something?

BTW.: Does anyone know what happened to wiki.bluez.org ?
 
^ certainly, it's dawning on me that ~/.asoundrc holds the solution to this. I'm current listening to Exaile (my Pandora is in the other room!) using this:

Code:
pcm.!default {
  type bluetooth
}

which is pretty similar to what you suggested. A quick and dirty toggling method, then, is to have 2 .asoundrc files, one for bluetooth and one for not and have a bash script that will change the names of them, to effectively swap them.

What I'm currently thinking of looking into is a config that duplicates the audio stream to both bluetooth and standard outputs. That way, when you pair a headset, it will just work AND you could have sound going to another pair of wired headphones for sharing :)

lots of info here: http://alsa.opensrc.org/index.php/.asoundrc
 
It's great to see the bluetooth getting used :)

I guess a better long term approch to having easy bluetooth audio is pulseaudio with bluetooth support. I am have to say I am not sure how well it works but hopefully it's mature enough by now.
Priority should probably be a take care of all the alsa problem first though.
 
Anybody but me who thinks it's pretty darn cool routing audio output from a commandline media player in the Linux terminal wirelessly to your headphones on a portable unit? B)
 
GuSec said:
Anybody but me who thinks it's pretty darn cool routing audio output from a commandline media player in the Linux terminal wirelessly to your headphones on a portable unit? B)

yeah!
I've got an MBS-100 (sony ericsson speaker ball)
Would be nice to get an easy way to get the sound through it
 
Last edited by a moderator:
When I try this with my Plantronics 590, I get [AO_ALSA] Write error: Broken pipe 0.000 1/ 1 ??% ??% ??,?% 0 0

Getting this working would be huge for me, as I want to use the Pandora to watch video on my commute, and it'd be a shame to have to buy a non-bluetooth pair of headphones just to support this.
 
Is there an easy way to get my Bluetooth battery powered speakers into the drop down box in the audio mixer?? I just bought them today and would like an easy way to change outputs if possible

Thanks in advance :)
 
Hi sorry to double post but I wanted to bump this one

Is there anyone that could possibly help? My new bluetooth speakers are really cool and would love to set this up properly.

I got these bad boys http://www.svp.co.uk/technology/peripherals/samsung-ya-bs300-wireless-bluetooth-speaker-system-samsung059_bluetooth-portable-speakers.html I tried them out on my iPhone and they are very nice, would recommend to anyone who wants a bit more beefy sound on the go

These are Really good quality for there size and run 12hours from internal rechargeable battery I would be very very grateful if someone could help as I bought these especially for my Pandora. They have next track buttons as well but would like sound output to bluetooth for now and worry about the other features later. Thanks in advance if anyone can help

:)
Edit just thought I'd add I need to be able to change to and from Internal and Blutooth. someone mentioned making a bash script and I don't know how to do that I assume it would be similar to making a BAT file in windows but I know zero Linux commands.
 
I tried the various things further up the thread, but couldn't get my bluetooth headphones working at all with pandora, let alone fitting nicely into the interface. I think this might be something that has to wait for a bit :(
 
since I know of one program that allows easy switching of audio between multiple soundcards, I have to ask this question.... has anyone considered porting pulseaudio? Not sure what problems it would introduce, but it would eliminate the problem of not being able to switch audio to bluetooth on the fly. Just my two cents... hope it creates change. :D
 
I paired my BlueAnt z9i headset to my Pandora last night, easy as pie. Then I tried editing the .asoundrc files as per the first post, but I didn't have any success. I edited the file, and ran the terminal command for mplayer, but the audio still came out the Pandora speakers. Oh well.
 
Back
Top