bluetooth: Consider adapter UUIDs when evaluating profile support

System Internals / PulseAudio - João Paulo Rechi Vita [endlessm.com] - 6 October 2021 15:07 UTC

The remote device list of UUIDs reflects which profiles are supported by the remote device alone. We currently rely solely on this list to decide if a certain card profile is supported, and thus should be created and get connected.

This used to be accurate when the Bluetooth modules were first written, but now BlueZ is more dynamic and local profile support can be added or removed during runtime. The adapter's list of UUIDs is an accurate representation of the profiles supported by the local host at a certain moment.

This commit combines the list of UUIDs supported by remote device and the list of UUIDs supported by the local host to determined whether a Bluetooth profile is actually supported or not, and whether it should be expected to get connected during device connection.

Part-of:

d7f95170a bluetooth: Consider adapter UUIDs when evaluating profile support
src/modules/bluetooth/bluez5-util.c | 32 +++++++++++++++++++++-----------
src/modules/bluetooth/bluez5-util.h | 1 +
2 files changed, 22 insertions(+), 11 deletions(-)

Upstream: cgit.freedesktop.org


  • Share