All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ v2 0/5] test-bap: Add Broadcast Source STR MBIS tests
@ 2024-06-25  7:27 Iulia Tanasescu
  2024-06-25  7:27 ` [PATCH BlueZ v2 1/5] shared/lc3: Rename LC3_BASE Iulia Tanasescu
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Iulia Tanasescu @ 2024-06-25  7:27 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: claudia.rosu, mihai-octavian.urzica, vlad.pruteanu,
	andrei.istodorescu, luiz.dentz, Iulia Tanasescu

This patch adds BAP unit tests for Broadcast Source streaming with
multiple BISes (4.14.3 Broadcast Audio Stream with Multiple BISes -
Source - page 184).

This also moves the BASE defines from test-bap to lc3.h.

Iulia Tanasescu (5):
  shared/lc3: Rename LC3_BASE
  test-bap: Move BASE defines to lc3.h
  test-bap: Add support to config multiple bsrc streams
  shared/lc3: Add defines for BASE with multiple BISes
  test-bap: Add Broadcast Source STR MBIS tests

 src/shared/lc3.h | 215 +++++++++++++++++++-
 unit/test-bap.c  | 505 ++++++++++++++++++++++++++++++++---------------
 2 files changed, 550 insertions(+), 170 deletions(-)


base-commit: 2bd25c068c5f6a54fbe8d8ea11633d3b5f1468df
-- 
2.39.2


^ permalink raw reply	[flat|nested] 9+ messages in thread
* [PATCH BlueZ 1/2] test-bap: Add support to config multiple bsrc streams
@ 2024-06-06 10:25 Iulia Tanasescu
  2024-06-06 12:31 ` test-bap: Add Broadcast Source STR MBIS tests bluez.test.bot
  0 siblings, 1 reply; 9+ messages in thread
From: Iulia Tanasescu @ 2024-06-06 10:25 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: claudia.rosu, mihai-octavian.urzica, vlad.pruteanu,
	andrei.istodorescu, luiz.dentz, Iulia Tanasescu

This adds support to configure multiple bsrc streams.
---
 unit/test-bap.c | 52 ++++++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 45 insertions(+), 7 deletions(-)

diff --git a/unit/test-bap.c b/unit/test-bap.c
index 638717afc..c37f7676f 100644
--- a/unit/test-bap.c
+++ b/unit/test-bap.c
@@ -538,15 +538,17 @@ static void bsrc_pac_added(struct bt_bap_pac *pac, void *user_data)
 
 	bt_bap_pac_set_ops(pac, &bcast_pac_ops, NULL);
 
