Skip to contentSkip to conversation

Audio playback over bluetooth stutters during scan

DISCUSSION Christian Stadelmann 2 participants 2 messages May 30, 2021 – May 31, 2021 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Dear bluez developers,

whenever I start bluetooth scanning on my PC, any audio playback over bluetooth stutters.

Example #1 with GUI tools:
https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/409

Example #2 with bluetoothctl:
1. Connect a bluetooth speaker or headphone to the PC
2. start audio playback (e.g. using totem)
3. run bluetoothctl scan on

What happens:
As long as bluetooth scan is runnig, audio playback stutters. Once I kill bluetoothctl scan on or close gnome's control center, audio playback is back to normal.

Would it be possible to modify the scanning behaviour in a way that it does not make audio playback stutter?

Software versions (Fedora 34):
bluez 5.58 (5.58-2.fc34.x86_64)
kernel 5.12.7 (5.12.7-300.fc34.x86_64)

PS: I've attached the output of $ bluetoothctl info and $ bluetoothctl show but I doubt it is relevant for this issue.

Signature · 2 lines
Kind Regards
Chris

Device 94:DB:56:[redacted] (public)

	Name: WH-1000XM3
	Alias: WH-1000XM3
	Class: 0x00240404
	Icon: audio-card
	Paired: yes
	Trusted: yes
	Blocked: no
	Connected: yes
	LegacyPairing: no
	UUID: Vendor specific           (00000000-deca-fade-deca-deafdecacaff)
	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: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
	UUID: Handsfree                 (0000111e-0000-1000-8000-00805f9b34fb)
	UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
	UUID: Vendor specific           (7b265b0e-2232-4d45-bef4-bb8ae62f813d)
	UUID: Vendor specific           (81c2e72a-0591-443e-a1ff-05f988593351)
	UUID: Vendor specific           (931c7e8a-540f-4686-b798-e8df0a2ad9f7)
	UUID: Vendor specific           (96cc203e-5068-46ad-b32d-e316f5e069ba)
	UUID: Vendor specific           (b9b213ce-eeab-49e4-8fd9-aa478ed1b26b)
	UUID: Vendor specific           (f8d1fbe4-7966-4334-8024-ff96c9330e15)
	Modalias: usb:v054Cp0CD3d0452
Controller 00:DB:DF:[redacted] (public)
	Name: [redacted]
	Alias: [redacted]
	Class: 0x007c010c
	Powered: yes
	Discoverable: yes
	DiscoverableTimeout: 0x00000000
	Pairable: no
	UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
	UUID: Audio Source              (0000110a-0000-1000-8000-00805f9b34fb)
	UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
	UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)
	UUID: Headset                   (00001108-0000-1000-8000-00805f9b34fb)
	UUID: Message Notification Se.. (00001133-0000-1000-8000-00805f9b34fb)
	UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
	UUID: Handsfree Audio Gateway   (0000111f-0000-1000-8000-00805f9b34fb)
	UUID: Message Access Server     (00001132-0000-1000-8000-00805f9b34fb)
	UUID: OBEX File Transfer        (00001106-0000-1000-8000-00805f9b34fb)
	UUID: Phonebook Access Server   (0000112f-0000-1000-8000-00805f9b34fb)
	UUID: IrMC Sync                 (00001104-0000-1000-8000-00805f9b34fb)
	UUID: OBEX Object Push          (00001105-0000-1000-8000-00805f9b34fb)
	Modalias: usb:v1D6Bp0246d053A
	Discovering: no
#1 lore raw

Hi Chris,

Quoted 14 lines · Christian Stadelmann

Dear bluez developers,

whenever I start bluetooth scanning on my PC, any audio playback over bluetooth stutters.

Example #1 with GUI tools:
https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/409

Example #2 with bluetoothctl:
1. Connect a bluetooth speaker or headphone to the PC
2. start audio playback (e.g. using totem)
3. run bluetoothctl scan on

Quoted 7 lines

What happens:
As long as bluetooth scan is runnig, audio playback stutters. Once I kill bluetoothctl scan on or close gnome's control center, audio playback is back to normal.

Would it be possible to modify the scanning behaviour in a way that it does not make audio playback stutter?

I'm afraid this may be controller specific, afaik our parameters for scanning are not that aggressive that would force the controller to throttle but perhaps some controllers would attempt to prioritize the inquiry requests over an ACL connection, so we probably need to investigate if there is some way to get work around this problem even if that means we discovery will be slower. Btw, are you testing this in a crowded environment?

Quoted 12 lines

Software versions (Fedora 34):
bluez 5.58 (5.58-2.fc34.x86_64)
kernel 5.12.7 (5.12.7-300.fc34.x86_64)

PS: I've attached the output of $ bluetoothctl info and $ bluetoothctl show but I doubt it is relevant for this issue.

--
Kind Regards
Chris

Signature · 1 line
Luiz Augusto von Dentz