diff mbox series

[BlueZ,v3,6/7] shared/bap: Add support to create stream for bcast source

Message ID 20240215212356.310301-7-silviu.barbulescu@nxp.com (mailing list archive)
State Superseded
Headers show
Series Add support for multiple BISes on the bcast source | 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/IncrementalBuild success Incremental Build PASS

Commit Message

Silviu Florian Barbulescu Feb. 15, 2024, 9:23 p.m. UTC
Add support to create stream for bcast source

---
 src/shared/bap.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/src/shared/bap.c b/src/shared/bap.c
index 49d9838fb..97bf65c24 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -5038,6 +5038,10 @@  static bool find_ep_pacs(const void *data, const void *user_data)
 	case BT_BAP_STREAM_STATE_CONFIG:
 	case BT_BAP_STREAM_STATE_QOS:
 		return true;
+	default:
+		if (ep->stream->lpac->type ==
+				BT_BAP_BCAST_SOURCE)
+			return true;
 	}
 
 	return false;
@@ -5159,7 +5163,7 @@  struct bt_bap_stream *bt_bap_stream_new(struct bt_bap *bap,
 					struct bt_bap_qos *pqos,
 					struct iovec *data)
 {
-	struct bt_bap_stream *stream;
+	struct bt_bap_stream *stream = NULL;
 	struct bt_bap_endpoint *ep;
 	struct match_pac match;
 
@@ -5227,7 +5231,8 @@  struct bt_bap_stream *bt_bap_stream_new(struct bt_bap *bap,
 		}
 	}
 
-	stream = ep->stream;
+	if (lpac->type != BT_BAP_BCAST_SOURCE)
+		stream = ep->stream;
 	if (!stream)
 		stream = bap_stream_new(bap, ep, lpac, rpac, data, true);