2024-05-17 12:35:22

by Iulia Tanasescu

[permalink] [raw]
Subject: [PATCH BlueZ 0/5] test-bap: Add Broadcast Sink SCC tests

This patch adds BAP unit tests for Broadcast Sink Stream Configuration
(4.13.2 Broadcast Sink Synchronizes to PA - page 177).

Some shared/bap and test-bap fixes have been added for successful test
implementation.

Iulia Tanasescu (5):
shared/bap: Handle NULL caps at bis verify
shared/bap: Add detach stream op
test-bap: Update caps to accommodate 8_1 config
test-bap: Make test_bsrc generic
test-bap: Add Broadcast Sink SCC tests

src/shared/bap.c | 70 ++++++-
unit/test-bap.c | 485 +++++++++++++++++++++++++++++++++++++++++------
2 files changed, 493 insertions(+), 62 deletions(-)


base-commit: f6241a10e460ab14fa3e2b943460673df0ded603
--
2.39.2



2024-05-17 12:35:28

by Iulia Tanasescu

[permalink] [raw]
Subject: [PATCH BlueZ 2/5] shared/bap: Add detach stream op

Since a Broadcast Sink stream is not attached to an endpoint,
bap_stream_detach must be adapted accordingly.

This splits bap_stream_detach into dedicated stream op functions
for ucast, bcast source and bcast sink.
---
src/shared/bap.c | 55 ++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 46 insertions(+), 9 deletions(-)

diff --git a/src/shared/bap.c b/src/shared/bap.c
index 40ce16d75..6572ef1d1 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -250,6 +250,7 @@ struct bt_bap_stream_ops {
unsigned int (*get_loc)(struct bt_bap_stream *stream);
unsigned int (*release)(struct bt_bap_stream *stream,
bt_bap_stream_func_t func, void *user_data);
+ void (*detach)(struct bt_bap_stream *stream);
};

struct bt_bap_stream {
@@ -1171,7 +1172,7 @@ static void bap_abort_stream_req(struct bt_bap *bap,
queue_remove_all(bap->reqs, match_req_stream, stream, bap_req_abort);
}

-static void bap_stream_detach(struct bt_bap_stream *stream)
+static void bap_ucast_detach(struct bt_bap_stream *stream)
{
struct bt_bap_endpoint *ep = stream->ep;

@@ -1190,6 +1191,34 @@ static void bap_stream_detach(struct bt_bap_stream *stream)
bap_stream_free(stream);
}

+static void bap_bcast_src_detach(struct bt_bap_stream *stream)
+{
+ struct bt_bap_endpoint *ep = stream->ep;
+
+ if (!ep)
+ return;
+
+ DBG(stream->bap, "stream %p ep %p", stream, ep);
+
+ queue_remove(stream->bap->streams, stream);
+ bap_stream_clear_cfm(stream);
+
+ stream->ep = NULL;
+ ep->stream = NULL;
+
+ bap_stream_free(stream);
+}
+
+static void bap_bcast_sink_detach(struct bt_bap_stream *stream)
+{
+ DBG(stream->bap, "stream %p", stream);
+
+ queue_remove(stream->bap->streams, stream);
+ bap_stream_clear_cfm(stream);
+
+ bap_stream_free(stream);
+}
+
static bool bap_stream_io_link(const void *data, const void *user_data)
{
struct bt_bap_stream *stream = (void *)data;
@@ -1285,7 +1314,10 @@ static void bap_stream_state_changed(struct bt_bap_stream *stream)
bap_req_complete(bap->req, NULL);
bap->req = NULL;
}
- bap_stream_detach(stream);
+
+ if (stream->ops && stream->ops->detach)
+ stream->ops->detach(stream);
+
break;
case BT_ASCS_ASE_STATE_QOS:
break;
@@ -1311,7 +1343,9 @@ static bool stream_set_state(struct bt_bap_stream *stream, uint8_t state)
*/
bap = bt_bap_ref_safe(bap);
if (!bap) {
- bap_stream_detach(stream);
+ if (stream->ops && stream->ops->detach)
+ stream->ops->detach(stream);
+
return false;
}

@@ -2018,7 +2052,8 @@ static void bap_bcast_set_state(struct bt_bap_stream *stream, uint8_t state)
/* Post notification updates */
switch (stream->state) {
case BT_ASCS_ASE_STATE_IDLE:
- bap_stream_detach(stream);
+ if (stream->ops && stream->ops->detach)
+ stream->ops->detach(stream);
break;
case BT_ASCS_ASE_STATE_DISABLING:
bap_stream_io_detach(stream);
@@ -2134,7 +2169,8 @@ static unsigned int bap_bcast_release(struct bt_bap_stream *stream,
}

#define STREAM_OPS(_type, _set_state, _get_state, _config, _qos, _enable, \
- _start, _disable, _stop, _metadata, _get_dir, _get_loc, _release) \
+ _start, _disable, _stop, _metadata, _get_dir, _get_loc, _release, \
+ _detach) \
{ \
.type = _type, \
.set_state = _set_state, \
@@ -2149,6 +2185,7 @@ static unsigned int bap_bcast_release(struct bt_bap_stream *stream,
.get_dir = _get_dir,\
.get_loc = _get_loc, \
.release = _release, \
+ .detach = _detach, \
}

static const struct bt_bap_stream_ops stream_ops[] = {
@@ -2158,28 +2195,28 @@ static const struct bt_bap_stream_ops stream_ops[] = {
bap_ucast_start, bap_ucast_disable, bap_ucast_stop,
bap_ucast_metadata, bap_ucast_get_dir,
bap_ucast_get_location,
- bap_ucast_release),
+ bap_ucast_release, bap_ucast_detach),
STREAM_OPS(BT_BAP_SOURCE, bap_ucast_set_state,
bap_ucast_get_state,
bap_ucast_config, bap_ucast_qos, bap_ucast_enable,
bap_ucast_start, bap_ucast_disable, bap_ucast_stop,
bap_ucast_metadata, bap_ucast_get_dir,
bap_ucast_get_location,
- bap_ucast_release),
+ bap_ucast_release, bap_ucast_detach),
STREAM_OPS(BT_BAP_BCAST_SINK, bap_bcast_set_state,
bap_bcast_get_state,
bap_bcast_config, NULL, bap_bcast_enable,
bap_bcast_start, bap_bcast_sink_disable, NULL,
bap_bcast_metadata, bap_bcast_sink_get_dir,
bap_bcast_get_location,
- bap_bcast_release),
+ bap_bcast_release, bap_bcast_sink_detach),
STREAM_OPS(BT_BAP_BCAST_SOURCE, bap_bcast_set_state,
bap_bcast_get_state,
bap_bcast_config, NULL, bap_bcast_enable,
bap_bcast_start, bap_bcast_disable, NULL,
bap_bcast_metadata, bap_bcast_src_get_dir,
bap_bcast_get_location,
- bap_bcast_release),
+ bap_bcast_release, bap_bcast_src_detach),
};

static const struct bt_bap_stream_ops *
--
2.39.2


2024-05-17 12:35:28

by Iulia Tanasescu

[permalink] [raw]
Subject: [PATCH BlueZ 1/5] shared/bap: Handle NULL caps at bis verify

This updates bt_bap_verify_bis to handle NULL L2 and/or L3 caps.
---
src/shared/bap.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)

