diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-04-27 13:14:19 -0700 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-04-28 13:05:02 -0700 |
commit | fa7828bddd2164408535a9ac45095564e9ebbeea (patch) | |
tree | f673f51edb5440a64d18f889087b541cc94429f6 /src/device.h | |
parent | f65a9c9d21f69942024ea5b9f581533d2788eb2e (diff) | |
download | bluez-fa7828bddd2164408535a9ac45095564e9ebbeea.tar.gz |
transport: Fix not being able to initialize volume properly
In case AVRCP is connected first and
media_transport_update_device_volume is called without any media_player
being available the volume setting would be lost and Transport.Volume
won't be available, so this introduces btd_device_{set,get}_volume
helpers which is used to store the volume temporarely so
media_player_get_device_volume is able to restore it when the transport
is created.
Fixes: https://github.com/bluez/bluez/issues/335
Diffstat (limited to 'src/device.h')
-rw-r--r-- | src/device.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/device.h b/src/device.h index 071576d6b..9cdc0e68d 100644 --- a/src/device.h +++ b/src/device.h @@ -180,3 +180,6 @@ bool btd_device_all_services_allowed(struct btd_device *dev); void btd_device_update_allowed_services(struct btd_device *dev); void btd_device_init(void); void btd_device_cleanup(void); + +void btd_device_set_volume(struct btd_device *dev, int8_t volume); +int8_t btd_device_get_volume(struct btd_device *dev); |