bluez5: probe adapter msbc capability via hci commands

Using a probe connection to determine adapter msbc capability causes
problems on some adapters (ff8c3d2, 84bc0490a5, 717004334b,
pipewire#2030) and seems to be a bad idea.

Go back to probing for transparent msbc transport capability via HCI
commands. bluetooth/hci.h may be deprecated later, but for now it's
better to go back to using it.  (In practice, adapters not supporting
esco appear to be fairly rare; kernel commit in 2013 refers to "older
devices", so if we can't use HCI, assume the adapter supports the
necessary modes.)
This commit is contained in:
Pauli Virtanen 2022-01-20 22:39:51 +02:00
parent 483831e514
commit 1da23145df
4 changed files with 120 additions and 42 deletions

View file

@ -20,6 +20,10 @@ if not get_option('bluez5-backend-hsphfpd').disabled()
cdata.set('HAVE_BLUEZ_5_BACKEND_HSPHFPD', 1)
endif
if dependency('bluez', version: '< 6', required: false).found()
cdata.set('HAVE_BLUEZ_5_HCI', 1)
endif
bluez5_sources = [
'plugin.c',
'codec-loader.c',
@ -32,7 +36,8 @@ bluez5_sources = [
'quirks.c',
'player.c',
'bluez5-device.c',
'bluez5-dbus.c'
'bluez5-dbus.c',
'hci.c'
]
bluez5_data = ['bluez-hardware.conf']