mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-14 07:44:36 +08:00
transport: fix AVRCP volume in reconfigured transports
We no longer reconnect AVRCP session on AVDTP transport reconfiguration.
This breaks AVRCP volume after reconfiguration, since there's no volume
update event incoming.
Fix by keeping track of the latest volume in btd_device volume. It was
introduced to track volume changes that arrive when there are no
transports/players, but we should track all volume changes otherwise the
value can be out of date when we want to use it.
Fixes: 469a75ae18
("sink: Fix transitioning to BTD_SERVICE_STATE_DISCONNECTED on idle")
This commit is contained in:
parent
de1b3a5ac3
commit
774ad9fdd9
@ -2598,10 +2598,9 @@ void media_transport_update_device_volume(struct btd_device *dev,
|
||||
/* Volume is A2DP only */
|
||||
if (media_endpoint_get_sep(transport->endpoint)) {
|
||||
media_transport_update_volume(transport, volume);
|
||||
return;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* If transport volume doesn't exists add to device_volume */
|
||||
btd_device_set_volume(dev, volume);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user