Using microphone from bluetooth
Greets Not to forget: OS: Linux Mint 18.2 (want to switch to Arch Linux) CPU: Intel Core i7-4770 Solution: PC headsets either use analog audio or USB audio or Bluetooth audio. Is this only for using my laptop as a virtual headset for another device, or is there a way to use these codecs for the microphone of a Bluetooth headset?
Using microphone from bluetooth
I have a problem with bluetooth : I can connect to my handsfree device using bluetooth. By default it connects in A2DP mode (good audio quality, but no microphone available). However, when I try to switch back to HSP/HFP (microphone, even if the audio quality is lower) it fails with an error in syslog :
[pulseaudio] module-bluez5-device.c: Refused to switch profile to headset_head_unit: Not connected
And it’s very strange since last year I was able to use my bluetooth handsfree device without any problem ! I tried to follow some idea in the web, but no one works for me.
Finally, after several hours I found a solution : the thing is that the version 5.36 of Bluez is buggy, so you need to install it (to check the installed version, check for example the result of apt-cache policy bluez ). The idea is to downgrade (the version 5.35 seems to work), or go to a more recent version (the version 5.40 works). To upgrade, I decided to take the one from experimental repos (I’m running debian unstable). To do so, first add:
deb http://httpredir.debian.org/debian experimental main
in /etc/apt/sources.list . Then run
sudo apt-get update sudo apt-get -t experimental install bluez
Then reboot and it works ! (or I think that restarting pulseaudio should work:
(It should restart by itself))
Bluetooth headset mic not working in Teams for Linux, I have a Sony WH-1000XM4 bluetooth headset and Linux Mint 20.2 Cinnamon Edition. When I’m in a meeting in Teams for Linux, my headset microphone does not appear in the list of microphones, but it does if I go into the sound setting in system settings, and I can verify in the system settings that the …
Ubuntu: How to use a bluetooth headset mic in Ubuntu?
Ubuntu: How to use a bluetooth headset mic in Ubuntu? (2 Solutions!)Helpful? Please support me on Patreon: https://www.patreon.com/roelvandepaarWith thanks
I have various Bluetooth headsets, and when I use these with Android and ChromeOS, I get decent bidirectional audio quality for calls and video chats.
Unfortunately, when I use them on my arch Linux laptop (with PulseAudio 13.99.2+13+g7f4d7fcf5-1, bluez 5.55-1, and pulseaudio-modules-bt 1.4-3), I have a choice (under the pavucontrol configuration panel, or using pactl set-card-profile ): I can enable high quality sound using A2DP with a nice selection of codecs including SBC, AptX, and AAC, or I can enable the microphone using HSP/HSF instead of A2DP. With the HSP/HSF profile, the microphone «works» in the sense that there is bidirectional audio with both a source and sink in PulseAudio, but the sound quality is so bad that it can be hard to understand the words people are saying.
- What is actually happening when Android or ChromeOS gets decent sound quality with the mic enabled? Is it possible to use a decent codec in HSP/HSF mode? Is it possible to use a mic with A2DP? Or is there some other Bluetooth mode?
- On the pulseaudio-module-bt web site, all of the codecs except LDAC seem to support decoding as well as encoding, but how do I actually use the decoding functionality? Is this only for using my laptop as a virtual headset for another device, or is there a way to use these codecs for the microphone of a Bluetooth headset?
- What concrete steps can I take to make my headset sound better in bidirectional calls? Or failing that, even if the microphone sounds bad, can I at least make the speakers sound good without completely disabling the microphone?
Well, I don’t fully understand this, but it seems that maybe good sound quality requires at least HFP 1.6, and bluez currently does not support HFP because doing so requires breaking backwards compatibility with ofono, which has become a contentious question.
Until this has been sorted out, I worked around the problem by getting an Avantree DG80 Bluetooth audio dongle. It looks like an ordinary USB audio device in Linux but pairs with my headsets. The sound quality isn’t as good as A2DP, but is noticeably better than what I was getting out of bluez/PulseAudio. It’s also nice that I can switch between the A2DP and HSP/HSF modes either by switching between stereo and stereo+mono input in PulseAudio, or by double-tapping the switch on the front of the Bluetooth dongle.
A2DP is not a bidirectional profile. So it will not get bi-directional audio.
What you want is something like the mSBC codec over HFP profile.
There is a good article here that explains how to use it on Ubuntu 20.04 with pipewire instead of PulseAudio. It even includes a recording soundclip, and a playback soundclip (which was created by recording, with a mic the sound from the headset), to show the difference in quality.
Based on this answer https://askubuntu.com/a/1250010/35326 it looks like A2DP bi-directional audio will not work until Linux kernel and PulseAudio are improved to support this.
You might be able to do this with PipeWire instead of PulseAudio.
Comment from Ric @tornado99:
- uninstall pulseaudio-bluetooth
- force uninstall just pulseaudio without removing any dependencies, so sudo -Rdd pulseaudio
- install pipewire and pipewire-pulse
- edit /etc/pipewire/media-session.d/bluez-monitor.conf to allow mSBC
- make sure you are running kernel 5.8+
- check it works i.e. select HSP profile, and then you can use headphones+mic on your device with reasonable-sounding audio (16kHz)
- if you get silence, you need to switch to a Realtek RTL8761B-based USB receiver. these are very cheap (mine was branded Maxesla Bluetooth 5.0)
- install firmware file for RTL. (just do a web search)
- enjoy!
Sound — Headphones microphone is not working, Find load-module module-bluetooth-policy line in /etc/pulse/default.pa. Change it to load-module module-bluetooth-policy auto_switch=2. Now pulseaudio will switch the device profile to HSP whenever microphone access is requested and change it back to A2DP after stream is closed.
Hello Unix & Linux Community
Right now I’m looking for a new headset for my PC, because my Steel-series Siberia V2 is sometimes working, sometimes not.
I asked in different stores f.e. Gamestop which headsets the best for pc’s are. Everyone of them just said Logitech G, but Logitech sais, that their headset are just working with Windows.
Now I wanted to ask you, if somebody knows a good quality headset that’s working with Linux as well.
I hope somebody can give me a recommendation.
Not to forget:
OS: Linux Mint 18.2 (want to switch to Arch Linux)
CPU: Intel Core i7-4770
PC headsets either use analog audio or USB audio or Bluetooth audio. They should work with Linux.
Record audio from bluetooth headset using bluealsa on, Note: whenever any systemctl unit files are changed, the below command must be executed to take changes into effect. 1. «systemctl daemon-reload» 2. systemctl restart bluealsa. 4.Another thing to note is: using profile «sco» in asounrc file. recording audio should work after these changes!
Configuring microphone in a bluetooth headset in Linux is a difficult task. I have seen a lot of queries regarding this on several forums. I recently fixed this issue for myself in Manjaro KDE.
Why does this issue arise?
Most of the linux distribution use PulseAudio to manage sound settings. But pulseaudio with default installation only supports A2DP sink profile for High Fidelity Playback. This configuration only supports unidirectional audio transfer (Laptop to Headset). For using headset as both input and output we need to make use of HSP/HFP sink profile which is not present in the default installation of pulseaudio due to it’s buggy nature.
Solution
There are few libraries which adds the support for HSP/HFP in pulseaudio such as oFono and phonesim but it takes a lot of effort to setup and also does not guarantee good results. A better solution is to replace PulseAudio with PipeWire.
What is PipeWire
PipeWire acts as a drop-in replacement for PulseAudio and offers an easy way to set up Bluetooth headsets. It includes out-of-the-box support for A2DP sink profiles using SBC/SBC-XQ, AptX, LDAC or AAC codecs, and HFP/HSP.
Installation for Manjaro KDE
sudo pacman -Rdd manjaro-pulse pulseaudio pulseaudio-alsa pulseaudio-equalizer pulseaudio-jack pulseaudio-lirc pulseaudio-rtp pulseaudio-zeroconf pulseaudio-bluetooth pulseaudio-ctl sof-firmware
$ pactl info . Server Name: PulseAudio (on PipeWire 0.3.32) .
Installation for Ubuntu Users:
Open your terminal and follow these steps:
- We will use a PPA for adding Pipewire to Ubuntu. Execute the following command to do this:
$ pactl info . Server Name: PulseAudio (on PipeWire 0.3.32) .
systemctl —user unmask pulseaudio systemctl —user —now enable pulseaudio.service pulseaudio.socket
References
I hope this article helped you in configuring your wireless headphone microphone.
Questions, suggestions, a word of thanks is always encouraged.
Guide to bluetooth headset and audio profiles, I use bluez and blueman with the blueman-applet to manage my connections, and then pulseaudio to do the actual audio routing from my applications (zoom, skype, you name it) to the devices. Two headsets in question that I use are. Bose QC35 II. Google Pixel Buds A-Series. For either of these, …