Diff between 98818da25b2329dd0ff82009c167724df19db880 and db8c96059c02fefd232d49dcbeb16d6b22481100

Changed Files

File Additions Deletions Status
src/shared/bap.c +21 -0 modified
src/shared/bap.h +7 -0 modified

Full Patch

diff --git a/src/shared/bap.c b/src/shared/bap.c
index 919ecbb..c927ddc 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -6521,3 +6521,24 @@ void bt_bap_add_bis(struct bt_bap *bap, uint8_t bis_index,
 cleanup:
 	util_iov_free(merge_data.result, 1);
 }
+
+void bt_bap_verify_bis(struct bt_bap *bap, uint8_t bis_index,
+		struct bt_bap_codec *codec,
+		struct iovec *l2_caps,
+		struct iovec *l3_caps,
+		struct bt_bap_pac **lpac,
+		struct iovec **caps)
+{
+	struct bt_ltv_extract merge_data = {0};
+
+	merge_data.src = l3_caps;
+	merge_data.result = new0(struct iovec, 1);
+
+	/* Create a Codec Specific Configuration with LTVs at level 2 (subgroup)
+	 * overwritten by LTVs at level 3 (BIS)
+	 */
+	util_ltv_foreach(l2_caps->iov_base,
+			l2_caps->iov_len,
+			NULL,
+			bap_sink_check_level2_ltv, &merge_data);
+}
diff --git a/src/shared/bap.h b/src/shared/bap.h
index 62e2104..c9cc4c3 100644
--- a/src/shared/bap.h
+++ b/src/shared/bap.h
@@ -257,3 +257,10 @@ void bt_bap_add_bis(struct bt_bap *bap, uint8_t bis_index,
 		struct iovec *l3_caps,
 		struct iovec *meta);
 
+void bt_bap_verify_bis(struct bt_bap *bap, uint8_t bis_index,
+		struct bt_bap_codec *codec,
+		struct iovec *l2_caps,
+		struct iovec *l3_caps,
+		struct bt_bap_pac **lpac,
+		struct iovec **caps);
+