#911794 bluetooth: Baseus B11: Poor audio quality HSP/HFP, terrible with a2dp sink

Package:
bluetooth
Source:
bluez
Submitter:
Stelios Barberakis
Date:
2019-12-20 11:15:07 UTC
Severity:
important
#911794#5
Date:
2018-10-24 21:03:26 UTC
From:
To:
Dear Maintainer,

** I am not sure if this is a bluetooth or pulseaudio issue :S **

New Baseus b11 device works seamlessly with my android 4.0 phone.
Also pairing with Dell Latitude e5550 (current debian installation) works fine.
However:
* Sound streaming with HSP/HFP sounds like a poor 1950 recording with audio
source away from microphone but you can still understand conversations or
lyrics in music
* Sound streaming with a2dp sink, is normal for ~5sec and then starts periodic
cycles (~2 seconds) of fast-forwarding (with noise) -> Stop -> Fast Forwarding,
etc. This is unusable.


$ rfkill list

0: dell-wifi: Wireless LAN
        Soft blocked: no
        Hard blocked: no
1: dell-bluetooth: Bluetooth
        Soft blocked: no
        Hard blocked: no
2: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no
4: phy1: Wireless LAN
        Soft blocked: no
        Hard blocked: no
7: hci0: Bluetooth
        Soft blocked: no
        Hard blocked: no


package versions missing from auto report:
* pulseaudio-module-bluetooth 12.2-2
* pulseaudio 12.2-2


$ lspci

02:00.0 Network controller: Intel Corporation Wireless 7265 (rev 59)
        Subsystem: Intel Corporation Dual Band Wireless-AC 7265
        Flags: bus master, fast devsel, latency 0, IRQ 49
        Memory at f7000000 (64-bit, non-prefetchable) [size=8K]
        Capabilities: [c8] Power Management version 3
        Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Capabilities: [40] Express Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [140] Device Serial Number 18-5e-0f-ff-ff-9f-2c-61
        Capabilities: [14c] Latency Tolerance Reporting
        Capabilities: [154] L1 PM Substates
        Kernel driver in use: iwlwifi
        Kernel modules: iwlwifi


$ hciconfig -a

hci0:   Type: Primary  Bus: USB
        BD Address: 18:5E:0F:9F:2C:65  ACL MTU: 1021:5  SCO MTU: 96:6
        UP RUNNING
        RX bytes:46259396 acl:441 sco:892779 events:97477 errors:0
        TX bytes:105267095 acl:94171 sco:892691 commands:2626 errors:0
        Features: 0xff 0xfe 0x0f 0xfe 0xdb 0xff 0x7b 0x87
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy: RSWITCH HOLD SNIFF
        Link mode: SLAVE ACCEPT
        Class: 0x1c010c
        Service Classes: Rendering, Capturing, Object Transfer
        Device Class: Computer, Laptop
        HCI Version: 4.2 (0x8)  Revision: 0x1000
        LMP Version: 4.2 (0x8)  Subversion: 0x1000
        Manufacturer: Intel Corp. (2)


$ bluetoothctl

[Baseus B11]# show
Controller 18:5E:0F:9F:2C:65 (public)
        Class: 0x001c010c
        Powered: yes
        Discoverable: no
        Pairable: yes
        UUID: Headset AG                (00001112-0000-1000-8000-00805f9b34fb)
        UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
        UUID: OBEX File Transfer        (00001106-0000-1000-8000-00805f9b34fb)
        UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
        UUID: OBEX Object Push          (00001105-0000-1000-8000-00805f9b34fb)
        UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
        UUID: IrMC Sync                 (00001104-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
        UUID: Audio Source              (0000110a-0000-1000-8000-00805f9b34fb)
        UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)
        UUID: Vendor specific           (00005005-0000-1000-8000-0002ee000001)
        UUID: Message Notification Se.. (00001133-0000-1000-8000-00805f9b34fb)
        UUID: Phonebook Access Server   (0000112f-0000-1000-8000-00805f9b34fb)
        UUID: Message Access Server     (00001132-0000-1000-8000-00805f9b34fb)
        UUID: Headset                   (00001108-0000-1000-8000-00805f9b34fb)
        Modalias: usb:v1D6Bp0246d0532
        Discovering: no

[Baseus B11]# devices
Device 00:00:00:02:16:6A Baseus B11