diff --git a/src/shared/bap.c b/src/shared/bap.c
index 38c353a6d..40ce16d75 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -6531,6 +6531,20 @@ void bt_bap_verify_bis(struct bt_bap *bap, uint8_t bis_index,
struct bt_ltv_extract merge_data = {0};
struct bt_ltv_match match_data;

+ if (!l2_caps)
+ /* Codec_Specific_Configuration parameters shall
+ * be present at Level 2.
+ */
+ return;
+
+ if (!l3_caps) {
+ /* Codec_Specific_Configuration parameters may
+ * be present at Level 3.
+ */
+ merge_data.result = util_iov_dup(l2_caps, 1);
+ goto done;
+ }
+
merge_data.src = l3_caps;
merge_data.result = new0(struct iovec, 1);

@@ -6542,6 +6556,7 @@ void bt_bap_verify_bis(struct bt_bap *bap, uint8_t bis_index,
NULL,
bap_sink_check_level2_ltv, &merge_data);

+done:
/* Check each BIS Codec Specific Configuration LTVs against our Codec
* Specific Capabilities and if the BIS matches create a PAC with it
*/
--
2.39.2


2024-05-17 12:35:33

by Iulia Tanasescu

[permalink] [raw]
Subject: [PATCH BlueZ 3/5] test-bap: Update caps to accommodate 8_1 config

This adjusts the min SDU size in lc3_caps, to accommodate the 8_1 config.
---
unit/test-bap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/unit/test-bap.c b/unit/test-bap.c
index ac9d7ff38..e930ca604 100644
--- a/unit/test-bap.c
+++ b/unit/test-bap.c
@@ -64,10 +64,10 @@ struct test_data {
* Frequencies: 8Khz 11Khz 16Khz 22Khz 24Khz 32Khz 44.1Khz 48Khz
* Duration: 7.5 ms 10 ms
* Channel count: 3
- * Frame length: 30-240
+ * Frame length: 26-240
*/
static struct iovec lc3_caps = LC3_CAPABILITIES(LC3_FREQ_ANY, LC3_DURATION_ANY,
- 3u, 30, 240);
+ 3u, 26, 240);

#define iov_data(args...) ((const struct iovec[]) { args })

--
2.39.2


2024-05-17 12:35:35

by Iulia Tanasescu

[permalink] [raw]
Subject: [PATCH BlueZ 4/5] test-bap: Make test_bsrc generic

This makes test_bsrc more generic, to accommodate Broadcast Sink tests
as well, following the unicast design for handling source/sink
configurations.
---
unit/test-bap.c | 182 ++++++++++++++++++++++++++++++++++--------------
1 file changed, 131 insertions(+), 51 deletions(-)

diff --git a/unit/test-bap.c b/unit/test-bap.c
index e930ca604..a6e24e605 100644
--- a/unit/test-bap.c
+++ b/unit/test-bap.c
@@ -565,7 +565,34 @@ static void bsrc_state(struct bt_bap_stream *stream, uint8_t old_state,
}
}

-static void test_bsrc(const void *user_data)
+static void test_bcast_config(struct test_data *data)
+{
+ if (!data->cfg)
+ return;
+
+ if (data->cfg->src) {
+ bt_bap_pac_register(data->bap, bsrc_pac_added,
+ NULL, data, NULL);
+
+ if (data->cfg->vs)
+ data->bsrc = bt_bap_add_vendor_pac(data->db,
+ "test-bap-bsrc",
+ BT_BAP_BCAST_SOURCE,
+ 0x0ff, 0x0000, 0x0000,
+ NULL, data->caps,
+ NULL);
+ else
+ data->bsrc = bt_bap_add_pac(data->db, "test-bap-bsrc",
+ BT_BAP_BCAST_SOURCE,
+ LC3_ID,
+ NULL, data->caps,
+ NULL);
+
+ g_assert(data->bsrc);
+ }
+}
+
+static void test_bcast(const void *user_data)
{
struct test_data *data = (void *)user_data;

@@ -579,24 +606,11 @@ static void test_bsrc(const void *user_data)

bt_bap_attach_broadcast(data->bap);

- bt_bap_state_register(data->bap, bsrc_state,
- NULL, data, NULL);
-
- bt_bap_pac_register(data->bap, bsrc_pac_added,
- NULL, data, NULL);
-
- if (data->cfg->vs)
- data->bsrc = bt_bap_add_vendor_pac(data->db,
- "test-bap-bsrc",
- BT_BAP_BCAST_SOURCE, 0x0ff,
- 0x0000, 0x0000,
- NULL, data->caps, NULL);
- else
- data->bsrc = bt_bap_add_pac(data->db, "test-bap-bsrc",
- BT_BAP_BCAST_SOURCE, LC3_ID,
- NULL, data->caps, NULL);
+ if (data->cfg && data->cfg->state_func)
+ bt_bap_state_register(data->bap, data->cfg->state_func, NULL,
+ data, NULL);

- g_assert(data->bsrc);
+ test_bcast_config(data);
}

static void test_teardown(const void *user_data)
@@ -5501,12 +5515,16 @@ static struct test_config cfg_bsrc_8_1_1 = {
.cc = LC3_CONFIG_8_1,
.qos = LC3_QOS_8_1_1_B,
.base = UTIL_IOV_INIT(BASE_LC3_8_1),
+ .src = true,
+ .state_func = bsrc_state,
};

static struct test_config cfg_bsrc_8_1_2 = {
.cc = LC3_CONFIG_8_1,
.qos = LC3_QOS_8_1_2_B,
.base = UTIL_IOV_INIT(BASE_LC3_8_1),
+ .src = true,
+ .state_func = bsrc_state,
};

#define LC3_CFG_8_2 \
@@ -5521,12 +5539,16 @@ static struct test_config cfg_bsrc_8_2_1 = {
.cc = LC3_CONFIG_8_2,
.qos = LC3_QOS_8_2_1_B,
.base = UTIL_IOV_INIT(BASE_LC3_8_2),
+ .src = true,
+ .state_func = bsrc_state,
};

static struct test_config cfg_bsrc_8_2_2 = {
.cc = LC3_CONFIG_8_2,
.qos = LC3_QOS_8_2_2_B,
.base = UTIL_IOV_INIT(BASE_LC3_8_2),
+ .src = true,
+ .state_func = bsrc_state,
};

#define LC3_CFG_16_1 \
@@ -5541,12 +5563,16 @@ static struct test_config cfg_bsrc_16_1_1 = {
.cc = LC3_CONFIG_16_1,
.qos = LC3_QOS_16_1_1_B,
.base = UTIL_IOV_INIT(BASE_LC3_16_1),
+ .src = true,
+ .state_func = bsrc_state,
};

static struct test_config cfg_bsrc_16_1_2 = {
.cc = LC3_CONFIG_16_1,
.qos = LC3_QOS_16_1_2_B,
.base = UTIL_IOV_INIT(BASE_LC3_16_1),
+ .src = true,
+ .state_func = bsrc_state,
};

#define LC3_CFG_16_2 \
@@ -5561,12 +5587,16 @@ static struct test_config cfg_bsrc_16_2_1 = {
.cc = LC3_CONFIG_16_2,
.qos = LC3_QOS_16_2_1_B,
.base = UTIL_IOV_INIT(BASE_LC3_16_2),
+ .src = true,
+ .state_func = bsrc_state,
};

