You are not logged in.

#1 2020-12-26 21:37:12

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 17,693

Bluetooth Headset HSP/HFP not working, but available

I received an Aluratek Bluetooth headset for Christmas.  I works perfectly in Arch Linux in A2DP mode and sounds great.  It works seamlessly with my Pixel 4a in both A2DP mode and (presumably) in HSP/HFP mode as it works with phone calls.  It also works with the microphone to talk to Google assistant while listening to hi-def audio (Not quite sure how that works)

Regardless, in Arch Linux, I cannot find a mode in which I can use the microphone.  If I look at the output of pactl list, I can see that both A2DP and HSP/HFP are available, and I can use pacmd set-card-profile to change between the profiles without receiving any errors, but once in HSP/HFP mode, there is no audio, and there is no input from the microphone -- although both show up in pavucontrol.   Sometimes after making the switch to HSP/HFP, the headset will disconnect, and then reconnect again as a different card number.  Other time, nothing happens -- there is just no audio.  Running btmon as root shows data is transferred to the headset in A2DP mode, but not in HSP/HSF mode.

I checked other posts in the forums, and there are many stale threads similar to this that either died out without resolution, or had slightly different problems -- mostly that the poster could not change to the desired profile as it was not available.  The wiki goes off on what I beleive is a tangent of installing ofono and phonesim for some kind of incompatibility of HFP;  I don't think that is the issue and have not invested time descending that rabbit hole.  Of course, if I am wrong, let me know and I'll chase that to the mat.

The pulseaudio website talks of some cards not properly setting up endpoints and offers incantations to solve some of these issues with specific Bluetooth interfaces; mostly the usual culprits (*cough* Broadcom *cough*).  My device is an Intel USB Bluetooth that is internal to my laptop and is independent of the WiFi interface, and does not show up in the discussion of cards with need of workarounds.   

Pertinent output of pactl list with HD audio working:

Card #7
	Name: bluez_card.00_6A_8E_08_04_31
	Driver: module-bluez5-device.c
	Owner Module: 30
	Properties:
		device.description = "Aluratek Headset"
		device.string = "00:6A:8E:08:04:31"
		device.api = "bluez"
		device.class = "sound"
		device.bus = "bluetooth"
		device.form_factor = "headset"
		bluez.path = "/org/bluez/hci0/dev_00_6A_8E_08_04_31"
		bluez.class = "0x240404"
		bluez.alias = "Aluratek Headset"
		device.icon_name = "audio-headset-bluetooth"
		device.intended_roles = "phone"
	Profiles:
		headset_head_unit: Headset Head Unit (HSP/HFP) (sinks: 1, sources: 1, priority: 30, available: yes)
		a2dp_sink: High Fidelity Playback (A2DP Sink) (sinks: 1, sources: 0, priority: 40, available: yes)
		off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
	Active Profile: a2dp_sink
	Ports:
		headset-output: Headset (type: Headset, priority: 0, latency offset: 0 usec, available)
			Part of profile(s): headset_head_unit, a2dp_sink
		headset-input: Headset (type: Headset, priority: 0, latency offset: 0 usec, availability unknown)
			Part of profile(s): headset_head_unit

and again in HSP/HFP mode with no audio:

ewaller@odin/home/ewaller % pacmd set-card-profile 7 headset_head_unit 
ewaller@odin/home/ewaller % pactl list
Module #0
<----SNIP a lot of data that I think is unrelated ---->
Card #7
	Name: bluez_card.00_6A_8E_08_04_31
	Driver: module-bluez5-device.c
	Owner Module: 32
	Properties:
		device.description = "Aluratek Headset"
		device.string = "00:6A:8E:08:04:31"
		device.api = "bluez"
		device.class = "sound"
		device.bus = "bluetooth"
		device.form_factor = "headset"
		bluez.path = "/org/bluez/hci0/dev_00_6A_8E_08_04_31"
		bluez.class = "0x240404"
		bluez.alias = "Aluratek Headset"
		device.icon_name = "audio-headset-bluetooth"
		device.intended_roles = "phone"
	Profiles:
		headset_head_unit: Headset Head Unit (HSP/HFP) (sinks: 1, sources: 1, priority: 30, available: yes)
		a2dp_sink: High Fidelity Playback (A2DP Sink) (sinks: 1, sources: 0, priority: 40, available: yes)
		off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
	Active Profile: headset_head_unit
	Ports:
		headset-output: Headset (type: Headset, priority: 0, latency offset: 0 usec, available)
			Part of profile(s): headset_head_unit, a2dp_sink
		headset-input: Headset (type: Headset, priority: 0, latency offset: 0 usec, available)
			Part of profile(s): headset_head_unit
ewaller@odin/home/ewaller % 

 

Between Pulseaudo, alsa, bluez, and the wiki, there are a lot of windmills to tilt; any suggestions as to where to direct my efforts?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#2 2020-12-28 14:19:45

Stellarator
Member
Registered: 2019-01-12
Posts: 29

Re: Bluetooth Headset HSP/HFP not working, but available

Actually, it would be nice to close this topic once and for all. Considering the fact that people with 10+ years of experience (at least considering BB but I am sure that not only) took the stage smile.

I have SONY WH-1000XM3. I did everything you've mentioned (explored stale threads, read wiki pages, checked pulseaudio website, ...). What I've never tried was to install ofono smile (personally, I think that phonesim is definitely overkill). So, someone might have to look down the rabbit hole... For me this moment was not so important, because I have prioritized audio quality and the microphone in my laptop is still working. So, I decided not to waste time at that moment and settled on just playing audio. But the engineering mind demands an answer!

I watched the issues in this repo a year+ ago (it is mentioned in wiki's page). Especially interesting (and promising) one was Add HFP support ?. But I lost context 1.5 years ago and so need a refresh.

Personally, I checked author posts once in awhile (like this one). Because author has similar setup (in terms of headset). But it looks like the issue has not been resolved. And maybe all these things (and my words) are not related with your problem at all.

Offline

#3 2020-12-28 14:32:21

progandy
Member
Registered: 2012-05-17
Posts: 4,233

Re: Bluetooth Headset HSP/HFP not working, but available

It also works with the microphone to talk to Google assistant while listening to hi-def audio (Not quite sure how that works)

I'd guess it switches from A2DP to HFP with the 16kHz mSBC codec (which is currently not supported by pulseaudio)

This merge request and the others mentioned in the comments discuss different ways that could be implemented.
https://gitlab.freedesktop.org/pulseaud … quests/254

You could also try to replace pulseaudio with pipewire and try its implementations https://gitlab.freedesktop.org/pipewire … issues/249 (Edit: It seems to be incomplete)

Last edited by progandy (2020-12-28 14:43:45)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#4 2021-01-03 17:06:46

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 17,693

Re: Bluetooth Headset HSP/HFP not working, but available

I did try setting the default sample rate to 48000 to no avail.

It looks the collective opinion around the internet is that it may be related to the Linux firmware package and not using the proper USB endpoint.  Could all be noise, but that is jest of what I am seeing.   Still investigating.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB