forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bluetooth: tester: Add ASCS and BAP tests handling
Support for tests that use ASCS operations Codec Config, Config QOS, Enable, Disable, Update Metadata, Release. Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
- Loading branch information
1 parent
9772e03
commit 196261d
Showing
9 changed files
with
1,453 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
/* btp_bap.h - Bluetooth tester headers */ | ||
|
||
/* | ||
* Copyright (c) 2023 Codecoup | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/* ASCS commands */ | ||
#define BTP_ASCS_READ_SUPPORTED_COMMANDS 0x01 | ||
struct btp_ascs_read_supported_commands_rp { | ||
uint8_t data[0]; | ||
} __packed; | ||
|
||
#define BTP_ASCS_CONFIGURE_CODEC 0x02 | ||
struct btp_ascs_configure_codec_cmd { | ||
bt_addr_le_t address; | ||
uint8_t ase_id; | ||
uint8_t coding_format; | ||
uint8_t freq; | ||
uint8_t frame_duration; | ||
uint32_t audio_locations; | ||
uint16_t octets_per_frame; | ||
} __packed; | ||
|
||
#define BTP_ASCS_CONFIGURE_QOS 0x03 | ||
struct btp_ascs_configure_qos_cmd { | ||
bt_addr_le_t address; | ||
uint8_t ase_id; | ||
uint8_t cig_id; | ||
uint8_t cis_id; | ||
uint16_t sdu_interval; | ||
uint8_t framing; | ||
uint16_t max_sdu; | ||
uint8_t retransmission_num; | ||
uint8_t max_transport_latency; | ||
} __packed; | ||
|
||
#define BTP_ASCS_ENABLE 0x04 | ||
struct btp_ascs_enable_cmd { | ||
bt_addr_le_t address; | ||
uint8_t ase_id; | ||
} __packed; | ||
|
||
#define BTP_ASCS_RECEIVER_START_READY 0x05 | ||
struct btp_ascs_receiver_start_ready_cmd { | ||
bt_addr_le_t address; | ||
uint8_t ase_id; | ||
} __packed; | ||
|
||
#define BTP_ASCS_RECEIVER_STOP_READY 0x06 | ||
struct btp_ascs_receiver_stop_ready_cmd { | ||
bt_addr_le_t address; | ||
uint8_t ase_id; | ||
} __packed; | ||
|
||
#define BTP_ASCS_DISABLE 0x07 | ||
struct btp_ascs_disable_cmd { | ||
bt_addr_le_t address; | ||
uint8_t ase_id; | ||
} __packed; | ||
|
||
#define BTP_ASCS_RELEASE 0x08 | ||
struct btp_ascs_release_cmd { | ||
bt_addr_le_t address; | ||
uint8_t ase_id; | ||
} __packed; | ||
|
||
#define BTP_ASCS_UPDATE_METADATA 0x09 | ||
struct btp_ascs_update_metadata_cmd { | ||
bt_addr_le_t address; | ||
uint8_t ase_id; | ||
} __packed; | ||
|
||
/* ASCS events */ | ||
#define BTP_ASCS_EV_OPERATION_COMPLETED 0x80 | ||
struct btp_ascs_operation_completed_ev { | ||
bt_addr_le_t address; | ||
uint8_t ase_id; | ||
uint8_t opcode; | ||
uint8_t status; | ||
|
||
/* RFU */ | ||
uint8_t flags; | ||
} __packed; | ||
|
||
#define BTP_ASCS_STATUS_SUCCESS 0x00 | ||
#define BTP_ASCS_STATUS_FAILED 0x01 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* btp_bap.h - Bluetooth tester headers */ | ||
|
||
/* | ||
* Copyright (c) 2023 Codecoup | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/* PACS commands */ | ||
#define BTP_PACS_READ_SUPPORTED_COMMANDS 0x01 | ||
struct btp_pacs_read_supported_commands_rp { | ||
uint8_t data[0]; | ||
} __packed; | ||
|
||
#define BTP_PACS_CHARACTERISTIC_SINK_PAC 0x01 | ||
#define BTP_PACS_CHARACTERISTIC_SOURCE_PAC 0x02 | ||
#define BTP_PACS_CHARACTERISTIC_SINK_AUDIO_LOCATIONS 0x03 | ||
#define BTP_PACS_CHARACTERISTIC_SOURCE_AUDIO_LOCATIONS 0x04 | ||
#define BTP_PACS_CHARACTERISTIC_AVAILABLE_AUDIO_CONTEXTS 0x05 | ||
#define BTP_PACS_CHARACTERISTIC_SUPPORTED_AUDIO_CONTEXTS 0x06 | ||
|
||
#define BTP_PACS_UPDATE_CHARACTERISTIC 0x02 | ||
struct btp_pacs_update_characteristic_cmd { | ||
uint8_t characteristic; | ||
} __packed; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.