All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/5] media: Populate location to qos structure
@ 2023-10-20 14:25 Kiran K
  2023-10-20 14:25 ` [PATCH v1 2/5] bap: Fix update of sink location value Kiran K
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Kiran K @ 2023-10-20 14:25 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: ravishankar.srivatsa, Kiran K

Allow clients to register Location for endpoint.
---
 profiles/audio/media.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/profiles/audio/media.c b/profiles/audio/media.c
index 1d98ac5a1a70..d0520d3216c9 100644
--- a/profiles/audio/media.c
+++ b/profiles/audio/media.c
@@ -1609,6 +1609,10 @@ static int parse_properties(DBusMessageIter *props, const char **uuid,
 			if (var != DBUS_TYPE_UINT16)
 				return -EINVAL;
 			dbus_message_iter_get_basic(&value, &qos->ppd_max);
+		} else if (strcasecmp(key, "Location") == 0) {
+			if (var != DBUS_TYPE_UINT32)
+				return -EINVAL;
+			dbus_message_iter_get_basic(&value, &qos->location);
 		}
 
 		dbus_message_iter_next(props);
@@ -2799,6 +2803,13 @@ static void app_register_endpoint(void *data, void *user_data)
 		dbus_message_iter_get_basic(&iter, &qos.ppd_min);
 	}
 
+	if (g_dbus_proxy_get_property(proxy, "Location", &iter)) {
+		if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_UINT32)
+			goto fail;
+
+		dbus_message_iter_get_basic(&iter, &qos.location);
+	}
+
 	endpoint = media_endpoint_create(app->adapter, app->sender, path, uuid,
 						delay_reporting, codec,
 						vendor.cid, vendor.vid, &qos,
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-10-20 20:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-20 14:25 [PATCH v1 1/5] media: Populate location to qos structure Kiran K
2023-10-20 14:25 ` [PATCH v1 2/5] bap: Fix update of sink location value Kiran K
2023-10-20 14:25 ` [PATCH v1 3/5] bap: Do not set default location for sink and source Kiran K
2023-10-20 14:25 ` [PATCH v1 4/5] bap: Fix reading source codec capabilities Kiran K
2023-10-20 14:25 ` [PATCH v1 5/5] media: Parse conext and supported context Kiran K
2023-10-20 15:50 ` [PATCH v1 1/5] media: Populate location to qos structure Pauli Virtanen
2023-10-20 16:32 ` [v1,1/5] " bluez.test.bot
2023-10-20 20:50 ` [PATCH v1 1/5] " patchwork-bot+bluetooth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.