diff mbox series

[v2,1/2] client/player: Configure BASE using separate structure

Message ID 20230807110224.6024-2-silviu.barbulescu@nxp.com (mailing list archive)
State New, archived
Headers show
Series Configure BASE using separate structure | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint success Gitlint PASS
tedd_an/BuildEll success Build ELL PASS
tedd_an/BluezMake success Bluez Make PASS
tedd_an/MakeCheck success Bluez Make Check PASS
tedd_an/MakeDistcheck success Make Distcheck PASS
tedd_an/CheckValgrind success Check Valgrind PASS
tedd_an/CheckSmatch success CheckSparse PASS
tedd_an/bluezmakeextell success Make External ELL PASS
tedd_an/IncrementalBuild success Incremental Build PASS
tedd_an/ScanBuild success Scan Build PASS

Commit Message

Silviu Florian Barbulescu Aug. 7, 2023, 11:02 a.m. UTC
From: Claudia Draghicescu <claudia.rosu@nxp.com>

Use preset configuration in capabilities.
Configure BASE using separate structure.

---
 client/player.c | 24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)

Comments

bluez.test.bot@gmail.com Aug. 7, 2023, 12:23 p.m. UTC | #1
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=773597

---Test result---

Test Summary:
CheckPatch                    PASS      1.10 seconds
GitLint                       PASS      0.71 seconds
BuildEll                      PASS      27.85 seconds
BluezMake                     PASS      876.32 seconds
MakeCheck                     PASS      12.06 seconds
MakeDistcheck                 PASS      157.70 seconds
CheckValgrind                 PASS      258.29 seconds
CheckSmatch                   PASS      344.97 seconds
bluezmakeextell               PASS      104.85 seconds
IncrementalBuild              PASS      1449.01 seconds
ScanBuild                     PASS      1072.64 seconds



---
Regards,
Linux Bluetooth
diff mbox series

Patch

diff --git a/client/player.c b/client/player.c
index 9bc5f2a36..00ab33084 100644
--- a/client/player.c
+++ b/client/player.c
@@ -1735,6 +1735,7 @@  struct endpoint_config {
 	struct iovec *meta;
 	uint8_t target_latency;
 	const struct codec_qos *qos;
+	struct iovec *base;
 };
 
 #define BCODE {0x01, 0x02, 0x68, 0x05, 0x53, 0xf1, 0x41, 0x5a, \
@@ -1766,6 +1767,7 @@  static void append_properties(DBusMessageIter *iter,
 	const char *key = "Capabilities";
 	const char *meta = "Metadata";
 	const char *keyBCode = "BroadcastCode";
+	const char *base = "BASE";
 
 	dbus_message_iter_open_container(iter, DBUS_TYPE_ARRAY, "{sv}", &dict);
 
@@ -1902,6 +1904,14 @@  static void append_properties(DBusMessageIter *iter,
 	g_dbus_dict_append_entry(&dict, "Timeout", DBUS_TYPE_UINT16,
 						&bcast_qos.bcast.timeout);
 
+	bt_shell_printf("BASE:\n");
+	bt_shell_hexdump(cfg->base->iov_base, cfg->base->iov_len);
+
+	g_dbus_dict_append_basic_array(&dict, DBUS_TYPE_STRING, &base,
+						DBUS_TYPE_BYTE,
+						&cfg->base->iov_base,
+						cfg->base->iov_len);
+
 	bt_shell_printf("BroadcastCode:\n");
 	bt_shell_hexdump(cfg->ep->bcode->iov_base, cfg->ep->bcode->iov_len);
 
@@ -2758,15 +2768,15 @@  static void cmd_config_endpoint(int argc, char *argv[])
 		if (cfg->ep->broadcast) {
 			iov_append(&cfg->ep->bcode, bcast_qos.bcast.bcode,
 				sizeof(bcast_qos.bcast.bcode));
-			/* Copy capabilities for broadcast*/
-			iov_append(&cfg->caps, base_lc3_16_2_1,
-				sizeof(base_lc3_16_2_1));
-		} else {
-			/* Copy capabilities */
-			iov_append(&cfg->caps, preset->data.iov_base,
-							preset->data.iov_len);
+			/* Copy BASE for broadcast*/
+			iov_append(&cfg->base, base_lc3_16_2_1,
+			sizeof(base_lc3_16_2_1));
 		}
 
+		/* Copy capabilities */
+		iov_append(&cfg->caps, preset->data.iov_base,
+						preset->data.iov_len);
+
 		/* Set QoS parameters */
 		cfg->qos = &preset->qos;