[PATCH BlueZ 04/11] transport: Get volume from transport

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

 



---
 profiles/audio/transport.c | 6 ++++++
 profiles/audio/transport.h | 1 +
 2 files changed, 7 insertions(+)

diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c
index f3caa1b..4a81d85 100644
--- a/profiles/audio/transport.c
+++ b/profiles/audio/transport.c
@@ -849,6 +849,12 @@ struct audio_device *media_transport_get_dev(struct media_transport *transport)
 	return transport->device;
 }
 
+uint16_t media_transport_get_volume(struct media_transport *transport)
+{
+	struct a2dp_transport *a2dp = transport->data;
+	return a2dp->volume;
+}
+
 void media_transport_update_volume(struct media_transport *transport,
 								uint8_t volume)
 {
diff --git a/profiles/audio/transport.h b/profiles/audio/transport.h
index a6b71e5..0fe8973 100644
--- a/profiles/audio/transport.h
+++ b/profiles/audio/transport.h
@@ -32,6 +32,7 @@ struct media_transport *media_transport_create(struct media_endpoint *endpoint,
 void media_transport_destroy(struct media_transport *transport);
 const char *media_transport_get_path(struct media_transport *transport);
 struct audio_device *media_transport_get_dev(struct media_transport *transport);
+uint16_t media_transport_get_volume(struct media_transport *transport);
 void media_transport_update_delay(struct media_transport *transport,
 							uint16_t delay);
 void media_transport_update_volume(struct media_transport *transport,
-- 
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


[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