Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a bluetooth headphones that can be used in both A2DP and in SCO mode. Under Windows, I can activate both profiles simultaneously and I can listen to high quality music but when Skype rings, I can answer it right away.

Although I can use those headphones in Ubuntu, I have to connect them in either A2DP or SCO mode but not both and can't find a way to switch the mode on the fly which driving me insane. I can either listen to the music or I can use Skype and there's no procedure which will take under a minute to switch a profile.

Am I missing something there? Is there a way to use my headphones in Ubuntu like I do so in Windows or at least switch those profiles in the mid air without crashing music player and, more importantly, Skype?


locked by HopelessN00b Dec 5 '14 at 9:07

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. More info: help center.

Have you tried using PulseAudio? If you use the 'module-bluetooth-device' module, it allows switching modes on the fly either with pactl (a command line utility) or pavucontrol (a volume control/mixer app). The line to put in your config or to pass to pactl (for A2DP) is:

load-module module-bluetooth-device profile=a2dp channels=2 address=YO:UR:BT:AD:DR:ES name=<your_headphones_name>

Then you can use:

pactl set-card-profile bluez_card.<your_headphones_name> hsp

to set them to SCO mode. However, pavucontrol has a much nicer interface, where you use a pulldown menu. It works wonderfully for me, and you can use the 'module-combine' module to make sound output go to both your speakers and your headphones. Also, it might be possible to load the module-bluetooth-device module twice, once with each profile, but I haven't tried that.

Uh, thanks, going to try ASAP :) – vava May 17 '09 at 8:03
Turns out BlueMan should run the first command automatically if pulseaudio plugin enabled (icon->about->plugins). But it doesn't work with pulseaudio 0.9.14, only with 0.9.15 and Ubuntu still have the older one. So looks like I have to wait again for a couple of months. – vava May 17 '09 at 13:20
Ok, installed 0.9.15 from PPA, gave it a go. The result is - Skype doesn't work with that, it uses a lot of CPU and it can't hear me saying anything. But other than that this looks most promising than any other method. – vava May 17 '09 at 14:04

It might not be elegant but you can try adding a "voice" and an "audio" profile in your ~/.asoundrc file, but I think switching between the two would require you to restart the bluetooth service.

Might try to script it and put a shortcut somewhere convenient.

pcm.voice {
    type bluetooth
    device xxx
    profile "voice"
} {
    type bluetooth
    device xxx
    profile "audio"
I actually tried it and it worked every second or third time, not every time as I want :) – vava May 14 '09 at 2:24

Not the answer you're looking for? Browse other questions tagged or ask your own question.