Thread (12 messages) 12 messages, 3 authors, 2012-05-25

Re: [PATCH BlueZ 6/6] audio: Add Volume property to A2DP transport GetProperties

flat view

From: Lucas De Marchi <hidden>
Date: 2012-05-24 17:09:19

On Thu, May 24, 2012 at 10:22 AM, Luiz Augusto von Dentz
[off-list ref] wrote:
quoted hunk ↗ jump to hunk
From: Luiz Augusto von Dentz <redacted>

Now that volume is being handled by SetProperty it should also be
available in GetProperties.
---
 audio/transport.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/audio/transport.c b/audio/transport.c
index 6406ec1..4f86a8b 100644
--- a/audio/transport.c
+++ b/audio/transport.c
@@ -860,6 +860,10 @@ static void get_properties_a2dp(struct media_transport *transport,
                                               DBusMessageIter *dict)
 {
       dict_append_entry(dict, "Delay", DBUS_TYPE_UINT16, &transport->delay);
+
+       if (transport->volume <= 127)
+               dict_append_entry(dict, "Volume", DBUS_TYPE_UINT16,
+                                                       &transport->volume);
 }

 static void get_properties_headset(struct media_transport *transport,
@@ -1015,6 +1019,7 @@ struct media_transport *media_transport_create(DBusConnection *conn,
       transport->size = size;
       transport->path = g_strdup_printf("%s/fd%d", device->path, fd++);
       transport->fd = -1;
+       transport->volume = -1;
Ack


Lucas De Marchi
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help