[Baseus B11]# info 00:00:00:02:16:6A
Device 00:00:00:02:16:6A (public)
        Name: Baseus B11
        Alias: Baseus B11
        Class: 0x00240404
        Icon: audio-card
        Paired: yes
        Trusted: yes
        Blocked: no
        Connected: yes
        LegacyPairing: no
        UUID: Headset                   (00001108-0000-1000-8000-00805f9b34fb)
        UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
        UUID: Advanced Audio Distribu.. (0000110d-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
        UUID: Handsfree                 (0000111e-0000-1000-8000-00805f9b34fb)
        UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
        Modalias: bluetooth:v0094p0123d1000


$ sudo dmesg -t | grep -i bluetooth

Bluetooth: Core ver 2.22
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Bluetooth: L2CAP socket layer initialized
Bluetooth: SCO socket layer initialized
Bluetooth: hci0: read Intel version: 370810011003110e32
Bluetooth: hci0: Intel device is already patched. patch num: 32
Bluetooth: BNEP (Ethernet Emulation) ver 1.3
Bluetooth: BNEP filters: protocol multicast
Bluetooth: BNEP socket layer initialized
Bluetooth: RFCOMM TTY layer initialized
Bluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM ver 1.11
Bluetooth: hci0: read Intel version: 370810011003110e00
bluetooth hci0: firmware: direct-loading firmware intel/ibt-
hw-37.8.10-fw-1.10.3.11.e.bseq
Bluetooth: hci0: Intel Bluetooth firmware file: intel/ibt-
hw-37.8.10-fw-1.10.3.11.e.bseq
Bluetooth: hci0: Intel firmware patch completed and activated
Bluetooth: hci0: read Intel version: 370810011003110e00
Bluetooth: hci0: Intel Bluetooth firmware file: intel/ibt-
hw-37.8.10-fw-1.10.3.11.e.bseq
Bluetooth: hci0: Intel firmware patch completed and activated
Bluetooth: hci0: read Intel version: 370810011003110e00
bluetooth hci0: firmware: direct-loading firmware intel/ibt-
hw-37.8.10-fw-1.10.3.11.e.bseq
Bluetooth: hci0: Intel Bluetooth firmware file: intel/ibt-
hw-37.8.10-fw-1.10.3.11.e.bseq
Bluetooth: hci0: Intel firmware patch completed and activated
Bluetooth: hci0: last event is not cmd complete (0x0f)
...
Bluetooth: hci0: last event is not cmd complete (0x0f)
Bluetooth: hci0: SCO packet for unknown connection handle 0
Bluetooth: hci0: SCO packet for unknown connection handle 0
Bluetooth: hci0: SCO packet for unknown connection handle 0
Bluetooth: hci0: SCO packet for unknown connection handle 0
Bluetooth: hci0: last event is not cmd complete (0x0f)
...
Bluetooth: hci0: last event is not cmd complete (0x0f)
Bluetooth: hci0: failed to disable LE scan: status 0x1f
Bluetooth: hci0: command 0x200c tx timeout
Bluetooth: hci0: command 0x0c1a tx timeout
Bluetooth: hci0: command 0x0c1a tx timeout
Bluetooth: hci0: command 0x0c1a tx timeout
Bluetooth: hci0: command 0x0c3a tx timeout
Bluetooth: hci0: command 0x0408 tx timeout
Bluetooth: hci0: command 0x0408 tx timeout
Bluetooth: hci0: command 0xfc3f tx timeout
Bluetooth: hci0: turning off Intel device LED failed (-110)
Bluetooth: hci0: last event is not cmd complete (0x0f)
Bluetooth: hci0: SCO packet for unknown connection handle 0
...
Bluetooth: hci0: SCO packet for unknown connection handle 0
Bluetooth: hci0: last event is not cmd complete (0x0f)
Bluetooth: hci0: SCO packet for unknown connection handle 496
Bluetooth: hci0: SCO packet for unknown connection handle 0
...



$ sudo grep -i bluetooth /var/log/syslog | grep -i error

Oct 24 20:30:26 localhost bluetoothd[31807]: connect error: Device or resource
busy (16)
Oct 24 20:30:28 localhost bluetoothd[31807]: connect error: Device or resource
busy (16)
Oct 24 20:30:29 localhost bluetoothd[31807]: connect error: Device or resource
busy (16)
Oct 24 20:30:31 localhost bluetoothd[31807]: connect error: Device or resource
busy (16)
Oct 24 22:38:46 localhost bluetoothd[17973]: connect error: Device or resource
busy (16)
Oct 24 22:38:49 localhost bluetoothd[17973]: connect error: Device or resource
busy (16)

#911794#10
Date:
2019-12-20 10:48:09 UTC
From:
To:
Hi,

I had this too, with my laptop and bluetooth headset. Then I found

https://unix.stackexchange.com/questions/407447/how-to-force-a2dp-sink-when-wireless-bluetooth-headset-is-connected

The solution suggested there seems to work; adding "AutoConnect=true"
(to connect to all profiles, not just "the first one available", which
if it happens to be HFP/HSP is terrible) and "MultiProfile = multiple"
(to enable the Multi Profile Specification, which defaults to "off")
allows me to select A2DP (and in fact defaults to that for me).

It's probably a good idea to change the defaults in the bluetooth
package to do so by default...?