The 2.6.20 vanilla kernel no longer includes the module snd_bt_sco (the Ubuntu stock kernel does, but that does not help those of us who must use a custom kernel - see Whoopie's comment below). The Bluetooth Alsa project uses now a userspace program named Plugz to communicate with bluetooth headsets. Although the new implementation works great (when it works), it poses a problem: the bluetooth headset is no longer recognized as a real alsa device. The btsco module and command are deprecated.
1. Download the Debian package Bluetooth-Alsa from here. Make sure you have all of the dependencies installed. The libsbc0 package is not included in the Ubuntu repositories (the rest are), so follow the link and download it as well. Install the packages.
2. Due to some bugs, the 2.6.20 kernel must be patched for the headset to work (HiFi will work without the patch). I assume you have the kernel source in /usr/src, and that you symlinked the directory to /usr/src/linux.
Download the patch attached to this message. Extract it in /usr/src. Apply it:
Code:
sudo cat sco-flowcontrol-v3.0.diff | patch -p0 --dry-run
If the dry run succeeds, repeat the command without the --dry-run switch.
UPDATE: See post no. 26 in this thread for a patch that seems to work in Gutsy against kernel 2.6.23.
Compile and install the patched kernel.
3. Download the a2dprc attachment, and extract it to your home directory. Do the same to the asoundrc attachment (both files).
Edit the 3 files to include the mac address of your headset in the proper locations. You can find it, after putting it in discoverable mode, by running
Now, copy the default asoundrc file:
Code:
cp ~/.asoundrc.default ~/.asoundrc
NOTE: If you already have your own .asoundrc file, add the sections from the one provided to it.
4. The howto in this thread, which helped me greatly, is outdated. It does help, however, in pairing the headset to your computer. Note that bluepin, bluez-pin and kbluepin are no longer necessary (or, in fact, working). Install from the Ubuntu repositories all that has to do with gnome and bluetooth (mostly gnome-bluetooth and the bluetooth manager). Follow the instructions in that howto and pair the headset (I am sure you can do it now without the KDE components - please add to this guide your method, if you managed to do so).
5. Now, that the headset is paired, it is time to check the HiFi component. You can find instructions at the Bluetooth-Alsa build page. In my experience, the "Configure vlc" instructions work well.
Here is where we hit the first bump. Since the headset is not a real Alsa device, you cannot select it in any gui. You must edit config files, as described in that page (and that includes xmms, despite what they claim).
Before you run your application of choice, remember that you must have a terminal running
at the same time.
HiFi is a lousy name. Bluetooth headsets will not manage to give you a good, non-choppy sound, for anything above 96kbps.
6. Time to test the headset component. First, run the command
You may want to add it to your session startup commands, or create launch scripts to applications using the headset.
Now, try to record yourself:
Code:
arecord -Dplug:pcm.headset test.wav
Use ctrl-c to stop the recording.
Let's see if it worked:
Code:
aplay -Dplug:pcm.headset test.wav
If this worked, we can move on to Skype.
7. Figuring out how to use Skype took me a while. Here we don't even have config files we can change, so we must trick Skype into thinking the default Alsa device is the headset. This is where the .asoundrc.skype comes into play. When you make it into your .asoundrc file, and set Skype to use Alsa, Skype will use your headset (segmentation faults did happen to me, but not often).
The problem is that with this .asoundrc, the headset is the default for all of your system. This is why I created the skype-headset script attached here (don't forget to edit it to reflect your home folder's name, and to chmod it to executable) - it copies the .asoundrc.skype to .asoundrc, activates the headsetd daemon and launches Skype. When you quit Skype, it restores the default .asoundrc file.
Use the Skype test contact to see if all works.
That's it. Please let me know if I forgot anything or if anything is not working.
Bookmarks