Ubuntu 10.04 + A2DP = Awesome Headset Music!
Update: Been at it since morning again and looks like the whole process can be made much simpler & easier so say goodbye to PulseAudio as using ALSA is way better!
I recently bought a Plantronics BackBeat 903 and just wow! I got it working on my HTC Desire (w/ Froyo) in a breeze. Hardly anything to it, the android system takes care of most of the details. You just need to point and click :)
But getting the same working on Ubuntu 10.04 was quite a different ordeal. Don’t get me wrong here, Ubuntu Lucid Lynx is fantastic for what it did out of the box! I was able to pair and play music + talk on Skype via the ‘Telephony Duplex (HSP/HFP)’ profile. The problem here is that the sound in this profile just plain sucks. It breaks a lot and there’s a lot of background noise. Being the audiophile I am, this was just not acceptable!
Out came the documentation for Bluetooth, GStreamer & ALSA, trying to figure out what exactly needs to be tweaked. In the end, this is what worked for me:-
- Make sure you have the following packages installed via apt-get: bluetooth, bluez, bluez-utils, bluez-audio, blueman, gstreamer*.
- From a terminal run ‘gstreamer-properties’ and change the default output and input to ‘ALSA’.
- Startup bluetooth (say from a control on the keyboard) and load ‘Blueman Manager’ from System -> Preferences -> Blueman Manager.
- Here, do a search and find your device. You need to make sure to connect to the ‘Headset Service’ + ‘Audio Sink’ service for things to work correctly.
- Once its connected and showing that both the above services are running, open up the Sound Preferences from System -> Preferences -> Sound.
- In the Hardware tab, you should see a listing for your headset. By default, this is loaded on the ‘Telephone Duplex (HSP/HFP)’ profile. Use the drop down provided to select the ‘High Fidelity Playback (A2DP)’ profile.
- Now restart your music player of choice (Quod Libet in my case) and enjoy hi-def sound! :)
The one thing I noticed here is that if you are connected on the A2DP profile, the Input tab of Sound Preferences does not list the headset mic. Apparently, its a kernel bug which we can’t do anything about just yet.
A2DP serves as an audio sink and has no specs for the mic, hence when you are using a smartphone, its the phone that manages to get A2DP for audio and the headset mic working correctly for calls. We’ll just have to wait till we can get this same feature set on Ubuntu.
For now, I’m more than content to switch the profile from A2DP to HSP/HFP for programs like Skype / GTalk etc.
Open source FTW!