linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH BlueZ v3 1/2] bap: use MediaEndpoint related properties consistently
@ 2023-10-03 19:19 Pauli Virtanen
  2023-10-03 19:19 ` [PATCH BlueZ v3 2/2] doc: clarify org.bluez.MediaEndpoint documentation Pauli Virtanen
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Pauli Virtanen @ 2023-10-03 19:19 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Pauli Virtanen

Use the documented name "MaximumLatency" for the MediaEndpoint QoS
Max_Transport_Latency field, in SelectProperties input parameters and
expected client MediaEndpoint properties.

Put QoS fields to a "QoS" dict in SelectProperties input.

Fix typoed ppd_min -> ppd_max in SelectProperties input.

Use the name "Locations" for SelectProperties supported locations input
parameter, to match the MediaEndpoint property name which indicates the
same thing.
---

Notes:
    v3: remove spurious duplicated properties, fix duplicated ppd_min
    v2: put SelectProperties QoS things to "QoS" dict

 profiles/audio/media.c | 37 ++++++++++++++++++++++++++-----------
 1 file changed, 26 insertions(+), 11 deletions(-)

diff --git a/profiles/audio/media.c b/profiles/audio/media.c
index 8345487d7..1d98ac5a1 100644
--- a/profiles/audio/media.c
+++ b/profiles/audio/media.c
@@ -965,7 +965,7 @@ static int pac_select(struct bt_bap_pac *lpac, struct bt_bap_pac *rpac,
 
 	loc = bt_bap_pac_get_locations(rpac);
 	if (loc)
-		g_dbus_dict_append_entry(&dict, "Location", DBUS_TYPE_UINT32,
+		g_dbus_dict_append_entry(&dict, "Locations", DBUS_TYPE_UINT32,
 									&loc);
 
 	if (metadata) {
@@ -977,26 +977,41 @@ static int pac_select(struct bt_bap_pac *lpac, struct bt_bap_pac *rpac,
 	}
 
 	if (qos && qos->phy) {
-		g_dbus_dict_append_entry(&dict, "Framing", DBUS_TYPE_BYTE,
+		DBusMessageIter entry, variant, qos_dict;
+
+		key = "QoS";
+		dbus_message_iter_open_container(&dict, DBUS_TYPE_DICT_ENTRY,
+								NULL, &entry);
+		dbus_message_iter_append_basic(&entry, DBUS_TYPE_STRING, &key);
+		dbus_message_iter_open_container(&entry, DBUS_TYPE_VARIANT,
+							"a{sv}", &variant);
+		dbus_message_iter_open_container(&variant, DBUS_TYPE_ARRAY,
+							"{sv}", &qos_dict);
+
+		g_dbus_dict_append_entry(&qos_dict, "Framing", DBUS_TYPE_BYTE,
 							&qos->framing);
 
-		g_dbus_dict_append_entry(&dict, "PHY", DBUS_TYPE_BYTE,
+		g_dbus_dict_append_entry(&qos_dict, "PHY", DBUS_TYPE_BYTE,
 							&qos->phy);
 
-		g_dbus_dict_append_entry(&dict, "Latency", DBUS_TYPE_UINT16,
-							&qos->latency);
+		g_dbus_dict_append_entry(&qos_dict, "MaximumLatency",
+					DBUS_TYPE_UINT16, &qos->latency);
 
-		g_dbus_dict_append_entry(&dict, "MinimumDelay",
+		g_dbus_dict_append_entry(&qos_dict, "MinimumDelay",
 					DBUS_TYPE_UINT32, &qos->pd_min);
 
-		g_dbus_dict_append_entry(&dict, "MaximumDelay",
+		g_dbus_dict_append_entry(&qos_dict, "MaximumDelay",
 					DBUS_TYPE_UINT32, &qos->pd_max);
 
-		g_dbus_dict_append_entry(&dict, "PreferredMinimumDelay",
+		g_dbus_dict_append_entry(&qos_dict, "PreferredMinimumDelay",
 					DBUS_TYPE_UINT32, &qos->ppd_min);
 
-		g_dbus_dict_append_entry(&dict, "PreferredMaximumDelay",
-					DBUS_TYPE_UINT32, &qos->ppd_min);
+		g_dbus_dict_append_entry(&qos_dict, "PreferredMaximumDelay",
+					DBUS_TYPE_UINT32, &qos->ppd_max);
+
+		dbus_message_iter_close_container(&variant, &qos_dict);
+		dbus_message_iter_close_container(&entry, &variant);
+		dbus_message_iter_close_container(&dict, &entry);
 	}
 
 	dbus_message_iter_close_container(&iter, &dict);
@@ -2749,7 +2764,7 @@ static void app_register_endpoint(void *data, void *user_data)
 		dbus_message_iter_get_basic(&iter, &qos.phy);
 	}
 
-	if (g_dbus_proxy_get_property(proxy, "Latency", &iter)) {
+	if (g_dbus_proxy_get_property(proxy, "MaximumLatency", &iter)) {
 		if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_UINT16)
 			goto fail;
 
-- 
2.41.0


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

* [PATCH BlueZ v3 2/2] doc: clarify org.bluez.MediaEndpoint documentation
  2023-10-03 19:19 [PATCH BlueZ v3 1/2] bap: use MediaEndpoint related properties consistently Pauli Virtanen
@ 2023-10-03 19:19 ` Pauli Virtanen
  2023-10-03 20:50 ` [BlueZ,v3,1/2] bap: use MediaEndpoint related properties consistently bluez.test.bot
  2023-10-03 23:20 ` [PATCH BlueZ v3 1/2] " patchwork-bot+bluetooth
  2 siblings, 0 replies; 4+ messages in thread
