Unwired

25 January 2008

A couple of weeks ago, I bought a Bluetooth headset: the BlueAnt X5.

I’ve been very happy with it — audio quality is clear, and the headset has very good battery life. Also, the headset has a detachable microphone, which allows me once again to use Skype and other VoIP stuff. (I’ve been trying to compile Mumble with not much success. I suspect they’re not properly supporting the amd64 architecture.)

The headset comes with an “audio streamer”, which is basically a small device that can stream audio from a cable to the Bluetooth headset. This means you can use the X5 headset with not just Bluetooth-enabled computers, but anything that has an audio cable coming out of it. The advantage of this is that you can use it with a computer without having to fiddle with configuration on the operating system. You just plug your speaker cable into the streamer. I haven’t tried it, but I suspect the audio streamer will be happy to stream audio to other headsets, not just the X5.

Today, Dad brought home a no-name USB Bluetooth dongle (lsusb reports it as 0e5e:6622) that works beautifully out-of-the-box in Ubuntu Hardy. I’ve been working on getting the headset communicating directly to the computer without the use of the audio streamer. I installed the bluetooth-alsa package, which contains some useful documentation at /usr/share/doc/bluetooth-alsa. It’s highly recommended you have a read of the documentation if you want to get A2DP working in Ubuntu. It basically involves a bit of copy-and-pasting into config files.

For getting PulseAudio working with A2DP, first you will want to get the a2dpd daemon running. Depending on how you’ve set up your ~/.asoundrc, you should have an ALSA device called a2dpd. To get PulseAudio to see this device, you’ll need to enter this into the terminal:

$ pactl load-module module-alsa-sink sink_name=a2dpd device=a2dpd

I tried to get this working automatically by putting it in /etc/pulse/default.pa, but PulseAudio segfaulted on startup. I tried asking on #pulseaudio, but they’re always asleep whenever I ask. That’s the trouble with living in Australia. My mistake. You have to make sure you load module-hal-detect before module-alsa-sink. Works beautifully now.

If anyone has any tips for Bluetooth in PulseAudio, I’d be glad to hear it.

One reply

Leave a reply