static struct test_config cfg_bsrc_16_2_2 = {
.cc = LC3_CONFIG_16_2,
.qos = LC3_QOS_16_2_2_B,
.base = UTIL_IOV_INIT(BASE_LC3_16_2),
+ .src = true,
+ .state_func = bsrc_state,
};

#define LC3_CFG_24_1 \
@@ -5581,12 +5611,16 @@ static struct test_config cfg_bsrc_24_1_1 = {
.cc = LC3_CONFIG_24_1,
.qos = LC3_QOS_24_1_1_B,
.base = UTIL_IOV_INIT(BASE_LC3_24_1),
+ .src = true,
+ .state_func = bsrc_state,
};

static struct test_config cfg_bsrc_24_1_2 = {
.cc = LC3_CONFIG_24_1,
.qos = LC3_QOS_24_1_2_B,
.base = UTIL_IOV_INIT(BASE_LC3_24_1),
+ .src = true,
+ .state_func = bsrc_state,
};

#define LC3_CFG_24_2 \
@@ -5601,12 +5635,16 @@ static struct test_config cfg_bsrc_24_2_1 = {
.cc = LC3_CONFIG_24_2,
.qos = LC3_QOS_24_2_1_B,
.base = UTIL_IOV_INIT(BASE_LC3_24_2),
+ .src = true,
+ .state_func = bsrc_state,
};

static struct test_config cfg_bsrc_24_2_2 = {
.cc = LC3_CONFIG_24_2,
.qos = LC3_QOS_24_2_2_B,
.base = UTIL_IOV_INIT(BASE_LC3_24_2),
+ .src = true,
+ .state_func = bsrc_state,
};

#define LC3_CFG_32_1 \
@@ -5621,12 +5659,16 @@ static struct test_config cfg_bsrc_32_1_1 = {
.cc = LC3_CONFIG_32_1,
.qos = LC3_QOS_32_1_1_B,
.base = UTIL_IOV_INIT(BASE_LC3_32_1),
+ .src = true,
+ .state_func = bsrc_state,
};

static struct test_config cfg_bsrc_32_1_2 = {
.cc = LC3_CONFIG_32_1,
.qos = LC3_QOS_32_1_2_B,
.base = UTIL_IOV_INIT(BASE_LC3_32_1),
+ .src = true,
+ .state_func = bsrc_state,
};

#define LC3_CFG_32_2 \
@@ -5641,12 +5683,16 @@ static struct test_config cfg_bsrc_32_2_1 = {
.cc = LC3_CONFIG_32_2,
.qos = LC3_QOS_32_2_1_B,
.base = UTIL_IOV_INIT(BASE_LC3_32_2),
+ .src = true,
+ .state_func = bsrc_state,
};

static struct test_config cfg_bsrc_32_2_2 = {
.cc = LC3_CONFIG_32_2,
.qos = LC3_QOS_32_2_2_B,
.base = UTIL_IOV_INIT(BASE_LC3_32_2),
+ .src = true,
+ .state_func = bsrc_state,
};

#define LC3_CFG_44_1 \
@@ -5661,12 +5707,16 @@ static struct test_config cfg_bsrc_44_1_1 = {
.cc = LC3_CONFIG_44_1,
.qos = LC3_QOS_44_1_1_B,
.base = UTIL_IOV_INIT(BASE_LC3_44_1),
+ .src = true,
+ .state_func = bsrc_state,
};

static struct test_config cfg_bsrc_44_1_2 = {
.cc = LC3_CONFIG_44_1,
.qos = LC3_QOS_44_1_2_B,
.base = UTIL_IOV_INIT(BASE_LC3_44_1),
+ .src = true,
+ .state_func = bsrc_state,
};

#define LC3_CFG_44_2 \
@@ -5681,12 +5731,16 @@ static struct test_config cfg_bsrc_44_2_1 = {
.cc = LC3_CONFIG_44_2,
.qos = LC3_QOS_44_2_1_B,
.base = UTIL_IOV_INIT(BASE_LC3_44_2),
+ .src = true,
+ .state_func = bsrc_state,
};

static struct test_config cfg_bsrc_44_2_2 = {
.cc = LC3_CONFIG_44_2,
.qos = LC3_QOS_44_2_2_B,
.base = UTIL_IOV_INIT(BASE_LC3_44_2),
+ .src = true,
+ .state_func = bsrc_state,
};

#define LC3_CFG_48_1 \
@@ -5701,12 +5755,16 @@ static struct test_config cfg_bsrc_48_1_1 = {
.cc = LC3_CONFIG_48_1,
.qos = LC3_QOS_48_1_1_B,
.base = UTIL_IOV_INIT(BASE_LC3_48_1),
+ .src = true,
+ .state_func = bsrc_state,
};

static struct test_config cfg_bsrc_48_1_2 = {
.cc = LC3_CONFIG_48_1,
.qos = LC3_QOS_48_1_2_B,
.base = UTIL_IOV_INIT(BASE_LC3_48_1),
+ .src = true,
+ .state_func = bsrc_state,
};

#define LC3_CFG_48_2 \
@@ -5721,12 +5779,16 @@ static struct test_config cfg_bsrc_48_2_1 = {
.cc = LC3_CONFIG_48_2,
.qos = LC3_QOS_48_2_1_B,
.base = UTIL_IOV_INIT(BASE_LC3_48_2),
+ .src = true,
+ .state_func = bsrc_state,
};

static struct test_config cfg_bsrc_48_2_2 = {
.cc = LC3_CONFIG_48_2,
.qos = LC3_QOS_48_2_2_B,
.base = UTIL_IOV_INIT(BASE_LC3_48_2),
+ .src = true,
+ .state_func = bsrc_state,
};

#define LC3_CFG_48_3 \
@@ -5741,12 +5803,16 @@ static struct test_config cfg_bsrc_48_3_1 = {
.cc = LC3_CONFIG_48_3,
.qos = LC3_QOS_48_3_1_B,
.base = UTIL_IOV_INIT(BASE_LC3_48_3),
+ .src = true,
+ .state_func = bsrc_state,
};

static struct test_config cfg_bsrc_48_3_2 = {
.cc = LC3_CONFIG_48_3,
.qos = LC3_QOS_48_3_2_B,
.base = UTIL_IOV_INIT(BASE_LC3_48_3),
+ .src = true,
+ .state_func = bsrc_state,
};

#define LC3_CFG_48_4 \
@@ -5761,12 +5827,16 @@ static struct test_config cfg_bsrc_48_4_1 = {
.cc = LC3_CONFIG_48_4,
.qos = LC3_QOS_48_4_1_B,
.base = UTIL_IOV_INIT(BASE_LC3_48_4),
+ .src = true,
+ .state_func = bsrc_state,
};

static struct test_config cfg_bsrc_48_4_2 = {
.cc = LC3_CONFIG_48_4,
.qos = LC3_QOS_48_4_2_B,
.base = UTIL_IOV_INIT(BASE_LC3_48_4),
+ .src = true,
+ .state_func = bsrc_state,
};

