📜 ⬆️ ⬇️

Setting up bluetooth stereo headphones in Ubuntu Linux (8.04 & 7.10)

Hello!
I decided to write a small instruction to help those who need to set up bluetooth headphones for Linux. The described method is guaranteed to work in Ubuntu 7.10 and 8.04. In other systems there should be no special problems if all the necessary components are available (bluez, alsa, python).


Last year I bought myself a bluetooth stereo headset (+ headset) Plantronics 590A . Excellent headphones - good sound quality and complete freedom from wires. After switching from Windows XP to Ubuntu, the question arose of using headphones, both as ordinary headphones for sound output, and as a full-fledged headset for communicating in games and in Skype.

Although the standard Bluetooth manager of Ubuntu, it seems, implies the use of Audio Service for the corresponding BT devices, but I could not quickly find a clear instruction how to organize the output of the sound to the headphones.
')


Soon I came across a wonderful program BlueMan bluetooth manager ( screenshots ). This program is worthy of a separate article, as it has a lot of opportunities and it makes life easier for anyone who needs to work with various devices via the bluetooth protocol. The program works “on top” of the standard Ubuntu bluet-bz stack of bluez and practically does not draw dependencies (the program is written in python ʻe).
I will not enumerate all the features of the program, I will limit myself only to the fact that the program supports BT devices with A2DP profile



All you need to do in BlueMan is to pair your bt-headphones with the program. After the "sparring" I additionally activated using the sound service in the program parameters.



In the sound service settings, I activated using Headset, Sink, Control services for my headphones. For normal audio output, the Headset service is quite sufficient. The remaining services are present, I think so, to support the work of the AVRCP bt-profile. I did not check the work of the profile in any program in Ubuntu, so I can not say anything about its performance.

The last step is to correct the ~ / .asoundrc file . I'm not a big Copenhagen in the ALSA configuration file, all edits were peeped from the articles:
  1. http://alfa2linux.blogspot.com/2008/03/my-jabra-finally-working-with-bluez.html
  2. http://wiki.bluez.org/wiki/HOWTO/AudioDevices
I did not put any additional packages that were mentioned in the articles - bluetooth-alsa, btsco , etc.

I added the following lines to the .asoundrc file:

pcm.bluetooth {
type bluetooth
}

After editing the file, you have the opportunity to specify in the necessary programs a new sound device - bluetooth . Article 2, from the list I provided, shows how to set up many popular programs for working with bt-headphones. I now successfully work with bt-headphones SMPlayer and Pidgin. I also successfully managed to use my headphones as a headset to communicate via Skype. In the audio settings of Skype, a new audio device appears - bluetooth. Having set up Skype to work with a new device, I was successfully able to talk via bt-headset.



The only annoying moment is for some reason, after the first conversation on Skype or when listening to music from Pidgin, Skype does not allow you to start a conversation a second time, referring to “problems with sound capture”. The solution was found halfway - turning off and on the headphones (re-pairing) again allows you to use Skype. This problem is noticed only with Skype, perhaps in the future it will be fixed. I'm not sure that the problem is in Skype itself, most likely the dog is buried in the depths of bluez and is associated with the operation of the headset microphone, since audio output always works fine.
Summary : although the initial setup of the headphones may seem long, but after passing it you get a full opportunity to work with bt-headphones. The only problem that remains unresolved is how to force ALSA to use bluetooth headphones as the main source for audio output in the system when the headphones are paired with the computer. At the moment, you have to keep on two labels to the same programs, each of the labels reconfigures the output / input of sound to the required device. No more beautiful solution has yet been found by me.


PS This is my first post on the Habrr, mind you, do not kick, if something is missed :)

Source: https://habr.com/ru/post/39206/


All Articles