mSBC codec not available only CVSD one

Bug #1993668 reported by Hadrien Mary
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Linux
Confirmed
Medium
PipeWire
Fix Released
Unknown
linux (Ubuntu)
Confirmed
Undecided
Unassigned
pipewire (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I am using Ubuntu 22.10 and my headset Pixel Buds Pro works correctly but only the low-quality CVSD codec is available and not the mSBC one for the Handsfree profile.

I know the Pixel Buds Pro headset are compatible with mSBC because on another machine also running Ubuntu 22.10, this headset correctly works with the mSBC codec (and the audio quality is much better for both input and output audio).

My motherboard is an Aorus x670 with AMD Zen 4 CPU.

The bluetooth controller seems to be:

```
Bus 005 Device 003: ID 0e8d:0616 MediaTek Inc. Wireless_Device
```

Let me know if you need more informations.
---
ProblemType: Bug
ApportVersion: 2.23.1-0ubuntu3
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
DistroRelease: Ubuntu 22.10
InstallationDate: Installed on 2022-09-27 (22 days ago)
InstallationMedia: Ubuntu 22.10 "Kinetic Kudu" - Beta amd64 (20220927.1)
NonfreeKernelModules: nvidia_modeset nvidia
Package: pipewire 0.3.58-2ubuntu1
PackageArchitecture: amd64
ProcVersionSignature: Ubuntu 5.19.0-21.21-generic 5.19.7
Tags: kinetic
Uname: Linux 5.19.0-21-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip docker lpadmin lxd plugdev sambashare sudo
_MarkForUpload: True

Revision history for this message
Hadrien Mary (hadim) wrote :

I have also asked a similar question at https://answers.launchpad.net/ubuntu/+question/703537

Revision history for this message
Hadrien Mary (hadim) wrote :

More information.

Device:

```
$ wpctl inspect 66
id 66, type PipeWire:Interface:Device
    api.bluez5.address = "74:74:46:1F:3A:63"
    api.bluez5.class = "0x240404"
    api.bluez5.connection = "disconnected"
    api.bluez5.device = ""
    api.bluez5.icon = "audio-headset"
    api.bluez5.path = "/org/bluez/hci0/dev_74_74_46_1F_3A_63"
    bluez5.auto-connect = "[ hfp_hf hsp_hs a2dp_sink ]"
    bluez5.profile = "off"
  * client.id = "32"
    device.alias = "Pixel Buds Pro de Hadrien"
  * device.api = "bluez5"
    device.bus = "bluetooth"
  * device.description = "Pixel Buds Pro de Hadrien"
    device.form-factor = "headset"
    device.icon-name = "audio-headset-bluetooth"
  * device.name = "bluez_card.74_74_46_1F_3A_63"
    device.product.id = "0x3004"
    device.string = "74:74:46:1F:3A:63"
    device.vendor.id = "bluetooth:00e0"
  * factory.id = "14"
  * media.class = "Audio/Device"
  * object.serial = "438"
```

Sink:

```
$ wpctl inspect 128
id 128, type PipeWire:Interface:Node
    api.bluez5.address = "74:74:46:1F:3A:63"
    api.bluez5.codec = "cvsd"
    api.bluez5.profile = "headset-head-unit"
    api.bluez5.transport = ""
    audio.adapt.follower = ""
    card.profile.device = "1"
  * client.id = "32"
    clock.quantum-limit = "8192"
    device.api = "bluez5"
  * device.id = "66"
    device.intended-roles = "Communication"
    device.routes = "1"
  * factory.id = "8"
    factory.mode = "merge"
    factory.name = "api.bluez5.sco.sink"
    library.name = "audioconvert/libspa-audioconvert"
  * media.class = "Audio/Sink"
  * node.description = "Pixel Buds Pro de Hadrien"
    node.driver = "true"
  * node.name = "bluez_output.74_74_46_1F_3A_63.1"
    node.pause-on-idle = "false"
  * object.serial = "440"
  * priority.driver = "1010"
  * priority.session = "1010"
```

Source:

```
$ wpctl inspect 81
id 81, type PipeWire:Interface:Node
    api.bluez5.address = "74:74:46:1F:3A:63"
    api.bluez5.codec = "cvsd"
    api.bluez5.profile = "headset-head-unit"
    api.bluez5.transport = ""
    audio.adapt.follower = ""
    card.profile.device = "0"
  * client.id = "32"
    clock.quantum-limit = "8192"
    device.api = "bluez5"
  * device.id = "66"
    device.intended-roles = "Communication"
    device.routes = "1"
  * factory.id = "8"
    factory.mode = "split"
    factory.name = "api.bluez5.sco.source"
    library.name = "audioconvert/libspa-audioconvert"
  * media.class = "Audio/Source"
  * node.description = "Pixel Buds Pro de Hadrien"
    node.driver = "true"
  * node.name = "bluez_input.74_74_46_1F_3A_63.0"
    node.pause-on-idle = "false"
  * object.serial = "439"
  * priority.driver = "2010"
  * priority.session = "2010"
```

tags: added: apport-collected kinetic
description: updated
Revision history for this message
Hadrien Mary (hadim) wrote : Dependencies.txt

apport information

Revision history for this message
Hadrien Mary (hadim) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Hadrien Mary (hadim) wrote : ProcEnviron.txt

apport information

Revision history for this message
Hadrien Mary (hadim) wrote :

I checked the logs for the wireplumber, bluetooth and pipewire services and only the wireplumber shows something.

- I first connect the headset
- The profile is auto to CVSD
- I switch to mSBC (available in the menu)
- I see those wireplumber logs:

```
Oct 20 18:14:25 gollum wireplumber[2639]: connect(): Operation not supported
Oct 20 18:14:25 gollum wireplumber[2639]: 0x55807b962e38: can't send command 2: Operation not permitted
Oct 20 18:14:25 gollum wireplumber[2639]: (bluez_input.74_74_46_1F_3A_63.0-20) suspended -> error (Start error: Operation not permitted)
Oct 20 18:14:25 gollum wireplumber[2639]: connect(): Operation not supported
Oct 20 18:14:25 gollum wireplumber[2639]: 0x55807b977d88: can't send command 2: Operation not permitted
Oct 20 18:14:25 gollum wireplumber[2639]: (bluez_output.74_74_46_1F_3A_63.1-23) suspended -> error (Start error: Operation not permitted)
```

- After doing that, the mSBC option is not available in the Gnome Sound Settings menu anymore.

I tried to look for more logs but I can't find relevant ones.

Note that the above logs does not show on my other machine that works with the mSBC profile.

Revision history for this message
Hadrien Mary (hadim) wrote :

I have also reported the issue upstream at https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/363

Revision history for this message
Hadrien Mary (hadim) wrote :

According to https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2783#note_1601772, the bug is related to the kernel driver for the adapter `0e8d:0616`.

Changed in pipewire:
status: Unknown → Fix Released
Revision history for this message
Hadrien Mary (hadim) wrote :
Revision history for this message
In , marelo64 (marelo64-linux-kernel-bugs) wrote :

Created attachment 303073
Logs for multiple relevant commands

- Ubuntu ticket: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2783
- Pipewire ticket: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2783

---

While the bluetooth adapter `0e8d:0616` is supposed to support HFP/mSBC (detected as such by pipewire), when switching to it, it fails and fall back to the low quality HFP/CVSD audio codec.

According to pipewire's dev, it could be an issue with the driver for that specific adapter since my headset (Pixel Buds Pro) works well on another machine with the exact same software stack (Ubuntu 22.10) but another bluetooth adapter where the Pixel Buds Pro works well with HFP/mSBC.

See logs attached.

Revision history for this message
In , marelo64 (marelo64-linux-kernel-bugs) wrote :
Changed in pipewire:
status: Fix Released → Unknown
Changed in linux:
importance: Unknown → Medium
status: Unknown → Confirmed
Changed in pipewire:
status: Unknown → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in linux (Ubuntu):
status: New → Confirmed
Changed in pipewire (Ubuntu):
status: New → Confirmed
Revision history for this message
Boris Erdmann (boris-erdmann) wrote :

This bug affects me, albeit with another chip that used to work with kernel 5.15 from Ubuntu 22.04

dmesg output:
```
[ 5.641569] Bluetooth: hci0: BCM: chip id 110
[ 5.642558] Bluetooth: hci0: BCM: features 0x2f
[ 5.658564] Bluetooth: hci0: BCM4350C5
[ 5.658570] Bluetooth: hci0: BCM4350C5 (003.006.007) build 0000
[ 5.661596] Bluetooth: hci0: BCM4350C5 'brcm/BCM-0a5c-6412.hcd' Patch
[ 5.682015] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4350-pcie for chip BCM4350/8
[ 5.682301] brcmfmac 0000:3a:00.0: Direct firmware load for brcm/brcmfmac4350-pcie.Dell Inc.-XPS 13 9350.bin failed with error -2
[ 5.684268] brcmfmac 0000:3a:00.0: Direct firmware load for brcm/brcmfmac4350-pcie.Dell Inc.-XPS 13 9350.txt failed with error -2
[ 5.684313] brcmfmac 0000:3a:00.0: Direct firmware load for brcm/brcmfmac4350-pcie.txt failed with error -2
[ 5.879989] psmouse serio1: synaptics: Unable to query device: -5
[ 5.974249] input: Dell WMI hotkeys as /devices/platform/PNP0C14:01/wmi_bus/wmi_bus-PNP0C14:01/9DBB5994-A997-11DA-B012-B622A1EF5492/input/input17
[ 6.021264] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4350-pcie for chip BCM4350/8
[ 6.021313] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available
[ 6.021581] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4350/8 wl0: Oct 22 2015 06:16:26 version 7.35.180.119 (r594535) FWID 01-e791c176
[ 6.032590] _ART package 0 is invalid, ignored
[ 6.032614] _ART package 0 is invalid, ignored
[ 6.076145] snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380
[ 6.076154] snd_hda_intel 0000:00:1f.3: NHLT table not found
[ 6.076170] snd_hda_intel 0000:00:1f.3: enabling device (0000 -> 0002)
[ 6.076481] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 6.310307] intel_tcc_cooling: Programmable TCC Offset detected
[ 6.316550] Bluetooth: hci0: Dell DW1820A
[ 6.316558] Bluetooth: hci0: BCM4350C5 (003.006.007) build 1703
```

Changed in pipewire:
status: New → Fix Released
Changed in pipewire:
status: Fix Released → New
Changed in pipewire:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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