#define LC3_CFG_48_5 \
@@ -5781,12 +5851,16 @@ static struct test_config cfg_bsrc_48_5_1 = {
.cc = LC3_CONFIG_48_5,
.qos = LC3_QOS_48_5_1_B,
.base = UTIL_IOV_INIT(BASE_LC3_48_5),
+ .src = true,
+ .state_func = bsrc_state,
};

static struct test_config cfg_bsrc_48_5_2 = {
.cc = LC3_CONFIG_48_5,
.qos = LC3_QOS_48_5_2_B,
.base = UTIL_IOV_INIT(BASE_LC3_48_5),
+ .src = true,
+ .state_func = bsrc_state,
};

#define LC3_CFG_48_6 \
@@ -5801,12 +5875,16 @@ static struct test_config cfg_bsrc_48_6_1 = {
.cc = LC3_CONFIG_48_6,
.qos = LC3_QOS_48_6_1_B,
.base = UTIL_IOV_INIT(BASE_LC3_48_6),
+ .src = true,
+ .state_func = bsrc_state,
};

static struct test_config cfg_bsrc_48_6_2 = {
.cc = LC3_CONFIG_48_6,
.qos = LC3_QOS_48_6_2_B,
.base = UTIL_IOV_INIT(BASE_LC3_48_6),
+ .src = true,
+ .state_func = bsrc_state,
};

#define VS_CC \
@@ -5841,6 +5919,8 @@ static struct test_config cfg_bsrc_vs = {
.qos = QOS_BCAST,
.base = UTIL_IOV_INIT(BASE_VS),
.vs = true,
+ .src = true,
+ .state_func = bsrc_state,
};

