Prometheus

Ubuntu 10.04 + A2DP = Awesome Headset Music!

Posted in Uncategorized by dpillay on September 27, 2010

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!

About these ads

10 Responses

Subscribe to comments with RSS.

  1. Juanjo said, on October 8, 2010 at 21:43

    Hi, Dpillay
    this is awesome news. im planning to do this on lucid lynx, for my htpc, i have a question though, have you checked for any latency on the audio ? ill try this soon when i get my new headset. it would be a pity to get audio / video sync problems…

    thanks
    Juanjo

  2. andyroo said, on November 4, 2010 at 11:39

    Thanks very much for this, my audio was skipping loads using pulseaudio but this works beautifully!

  3. Wargo said, on January 22, 2011 at 01:12

    Thanks man, this work perfect for a backbeat and inspiron 6400 with 10.04!!!!

  4. Armlabs.net» Blog Archive said, on April 11, 2011 at 17:14

    [...] setup the A2DP headset to ubuntu 10.04 original link. http://dpillay.wordpress.com/2010/09/27/ubuntu-10-04-a2dp-awesome-headset-music/ [...]

  5. vijay said, on July 23, 2011 at 22:37

    well….i got a strange problem that i even if i select the option “High Fidelity Playback (A2DP)” i cant see any change in menu in the output tab…it just shows mono there…
    Can you please help me out…
    Thanks in advance….

  6. Hamza Apaydin said, on August 24, 2011 at 10:21

    awesome tutorial man. thank you very much.

  7. [...] Das Problem ist wohl Ubuntu, aber vielleicht hilft dir dieser Artikel weiter. Guckst du hier … __________________ HAF 922 | Asus P8Z68 Deluxe | i5-2500k | CoolerMaster V6 GT | Corsair [...]

  8. Rykel said, on November 23, 2011 at 21:56

    Hi, we are already more than a year past since your post, and you all would be glad to know that using Blueman PPA, Ubuntu and my iQua BHS-701 works out of the box. However, like OP said, I am unable to use the microphone when connected via the A2DP profile… is Ubuntu gonna be stuck forever without mic under A2DP?

  9. pim said, on July 16, 2012 at 14:01

    any chance to see track infos using avrcp 1.3 ? With which player ?


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: