From dbe02b8c008b5511e6e3fa6c7246b2cf1faf3455 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Fri, 25 May 2012 18:02:45 +0300 Subject: [PATCH] audio: Fix updating volume property for non-A2DP transports Volume property is A2DP only --- audio/media.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/audio/media.c b/audio/media.c index cb8872f29..2a2cf37dd 100644 --- a/audio/media.c +++ b/audio/media.c @@ -1357,16 +1357,14 @@ static void set_volume(uint8_t volume, struct audio_device *dev, void *user_data mp->volume = volume; for (l = mp->adapter->endpoints; l; l = l->next) { - - struct media_endpoint *endpoint; + struct media_endpoint *endpoint = l->data; struct media_transport *transport; - if (l->data == NULL) + /* Volume is A2DP only */ + if (endpoint->sep == NULL) continue; - endpoint = l->data; transport = find_device_transport(endpoint, dev); - if (transport == NULL) continue; -- 2.47.3