From: Pauli Virtanen @ 2023-10-03 19:19 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Pauli Virtanen

Document the actual input and output parameter values used in
SelectProperties. These differ from SetConfiguration.

Mention SelectProperties is used for unicast only.

Document SetConfiguration input parameters.
---

Notes:
    v3: no changes
    v2: put SelectProperties QoS things to "QoS" dict

 doc/org.bluez.MediaEndpoint.rst | 48 +++++++++++++++++++++++++++------
 1 file changed, 40 insertions(+), 8 deletions(-)

diff --git a/doc/org.bluez.MediaEndpoint.rst b/doc/org.bluez.MediaEndpoint.rst
index 0e201ff9d..6754d6e3b 100644
--- a/doc/org.bluez.MediaEndpoint.rst
+++ b/doc/org.bluez.MediaEndpoint.rst
@@ -24,14 +24,24 @@ Interface
 Methods
 -------
 
+.. _SetConfiguration:
+
 void SetConfiguration(object transport, dict properties)
 ````````````````````````````````````````````````````````
 
 	Set configuration for the transport.
 
-	For client role transport must be set with a server endpoint oject which
-	will be configured and the properties must contain the following
-	properties:
+	:object transport:
+
+		Configured transport object.
+
+	:dict properties:
+
+		Configured **org.bluez.MediaTransport(5)** properties.
+
+	For client role transport must be set with a server endpoint
+	object which will be configured and the properties must
+	contain the following properties:
 
 	:array{byte} Capabilities [Mandatory]:
 
@@ -59,13 +69,35 @@ array{byte} SelectConfiguration(array{byte} capabilities)
 dict SelectProperties(dict capabilities)
 ````````````````````````````````````````
 
-	Select configuration from the supported capabilities:
+	Select BAP unicast configuration from the supported capabilities:
 
-	:object Endpoint [ISO only]:
-	:Refer to SetConfiguration for the list of other possible properties.:
+	:object Endpoint:
 
