mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-02-05 04:06:37 -05:00
bluez5: handle BAP volume change events
Handle volume changes initiated by remote also for the BAP profiles.
This commit is contained in:
parent
8a7c71694d
commit
f754741d58
2 changed files with 8 additions and 9 deletions
|
|
@ -3552,6 +3552,12 @@ static void spa_bt_transport_volume_changed(struct spa_bt_transport *transport)
|
|||
volume_id = SPA_BT_VOLUME_ID_RX;
|
||||
else if (transport->profile & SPA_BT_PROFILE_ASHA_SINK)
|
||||
volume_id = SPA_BT_VOLUME_ID_TX;
|
||||
else if (transport->profile & SPA_BT_PROFILE_BAP_SINK)
|
||||
volume_id = SPA_BT_VOLUME_ID_TX;
|
||||
else if (transport->profile & SPA_BT_PROFILE_BAP_SOURCE)
|
||||
volume_id = SPA_BT_VOLUME_ID_RX;
|
||||
else if (transport->profile & SPA_BT_PROFILE_BAP_BROADCAST_SOURCE)
|
||||
volume_id = SPA_BT_VOLUME_ID_RX;
|
||||
else
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -809,17 +809,10 @@ static void dynamic_node_volume_changed(void *data)
|
|||
SPA_FLAG_CLEAR(id, DYNAMIC_NODE_ID_FLAG);
|
||||
|
||||
/* Remote device is the controller */
|
||||
if (!node->transport || impl->profile != DEVICE_PROFILE_AG
|
||||
|| !spa_bt_transport_volume_enabled(node->transport))
|
||||
return;
|
||||
|
||||
if (id == 0 || id == 2)
|
||||
volume_id = SPA_BT_VOLUME_ID_RX;
|
||||
else if (id == 1)
|
||||
volume_id = SPA_BT_VOLUME_ID_TX;
|
||||
else
|
||||
if (!node->transport || !spa_bt_transport_volume_enabled(node->transport))
|
||||
return;
|
||||
|
||||
volume_id = get_volume_id(id);
|
||||
t_volume = &node->transport->volumes[volume_id];
|
||||
if (!t_volume->active)
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue