From c8014d181e55604812edf6956d248f836f99a4dc Mon Sep 17 00:00:00 2001 From: Emil Gydesen Date: Thu, 15 Dec 2022 21:25:51 +0100 Subject: [PATCH] Bluetooth: Audio: Remove unicast_group_valid_qos The function checked several value, but the BAP spec does not specify that these cannot be different from stream to stream in the CIG. The function thus did nothing but needlessly restrict the upper layers. Signed-off-by: Emil Gydesen --- subsys/bluetooth/audio/stream.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/subsys/bluetooth/audio/stream.c b/subsys/bluetooth/audio/stream.c index 917396dd584..1c29b12a1ba 100644 --- a/subsys/bluetooth/audio/stream.c +++ b/subsys/bluetooth/audio/stream.c @@ -728,18 +728,6 @@ int bt_audio_stream_connect(struct bt_audio_stream *stream) } } -static bool unicast_group_valid_qos(const struct bt_codec_qos *group_qos, - const struct bt_codec_qos *stream_qos) -{ - if (group_qos->framing != stream_qos->framing || - group_qos->interval != stream_qos->interval || - group_qos->latency != stream_qos->latency) { - return false; - } - - return true; -} - static struct bt_audio_iso *get_new_iso(struct bt_audio_unicast_group *group, struct bt_conn *acl, enum bt_audio_dir dir) @@ -1020,10 +1008,6 @@ int bt_audio_unicast_group_create(struct bt_audio_unicast_group_param *param, if (group_qos == NULL) { group_qos = stream_param->qos; - } else if (!unicast_group_valid_qos(group_qos, - stream_param->qos)) { - LOG_DBG("Stream[%zu] QoS incompatible with group QoS", i); - return -EINVAL; } CHECKIF(!bt_audio_valid_qos(stream_param->qos)) { @@ -1109,9 +1093,6 @@ int bt_audio_unicast_group_add_streams(struct bt_audio_unicast_group *unicast_gr if (group_qos == NULL) { group_qos = params[i].qos; - } else if (!unicast_group_valid_qos(group_qos, params[i].qos)) { - LOG_DBG("Stream[%zu] QoS incompatible with group QoS", i); - return -EINVAL; } }