-	Returns a configuration which can be used to setup a transport, see
-	**org.bluez.MediaTransport(5)** for possible values.
+	:array{byte} Capabilities:
+
+	:array{byte} Metadata:
+
+	:uint32 Locations:
+
+	:dict QoS:
+
+		:byte Framing:
+		:byte PHY:
+		:uint16 MaximumLatency:
+		:uint32 MinimumDelay:
+		:uint32 MaximumDelay:
+		:uint32 PreferredMinimumDelay:
+		:uint32 PreferredMaximumDelay:
+
+	See `MediaEndpoint Properties`_ for their possible values.
+
+	Returns a configuration which can be used to setup a transport:
+
+	:array{byte} Capabilities:
+	:array{byte} Metadata [optional]:
+	:dict QoS:
+
+	See `SetConfiguration`_ for their possible values.
 
 	Note: There is no need to cache the selected properties since on
 	success the configuration is send back as parameter of SetConfiguration.
-- 
2.41.0


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

* RE: [BlueZ,v3,1/2] bap: use MediaEndpoint related properties consistently
  2023-10-03 19:19 [PATCH BlueZ v3 1/2] bap: use MediaEndpoint related properties consistently Pauli Virtanen
  2023-10-03 19:19 ` [PATCH BlueZ v3 2/2] doc: clarify org.bluez.MediaEndpoint documentation Pauli Virtanen
@ 2023-10-03 20:50 ` bluez.test.bot
  2023-10-03 23:20 ` [PATCH BlueZ v3 1/2] " patchwork-bot+bluetooth
  2 siblings, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2023-10-03 20:50 UTC (permalink / raw)
  To: linux-bluetooth, pav

[-- Attachment #1: Type: text/plain, Size: 948 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=789693

---Test result---

Test Summary:
CheckPatch                    PASS      1.17 seconds
GitLint                       PASS      1.98 seconds
BuildEll                      PASS      28.77 seconds
BluezMake                     PASS      897.30 seconds
MakeCheck                     PASS      12.03 seconds
MakeDistcheck                 PASS      163.96 seconds
CheckValgrind                 PASS      266.65 seconds
CheckSmatch                   PASS      359.83 seconds
bluezmakeextell               PASS      109.91 seconds
IncrementalBuild              PASS      1459.07 seconds
ScanBuild                     PASS      1105.26 seconds



---
Regards,
Linux Bluetooth


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

* Re: [PATCH BlueZ v3 1/2] bap: use MediaEndpoint related properties consistently
  2023-10-03 19:19 [PATCH BlueZ v3 1/2] bap: use MediaEndpoint related properties consistently Pauli Virtanen
  2023-10-03 19:19 ` [PATCH BlueZ v3 2/2] doc: clarify org.bluez.MediaEndpoint documentation Pauli Virtanen
  2023-10-03 20:50 ` [BlueZ,v3,1/2] bap: use MediaEndpoint related properties consistently bluez.test.bot
@ 2023-10-03 23:20 ` patchwork-bot+bluetooth
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+bluetooth @ 2023-10-03 23:20 UTC (permalink / raw)
  To: Pauli Virtanen; +Cc: linux-bluetooth

Hello:

This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Tue,  3 Oct 2023 22:19:03 +0300 you wrote:
> Use the documented name "MaximumLatency" for the MediaEndpoint QoS
> Max_Transport_Latency field, in SelectProperties input parameters and
> expected client MediaEndpoint properties.
> 
> Put QoS fields to a "QoS" dict in SelectProperties input.
> 
> Fix typoed ppd_min -> ppd_max in SelectProperties input.
> 
> [...]

Here is the summary with links:
  - [BlueZ,v3,1/2] bap: use MediaEndpoint related properties consistently
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=5e582e34e392
  - [BlueZ,v3,2/2] doc: clarify org.bluez.MediaEndpoint documentation
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=6683305d827a

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

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

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-03 19:19 [PATCH BlueZ v3 1/2] bap: use MediaEndpoint related properties consistently Pauli Virtanen
2023-10-03 19:19 ` [PATCH BlueZ v3 2/2] doc: clarify org.bluez.MediaEndpoint documentation Pauli Virtanen
2023-10-03 20:50 ` [BlueZ,v3,1/2] bap: use MediaEndpoint related properties consistently bluez.test.bot
2023-10-03 23:20 ` [PATCH BlueZ v3 1/2] " patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).