/* Test Purpose:
@@ -5866,103 +5946,103 @@ static struct test_config cfg_bsrc_vs = {
static void test_bsrc_scc(void)
{
define_test("BAP/BSRC/SCC/BV-01-C [Config Broadcast, LC3 8_1_1]",
- NULL, test_bsrc, &cfg_bsrc_8_1_1, IOV_NULL);
+ NULL, test_bcast, &cfg_bsrc_8_1_1, IOV_NULL);

define_test("BAP/BSRC/SCC/BV-02-C [Config Broadcast, LC3 8_2_1]",
- NULL, test_bsrc, &cfg_bsrc_8_2_1, IOV_NULL);
+ NULL, test_bcast, &cfg_bsrc_8_2_1, IOV_NULL);

define_test("BAP/BSRC/SCC/BV-03-C [Config Broadcast, LC3 16_1_1]",
- NULL, test_bsrc, &cfg_bsrc_16_1_1, IOV_NULL);
+ NULL, test_bcast, &cfg_bsrc_16_1_1, IOV_NULL);

define_test("BAP/BSRC/SCC/BV-04-C [Config Broadcast, LC3 16_2_1]",
- NULL, test_bsrc, &cfg_bsrc_16_2_1, IOV_NULL);
+ NULL, test_bcast, &cfg_bsrc_16_2_1, IOV_NULL);

define_test("BAP/BSRC/SCC/BV-05-C [Config Broadcast, LC3 24_1_1]",
- NULL, test_bsrc, &cfg_bsrc_24_1_1, IOV_NULL);
+ NULL, test_bcast, &cfg_bsrc_24_1_1, IOV_NULL);

define_test("BAP/BSRC/SCC/BV-06-C [Config Broadcast, LC3 24_2_1]",
- NULL, test_bsrc, &cfg_bsrc_24_2_1, IOV_NULL);
+ NULL, test_bcast, &cfg_bsrc_24_2_1, IOV_NULL);

define_test("BAP/BSRC/SCC/BV-07-C [Config Broadcast, LC3 32_1_1]",
- NULL, test_bsrc, &cfg_bsrc_32_1_1, IOV_NULL);
+ NULL, test_bcast, &cfg_bsrc_32_1_1, IOV_NULL);

define_test("BAP/BSRC/SCC/BV-08-C [Config Broadcast, LC3 32_2_1]",
- NULL, test_bsrc, &cfg_bsrc_32_2_1, IOV_NULL);
+ NULL, test_bcast, &cfg_bsrc_32_2_1, IOV_NULL);

define_test("BAP/BSRC/SCC/BV-09-C [Config Broadcast, LC3 44.1_1_1]",
- NULL, test_bsrc, &cfg_bsrc_44_1_1, IOV_NULL);
+ NULL, test_bcast, &cfg_bsrc_44_1_1, IOV_NULL);

define_test("BAP/BSRC/SCC/BV-10-C [Config Broadcast, LC3 44.1_2_1]",
- NULL, test_bsrc, &cfg_bsrc_44_2_1, IOV_NULL);
+ NULL, test_bcast, &cfg_bsrc_44_2_1, IOV_NULL);

define_test("BAP/BSRC/SCC/BV-11-C [Config Broadcast, LC3 48_1_1]",
- NULL, test_bsrc, &cfg_bsrc_48_1_1, IOV_NULL);
+ NULL, test_bcast, &cfg_bsrc_48_1_1, IOV_NULL);

define_test("BAP/BSRC/SCC/BV-12-C [Config Broadcast, LC3 48_2_1]",
- NULL, test_bsrc, &cfg_bsrc_48_2_1, IOV_NULL);
+ NULL, test_bcast, &cfg_bsrc_48_2_1, IOV_NULL);

define_test("BAP/BSRC/SCC/BV-13-C [Config Broadcast, LC3 48_3_1]",
- NULL, test_bsrc, &cfg_bsrc_48_3_1, IOV_NULL);
+ NULL, test_bcast, &cfg_bsrc_48_3_1, IOV_NULL);

define_test("BAP/BSRC/SCC/BV-14-C [Config Broadcast, LC3 48_4_1]",
- NULL, test_bsrc, &cfg_bsrc_48_4_1, IOV_NULL);
+ NULL, test_bcast, &cfg_bsrc_48_4_1, IOV_NULL);

define_test("BAP/BSRC/SCC/BV-15-C [Config Broadcast, LC3 48_5_1]",
- NULL, test_bsrc, &cfg_bsrc_48_5_1, IOV_NULL);
+ NULL, test_bcast, &cfg_bsrc_48_5_1, IOV_NULL);

define_test("BAP/BSRC/SCC/BV-16-C [Config Broadcast, LC3 48_6_1]",
- NULL, test_bsrc, &cfg_bsrc_48_6_1, IOV_NULL);
+ NULL, test_bcast, &cfg_bsrc_48_6_1, IOV_NULL);

define_test("BAP/BSRC/SCC/BV-17-C [Config Broadcast, LC3 8_1_2]",
- NULL, test_bsrc, &cfg_bsrc_8_1_2, IOV_NULL);
+ NULL, test_bcast, &cfg_bsrc_8_1_2, IOV_NULL);

define_test("BAP/BSRC/SCC/BV-18-C [Config Broadcast, LC3 8_2_2]",
- NULL, test_bsrc, &cfg_bsrc_8_2_2, IOV_NULL);
+ NULL, test_bcast, &cfg_bsrc_8_2_2, IOV_NULL);

define_test("BAP/BSRC/SCC/BV-19-C [Config Broadcast, LC3 16_1_2]",
- NULL, test_bsrc, &cfg_bsrc_16_1_2, IOV_NULL);
+ NULL, test_bcast, &cfg_bsrc_16_1_2, IOV_NULL);

define_test("BAP/BSRC/SCC/BV-20-C [Config Broadcast, LC3 16_2_2]",
- NULL, test_bsrc, &cfg_bsrc_16_2_2, IOV_NULL);
+ NULL, test_bcast, &cfg_bsrc_16_2_2, IOV_NULL);

define_test("BAP/BSRC/SCC/BV-21-C [Config Broadcast, LC3 24_1_2]",
- NULL, test_bsrc, &cfg_bsrc_24_1_2, IOV_NULL);
+ NULL, test_bcast, &cfg_bsrc_24_1_2, IOV_NULL);

define_test("BAP/BSRC/SCC/BV-22-C [Config Broadcast, LC3 24_2_2]",
- NULL, test_bsrc, &cfg_bsrc_24_2_2, IOV_NULL);
+ NULL, test_bcast, &cfg_bsrc_24_2_2, IOV_NULL);

define_test("BAP/BSRC/SCC/BV-23-C [Config Broadcast, LC3 32_1_2]",
- NULL, test_bsrc, &cfg_bsrc_32_1_2, IOV_NULL);
+ NULL, test_bcast, &cfg_bsrc_32_1_2, IOV_NULL);

define_test("BAP/BSRC/SCC/BV-24-C [Config Broadcast, LC3 32_2_2]",
- NULL, test_bsrc, &cfg_bsrc_32_2_2, IOV_NULL);
+ NULL, test_bcast, &cfg_bsrc_32_2_2, IOV_NULL);

define_test("BAP/BSRC/SCC/BV-25-C [Config Broadcast, LC3 44.1_1_2]",
- NULL, test_bsrc, &cfg_bsrc_44_1_2, IOV_NULL);
+ NULL, test_bcast, &cfg_bsrc_44_1_2, IOV_NULL);

define_test("BAP/BSRC/SCC/BV-26-C [Config Broadcast, LC3 44.1_2_2]",
- NULL, test_bsrc, &cfg_bsrc_44_2_2, IOV_NULL);
+ NULL, test_bcast, &cfg_bsrc_44_2_2, IOV_NULL);

define_test("BAP/BSRC/SCC/BV-27-C [Config Broadcast, LC3 48_1_2]",
- NULL, test_bsrc, &cfg_bsrc_48_1_2, IOV_NULL);
+ NULL, test_bcast, &cfg_bsrc_48_1_2, IOV_NULL);

define_test("BAP/BSRC/SCC/BV-28-C [Config Broadcast, LC3 48_2_2]",
- NULL, test_bsrc, &cfg_bsrc_48_2_2, IOV_NULL);
+ NULL, test_bcast, &cfg_bsrc_48_2_2, IOV_NULL);

define_test("BAP/BSRC/SCC/BV-29-C [Config Broadcast, LC3 48_3_2]",
- NULL, test_bsrc, &cfg_bsrc_48_3_2, IOV_NULL);
+ NULL, test_bcast, &cfg_bsrc_48_3_2, IOV_NULL);

define_test("BAP/BSRC/SCC/BV-30-C [Config Broadcast, LC3 48_4_2]",
- NULL, test_bsrc, &cfg_bsrc_48_4_2, IOV_NULL);
+ NULL, test_bcast, &cfg_bsrc_48_4_2, IOV_NULL);

define_test("BAP/BSRC/SCC/BV-31-C [Config Broadcast, LC3 48_5_2]",
- NULL, test_bsrc, &cfg_bsrc_48_5_2, IOV_NULL);
+ NULL, test_bcast, &cfg_bsrc_48_5_2, IOV_NULL);

define_test("BAP/BSRC/SCC/BV-32-C [Config Broadcast, LC3 48_6_2]",
- NULL, test_bsrc, &cfg_bsrc_48_6_2, IOV_NULL);
+ NULL, test_bcast, &cfg_bsrc_48_6_2, IOV_NULL);

define_test("BAP/BSRC/SCC/BV-33-C [Config Broadcast, VS]",
- NULL, test_bsrc, &cfg_bsrc_vs, IOV_NULL);
+ NULL, test_bcast, &cfg_bsrc_vs, IOV_NULL);
}

int main(int argc, char *argv[])
--
2.39.2


2024-05-17 12:35:38

by Iulia Tanasescu

[permalink] [raw]
Subject: [PATCH BlueZ 5/5] test-bap: Add Broadcast Sink SCC tests

4.13.2 Broadcast Sink Synchronizes to PA (page 177)

Test Purpose:
Verify that a Broadcast Sink IUT can synchronize to the PA
associated with a broadcast Audio Stream transmitted by a
Broadcast Source.

Test Case Configuration:
BAP/BSNK/SCC/BV-01-C [Sync to PA, LC3 8_1_1]
BAP/BSNK/SCC/BV-02-C [Sync to PA, LC3 8_2_1]
BAP/BSNK/SCC/BV-03-C [Sync to PA, LC3 16_1_1]
BAP/BSNK/SCC/BV-04-C [Sync to PA, LC3 16_2_1]
BAP/BSNK/SCC/BV-05-C [Sync to PA, LC3 24_1_1]
BAP/BSNK/SCC/BV-06-C [Sync to PA, LC3 24_2_1]
BAP/BSNK/SCC/BV-07-C [Sync to PA, LC3 32_1_1]
BAP/BSNK/SCC/BV-08-C [Sync to PA, LC3 32_2_1]
BAP/BSNK/SCC/BV-09-C [Sync to PA, LC3 44.1_1_1]
BAP/BSNK/SCC/BV-10-C [Sync to PA, LC3 44.1_2_1]
BAP/BSNK/SCC/BV-11-C [Sync to PA, LC3 48_1_1]
BAP/BSNK/SCC/BV-12-C [Sync to PA, LC3 48_2_1]
BAP/BSNK/SCC/BV-13-C [Sync to PA, LC3 48_3_1]
BAP/BSNK/SCC/BV-14-C [Sync to PA, LC3 48_4_1]
BAP/BSNK/SCC/BV-15-C [Sync to PA, LC3 48_5_1]
BAP/BSNK/SCC/BV-16-C [Sync to PA, LC3 48_6_1]
BAP/BSNK/SCC/BV-17-C [Sync to PA, LC3 8_1_2]
BAP/BSNK/SCC/BV-18-C [Sync to PA, LC3 8_2_2]
BAP/BSNK/SCC/BV-19-C [Sync to PA, LC3 16_1_2]
BAP/BSNK/SCC/BV-20-C [Sync to PA, LC3 16_2_2]
BAP/BSNK/SCC/BV-21-C [Sync to PA, LC3 24_1_2]
BAP/BSNK/SCC/BV-22-C [Sync to PA, LC3 24_2_2]
BAP/BSNK/SCC/BV-23-C [Sync to PA, LC3 32_1_2]
BAP/BSNK/SCC/BV-24-C [Sync to PA, LC3 32_2_2]
BAP/BSNK/SCC/BV-25-C [Sync to PA, LC3 44.1_1_2]
BAP/BSNK/SCC/BV-26-C [Sync to PA, LC3 44.1_2_2]
BAP/BSNK/SCC/BV-27-C [Sync to PA, LC3 48_1_2]
BAP/BSNK/SCC/BV-28-C [Sync to PA, LC3 48_2_2]
BAP/BSNK/SCC/BV-29-C [Sync to PA, LC3 48_3_2]
BAP/BSNK/SCC/BV-30-C [Sync to PA, LC3 48_4_2]
BAP/BSNK/SCC/BV-31-C [Sync to PA, LC3 48_5_2]
BAP/BSNK/SCC/BV-32-C [Sync to PA, LC3 48_6_2]
BAP/BSNK/SCC/BV-33-C [Sync to PA, VS]

Pass verdict:
The received AdvData field of AUX_SYNC_IND and optionally
AUX_CHAIN_IND PDUs contains the configured BASE information.

Test Summary
------------
BAP/BSNK/SCC/BV-01-C [Sync to PA, LC3 8_1_1] Passed
BAP/BSNK/SCC/BV-02-C [Sync to PA, LC3 8_2_1] Passed
BAP/BSNK/SCC/BV-03-C [Sync to PA, LC3 16_1_1] Passed
BAP/BSNK/SCC/BV-04-C [Sync to PA, LC3 16_2_1] Passed
BAP/BSNK/SCC/BV-05-C [Sync to PA, LC3 24_1_1] Passed
BAP/BSNK/SCC/BV-06-C [Sync to PA, LC3 24_2_1] Passed
BAP/BSNK/SCC/BV-07-C [Sync to PA, LC3 32_1_1] Passed
BAP/BSNK/SCC/BV-08-C [Sync to PA, LC3 32_2_1] Passed
BAP/BSNK/SCC/BV-09-C [Sync to PA, LC3 44.1_1_1] Passed
BAP/BSNK/SCC/BV-10-C [Sync to PA, LC3 44.1_2_1] Passed
BAP/BSNK/SCC/BV-11-C [Sync to PA, LC3 48_1_1] Passed
BAP/BSNK/SCC/BV-12-C [Sync to PA, LC3 48_2_1] Passed
BAP/BSNK/SCC/BV-13-C [Sync to PA, LC3 48_3_1] Passed
BAP/BSNK/SCC/BV-14-C [Sync to PA, LC3 48_4_1] Passed
BAP/BSNK/SCC/BV-15-C [Sync to PA, LC3 48_5_1] Passed
BAP/BSNK/SCC/BV-16-C [Sync to PA, LC3 48_6_1] Passed
BAP/BSNK/SCC/BV-17-C [Sync to PA, LC3 8_1_2] Passed
BAP/BSNK/SCC/BV-18-C [Sync to PA, LC3 8_2_2] Passed
BAP/BSNK/SCC/BV-19-C [Sync to PA, LC3 16_1_2] Passed
BAP/BSNK/SCC/BV-20-C [Sync to PA, LC3 16_2_2] Passed
BAP/BSNK/SCC/BV-21-C [Sync to PA, LC3 24_1_2] Passed
BAP/BSNK/SCC/BV-22-C [Sync to PA, LC3 24_2_2] Passed
BAP/BSNK/SCC/BV-23-C [Sync to PA, LC3 32_1_2] Passed
BAP/BSNK/SCC/BV-24-C [Sync to PA, LC3 32_2_2] Passed
BAP/BSNK/SCC/BV-25-C [Sync to PA, LC3 44.1_1_2] Passed
BAP/BSNK/SCC/BV-26-C [Sync to PA, LC3 44.1_2_2] Passed
BAP/BSNK/SCC/BV-27-C [Sync to PA, LC3 48_1_2] Passed
BAP/BSNK/SCC/BV-28-C [Sync to PA, LC3 48_2_2] Passed
BAP/BSNK/SCC/BV-29-C [Sync to PA, LC3 48_3_2] Passed
BAP/BSNK/SCC/BV-30-C [Sync to PA, LC3 48_4_2] Passed
BAP/BSNK/SCC/BV-31-C [Sync to PA, LC3 48_5_2] Passed
BAP/BSNK/SCC/BV-32-C [Sync to PA, LC3 48_6_2] Passed
BAP/BSNK/SCC/BV-33-C [Sync to PA, VS] Passed
---
unit/test-bap.c | 299 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 299 insertions(+)

diff --git a/unit/test-bap.c b/unit/test-bap.c
index a6e24e605..46ee0e4e5 100644
--- a/unit/test-bap.c
+++ b/unit/test-bap.c
@@ -52,6 +52,7 @@ struct test_data {
struct bt_bap_pac *snk;
struct bt_bap_pac *src;
struct bt_bap_pac *bsrc;
+ struct bt_bap_pac *bsnk;
struct iovec *base;
struct iovec *caps;
struct test_config *cfg;
@@ -565,6 +566,59 @@ static void bsrc_state(struct bt_bap_stream *stream, uint8_t old_state,
}
}

+static void bsnk_pac_added(struct bt_bap_pac *pac, void *user_data)
+{
+ struct test_data *data = user_data;
+ struct bt_bap_pac *lpac;
+ struct iovec *cc;
+ struct bt_bap_codec codec = {0};
+
+ if (data->cfg->vs)
+ codec.id = 0xff;
+ else
+ codec.id = LC3_ID;
+
+ bt_bap_verify_bis(data->bap, 1, &codec,
+ &data->cfg->cc, NULL, &lpac, &cc);
+
+ g_assert(lpac);
+ g_assert(pac == lpac);
+ g_assert(cc);
+
+ bt_bap_pac_set_ops(pac, &bcast_pac_ops, NULL);
+
+ data->stream = bt_bap_stream_new(data->bap,
+ pac, NULL, &data->cfg->qos, cc);
+
+ g_assert(data->stream);
+
+ bt_bap_stream_config(data->stream, &data->cfg->qos,
+ cc, NULL, NULL);
+
+ util_iov_free(cc, 1);
+}
+
+static void bsnk_state(struct bt_bap_stream *stream, uint8_t old_state,
+ uint8_t new_state, void *user_data)
+{
+ struct test_data *data = user_data;
+ struct iovec *cc;
+
+ switch (new_state) {
+ case BT_BAP_STREAM_STATE_CONFIG:
+ /* Check that stream has been configured as expected */
+ cc = bt_bap_stream_get_config(stream);
+
+ g_assert(cc);
+ g_assert(cc->iov_len == data->cfg->cc.iov_len);
+ g_assert(memcmp(cc->iov_base, data->cfg->cc.iov_base,
+ cc->iov_len) == 0);
+
+ tester_test_passed();
+ break;
+ }
+}
+
static void test_bcast_config(struct test_data *data)
{
if (!data->cfg)
@@ -590,6 +644,27 @@ static void test_bcast_config(struct test_data *data)

g_assert(data->bsrc);
}
+
+ if (data->cfg->snk) {
+ bt_bap_pac_register(data->bap, bsnk_pac_added,
+ NULL, data, NULL);
+
+ if (data->cfg->vs)
+ data->bsnk = bt_bap_add_vendor_pac(data->db,
+ "test-bap-bsnk",
+ BT_BAP_BCAST_SINK,
+ 0xff, 0x0000, 0x0000,
+ NULL, data->caps,
+ NULL);
+ else
+ data->bsnk = bt_bap_add_pac(data->db, "test-bap-bsnk",
+ BT_BAP_BCAST_SINK,
+ LC3_ID,
+ NULL, data->caps,
+ NULL);
+
+ g_assert(data->bsnk);
+ }
}

