Bluetooth speaker used the HSP/HFP profile by default rather than the higher-quality A2DP profile

Bug #1720684 reported by Nate Graham
30
This bug affects 6 people
Affects Status Importance Assigned to Milestone
PulseAudio
Fix Released
Medium
pulseaudio (Ubuntu)
Fix Released
Medium
Daniel van Vugt

Bug Description

Kubuntu 17.04
Bluetooth device: https://smile.amazon.com/VicTsing-Wireless-Waterproof-Hands-Free-Speakerphone/dp/B074DX13T1 (itentifies itself as "C6")

The above Bluetooth speaker paired and started streaming audio perfectly in Kubuntu 17.04. But the audio quality was poor, because the default audio profile was the low-quality HSP/HFP one. When I switched it to the A2DP profile, it sounded perfect again.

Can we make A2DP the default playback profile for Bluetooth audio devices?

Tags: a2dp pulse11
Revision history for this message
In , Nate-b (nate-b) wrote :

Kubuntu 17.04
Pulseaudio 1:10.0-1ubuntu2
Bluetooth device: https://smile.amazon.com/VicTsing-Wireless-Waterproof-Hands-Free-Speakerphone/dp/B074DX13T1 (identifies itself as "C6" by default)

The above Bluetooth speaker paired and started streaming audio perfectly on my Kubuntu 17.04 system. But the audio quality was poor, because the default audio profile was the low-quality HSP/HFP one. When I used pavucontrol to switch it to the A2DP profile, it sounded perfect.

I don't know enough about Bluetooth to suggest a solution, but this is definitely an issue. My Mac used the correct profile with no configuration and sound was perfect with no configuration, but my Linux system didn't, and I had to start a reddit thread and read a wiki page to learn how to get the device to produce decent audio. This is a sub-optimal user experience for someone like my wife or my mother, who would would just assume that it doesn't work and blame the speaker or the OS.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Bluetooth audio and profile selection is actually the job of pulseaudio, not bluez (surprisingly).

Also, A2DP has always been preferred over HSP/HFP but the availability and detection of A2DP has been historically buggy. So the selection might not turn out as you hope. AFAIK fixes for this already exist in 17.10 and in 16.04:

https://launchpad.net/ubuntu/+source/pulseaudio

Unfortunately it seems 17.04 has been neglected in this area. Although to be fair 17.04 is also end-of-life soon:

https://wiki.ubuntu.com/Releases

Please try live-booting the latest 17.10 image and tell us if that has indeed resolved the problem for your hardware:

http://cdimages.ubuntu.com/daily-live/current/

Changed in bluez (Ubuntu):
status: New → Incomplete
affects: bluez (Ubuntu) → pulseaudio (Ubuntu)
Revision history for this message
Nate Graham (pointedstick) wrote :

Thanks for the info. I'll give that a shot and report back.

Revision history for this message
In , Tanu Kaskinen (tanuk) wrote :

I agree that A2DP is a better default. I don't know why we have higher priority for HSP.

Patch submitted:
https://patchwork.freedesktop.org/patch/182709/

Revision history for this message
In , Nate-b (nate-b) wrote :

Fantastic, thank you!

Revision history for this message
Nate Graham (pointedstick) wrote :

I was able to test with a Live USB disk booting Kubuntu 17.10 and I'm sorry to say that there was no change: the HSP profile was still the default.

However, I'd also reported this upstream to the PulseAudio folks, and it looks like they've identified the problem and are preparing a fix: https://bugs.freedesktop.org/show_bug.cgi?id=103058

tags: added: a2dp
Changed in pulseaudio (Ubuntu):
status: Incomplete → Confirmed
Changed in pulseaudio:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
In , Tanu Kaskinen (tanuk) wrote :

Patch merged to master.

Changed in pulseaudio:
status: Confirmed → Fix Released
tags: added: pulse11
Changed in pulseaudio (Ubuntu):
status: Confirmed → In Progress
importance: Undecided → High
Changed in pulseaudio (Ubuntu):
status: In Progress → Triaged
Changed in pulseaudio (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
status: Triaged → In Progress
Revision history for this message
In , Daniel van Vugt (vanvugt) wrote :

I was just looking at this fix and am not sure it's right...

https://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/src/modules?id=85daab2725c8964d5e3d07089c4056435022d12e

My reading of the PulseAudio source suggests that lower values are higher priority, as is often the convention. In that case, wasn't the code correct before the fix?

Changed in pulseaudio (Ubuntu):
status: In Progress → Triaged
Revision history for this message
In , Tanu Kaskinen (tanuk) wrote :

Higher values mean higher priority.

Changed in pulseaudio (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Here's the same fix, for bionic.

Unfortunately even with this fix it's too hard for me to tell if it's any improvement. My system seems to reliably default to the last used audio profile for the device. Even if I have removed and re-paired the device. So it seems like the fix at most is only necessary for brand new devices you've never had on your system before.

Changed in pulseaudio (Ubuntu):
importance: High → Medium
Revision history for this message
Sebastien Bacher (seb128) wrote :

thanks Daniel, let's see what the feedback is after the new version lands

Changed in pulseaudio (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pulseaudio - 1:11.1-1ubuntu2

---------------
pulseaudio (1:11.1-1ubuntu2) bionic; urgency=medium

  * Add 0800-fix-lp1720684.patch to ensure the default Bluetooth audio
    profile is the higher quality A2DP rather than HSP/HFP. (LP: #1720684)

 -- Daniel van Vugt <email address hidden> Fri, 15 Dec 2017 09:49:25 +0100

Changed in pulseaudio (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.