diff mbox series

[BlueZ,1/1] player: Adjust SDU size based on the number of locations

Message ID 20240321161255.24892-2-silviu.barbulescu@nxp.com
State New
Headers show
Series Adjust SDU size based on the number of locations | expand

Commit Message

Silviu Florian Barbulescu March 21, 2024, 4:12 p.m. UTC
Adjust the SDU size based on the number of locations/channels
 that is being requested.

---
 client/player.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

bluez.test.bot@gmail.com March 21, 2024, 5:41 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=837099

---Test result---

Test Summary:
CheckPatch                    PASS      0.42 seconds
GitLint                       PASS      0.29 seconds
BuildEll                      PASS      23.81 seconds
BluezMake                     PASS      1576.90 seconds
MakeCheck                     PASS      13.59 seconds
MakeDistcheck                 PASS      174.09 seconds
CheckValgrind                 PASS      243.71 seconds
CheckSmatch                   PASS      344.82 seconds
bluezmakeextell               PASS      116.88 seconds
IncrementalBuild              PASS      1478.08 seconds
ScanBuild                     PASS      970.49 seconds



---
Regards,
Linux Bluetooth
diff mbox series

Patch

diff --git a/client/player.c b/client/player.c
index ab33bfc46..7856be3b5 100644
--- a/client/player.c
+++ b/client/player.c
@@ -3574,6 +3574,7 @@  static void config_endpoint_channel_location(const char *input, void *user_data)
 	struct endpoint_config *cfg = user_data;
 	char *endptr = NULL;
 	uint32_t location;
+	uint8_t channels = 1;
 
 	if (!strcasecmp(input, "n") || !strcasecmp(input, "no"))
 		goto add_meta;
@@ -3590,6 +3591,13 @@  static void config_endpoint_channel_location(const char *input, void *user_data)
 	iov_append_ltv(&cfg->caps, LC3_CONFIG_CHAN_ALLOC_LEN,
 			LC3_CONFIG_CHAN_ALLOC, &location);
 
+	/* Adjust the SDU size based on the number of
+	 * locations/channels that is being requested.
+	 */
+	channels = __builtin_popcount(location);
+	if (channels > 1)
+		cfg->qos.bcast.io_qos.sdu *= channels;
+
 add_meta:
 	/* Add metadata */
 	bt_shell_prompt_input(cfg->ep->path, "Enter Metadata (value/no):",