diff --git a/src/shared/bap.c b/src/shared/bap.c
index 6573ea3..427d186 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
*qos = &stream->qos;
}
+static void bap_stream_bcast_get_out_qos(void *data, void *user_data)
+{
+ struct bt_bap_stream *stream = data;
+ struct bt_bap_qos **qos = user_data;
+
+ if (!stream)
+ return;
+
+ if (!qos || *qos || stream->ep->dir != BT_BAP_BCAST_SINK ||
+ !stream->qos.bcast.io_qos.sdu)
+ return;
+
+ *qos = &stream->qos;
+}
+
+static void bap_stream_bcast_get_in_qos(void *data, void *user_data)
+{
+ struct bt_bap_stream *stream = data;
+ struct bt_bap_qos **qos = user_data;
+
+ if (!stream)
+ return;
+
+ if (!qos || *qos || stream->ep->dir != BT_BAP_BCAST_SOURCE ||
+ !stream->qos.bcast.io_qos.sdu)
+ return;
+
+ *qos = &stream->qos;
+}
+
bool bt_bap_stream_io_get_qos(struct bt_bap_stream *stream,
struct bt_bap_qos **in,
struct bt_bap_qos **out)
bap_stream_get_out_qos(stream, out);
queue_foreach(stream->links, bap_stream_get_in_qos, in);
break;
+ case BT_BAP_BCAST_SOURCE:
+ bap_stream_bcast_get_in_qos(stream, in);
+ break;
+ case BT_BAP_BCAST_SINK:
+ bap_stream_bcast_get_out_qos(stream, out);
+ break;
default:
return false;
}
DBG(stream->bap, "in %p out %p", in ? *in : NULL, out ? *out : NULL);
- return in && out;
+ return (in && *in) || (out && *out);
}
static void bap_stream_get_dir(void *data, void *user_data)