diff mbox series

[BlueZ,v4,1/5] shared/bap: Fix endpoint dir for the bcast source

Message ID 20240223164813.66484-2-silviu.barbulescu@nxp.com
State New
Headers show
Series Add support for multiple BISes on the bcast source | expand

Commit Message

Silviu Florian Barbulescu Feb. 23, 2024, 4:48 p.m. UTC
Fix endpoint direction for the broadcast source

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

Patch

diff --git a/src/shared/bap.c b/src/shared/bap.c
index 626e8f127..fd29557b1 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -682,7 +682,7 @@  static struct bt_bap_endpoint *bap_endpoint_new_broadcast(struct bt_bap_db *bdb,
 	if (type == BT_BAP_BCAST_SINK)
 		ep->dir = BT_BAP_BCAST_SOURCE;
 	else
-		ep->dir = 0;
+		ep->dir = BT_BAP_BCAST_SINK;
 
 	return ep;
 }
@@ -1303,7 +1303,7 @@  static void ep_config_cb(struct bt_bap_stream *stream, int err)
 		return;
 
 	if (bt_bap_stream_get_type(stream) == BT_BAP_STREAM_TYPE_BCAST) {
-		if (!bt_bap_stream_io_dir(stream))
+		if (bt_bap_stream_io_dir(stream) == BT_BAP_BCAST_SINK)
 			stream_set_state(stream, BT_BAP_STREAM_STATE_QOS);
 		else if (bt_bap_stream_io_dir(stream) == BT_BAP_BCAST_SOURCE)
 			stream_set_state(stream, BT_BAP_STREAM_STATE_CONFIG);