File tree Expand file tree Collapse file tree 3 files changed +18
-13
lines changed
tests/bsim/bluetooth/audio Expand file tree Collapse file tree 3 files changed +18
-13
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (c) 2023 Nordic Semiconductor ASA
2
+ * Copyright (c) 2023-2025 Nordic Semiconductor ASA
3
3
*
4
4
* SPDX-License-Identifier: Apache-2.0
5
5
*/
@@ -771,12 +771,6 @@ static void discover_bass(size_t acceptor_cnt)
771
771
{
772
772
k_sem_reset (& sem_bass_discovered );
773
773
774
- if (acceptor_cnt > 1 ) {
775
- FAIL ("Current implementation does not support multiple connections for the "
776
- "broadcast assistant" );
777
- return ;
778
- }
779
-
780
774
for (size_t i = 0U ; i < acceptor_cnt ; i ++ ) {
781
775
int err ;
782
776
@@ -1215,15 +1209,21 @@ static void test_main_cap_commander_broadcast_reception(void)
1215
1209
1216
1210
test_distribute_broadcast_code (acceptor_count );
1217
1211
1218
- backchannel_sync_wait_any (); /* wait for the acceptor to receive data */
1212
+ for (size_t i = 0U ; i < acceptor_count ; i ++ ) {
1213
+ backchannel_sync_wait_any (); /* wait for the acceptor to receive data */
1214
+ }
1219
1215
1220
1216
test_broadcast_reception_stop (acceptor_count );
1221
1217
1222
- backchannel_sync_wait_any (); /* wait for the acceptor to stop reception */
1218
+ for (size_t i = 0U ; i < acceptor_count ; i ++ ) {
1219
+ backchannel_sync_wait_any (); /* wait for the acceptor to stop reception */
1220
+ }
1223
1221
1224
1222
/* Disconnect all CAP acceptors */
1225
1223
disconnect_acl (acceptor_count );
1226
1224
1225
+ backchannel_sync_send_all (); /* let others know we have received what we wanted */
1226
+
1227
1227
PASS ("Broadcast reception passed\n" );
1228
1228
}
1229
1229
Original file line number Diff line number Diff line change 37
37
#if defined(CONFIG_BT_CAP_INITIATOR ) && defined(CONFIG_BT_BAP_BROADCAST_SOURCE )
38
38
CREATE_FLAG (flag_source_started );
39
39
40
- #define BROADCAST_STREMT_CNT CONFIG_BT_BAP_BROADCAST_SRC_STREAM_COUNT
41
40
#define CAP_AC_MAX_STREAM 2
42
41
#define LOCATION (BT_AUDIO_LOCATION_FRONT_LEFT | BT_AUDIO_LOCATION_FRONT_RIGHT)
43
42
#define CONTEXT (BT_AUDIO_CONTEXT_TYPE_MEDIA)
43
+ #define BROADCAST_STREMT_CNT MIN(CAP_AC_MAX_STREAM, CONFIG_BT_BAP_BROADCAST_SRC_STREAM_COUNT)
44
44
45
45
struct cap_initiator_ac_param {
46
46
char * name ;
@@ -673,7 +673,8 @@ static void test_main_cap_initiator_broadcast(void)
673
673
WAIT_FOR_FLAG (flag_source_started );
674
674
675
675
/* Wait for other devices to have received the data they wanted */
676
- backchannel_sync_wait_any ();
676
+ printk ("Waiting for broadcast stop signal" );
677
+ backchannel_sync_wait_all ();
677
678
678
679
test_broadcast_audio_tx_sync ();
679
680
Original file line number Diff line number Diff line change 6
6
7
7
SIMULATION_ID=" cap_broadcast_reception"
8
8
VERBOSITY_LEVEL=2
9
- NR_OF_DEVICES=3
9
+ NR_OF_DEVICES=4
10
10
EXECUTE_TIMEOUT=180
11
11
12
12
source ${ZEPHYR_BASE} /tests/bsim/sh_common.source
@@ -20,13 +20,17 @@ Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_audio_prj_conf \
20
20
-RealEncryption=1 -rs=46 -D=${NR_OF_DEVICES}
21
21
22
22
Execute ./bs_${BOARD_TS} _tests_bsim_bluetooth_audio_prj_conf \
23
- -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=1 -testid=broadcast_source \
23
+ -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=1 -testid=cap_initiator_broadcast \
24
24
-RealEncryption=1 -rs=23 -D=${NR_OF_DEVICES}
25
25
26
26
Execute ./bs_${BOARD_TS} _tests_bsim_bluetooth_audio_prj_conf \
27
27
-v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=2 -testid=cap_acceptor_broadcast_reception \
28
28
-RealEncryption=1 -rs=69 -D=${NR_OF_DEVICES} -start_offset=7e3
29
29
30
+ Execute ./bs_${BOARD_TS} _tests_bsim_bluetooth_audio_prj_conf \
31
+ -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=3 -testid=cap_acceptor_broadcast_reception \
32
+ -RealEncryption=1 -rs=87 -D=${NR_OF_DEVICES} -start_offset=7e3
33
+
30
34
# Simulation time should be larger than the WAIT_TIME in common.h
31
35
Execute ./bs_2G4_phy_v1 -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} \
32
36
-D=${NR_OF_DEVICES} -sim_length=60e6 $@
You can’t perform that action at this time.
0 commit comments