Skip to content

Commit b80fddd

Browse files
Thalleykoffes
authored andcommitted
[nrf fromtree] Bluetooth: Tester: Added flag parameter to CAP stop cmd
Added a flag parameter so that it is possible to use the bt_cap_initiator_unicast_audio_stop to perform disable+stop without releasing the streams by setting the RELEASE flag. This allows us to use the bt_cap_initiator_unicast_audio_stop function to just disable streams without releasing them, as that is requested by some PTS tests such as CAP/INI/UST/BV-40-C. Signed-off-by: Emil Gydesen <[email protected]> (cherry picked from commit 0fa9701)
1 parent c85c77c commit b80fddd

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

tests/bluetooth/tester/src/audio/btp/btp_cap.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ struct btp_cap_unicast_audio_update_data {
6060
#define BTP_CAP_UNICAST_AUDIO_STOP 0x06
6161
struct btp_cap_unicast_audio_stop_cmd {
6262
uint8_t cig_id;
63+
uint8_t flags;
6364
} __packed;
65+
#define BTP_CAP_UNICAST_AUDIO_STOP_FLAG_RELEASE BIT(0)
6466

6567
#define BTP_CAP_BROADCAST_SOURCE_SETUP_STREAM 0x07
6668
struct btp_cap_broadcast_source_setup_stream_cmd {

tests/bluetooth/tester/src/audio/btp_cap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ static uint8_t btp_cap_unicast_audio_stop(const void *cmd, uint16_t cmd_len,
438438
param.streams = streams;
439439
param.count = stream_cnt;
440440
param.type = BT_CAP_SET_TYPE_AD_HOC;
441-
param.release = true;
441+
param.release = (cp->flags & BTP_CAP_UNICAST_AUDIO_STOP_FLAG_RELEASE) != 0;
442442

443443
err = bt_cap_initiator_unicast_audio_stop(&param);
444444
if (err != 0) {

0 commit comments

Comments
 (0)