--- profiles/audio/transport.c | 19 +++++++++++++++++++ profiles/audio/transport.h | 2 ++ 2 files changed, 21 insertions(+) diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c index 9419af0..c344a92 100644 --- a/profiles/audio/transport.c +++ b/profiles/audio/transport.c @@ -896,3 +896,22 @@ uint8_t media_transport_get_device_volume(struct audio_device *dev) return 128; } + +void media_transport_update_device_volume(struct audio_device *dev, + uint8_t volume) +{ + GSList *l; + + if (dev == NULL) + return; + + for (l = transports; l; l = l->next) { + struct media_transport *transport = l->data; + if (transport->device != dev) + continue; + + /* Volume is A2DP only */ + if (media_endpoint_get_sep(transport->endpoint)) + media_transport_update_volume(transport, volume); + } +} diff --git a/profiles/audio/transport.h b/profiles/audio/transport.h index cbbd0b6..b8cbf1f 100644 --- a/profiles/audio/transport.h +++ b/profiles/audio/transport.h @@ -42,3 +42,5 @@ void transport_get_properties(struct media_transport *transport, DBusMessageIter *iter); uint8_t media_transport_get_device_volume(struct audio_device *dev); +void media_transport_update_device_volume(struct audio_device *dev, + uint8_t volume); -- 1.7.11.7 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html