bluez5: determine available BAP profiles from remote endpoints

The PAC profile UUIDs do not appear in the UUID list, but are still
useful to know before SelectProperties.

Set them ahead of time based on the visible remote endpoints.
This commit is contained in:
Pauli Virtanen 2024-01-21 20:16:13 +02:00 committed by Wim Taymans
parent 8eb1f5aa35
commit 9474030582

View file

@ -2680,6 +2680,19 @@ static int remote_endpoint_update_props(struct spa_bt_remote_endpoint *remote_en
next: next:
dbus_message_iter_next(props_iter); dbus_message_iter_next(props_iter);
} }
/* BAP profile UUIDs do not appear in device UUID list.
* Instead, we detect these capabilities based on available
* endpoints (i.e. PACs).
*/
if (remote_endpoint->uuid && remote_endpoint->device) {
enum spa_bt_profile profile;
profile = spa_bt_profile_from_uuid(remote_endpoint->uuid);
if (profile & SPA_BT_PROFILE_BAP_AUDIO)
spa_bt_device_add_profile(remote_endpoint->device, profile);
}
return 0; return 0;
} }