-	stream = bt_bap_stream_new(data->bap, pac, NULL,
-						&data->cfg->qos,
-						&data->cfg->cc);
-	g_assert(stream);
+	for (uint8_t i = 0; i < data->cfg->streams; i++) {
+		stream = bt_bap_stream_new(data->bap, pac, NULL,
+							&data->cfg->qos,
+							&data->cfg->cc);
+		g_assert(stream);
 
-	queue_push_tail(data->streams, stream);
+		queue_push_tail(data->streams, stream);
 
-	bt_bap_stream_config(stream, &data->cfg->qos,
-					&data->cfg->cc, NULL, data);
+		bt_bap_stream_config(stream, &data->cfg->qos,
+						&data->cfg->cc, NULL, data);
+	}
 }
 
 static void bsrc_state_cfg(struct bt_bap_stream *stream, uint8_t old_state,
@@ -5603,6 +5605,7 @@ static struct test_config cfg_bsrc_8_1_1 = {
 	.base = UTIL_IOV_INIT(BASE_LC3_8_1),
 	.src = true,
 	.state_func = bsrc_state_cfg,
+	.streams = 1,
 };
 
 static struct test_config cfg_bsrc_8_1_2 = {
@@ -5611,6 +5614,7 @@ static struct test_config cfg_bsrc_8_1_2 = {
 	.base = UTIL_IOV_INIT(BASE_LC3_8_1),
 	.src = true,
 	.state_func = bsrc_state_cfg,
+	.streams = 1,
 };
 
 #define LC3_CFG_8_2 \
@@ -5627,6 +5631,7 @@ static struct test_config cfg_bsrc_8_2_1 = {
 	.base = UTIL_IOV_INIT(BASE_LC3_8_2),
 	.src = true,
 	.state_func = bsrc_state_cfg,
+	.streams = 1,
 };
 
 static struct test_config cfg_bsrc_8_2_2 = {
@@ -5635,6 +5640,7 @@ static struct test_config cfg_bsrc_8_2_2 = {
 	.base = UTIL_IOV_INIT(BASE_LC3_8_2),
 	.src = true,
 	.state_func = bsrc_state_cfg,
+	.streams = 1,
 };
 
 #define LC3_CFG_16_1 \
@@ -5651,6 +5657,7 @@ static struct test_config cfg_bsrc_16_1_1 = {
 	.base = UTIL_IOV_INIT(BASE_LC3_16_1),
 	.src = true,
 	.state_func = bsrc_state_cfg,
+	.streams = 1,
 };
 
 static struct test_config cfg_bsrc_16_1_2 = {
@@ -5659,6 +5666,7 @@ static struct test_config cfg_bsrc_16_1_2 = {
 	.base = UTIL_IOV_INIT(BASE_LC3_16_1),
 	.src = true,
 	.state_func = bsrc_state_cfg,
+	.streams = 1,
 };
 
 #define LC3_CFG_16_2 \
@@ -5675,6 +5683,7 @@ static struct test_config cfg_bsrc_16_2_1 = {
 	.base = UTIL_IOV_INIT(BASE_LC3_16_2),
 	.src = true,
 	.state_func = bsrc_state_cfg,
+	.streams = 1,
 };
 
 static struct test_config cfg_bsrc_16_2_2 = {
@@ -5683,6 +5692,7 @@ static struct test_config cfg_bsrc_16_2_2 = {
 	.base = UTIL_IOV_INIT(BASE_LC3_16_2),
 	.src = true,
 	.state_func = bsrc_state_cfg,
+	.streams = 1,
 };
 
 #define LC3_CFG_24_1 \
@@ -5699,6 +5709,7 @@ static struct test_config cfg_bsrc_24_1_1 = {
 	.base = UTIL_IOV_INIT(BASE_LC3_24_1),
 	.src = true,
 	.state_func = bsrc_state_cfg,
+	.streams = 1,
 };
 
 static struct test_config cfg_bsrc_24_1_2 = {
@@ -5707,6 +5718,7 @@ static struct test_config cfg_bsrc_24_1_2 = {
 	.base = UTIL_IOV_INIT(BASE_LC3_24_1),
 	.src = true,
 	.state_func = bsrc_state_cfg,
+	.streams = 1,
 };
 
 #define LC3_CFG_24_2 \
@@ -5723,6 +5735,7 @@ static struct test_config cfg_bsrc_24_2_1 = {
 	.base = UTIL_IOV_INIT(BASE_LC3_24_2),
 	.src = true,
 	.state_func = bsrc_state_cfg,
+	.streams = 1,
 };
 
 static struct test_config cfg_bsrc_24_2_2 = {
@@ -5731,6 +5744,7 @@ static struct test_config cfg_bsrc_24_2_2 = {
 	.base = UTIL_IOV_INIT(BASE_LC3_24_2),
 	.src = true,
 	.state_func = bsrc_state_cfg,
+	.streams = 1,
 };
 
 #define LC3_CFG_32_1 \
@@ -5747,6 +5761,7 @@ static struct test_config cfg_bsrc_32_1_1 = {
 	.base = UTIL_IOV_INIT(BASE_LC3_32_1),
 	.src = true,
 	.state_func = bsrc_state_cfg,
+	.streams = 1,
 };
 
 static struct test_config cfg_bsrc_32_1_2 = {
@@ -5755,6 +5770,7 @@ static struct test_config cfg_bsrc_32_1_2 = {
 	.base = UTIL_IOV_INIT(BASE_LC3_32_1),
 	.src = true,
 	.state_func = bsrc_state_cfg,
+	.streams = 1,
 };
 
 #define LC3_CFG_32_2 \
@@ -5771,6 +5787,7 @@ static struct test_config cfg_bsrc_32_2_1 = {
 	.base = UTIL_IOV_INIT(BASE_LC3_32_2),
 	.src = true,
 	.state_func = bsrc_state_cfg,
+	.streams = 1,
 };
 
 static struct test_config cfg_bsrc_32_2_2 = {
@@ -5779,6 +5796,7 @@ static struct test_config cfg_bsrc_32_2_2 = {
 	.base = UTIL_IOV_INIT(BASE_LC3_32_2),
 	.src = true,
 	.state_func = bsrc_state_cfg,
+	.streams = 1,
 };
 
 #define LC3_CFG_44_1 \
@@ -5795,6 +5813,7 @@ static struct test_config cfg_bsrc_44_1_1 = {
 	.base = UTIL_IOV_INIT(BASE_LC3_44_1),
 	.src = true,
 	.state_func = bsrc_state_cfg,
+	.streams = 1,
 };
 
 static struct test_config cfg_bsrc_44_1_2 = {
@@ -5803,6 +5822,7 @@ static struct test_config cfg_bsrc_44_1_2 = {
 	.base = UTIL_IOV_INIT(BASE_LC3_44_1),
 	.src = true,
 	.state_func = bsrc_state_cfg,
+	.streams = 1,
 };
 
 #define LC3_CFG_44_2 \
@@ -5819,6 +5839,7 @@ static struct test_config cfg_bsrc_44_2_1 = {
 	.base = UTIL_IOV_INIT(BASE_LC3_44_2),
 	.src = true,
 	.state_func = bsrc_state_cfg,
+	.streams = 1,
 };
 
 static struct test_config cfg_bsrc_44_2_2 = {
@@ -5827,6 +5848,7 @@ static struct test_config cfg_bsrc_44_2_2 = {
 	.base = UTIL_IOV_INIT(BASE_LC3_44_2),
 	.src = true,
 	.state_func = bsrc_state_cfg,
+	.streams = 1,
 };
 
 #define LC3_CFG_48_1 \
@@ -5843,6 +5865,7 @@ static struct test_config cfg_bsrc_48_1_1 = {
 	.base = UTIL_IOV_INIT(BASE_LC3_48_1),
 	.src = true,
 	.state_func = bsrc_state_cfg,
+	.streams = 1,
 };
 
 static struct test_config cfg_bsrc_48_1_2 = {
@@ -5851,6 +5874,7 @@ static struct test_config cfg_bsrc_48_1_2 = {
 	.base = UTIL_IOV_INIT(BASE_LC3_48_1),
 	.src = true,
 	.state_func = bsrc_state_cfg,
+	.streams = 1,
 };
 
 #define LC3_CFG_48_2 \
@@ -5867,6 +5891,7 @@ static struct test_config cfg_bsrc_48_2_1 = {
 	.base = UTIL_IOV_INIT(BASE_LC3_48_2),
 	.src = true,
 	.state_func = bsrc_state_cfg,
+	.streams = 1,
 };
 
 static struct test_config cfg_bsrc_48_2_2 = {
@@ -5875,6 +5900,7 @@ static struct test_config cfg_bsrc_48_2_2 = {
 	.base = UTIL_IOV_INIT(BASE_LC3_48_2),
 	.src = true,
 	.state_func = bsrc_state_cfg,
+	.streams = 1,
 };
 
 #define LC3_CFG_48_3 \
@@ -5891,6 +5917,7 @@ static struct test_config cfg_bsrc_48_3_1 = {
 	.base = UTIL_IOV_INIT(BASE_LC3_48_3),
 	.src = true,
 	.state_func = bsrc_state_cfg,
+	.streams = 1,
 };
 
 static struct test_config cfg_bsrc_48_3_2 = {
@@ -5899,6 +5926,7 @@ static struct test_config cfg_bsrc_48_3_2 = {
 	.base = UTIL_IOV_INIT(BASE_LC3_48_3),
 	.src = true,
 	.state_func = bsrc_state_cfg,
+	.streams = 1,
 };
 
 #define LC3_CFG_48_4 \
@@ -5915,6 +5943,7 @@ static struct test_config cfg_bsrc_48_4_1 = {
 	.base = UTIL_IOV_INIT(BASE_LC3_48_4),
 	.src = true,
 	.state_func = bsrc_state_cfg,
+	.streams = 1,
 };
 
 static struct test_config cfg_bsrc_48_4_2 = {
@@ -5923,6 +5952,7 @@ static struct test_config cfg_bsrc_48_4_2 = {
 	.base = UTIL_IOV_INIT(BASE_LC3_48_4),
 	.src = true,
 	.state_func = bsrc_state_cfg,
+	.streams = 1,
 };
 
 #define LC3_CFG_48_5 \
@@ -5939,6 +5969,7 @@ static struct test_config cfg_bsrc_48_5_1 = {
 	.base = UTIL_IOV_INIT(BASE_LC3_48_5),
 	.src = true,
 	.state_func = bsrc_state_cfg,
+	.streams = 1,
 };
 
 static struct test_config cfg_bsrc_48_5_2 = {
@@ -5947,6 +5978,7 @@ static struct test_config cfg_bsrc_48_5_2 = {
 	.base = UTIL_IOV_INIT(BASE_LC3_48_5),
 	.src = true,
 	.state_func = bsrc_state_cfg,
+	.streams = 1,
 };
 
 #define LC3_CFG_48_6 \
@@ -5963,6 +5995,7 @@ static struct test_config cfg_bsrc_48_6_1 = {
 	.base = UTIL_IOV_INIT(BASE_LC3_48_6),
 	.src = true,
 	.state_func = bsrc_state_cfg,
+	.streams = 1,
 };
 
 static struct test_config cfg_bsrc_48_6_2 = {
@@ -5971,6 +6004,7 @@ static struct test_config cfg_bsrc_48_6_2 = {
 	.base = UTIL_IOV_INIT(BASE_LC3_48_6),
 	.src = true,
 	.state_func = bsrc_state_cfg,
+	.streams = 1,
 };
 
 #define VS_CC \
@@ -6007,6 +6041,7 @@ static struct test_config cfg_bsrc_vs = {
 	.vs = true,
 	.src = true,
 	.state_func = bsrc_state_cfg,
+	.streams = 1,
 };
 
 /* Test Purpose:
@@ -6152,6 +6187,7 @@ static struct test_config cfg_bsrc_8_1_1_estab = {
 	.qos = LC3_QOS_8_1_1_B,
 	.src = true,
 	.state_func = bsrc_state_estab,
+	.streams = 1,
 };
 
 /* Test Purpose:
@@ -6196,6 +6232,7 @@ static struct test_config cfg_bsrc_8_1_1_disable = {
 	.qos = LC3_QOS_8_1_1_B,
 	.src = true,
 	.state_func = bsrc_state_disable,
+	.streams = 1,
 };
 
 /* Test Purpose:
@@ -6241,6 +6278,7 @@ static struct test_config cfg_bsrc_8_1_1_release = {
 	.qos = LC3_QOS_8_1_1_B,
 	.src = true,
 	.state_func = bsrc_state_release,
+	.streams = 1,
 };
 
 /* Test Purpose:
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-06-25 14:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-25  7:27 [PATCH BlueZ v2 0/5] test-bap: Add Broadcast Source STR MBIS tests Iulia Tanasescu
2024-06-25  7:27 ` [PATCH BlueZ v2 1/5] shared/lc3: Rename LC3_BASE Iulia Tanasescu
2024-06-25 10:55   ` test-bap: Add Broadcast Source STR MBIS tests bluez.test.bot
2024-06-25  7:27 ` [PATCH BlueZ v2 2/5] test-bap: Move BASE defines to lc3.h Iulia Tanasescu
2024-06-25  7:27 ` [PATCH BlueZ v2 3/5] test-bap: Add support to config multiple bsrc streams Iulia Tanasescu
2024-06-25  7:27 ` [PATCH BlueZ v2 4/5] shared/lc3: Add defines for BASE with multiple BISes Iulia Tanasescu
2024-06-25  7:27 ` [PATCH BlueZ v2 5/5] test-bap: Add Broadcast Source STR MBIS tests Iulia Tanasescu
2024-06-25 14:10 ` [PATCH BlueZ v2 0/5] " patchwork-bot+bluetooth
  -- strict thread matches above, loose matches on Subject: below --
2024-06-06 10:25 [PATCH BlueZ 1/2] test-bap: Add support to config multiple bsrc streams Iulia Tanasescu
2024-06-06 12:31 ` test-bap: Add Broadcast Source STR MBIS tests bluez.test.bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.