[PATCH BlueZ 3/6] audio: Fix updating volume property for non-A2DP transports

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>

Volume property is A2DP only
---
 audio/media.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/audio/media.c b/audio/media.c
index cb8872f..2a2cf37 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;
 
-- 
1.7.7.6

--
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


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux