All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ] shared/bap: ucast streams can only have one link
@ 2024-10-26 10:13 Pauli Virtanen
  2024-10-26 12:05 ` [BlueZ] " bluez.test.bot
  2024-10-28 14:50 ` [PATCH BlueZ] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Pauli Virtanen @ 2024-10-26 10:13 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Pauli Virtanen

In unicast, linked streams mean bidirectional CIS.  Ucast stream can
have at most one linked stream.

Fix ucast streams to have only single link. This fixes eg. configuring
for AC 11(i).
---
 src/shared/bap.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/shared/bap.c b/src/shared/bap.c
index dad510aec..658ee1370 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -2422,8 +2422,7 @@ static int bap_ucast_io_link(struct bt_bap_stream *stream,
 
 	bap = stream->bap;
 
-	if (queue_find(stream->links, NULL, link) ||
-		queue_find(link->links, NULL, stream))
+	if (!queue_isempty(stream->links) || !queue_isempty(link->links))
 		return -EALREADY;
 
 	if (stream->client != link->client ||
-- 
2.47.0


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

end of thread, other threads:[~2024-10-28 14:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-26 10:13 [PATCH BlueZ] shared/bap: ucast streams can only have one link Pauli Virtanen
2024-10-26 12:05 ` [BlueZ] " bluez.test.bot
2024-10-28 14:50 ` [PATCH BlueZ] " 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.