Diff between bbf198280e701580cf2284800d56811bae71b80a and a2b2d2e4ab0ee375b24007e23f19e3122fa33764

Changed Files

File Additions Deletions Status
client/player.c +8 -0 modified

Full Patch

diff --git a/client/player.c b/client/player.c
index d3ff15a..1f56bfd 100644
--- a/client/player.c
+++ b/client/player.c
@@ -3558,6 +3558,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;
@@ -3574,6 +3575,13 @@ static void config_endpoint_channel_location(const char *input, void *user_data)
 	util_ltv_push(cfg->caps, LC3_CONFIG_CHAN_ALLOC_LEN - 1,
 			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):",