Diff between 6cb268f47f477a07185a6b982e96787f82de98bf and bb30b19901547b012896b239dfa10a2a9e95c665

Changed Files

File Additions Deletions Status
unit/test-bap.c +45 -1 modified

Full Patch

diff --git a/unit/test-bap.c b/unit/test-bap.c
index 9cb4ae8..59e056e 100644
--- a/unit/test-bap.c
+++ b/unit/test-bap.c
@@ -6029,7 +6029,7 @@ static struct test_config cfg_bsrc_vs = {
  * Each value included in the Codec_Specific_Configuration is formatted in
  * an LTV structure with the length, type, and value specified in Table 4.74.
  */
-static void test_bsrc_scc(void)
+static void test_bsrc_scc_config(void)
 {
 	define_test("BAP/BSRC/SCC/BV-01-C [Config Broadcast, LC3 8_1_1]",
 		NULL, test_bcast, &cfg_bsrc_8_1_1, IOV_NULL);
@@ -6131,6 +6131,50 @@ static void test_bsrc_scc(void)
 		NULL, test_bcast, &cfg_bsrc_vs, IOV_NULL);
 }
 
+static void bsrc_state_estab(struct bt_bap_stream *stream, uint8_t old_state,
+				uint8_t new_state, void *user_data)
+{
+	switch (new_state) {
+	case BT_BAP_STREAM_STATE_CONFIG:
+		bt_bap_stream_enable(stream, true, NULL, NULL, NULL);
+		break;
+	case BT_BAP_STREAM_STATE_ENABLING:
+		bt_bap_stream_start(stream, NULL, NULL);
+		break;
+	case BT_BAP_STREAM_STATE_STREAMING:
+		tester_test_passed();
+		break;
+	}
+}
+
+static struct test_config cfg_bsrc_8_1_1_estab = {
+	.cc = LC3_CONFIG_8_1,
+	.qos = LC3_QOS_8_1_1_B,
+	.src = true,
+	.state_func = bsrc_state_estab,
+};
+
+/* Test Purpose:
+ * Verify that a Broadcast Source IUT can establish a broadcast
+ * Audio Stream.
+ *
+ * Pass verdict:
+ * The IUT sends AUX_SYNC_IND PDUs with an Extended Header
+ * containing BIGInfo in the ACAD field. The IUT sends BIS Data
+ * PDUs over the broadcast Audio Stream.
+ */
+static void test_bsrc_scc_estab(void)
+{
+	define_test("BAP/BSRC/SCC/BV-35-C [Establishes Broadcast]",
+		NULL, test_bcast, &cfg_bsrc_8_1_1_estab, IOV_NULL);
+}
+
+static void test_bsrc_scc(void)
+{
+	test_bsrc_scc_config();
+	test_bsrc_scc_estab();
+}
+
 static struct test_config cfg_bsnk_8_1 = {
 	.cc = LC3_CONFIG_8_1,
 	.qos = QOS_BCAST,