static void test_bcast(const void *user_data)
@@ -626,6 +701,7 @@ static void test_teardown(const void *user_data)
bt_bap_remove_pac(data->snk);
bt_bap_remove_pac(data->src);
bt_bap_remove_pac(data->bsrc);
+ bt_bap_remove_pac(data->bsnk);
gatt_db_unref(data->db);

tester_teardown_complete();
@@ -6045,6 +6121,228 @@ static void test_bsrc_scc(void)
NULL, test_bcast, &cfg_bsrc_vs, IOV_NULL);
}

+static struct test_config cfg_bsnk_8_1 = {
+ .cc = LC3_CONFIG_8_1,
+ .qos = QOS_BCAST,
+ .snk = true,
+ .state_func = bsnk_state,
+};
+
+static struct test_config cfg_bsnk_8_2 = {
+ .cc = LC3_CONFIG_8_2,
+ .qos = QOS_BCAST,
+ .snk = true,
+ .state_func = bsnk_state,
+};
+
+static struct test_config cfg_bsnk_16_1 = {
+ .cc = LC3_CONFIG_16_1,
+ .qos = QOS_BCAST,
+ .snk = true,
+ .state_func = bsnk_state,
+};
+
+static struct test_config cfg_bsnk_16_2 = {
+ .cc = LC3_CONFIG_16_2,
+ .qos = QOS_BCAST,
+ .snk = true,
+ .state_func = bsnk_state,
+};
+
+static struct test_config cfg_bsnk_24_1 = {
+ .cc = LC3_CONFIG_24_1,
+ .qos = QOS_BCAST,
+ .snk = true,
+ .state_func = bsnk_state,
+};
+
+static struct test_config cfg_bsnk_24_2 = {
+ .cc = LC3_CONFIG_24_2,
+ .qos = QOS_BCAST,
+ .snk = true,
+ .state_func = bsnk_state,
+};
+
+static struct test_config cfg_bsnk_32_1 = {
+ .cc = LC3_CONFIG_32_1,
+ .qos = QOS_BCAST,
+ .snk = true,
+ .state_func = bsnk_state,
+};
+
+static struct test_config cfg_bsnk_32_2 = {
+ .cc = LC3_CONFIG_32_2,
+ .qos = QOS_BCAST,
+ .snk = true,
+ .state_func = bsnk_state,
+};
+
+static struct test_config cfg_bsnk_44_1 = {
+ .cc = LC3_CONFIG_44_1,
+ .qos = QOS_BCAST,
+ .snk = true,
+ .state_func = bsnk_state,
+};
+
+static struct test_config cfg_bsnk_44_2 = {
+ .cc = LC3_CONFIG_44_2,
+ .qos = QOS_BCAST,
+ .snk = true,
+ .state_func = bsnk_state,
+};
+
+static struct test_config cfg_bsnk_48_1 = {
+ .cc = LC3_CONFIG_48_1,
+ .qos = QOS_BCAST,
+ .snk = true,
+ .state_func = bsnk_state,
+};
+
+static struct test_config cfg_bsnk_48_2 = {
+ .cc = LC3_CONFIG_48_2,
+ .qos = QOS_BCAST,
+ .snk = true,
+ .state_func = bsnk_state,
+};
+
+static struct test_config cfg_bsnk_48_3 = {
+ .cc = LC3_CONFIG_48_3,
+ .qos = QOS_BCAST,
+ .snk = true,
+ .state_func = bsnk_state,
+};
+
+static struct test_config cfg_bsnk_48_4 = {
+ .cc = LC3_CONFIG_48_4,
+ .qos = QOS_BCAST,
+ .snk = true,
+ .state_func = bsnk_state,
+};
+
+static struct test_config cfg_bsnk_48_5 = {
+ .cc = LC3_CONFIG_48_5,
+ .qos = QOS_BCAST,
+ .snk = true,
+ .state_func = bsnk_state,
+};
+
+static struct test_config cfg_bsnk_48_6 = {
+ .cc = LC3_CONFIG_48_6,
+ .qos = QOS_BCAST,
+ .snk = true,
+ .state_func = bsnk_state,
+};
+
+static struct test_config cfg_bsnk_vs = {
+ .cc = UTIL_IOV_INIT(VS_CC),
+ .qos = QOS_BCAST,
+ .snk = true,
+ .vs = true,
+ .state_func = bsnk_state,
+};
+
+static void test_bsnk_scc(void)
+{
+ define_test("BAP/BSNK/SCC/BV-01-C [Sync to PA, LC3 8_1_1]",
+ NULL, test_bcast, &cfg_bsnk_8_1, IOV_NULL);
+
+ define_test("BAP/BSNK/SCC/BV-02-C [Sync to PA, LC3 8_2_1]",
+ NULL, test_bcast, &cfg_bsnk_8_2, IOV_NULL);
+
+ define_test("BAP/BSNK/SCC/BV-03-C [Sync to PA, LC3 16_1_1]",
+ NULL, test_bcast, &cfg_bsnk_16_1, IOV_NULL);
+
+ define_test("BAP/BSNK/SCC/BV-04-C [Sync to PA, LC3 16_2_1]",
+ NULL, test_bcast, &cfg_bsnk_16_2, IOV_NULL);
+
+ define_test("BAP/BSNK/SCC/BV-05-C [Sync to PA, LC3 24_1_1]",
+ NULL, test_bcast, &cfg_bsnk_24_1, IOV_NULL);
+
+ define_test("BAP/BSNK/SCC/BV-06-C [Sync to PA, LC3 24_2_1]",
+ NULL, test_bcast, &cfg_bsnk_24_2, IOV_NULL);
+
+ define_test("BAP/BSNK/SCC/BV-07-C [Sync to PA, LC3 32_1_1]",
+ NULL, test_bcast, &cfg_bsnk_32_1, IOV_NULL);
+
+ define_test("BAP/BSNK/SCC/BV-08-C [Sync to PA, LC3 32_2_1]",
+ NULL, test_bcast, &cfg_bsnk_32_2, IOV_NULL);
+
+ define_test("BAP/BSNK/SCC/BV-09-C [Sync to PA, LC3 44.1_1_1]",
+ NULL, test_bcast, &cfg_bsnk_44_1, IOV_NULL);
+
+ define_test("BAP/BSNK/SCC/BV-10-C [Sync to PA, LC3 44.1_2_1]",
+ NULL, test_bcast, &cfg_bsnk_44_2, IOV_NULL);
+
+ define_test("BAP/BSNK/SCC/BV-11-C [Sync to PA, LC3 48_1_1]",
+ NULL, test_bcast, &cfg_bsnk_48_1, IOV_NULL);
+
+ define_test("BAP/BSNK/SCC/BV-12-C [Sync to PA, LC3 48_2_1]",
+ NULL, test_bcast, &cfg_bsnk_48_2, IOV_NULL);
+
+ define_test("BAP/BSNK/SCC/BV-13-C [Sync to PA, LC3 48_3_1]",
+ NULL, test_bcast, &cfg_bsnk_48_3, IOV_NULL);
+
+ define_test("BAP/BSNK/SCC/BV-14-C [Sync to PA, LC3 48_4_1]",
+ NULL, test_bcast, &cfg_bsnk_48_4, IOV_NULL);
+
+ define_test("BAP/BSNK/SCC/BV-15-C [Sync to PA, LC3 48_5_1]",
+ NULL, test_bcast, &cfg_bsnk_48_5, IOV_NULL);
+
+ define_test("BAP/BSNK/SCC/BV-16-C [Sync to PA, LC3 48_6_1]",
+ NULL, test_bcast, &cfg_bsnk_48_6, IOV_NULL);
+
+ define_test("BAP/BSNK/SCC/BV-17-C [Sync to PA, LC3 8_1_2]",
+ NULL, test_bcast, &cfg_bsnk_8_1, IOV_NULL);
+
+ define_test("BAP/BSNK/SCC/BV-18-C [Sync to PA, LC3 8_2_2]",
+ NULL, test_bcast, &cfg_bsnk_8_2, IOV_NULL);
+
+ define_test("BAP/BSNK/SCC/BV-19-C [Sync to PA, LC3 16_1_2]",
+ NULL, test_bcast, &cfg_bsnk_16_1, IOV_NULL);
+
+ define_test("BAP/BSNK/SCC/BV-20-C [Sync to PA, LC3 16_2_2]",
+ NULL, test_bcast, &cfg_bsnk_16_2, IOV_NULL);
+
+ define_test("BAP/BSNK/SCC/BV-21-C [Sync to PA, LC3 24_1_2]",
+ NULL, test_bcast, &cfg_bsnk_24_1, IOV_NULL);
+
+ define_test("BAP/BSNK/SCC/BV-22-C [Sync to PA, LC3 24_2_2]",
+ NULL, test_bcast, &cfg_bsnk_24_2, IOV_NULL);
+
+ define_test("BAP/BSNK/SCC/BV-23-C [Sync to PA, LC3 32_1_2]",
+ NULL, test_bcast, &cfg_bsnk_32_1, IOV_NULL);
+
+ define_test("BAP/BSNK/SCC/BV-24-C [Sync to PA, LC3 32_2_2]",
+ NULL, test_bcast, &cfg_bsnk_32_2, IOV_NULL);
+
+ define_test("BAP/BSNK/SCC/BV-25-C [Sync to PA, LC3 44.1_1_2]",
+ NULL, test_bcast, &cfg_bsnk_44_1, IOV_NULL);
+
+ define_test("BAP/BSNK/SCC/BV-26-C [Sync to PA, LC3 44.1_2_2]",
+ NULL, test_bcast, &cfg_bsnk_44_2, IOV_NULL);
+
+ define_test("BAP/BSNK/SCC/BV-27-C [Sync to PA, LC3 48_1_2]",
+ NULL, test_bcast, &cfg_bsnk_48_1, IOV_NULL);
+
+ define_test("BAP/BSNK/SCC/BV-28-C [Sync to PA, LC3 48_2_2]",
+ NULL, test_bcast, &cfg_bsnk_48_2, IOV_NULL);
+
+ define_test("BAP/BSNK/SCC/BV-29-C [Sync to PA, LC3 48_3_2]",
+ NULL, test_bcast, &cfg_bsnk_48_3, IOV_NULL);
+
+ define_test("BAP/BSNK/SCC/BV-30-C [Sync to PA, LC3 48_4_2]",
+ NULL, test_bcast, &cfg_bsnk_48_4, IOV_NULL);
+
+ define_test("BAP/BSNK/SCC/BV-31-C [Sync to PA, LC3 48_5_2]",
+ NULL, test_bcast, &cfg_bsnk_48_5, IOV_NULL);
+
+ define_test("BAP/BSNK/SCC/BV-32-C [Sync to PA, LC3 48_6_2]",
+ NULL, test_bcast, &cfg_bsnk_48_6, IOV_NULL);
+
+ define_test("BAP/BSNK/SCC/BV-33-C [Sync to PA, VS]",
+ NULL, test_bcast, &cfg_bsnk_vs, IOV_NULL);
+}
+
int main(int argc, char *argv[])
{
tester_init(&argc, &argv);
@@ -6052,6 +6350,7 @@ int main(int argc, char *argv[])
test_disc();
test_scc();
test_bsrc_scc();
+ test_bsnk_scc();

return tester_run();
}
--
2.39.2


2024-05-17 15:40:40

by patchwork-bot+bluetooth

[permalink] [raw]
Subject: Re: [PATCH BlueZ 0/5] test-bap: Add Broadcast Sink SCC tests

Hello:

This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <[email protected]>:

On Fri, 17 May 2024 15:34:31 +0300 you wrote:
> This patch adds BAP unit tests for Broadcast Sink Stream Configuration
> (4.13.2 Broadcast Sink Synchronizes to PA - page 177).
>
> Some shared/bap and test-bap fixes have been added for successful test
> implementation.
>
> Iulia Tanasescu (5):
> shared/bap: Handle NULL caps at bis verify
> shared/bap: Add detach stream op
> test-bap: Update caps to accommodate 8_1 config
> test-bap: Make test_bsrc generic
> test-bap: Add Broadcast Sink SCC tests
>
> [...]

Here is the summary with links:
- [BlueZ,1/5] shared/bap: Handle NULL caps at bis verify
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=f473d4404679
- [BlueZ,2/5] shared/bap: Add detach stream op
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=cd3540107f25
- [BlueZ,3/5] test-bap: Update caps to accommodate 8_1 config
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=61ed4b4b60c3
- [BlueZ,4/5] test-bap: Make test_bsrc generic
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=94c1c776ca25
- [BlueZ,5/5] test-bap: Add Broadcast Sink SCC tests
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=62d38d6c9ef4

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



2024-05-17 16:03:35

by bluez.test.bot

[permalink] [raw]
Subject: RE: test-bap: Add Broadcast Sink SCC tests

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=853984

---Test result---

Test Summary:
CheckPatch PASS 3.36 seconds
GitLint PASS 1.73 seconds
BuildEll PASS 24.25 seconds
BluezMake PASS 1748.84 seconds
MakeCheck PASS 13.18 seconds
MakeDistcheck PASS 181.70 seconds
CheckValgrind PASS 254.18 seconds
CheckSmatch WARNING 353.25 seconds
bluezmakeextell PASS 122.98 seconds
IncrementalBuild PASS 7837.32 seconds
ScanBuild PASS 998.38 seconds

Details
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
src/shared/bap.c:286:25: warning: array of flexible structuressrc/shared/bap.c: note: in included file:./src/shared/ascs.h:88:25: warning: array of flexible structuressrc/shared/bap.c:286:25: warning: array of flexible structuressrc/shared/bap.c: note: in included file:./src/shared/ascs.h:88:25: warning: array of flexible structuressrc/shared/bap.c:286:25: warning: array of flexible structuressrc/shared/bap.c: note: in included file:./src/shared/ascs.h:88:25: warning: array of flexible structuressrc/shared/bap.c:286:25: warning: array of flexible structuressrc/shared/bap.c: note: in included file:./src/shared/ascs.h:88:25: warning: array of flexible structuressrc/shared/bap.c:286:25: warning: array of flexible structuressrc/shared/bap.c: note: in included file:./src/shared/ascs.h:88:25: warning: array of flexible structuressrc/shared/bap.c:286:25: warning: array of flexible structuressrc/shared/bap.c: note: in included file:./src/shared/ascs.h:88:25: warning: array of flexible struct
ures


---
Regards,
Linux Bluetooth