mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
bluez5: fix reported BAP profile index
This commit is contained in:
parent
37d78ce29e
commit
4b408e2978
1 changed files with 8 additions and 1 deletions
|
|
@ -1150,13 +1150,20 @@ static uint32_t get_index_from_profile(struct impl *this, uint32_t profile, enum
|
|||
if (profile == DEVICE_PROFILE_OFF || profile == DEVICE_PROFILE_AG)
|
||||
return profile;
|
||||
|
||||
if (profile == DEVICE_PROFILE_A2DP || profile == DEVICE_PROFILE_BAP) {
|
||||
if (profile == DEVICE_PROFILE_A2DP) {
|
||||
if (codec == 0 || (this->bt_dev->connected_profiles & SPA_BT_PROFILE_MEDIA_SOURCE))
|
||||
return profile;
|
||||
|
||||
return codec + DEVICE_PROFILE_LAST;
|
||||
}
|
||||
|
||||
if (profile == DEVICE_PROFILE_BAP) {
|
||||
if (codec == 0)
|
||||
return profile;
|
||||
|
||||
return codec + DEVICE_PROFILE_LAST;
|
||||
}
|
||||
|
||||
if (profile == DEVICE_PROFILE_HSP_HFP) {
|
||||
if (codec == 0 || (this->bt_dev->connected_profiles & SPA_BT_PROFILE_HFP_AG))
|
||||
return profile;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue