Commit daf7c80c authored by Vinayak Kariappa Chettimada's avatar Vinayak Kariappa Chettimada Committed by Carles Cufi
Browse files

tests: bsim: Bluetooth: CAP broadcast AC testing updates



Update testing of the Audio Configurations from the BAP
spec using the CAP API.

Signed-off-by: default avatarVinayak Kariappa Chettimada <vich@nordicsemi.no>
parent 197336c8
Loading
Loading
Loading
Loading
+17 −2
Original line number Diff line number Diff line
@@ -15,6 +15,21 @@
#include "bap_common.h"
#include "common.h"

/* Zephyr Controller works best while Extended Advertising interval to be a multiple
 * of the ISO Interval minus 10 ms (max. advertising random delay). This is
 * required to place the AUX_ADV_IND PDUs in a non-overlapping interval with the
 * Broadcast ISO radio events.
 */
#define BT_LE_EXT_ADV_CUSTOM \
		BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | \
				BT_LE_ADV_OPT_USE_NAME, \
				0x0080, 0x0080, NULL)

#define BT_LE_PER_ADV_CUSTOM \
		BT_LE_PER_ADV_PARAM(0x0048, \
				    0x0048, \
				    BT_LE_PER_ADV_OPT_NONE)

#define BROADCAST_STREMT_CNT    CONFIG_BT_BAP_BROADCAST_SRC_STREAM_COUNT
#define BROADCAST_ENQUEUE_COUNT 2U
#define TOTAL_BUF_NEEDED        (BROADCAST_ENQUEUE_COUNT * BROADCAST_STREMT_CNT)
@@ -171,14 +186,14 @@ static void setup_extended_adv(struct bt_le_ext_adv **adv)
	int err;

	/* Create a non-connectable non-scannable advertising set */
	err = bt_le_ext_adv_create(BT_LE_EXT_ADV_NCONN_NAME, NULL, adv);
	err = bt_le_ext_adv_create(BT_LE_EXT_ADV_CUSTOM, NULL, adv);
	if (err != 0) {
		FAIL("Unable to create extended advertising set: %d\n", err);
		return;
	}

	/* Set periodic advertising parameters */
	err = bt_le_per_adv_set_param(*adv, BT_LE_PER_ADV_DEFAULT);
	err = bt_le_per_adv_set_param(*adv, BT_LE_PER_ADV_CUSTOM);
	if (err) {
		FAIL("Failed to set periodic advertising parameters: %d\n", err);
		return;
+17 −2
Original line number Diff line number Diff line
@@ -17,6 +17,21 @@
#include "common.h"
#include "bap_common.h"

/* Zephyr Controller works best while Extended Advertising interval to be a multiple
 * of the ISO Interval minus 10 ms (max. advertising random delay). This is
 * required to place the AUX_ADV_IND PDUs in a non-overlapping interval with the
 * Broadcast ISO radio events.
 */
#define BT_LE_EXT_ADV_CUSTOM \
		BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | \
				BT_LE_ADV_OPT_USE_NAME, \
				0x0080, 0x0080, NULL)

#define BT_LE_PER_ADV_CUSTOM \
		BT_LE_PER_ADV_PARAM(0x0048, \
				    0x0048, \
				    BT_LE_PER_ADV_OPT_NONE)

#define UNICAST_SINK_SUPPORTED (CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SNK_COUNT > 0)
#define UNICAST_SRC_SUPPORTED  (CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SRC_COUNT > 0)

@@ -973,14 +988,14 @@ static void setup_extended_adv(struct bt_le_ext_adv **adv)
	int err;

	/* Create a non-connectable non-scannable advertising set */
	err = bt_le_ext_adv_create(BT_LE_EXT_ADV_NCONN_NAME, NULL, adv);
	err = bt_le_ext_adv_create(BT_LE_EXT_ADV_CUSTOM, NULL, adv);
	if (err != 0) {
		FAIL("Unable to create extended advertising set: %d\n", err);
		return;
	}

	/* Set periodic advertising parameters */
	err = bt_le_per_adv_set_param(*adv, BT_LE_PER_ADV_DEFAULT);
	err = bt_le_per_adv_set_param(*adv, BT_LE_PER_ADV_CUSTOM);
	if (err) {
		FAIL("Failed to set periodic advertising parameters: %d\n", err);
		return;
+5 −5
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
#
# SPDX-License-Identifier: Apache-2.0

SIMULATION_ID="cap_unicast_ac_12"
SIMULATION_ID="cap_broadcast_ac_12"
VERBOSITY_LEVEL=2
EXECUTE_TIMEOUT=60

@@ -41,13 +41,13 @@ Execute_AC_12 24_1_1
Execute_AC_12 24_2_1
Execute_AC_12 32_1_1
Execute_AC_12 32_2_1
# Execute_AC_12 441_1_1 # BT_ISO_FLAGS_ERROR
Execute_AC_12 441_1_1
Execute_AC_12 441_2_1
# Execute_AC_12 48_1_1 # BT_ISO_FLAGS_ERROR
Execute_AC_12 48_1_1
Execute_AC_12 48_2_1
# Execute_AC_12 48_3_1 # BT_ISO_FLAGS_ERROR
Execute_AC_12 48_3_1
Execute_AC_12 48_4_1
# Execute_AC_12 48_5_1 # BT_ISO_FLAGS_ERROR
Execute_AC_12 48_5_1
Execute_AC_12 48_6_1

# High reliability
+13 −13
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
#
# SPDX-License-Identifier: Apache-2.0

SIMULATION_ID="cap_unicast_ac_13"
SIMULATION_ID="cap_broadcast_ac_13"
VERBOSITY_LEVEL=2
EXECUTE_TIMEOUT=60

@@ -32,22 +32,22 @@ function Execute_AC_13() {

set -e # Exit on error

# Execute_AC_13 8_1_1 # BT_ISO_FLAGS_ERROR
Execute_AC_13 8_1_1
Execute_AC_13 8_2_1
# Execute_AC_13 16_1_1 # BT_ISO_FLAGS_ERROR
Execute_AC_13 16_1_1
Execute_AC_13 16_2_1
# Execute_AC_13 24_1_1 # BT_ISO_FLAGS_ERROR
Execute_AC_13 24_1_1
Execute_AC_13 24_2_1
# Execute_AC_13 32_1_1 # BT_ISO_FLAGS_ERROR
Execute_AC_13 32_1_1
Execute_AC_13 32_2_1
# Execute_AC_13 441_1_1 # BT_ISO_FLAGS_ERROR
# Execute_AC_13 441_2_1 # BT_ISO_FLAGS_ERROR
# Execute_AC_13 48_1_1 # BT_ISO_FLAGS_ERROR
# Execute_AC_13 48_2_1 # BT_ISO_FLAGS_ERROR
# Execute_AC_13 48_3_1 # BT_ISO_FLAGS_ERROR
# Execute_AC_13 48_4_1 # BT_ISO_FLAGS_ERROR
# Execute_AC_13 48_5_1 # BT_ISO_FLAGS_ERROR
# Execute_AC_13 48_6_1 # BT_ISO_FLAGS_ERROR
Execute_AC_13 441_1_1
Execute_AC_13 441_2_1
Execute_AC_13 48_1_1
Execute_AC_13 48_2_1
Execute_AC_13 48_3_1
Execute_AC_13 48_4_1
Execute_AC_13 48_5_1
Execute_AC_13 48_6_1

# High reliability
# Execute_AC_13 8_1_2 # BT_ISO_FLAGS_ERROR
+7 −7
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
#
# SPDX-License-Identifier: Apache-2.0

SIMULATION_ID="cap_unicast_ac_14"
SIMULATION_ID="cap_broadcast_ac_14"
VERBOSITY_LEVEL=2
EXECUTE_TIMEOUT=60

@@ -41,14 +41,14 @@ Execute_AC_14 24_1_1
Execute_AC_14 24_2_1
Execute_AC_14 32_1_1
Execute_AC_14 32_2_1
# Execute_AC_14 441_1_1 # BT_ISO_FLAGS_ERROR
# Execute_AC_14 441_2_1 # Failed to create BIG: -22
# Execute_AC_14 48_1_1 # BT_ISO_FLAGS_ERROR
Execute_AC_14 441_1_1
Execute_AC_14 441_2_1
Execute_AC_14 48_1_1
Execute_AC_14 48_2_1
# Execute_AC_14 48_3_1 # BT_ISO_FLAGS_ERROR
Execute_AC_14 48_3_1
Execute_AC_14 48_4_1
# Execute_AC_14 48_5_1 # BT_ISO_FLAGS_ERROR
# Execute_AC_14 48_6_1 # Failed to create BIG: -22
Execute_AC_14 48_5_1
Execute_AC_14 48_6_1

# High reliability
# Execute_AC_14 8_1_2 # BT_ISO_FLAGS_ERROR
Loading