mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-19 08:57:14 -05: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)
|
if (profile == DEVICE_PROFILE_OFF || profile == DEVICE_PROFILE_AG)
|
||||||
return profile;
|
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))
|
if (codec == 0 || (this->bt_dev->connected_profiles & SPA_BT_PROFILE_MEDIA_SOURCE))
|
||||||
return profile;
|
return profile;
|
||||||
|
|
||||||
return codec + DEVICE_PROFILE_LAST;
|
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 (profile == DEVICE_PROFILE_HSP_HFP) {
|
||||||
if (codec == 0 || (this->bt_dev->connected_profiles & SPA_BT_PROFILE_HFP_AG))
|
if (codec == 0 || (this->bt_dev->connected_profiles & SPA_BT_PROFILE_HFP_AG))
|
||||||
return profile;
|
return profile;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue