Bluetooth: Audio: Spring cleaning

Adds, removes and modifies includes in all LE audio
files.

Fixes any found spelling mistakes as well.

Fixes a few places where incorrect types were used.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
Emil Gydesen 2024-05-20 19:40:04 +02:00 committed by Alberto Escolar
commit ebadb11645
146 changed files with 1912 additions and 600 deletions

View file

@ -4,7 +4,18 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <stddef.h>
#include <stdint.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/byteorder.h>
#include <zephyr/bluetooth/gap.h>
#include <zephyr/bluetooth/uuid.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/util.h>
#include "bstests.h"
#include "common.h"
extern enum bst_result_t bst_result;

View file

@ -4,14 +4,30 @@
* SPDX-License-Identifier: Apache-2.0
*/
#ifdef CONFIG_BT_BAP_BROADCAST_ASSISTANT
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/hci.h>
#include <zephyr/autoconf.h>
#include <zephyr/bluetooth/audio/audio.h>
#include <zephyr/bluetooth/audio/bap.h>
#include <zephyr/bluetooth/addr.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/gap.h>
#include <zephyr/bluetooth/gatt.h>
#include <zephyr/bluetooth/hci.h>
#include <zephyr/bluetooth/uuid.h>
#include <zephyr/net/buf.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/util.h>
#include <zephyr/sys/util_macro.h>
#include "../../../../../subsys/bluetooth/host/hci_core.h"
#include "common.h"
#include "bap_common.h"
#include "bstests.h"
#ifdef CONFIG_BT_BAP_BROADCAST_ASSISTANT
extern enum bst_result_t bst_result;

View file

@ -4,16 +4,36 @@
* SPDX-License-Identifier: Apache-2.0
*/
#if defined(CONFIG_BT_BAP_BROADCAST_SINK)
#include <errno.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/autoconf.h>
#include <zephyr/autoconf.h>
#include <zephyr/bluetooth/addr.h>
#include <zephyr/bluetooth/audio/audio.h>
#include <zephyr/bluetooth/audio/bap.h>
#include <zephyr/bluetooth/audio/bap_lc3_preset.h>
#include <zephyr/bluetooth/audio/lc3.h>
#include <zephyr/bluetooth/audio/pacs.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/gap.h>
#include <zephyr/bluetooth/iso.h>
#include <zephyr/bluetooth/uuid.h>
#include <zephyr/kernel.h>
#include <zephyr/net/buf.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/util.h>
#include <zephyr/sys/util_macro.h>
#include <zephyr/toolchain.h>
#include "bstests.h"
#include "common.h"
#if defined(CONFIG_BT_BAP_BROADCAST_SINK)
extern enum bst_result_t bst_result;
CREATE_FLAG(broadcaster_found);

View file

@ -3,15 +3,31 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#if defined(CONFIG_BT_BAP_BROADCAST_SOURCE)
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/autoconf.h>
#include <zephyr/bluetooth/audio/audio.h>
#include <zephyr/bluetooth/audio/bap.h>
#include <zephyr/bluetooth/audio/bap_lc3_preset.h>
#include <zephyr/bluetooth/audio/lc3.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/byteorder.h>
#include <zephyr/bluetooth/gap.h>
#include <zephyr/bluetooth/iso.h>
#include <zephyr/bluetooth/uuid.h>
#include <zephyr/kernel.h>
#include <zephyr/net/buf.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/util.h>
#include <zephyr/toolchain.h>
#include "bstests.h"
#include "common.h"
#if defined(CONFIG_BT_BAP_BROADCAST_SOURCE)
/* When BROADCAST_ENQUEUE_COUNT > 1 we can enqueue enough buffers to ensure that
* the controller is never idle
*/

View file

@ -4,7 +4,16 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include <zephyr/bluetooth/audio/audio.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/hci_types.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/sys/printk.h>
#include "common.h"
#include "bap_common.h"

View file

@ -9,10 +9,13 @@
#ifndef ZEPHYR_TEST_BSIM_BT_AUDIO_TEST_COMMON_
#define ZEPHYR_TEST_BSIM_BT_AUDIO_TEST_COMMON_
#include <zephyr/bluetooth/bluetooth.h>
#include <stdbool.h>
#include <stdint.h>
#include <zephyr/bluetooth/audio/audio.h>
#include <zephyr/bluetooth/audio/bap_lc3_preset.h>
#include <zephyr/bluetooth/audio/cap.h>
#include <zephyr/bluetooth/bluetooth.h>
#define LONG_META 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, \
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, \

View file

@ -4,14 +4,30 @@
* SPDX-License-Identifier: Apache-2.0
*/
#ifdef CONFIG_BT_BAP_SCAN_DELEGATOR
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/byteorder.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include <zephyr/autoconf.h>
#include <zephyr/bluetooth/addr.h>
#include <zephyr/bluetooth/audio/audio.h>
#include <zephyr/bluetooth/audio/bap.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/byteorder.h>
#include <zephyr/bluetooth/gap.h>
#include <zephyr/bluetooth/uuid.h>
#include <zephyr/kernel.h>
#include <zephyr/net/buf.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/util.h>
#include <zephyr/sys/util_macro.h>
#include "bstests.h"
#include "common.h"
#ifdef CONFIG_BT_BAP_SCAN_DELEGATOR
extern enum bst_result_t bst_result;
#define PA_SYNC_INTERVAL_TO_TIMEOUT_RATIO 20 /* Set the timeout relative to interval */

View file

@ -3,17 +3,38 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <errno.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#if defined(CONFIG_BT_BAP_UNICAST_CLIENT)
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/autoconf.h>
#include <zephyr/bluetooth/addr.h>
#include <zephyr/bluetooth/audio/audio.h>
#include <zephyr/bluetooth/audio/bap.h>
#include <zephyr/bluetooth/audio/bap_lc3_preset.h>
#include <zephyr/bluetooth/audio/pacs.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/gap.h>
#include <zephyr/bluetooth/gatt.h>
#include <zephyr/bluetooth/hci_types.h>
#include <zephyr/bluetooth/iso.h>
#include <zephyr/bluetooth/uuid.h>
#include <zephyr/kernel.h>
#include <zephyr/net/buf.h>
#include <zephyr/sys/atomic.h>
#include <zephyr/sys/atomic_types.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/util.h>
#include "bstests.h"
#include "common.h"
#include "bap_common.h"
#if defined(CONFIG_BT_BAP_UNICAST_CLIENT)
#define BAP_STREAM_RETRY_WAIT K_MSEC(100)
#define ENQUEUE_COUNT 2U

View file

@ -3,15 +3,34 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <errno.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#if defined(CONFIG_BT_BAP_UNICAST_SERVER)
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/autoconf.h>
#include <zephyr/bluetooth/audio/audio.h>
#include <zephyr/bluetooth/audio/bap.h>
#include <zephyr/bluetooth/audio/pacs.h>
#include "common.h"
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/byteorder.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/gap.h>
#include <zephyr/bluetooth/hci_types.h>
#include <zephyr/bluetooth/iso.h>
#include <zephyr/bluetooth/uuid.h>
#include <zephyr/kernel.h>
#include <zephyr/net/buf.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/util.h>
#include <zephyr/sys/util_macro.h>
#include "bap_common.h"
#include "bstests.h"
#include "common.h"
#if defined(CONFIG_BT_BAP_UNICAST_SERVER)
extern enum bst_result_t bst_result;

View file

@ -3,19 +3,41 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <errno.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#if defined(CONFIG_BT_CAP_ACCEPTOR)
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/autoconf.h>
#include <zephyr/bluetooth/addr.h>
#include <zephyr/bluetooth/audio/aics.h>
#include <zephyr/bluetooth/audio/audio.h>
#include <zephyr/bluetooth/audio/bap.h>
#include <zephyr/bluetooth/audio/bap_lc3_preset.h>
#include <zephyr/bluetooth/audio/cap.h>
#include <zephyr/bluetooth/audio/csip.h>
#include <zephyr/bluetooth/audio/lc3.h>
#include <zephyr/bluetooth/audio/pacs.h>
#include <zephyr/bluetooth/audio/micp.h>
#include <zephyr/bluetooth/audio/vcp.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/gap.h>
#include <zephyr/bluetooth/iso.h>
#include <zephyr/bluetooth/uuid.h>
#include <zephyr/kernel.h>
#include <zephyr/net/buf.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/util.h>
#include <zephyr/sys/util_macro.h>
#include "bstests.h"
#include "common.h"
#include "bap_common.h"
#if defined(CONFIG_BT_CAP_ACCEPTOR)
extern enum bst_result_t bst_result;
#define SINK_CONTEXT \
@ -107,7 +129,7 @@ static bool valid_subgroup_metadata_cb(const struct bt_bap_base_subgroup *subgro
printk("Subgroup did not have streaming context\n");
}
/* if this is false, the iterater will return early with an error */
/* if this is false, the iterator will return early with an error */
return stream_context_found;
}

View file

@ -3,20 +3,35 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#if defined(CONFIG_BT_CAP_COMMANDER)
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/byteorder.h>
#include <zephyr/autoconf.h>
#include <zephyr/bluetooth/addr.h>
#include <zephyr/bluetooth/audio/bap_lc3_preset.h>
#include <zephyr/bluetooth/audio/cap.h>
#include <zephyr/bluetooth/audio/csip.h>
#include <zephyr/bluetooth/audio/micp.h>
#include <zephyr/bluetooth/audio/vcp.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/byteorder.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/gap.h>
#include <zephyr/bluetooth/gatt.h>
#include <zephyr/bluetooth/hci_types.h>
#include <zephyr/kernel.h>
#include <zephyr/net/buf.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/util_macro.h>
#include "bstests.h"
#include "common.h"
#include "bap_common.h"
#if defined(CONFIG_BT_CAP_COMMANDER)
#define SEM_TIMEOUT K_SECONDS(5)
extern enum bst_result_t bst_result;

View file

@ -3,18 +3,34 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <errno.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#if defined(CONFIG_BT_CAP_INITIATOR) && defined(CONFIG_BT_BAP_BROADCAST_SOURCE)
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/byteorder.h>
#include <zephyr/autoconf.h>
#include <zephyr/bluetooth/audio/audio.h>
#include <zephyr/bluetooth/audio/bap_lc3_preset.h>
#include <zephyr/bluetooth/audio/cap.h>
#include <zephyr/bluetooth/audio/bap.h>
#include <zephyr/bluetooth/audio/lc3.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/byteorder.h>
#include <zephyr/bluetooth/gap.h>
#include <zephyr/bluetooth/iso.h>
#include <zephyr/bluetooth/uuid.h>
#include <zephyr/kernel.h>
#include <zephyr/net/buf.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/util.h>
#include <zephyr/toolchain.h>
#include "bap_common.h"
#include "bstests.h"
#include "common.h"
#if defined(CONFIG_BT_CAP_INITIATOR) && defined(CONFIG_BT_BAP_BROADCAST_SOURCE)
/* 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

View file

@ -3,18 +3,41 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <errno.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#if defined(CONFIG_BT_CAP_INITIATOR_UNICAST)
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/byteorder.h>
#include <zephyr/autoconf.h>
#include <zephyr/bluetooth/addr.h>
#include <zephyr/bluetooth/audio/audio.h>
#include <zephyr/bluetooth/audio/bap_lc3_preset.h>
#include <zephyr/bluetooth/audio/cap.h>
#include <zephyr/bluetooth/audio/bap.h>
#include <zephyr/bluetooth/audio/csip.h>
#include <zephyr/bluetooth/audio/lc3.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/byteorder.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/gap.h>
#include <zephyr/bluetooth/gatt.h>
#include <zephyr/bluetooth/hci_types.h>
#include <zephyr/bluetooth/iso.h>
#include <zephyr/kernel.h>
#include <zephyr/net/buf.h>
#include <zephyr/sys/atomic.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/util.h>
#include <zephyr/sys/util_macro.h>
#include <zephyr/sys_clock.h>
#include "bstests.h"
#include "common.h"
#include "bap_common.h"
#if defined(CONFIG_BT_CAP_INITIATOR_UNICAST)
#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)

View file

@ -5,11 +5,28 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <zephyr/bluetooth/addr.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/gap.h>
#include <zephyr/kernel.h>
#include <zephyr/net/buf.h>
#include <zephyr/sys/__assert.h>
#include <zephyr/sys/atomic_types.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/util.h>
#include "bs_cmd_line.h"
#include "bs_dynargs.h"
#include "bs_pc_backchannel.h"
#include <argparse.h>
#include <posix_native_task.h>
#include "posix_native_task.h"
#include "bs_types.h"
#include "bsim_args_runner.h"
#include "bstests.h"
#include "common.h"
extern enum bst_result_t bst_result;

View file

@ -10,25 +10,27 @@
#ifndef ZEPHYR_TEST_BSIM_BT_AUDIO_TEST_
#define ZEPHYR_TEST_BSIM_BT_AUDIO_TEST_
#include <zephyr/kernel.h>
#include "bstests.h"
#include "bs_types.h"
#include "bs_tracing.h"
#include "time_machine.h"
#include <zephyr/types.h>
#include <stdbool.h>
#include <stddef.h>
#include <errno.h>
#include <zephyr/sys_clock.h>
#include <stdint.h>
#include <zephyr/bluetooth/audio/audio.h>
#include <zephyr/bluetooth/audio/bap.h>
#include <zephyr/bluetooth/audio/cap.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/hci.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/iso.h>
#include <zephyr/bluetooth/uuid.h>
#include <zephyr/bluetooth/gatt.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/atomic_types.h>
#include <zephyr/sys/util.h>
#include <zephyr/sys_clock.h>
#include <zephyr/types.h>
#include "bs_types.h"
#include "bs_tracing.h"
static const uint8_t mock_iso_data[] = {
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,

View file

@ -4,10 +4,17 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/gatt.h>
#include <zephyr/bluetooth/audio/csip.h>
#include <stdbool.h>
#include <stddef.h>
#include <zephyr/bluetooth/audio/csip.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/gatt.h>
#include <zephyr/bluetooth/hci_types.h>
#include <zephyr/sys/printk.h>
#include "bstests.h"
#include "common.h"
#include "common/bt_str.h"

View file

@ -4,9 +4,21 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdbool.h>
#include <stddef.h>
#include <zephyr/bluetooth/audio/cap.h>
#include <zephyr/bluetooth/audio/csip.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/gap.h>
#include <zephyr/bluetooth/gatt.h>
#include <zephyr/bluetooth/uuid.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/util.h>
#include "bstests.h"
#include "common.h"
extern enum bst_result_t bst_result;

View file

@ -4,11 +4,28 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifdef CONFIG_BT_CSIP_SET_COORDINATOR
#include <zephyr/bluetooth/addr.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include <zephyr/autoconf.h>
#include <zephyr/bluetooth/audio/csip.h>
#include <zephyr/bluetooth/addr.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/gap.h>
#include <zephyr/bluetooth/hci_types.h>
#include <zephyr/kernel.h>
#include <zephyr/net/buf.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/util.h>
#include "bstests.h"
#include "common.h"
#ifdef CONFIG_BT_CSIP_SET_COORDINATOR
static bool expect_rank = true;
static bool expect_set_size = true;
static bool expect_lockable = true;

View file

@ -4,11 +4,21 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifdef CONFIG_BT_CSIP_SET_MEMBER
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <zephyr/autoconf.h>
#include <zephyr/bluetooth/audio/csip.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/gap.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/util.h>
#include "bstests.h"
#include "common.h"
#ifdef CONFIG_BT_CSIP_SET_MEMBER
static struct bt_csip_set_member_svc_inst *svc_inst;
extern enum bst_result_t bst_result;
static volatile bool g_locked;

View file

@ -4,19 +4,40 @@
* SPDX-License-Identifier: Apache-2.0
*/
#if defined(CONFIG_BT_GMAP)
#include <errno.h>
#include <stdbool.h>
#include <stddef.h>
#include <string.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/byteorder.h>
#include <zephyr/autoconf.h>
#include <zephyr/bluetooth/addr.h>
#include <zephyr/bluetooth/audio/audio.h>
#include <zephyr/bluetooth/audio/cap.h>
#include <zephyr/bluetooth/audio/bap.h>
#include <zephyr/bluetooth/audio/csip.h>
#include <zephyr/bluetooth/audio/gmap.h>
#include <zephyr/bluetooth/audio/gmap_lc3_preset.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/byteorder.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/gap.h>
#include <zephyr/bluetooth/gatt.h>
#include <zephyr/bluetooth/hci_types.h>
#include <zephyr/bluetooth/iso.h>
#include <zephyr/bluetooth/uuid.h>
#include <zephyr/kernel.h>
#include <zephyr/net/buf.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/util.h>
#include <zephyr/sys/util_macro.h>
#include <zephyr/toolchain.h>
#include "bstests.h"
#include "common.h"
#include "bap_common.h"
#if defined(CONFIG_BT_GMAP)
/* 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

View file

@ -3,17 +3,34 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <errno.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#if defined(CONFIG_BT_CAP_ACCEPTOR)
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/autoconf.h>
#include <zephyr/bluetooth/audio/audio.h>
#include <zephyr/bluetooth/audio/bap.h>
#include <zephyr/bluetooth/audio/bap_lc3_preset.h>
#include <zephyr/bluetooth/audio/cap.h>
#include <zephyr/bluetooth/audio/csip.h>
#include <zephyr/bluetooth/audio/lc3.h>
#include <zephyr/bluetooth/audio/pacs.h>
#include <zephyr/bluetooth/audio/gmap.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/gap.h>
#include <zephyr/bluetooth/uuid.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/util.h>
#include <zephyr/sys/util_macro.h>
#include "bstests.h"
#include "common.h"
#include "bap_common.h"
#if defined(CONFIG_BT_CAP_ACCEPTOR)
extern enum bst_result_t bst_result;
#define CONTEXT (BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED | BT_AUDIO_CONTEXT_TYPE_GAME)

View file

@ -3,14 +3,28 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <errno.h>
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include <zephyr/autoconf.h>
#include <zephyr/bluetooth/audio/has.h>
#include <zephyr/bluetooth/att.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/gatt.h>
#include <zephyr/bluetooth/hci_types.h>
#include <zephyr/bluetooth/uuid.h>
#include <zephyr/logging/log.h>
#include <zephyr/logging/log_core.h>
#include <zephyr/sys/util_macro.h>
#include "../../subsys/bluetooth/audio/has_internal.h"
#include "bstests.h"
#include "common.h"
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(has_client_test, LOG_LEVEL_DBG);
extern enum bst_result_t bst_result;

View file

@ -3,13 +3,21 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <zephyr/bluetooth/gatt.h>
#include <zephyr/autoconf.h>
#include <zephyr/bluetooth/audio/has.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/gatt.h>
#include <zephyr/logging/log.h>
#include <zephyr/logging/log_core.h>
#include <zephyr/sys/util_macro.h>
#include "bstests.h"
#include "common.h"
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(has_test, LOG_LEVEL_DBG);
extern enum bst_result_t bst_result;

View file

@ -4,12 +4,20 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <stddef.h>
#include <stdint.h>
#ifdef CONFIG_BT_IAS_CLIENT
#include <zephyr/autoconf.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/services/ias.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/printk.h>
#include "bstests.h"
#include "common.h"
#ifdef CONFIG_BT_IAS_CLIENT
extern enum bst_result_t bst_result;
CREATE_FLAG(g_service_discovered);

View file

@ -5,22 +5,22 @@
*/
#include <stdint.h>
#ifdef CONFIG_BT_IAS
#include <stddef.h>
#include <errno.h>
#include <zephyr/types.h>
#include <zephyr/autoconf.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/hci.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/uuid.h>
#include <zephyr/bluetooth/gatt.h>
#include <zephyr/bluetooth/services/ias.h>
#include <zephyr/sys/printk.h>
#include <zephyr/types.h>
#include "bstests.h"
#include "common.h"
#ifdef CONFIG_BT_IAS
extern enum bst_result_t bst_result;
CREATE_FLAG(g_high_alert_received);

View file

@ -4,6 +4,8 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <stddef.h>
#include "bstests.h"
extern struct bst_test_list *test_vcp_install(struct bst_test_list *tests);

View file

@ -3,15 +3,27 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#ifdef CONFIG_BT_MCC
#include <zephyr/autoconf.h>
#include <zephyr/bluetooth/addr.h>
#include <zephyr/bluetooth/audio/mcc.h>
#include <zephyr/bluetooth/audio/mcs.h>
#include <zephyr/bluetooth/audio/media_proxy.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/hci_types.h>
#include <zephyr/bluetooth/services/ots.h>
#include <zephyr/kernel.h>
#include <zephyr/net/buf.h>
#include <zephyr/sys/printk.h>
#include "bstests.h"
#include "common.h"
#ifdef CONFIG_BT_MCC
extern enum bst_result_t bst_result;
static struct bt_mcc_cb mcc_cb;
@ -1034,7 +1046,7 @@ static void test_cp_prev_track(void)
* and can change between them.
*/
/* To verify that a track change has happeded, the test checks that the
/* To verify that a track change has happened, the test checks that the
* current track object ID has changed.
*/
@ -1208,7 +1220,7 @@ static void test_cp_prev_group(void)
* and can change between them.
*/
/* To verify that a group change has happeded, the test checks that the
/* To verify that a group change has happened, the test checks that the
* current group object ID has changed.
*/

View file

@ -3,13 +3,17 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stddef.h>
#ifdef CONFIG_BT_MCS
#include <zephyr/autoconf.h>
#include <zephyr/bluetooth/audio/media_proxy.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/sys/printk.h>
#include "bstests.h"
#include "common.h"
#ifdef CONFIG_BT_MCS
extern enum bst_result_t bst_result;
static void start_adv(void)

View file

@ -3,15 +3,23 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#ifdef CONFIG_BT_MCS
#include <zephyr/autoconf.h>
#include <zephyr/bluetooth/addr.h>
#include <zephyr/bluetooth/audio/mcc.h>
#include <zephyr/bluetooth/audio/media_proxy.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/services/ots.h>
#include <zephyr/sys/printk.h>
#include "bstests.h"
#include "common.h"
#ifdef CONFIG_BT_MCS
extern enum bst_result_t bst_result;
static uint64_t g_icon_object_id;
@ -879,7 +887,7 @@ static void test_cp_prev_track(void)
* and can change between them.
*/
/* To verify that a track change has happeded, the test checks that the
/* To verify that a track change has happened, the test checks that the
* current track object ID has changed.
*/
@ -1047,7 +1055,7 @@ static void test_cp_prev_group(void)
* and can change between them.
*/
/* To verify that a group change has happeded, the test checks that the
/* To verify that a group change has happened, the test checks that the
* current group object ID has changed.
*/

View file

@ -3,14 +3,21 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <errno.h>
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#ifdef CONFIG_BT_MICP_MIC_CTLR
#include <zephyr/autoconf.h>
#include <zephyr/bluetooth/audio/aics.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/audio/micp.h>
#include <zephyr/sys/printk.h>
#include "bstests.h"
#include "common.h"
#ifdef CONFIG_BT_MICP_MIC_CTLR
#define AICS_DESC_SIZE 64
extern enum bst_result_t bst_result;

View file

@ -3,11 +3,23 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#ifdef CONFIG_BT_MICP_MIC_DEV
#include <zephyr/autoconf.h>
#include <zephyr/bluetooth/audio/aics.h>
#include <zephyr/bluetooth/audio/micp.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/util.h>
#include <zephyr/sys/util_macro.h>
#include "bstests.h"
#include "common.h"
#ifdef CONFIG_BT_MICP_MIC_DEV
extern enum bst_result_t bst_result;
#if defined(CONFIG_BT_AICS)

View file

@ -3,14 +3,25 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <errno.h>
#include <stdint.h>
#include <string.h>
#include <zephyr/bluetooth/att.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/gatt.h>
#include "bstests.h"
#include "common.h"
#include "common/bt_str.h"
#include <zephyr/bluetooth/hci_types.h>
#include <zephyr/bluetooth/uuid.h>
#include <zephyr/logging/log.h>
#include <zephyr/logging/log_core.h>
#include <zephyr/sys/__assert.h>
#include <zephyr/sys/util_macro.h>
LOG_MODULE_REGISTER(pacs_notify_client_test, LOG_LEVEL_DBG);
struct pacs_instance_t {

View file

@ -4,11 +4,26 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/bluetooth/audio/pacs.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <zephyr/bluetooth/audio/audio.h>
#include <zephyr/bluetooth/audio/lc3.h>
#include <zephyr/bluetooth/audio/pacs.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/gap.h>
#include <zephyr/bluetooth/gatt.h>
#include <zephyr/bluetooth/uuid.h>
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
#include <zephyr/logging/log_core.h>
#include <zephyr/sys/__assert.h>
#include <zephyr/sys/util.h>
#include "bstests.h"
#include "common.h"
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(pacs_notify_server_test, LOG_LEVEL_DBG);
extern enum bst_result_t bst_result;

View file

@ -3,21 +3,34 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#if defined(CONFIG_BT_PBP)
#include <zephyr/sys/byteorder.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/autoconf.h>
#include <zephyr/bluetooth/audio/audio.h>
#include <zephyr/bluetooth/audio/bap.h>
#include <zephyr/bluetooth/audio/cap.h>
#include <zephyr/bluetooth/audio/bap_lc3_preset.h>
#include <zephyr/bluetooth/audio/pacs.h>
#include <zephyr/bluetooth/audio/pbp.h>
#include <zephyr/bluetooth/addr.h>
#include <zephyr/bluetooth/audio/lc3.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/gap.h>
#include <zephyr/bluetooth/iso.h>
#include <zephyr/bluetooth/uuid.h>
#include <zephyr/kernel.h>
#include <zephyr/net/buf.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/util.h>
#include <zephyr/sys/util_macro.h>
#include "bstests.h"
#include "common.h"
#if defined(CONFIG_BT_PBP)
#define SEM_TIMEOUT K_SECONDS(30)
extern enum bst_result_t bst_result;

View file

@ -3,18 +3,31 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#if defined(CONFIG_BT_PBP)
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/autoconf.h>
#include <zephyr/bluetooth/audio/audio.h>
#include <zephyr/bluetooth/audio/bap_lc3_preset.h>
#include <zephyr/bluetooth/audio/bap.h>
#include <zephyr/bluetooth/audio/cap.h>
#include <zephyr/bluetooth/audio/pbp.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/byteorder.h>
#include <zephyr/bluetooth/gap.h>
#include <zephyr/bluetooth/iso.h>
#include <zephyr/bluetooth/uuid.h>
#include <zephyr/kernel.h>
#include <zephyr/net/buf.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/util.h>
#include <zephyr/toolchain.h>
#include "bstests.h"
#include "common.h"
#if defined(CONFIG_BT_PBP)
/* When BROADCAST_ENQUEUE_COUNT > 1 we can enqueue enough buffers to ensure that
* the controller is never idle
*/
@ -35,7 +48,7 @@ NET_BUF_POOL_FIXED_DEFINE(tx_pool,
BT_ISO_SDU_BUF_SIZE(CONFIG_BT_ISO_TX_MTU),
CONFIG_BT_CONN_TX_USER_DATA_SIZE, NULL);
const uint8_t pba_metadata[] = {
static const uint8_t pba_metadata[] = {
BT_AUDIO_CODEC_DATA(BT_AUDIO_METADATA_TYPE_PROGRAM_INFO, PBS_DEMO)};
static uint8_t bis_codec_data[] = {
@ -57,7 +70,7 @@ static struct bt_bap_lc3_preset broadcast_preset_48_2_1 =
static K_SEM_DEFINE(sem_started, 0U, 1);
static K_SEM_DEFINE(sem_stopped, 0U, 1);
struct bt_le_ext_adv *adv;
static struct bt_le_ext_adv *adv;
static void started_cb(struct bt_bap_stream *stream)
{

View file

@ -4,13 +4,21 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#ifdef CONFIG_BT_TBS_CLIENT
#include <zephyr/autoconf.h>
#include <zephyr/bluetooth/addr.h>
#include <zephyr/bluetooth/audio/tbs.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/sys/printk.h>
#include "bstests.h"
#include "common.h"
#ifdef CONFIG_BT_TBS_CLIENT
static struct bt_conn_cb conn_callbacks;
extern enum bst_result_t bst_result;
@ -46,7 +54,7 @@ static void tbs_client_call_states_cb(struct bt_conn *conn, int err,
return;
}
printk("Index %u\n", __func__, index);
printk("Index %u\n", index);
if (err != 0) {
FAIL("Call could not read call states (%d)\n", err);
return;
@ -152,8 +160,7 @@ static void tbs_client_technology_cb(struct bt_conn *conn, int err,
return;
}
printk("%s Instance: %u Technology: %u\n", __func__, inst_index,
technology);
printk("%s Instance: %u Technology: %u\n", __func__, inst_index, value);
SET_FLAG(technology);
}
@ -167,8 +174,7 @@ static void tbs_client_signal_strength_cb(struct bt_conn *conn, int err,
return;
}
printk("%s Instance: %u, Strength: %u\n", __func__, inst_index,
signal_strength);
printk("%s Instance: %u, Strength: %u\n", __func__, inst_index, value);
SET_FLAG(signal_strength);
}
@ -196,8 +202,7 @@ static void tbs_client_status_flags_cb(struct bt_conn *conn, int err,
return;
}
printk("%s Instance: %u Flags: %u\n", __func__, inst_index,
status_flags);
printk("%s Instance: %u Flags: %u\n", __func__, inst_index, value);
SET_FLAG(status_flags);
}
@ -239,7 +244,7 @@ static void tbs_client_bearer_uci_cb(struct bt_conn *conn, int err,
return;
}
printk("%s Instance: %u UCI: %u\n", __func__, inst_index, value);
printk("%s Instance: %u UCI: %s\n", __func__, inst_index, value);
SET_FLAG(bearer_uci);
}
@ -252,8 +257,7 @@ static void tbs_client_uri_list_cb(struct bt_conn *conn, int err,
return;
}
printk("%s Instance: %u URI list: %u\n", __func__, inst_index,
uri_list);
printk("%s Instance: %u URI list: %s\n", __func__, inst_index, value);
SET_FLAG(uri_list);
}
@ -284,7 +288,7 @@ static void tbs_client_call_uri_cb(struct bt_conn *conn, int err,
}
printk("Incoming URI callback\n");
printk("%s Instance: %u URI: %u\n", __func__, inst_index, value);
printk("%s Instance: %u URI: %s\n", __func__, inst_index, value);
SET_FLAG(uri_inc);
}

View file

@ -5,18 +5,28 @@
* SPDX-License-Identifier: Apache-2.0
*/
#ifdef CONFIG_BT_TBS
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <zephyr/autoconf.h>
#include <zephyr/bluetooth/audio/tbs.h>
#include <zephyr/bluetooth/addr.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/sys/printk.h>
#include "bstests.h"
#include "common.h"
#ifdef CONFIG_BT_TBS
extern enum bst_result_t bst_result;
static uint8_t call_index;
static uint8_t g_call_index;
static volatile uint8_t call_state;
CREATE_FLAG(is_connected);
CREATE_FLAG(call_placed);
CREATE_FLAG(call_held);
CREATE_FLAG(call_id);
CREATE_FLAG(call_terminated);
CREATE_FLAG(call_accepted);
CREATE_FLAG(call_retrieved);
@ -24,7 +34,7 @@ CREATE_FLAG(call_joined);
static void tbs_hold_call_cb(struct bt_conn *conn, uint8_t call_index)
{
if (call_index == call_id) {
if (call_index == g_call_index) {
SET_FLAG(call_held);
}
}
@ -33,7 +43,7 @@ static bool tbs_originate_call_cb(struct bt_conn *conn, uint8_t call_index,
const char *caller_id)
{
printk("Placing call to remote with id %u to %s\n", call_index, caller_id);
call_id = call_index;
g_call_index = call_index;
SET_FLAG(call_placed);
return true;
}
@ -175,21 +185,21 @@ static int test_answer_terminate(void)
printk("%s\n", __func__);
printk("Placing call\n");
err = bt_tbs_originate(0, "tel:000000000001", &call_index);
err = bt_tbs_originate(0, "tel:000000000001", &g_call_index);
if (err != BT_TBS_RESULT_CODE_SUCCESS) {
FAIL("Could not originate call: %d\n", err);
return err;
}
printk("Answering call\n");
err = bt_tbs_remote_answer(call_index);
err = bt_tbs_remote_answer(g_call_index);
if (err != BT_TBS_RESULT_CODE_SUCCESS) {
FAIL("Could not accept call: %d\n", err);
return err;
}
printk("Terminating call\n");
err = bt_tbs_terminate(call_index);
err = bt_tbs_terminate(g_call_index);
if (err != BT_TBS_RESULT_CODE_SUCCESS) {
FAIL("Could not terminate call: %d\n", err);
return err;
@ -205,40 +215,40 @@ static int test_hold_retrieve(void)
int err;
printk("%s\n", __func__);
err = bt_tbs_originate(0, "tel:000000000001", &call_index);
err = bt_tbs_originate(0, "tel:000000000001", &g_call_index);
if (err != BT_TBS_RESULT_CODE_SUCCESS) {
FAIL("Could not originate call: %d\n", err);
return err;
}
err = bt_tbs_remote_answer(call_index);
err = bt_tbs_remote_answer(g_call_index);
if (err != BT_TBS_RESULT_CODE_SUCCESS) {
FAIL("Could not accept call: %d\n", err);
return err;
}
printk("Holding call\n");
err = bt_tbs_hold(call_index);
err = bt_tbs_hold(g_call_index);
if (err != BT_TBS_RESULT_CODE_SUCCESS) {
FAIL("Could not terminate call: %d\n", err);
return err;
}
printk("Retrieving call\n");
err = bt_tbs_retrieve(call_index);
err = bt_tbs_retrieve(g_call_index);
if (err != BT_TBS_RESULT_CODE_SUCCESS) {
FAIL("Could not retrieve call: %d\n", err);
return err;
}
printk("Terminating call\n");
err = bt_tbs_terminate(call_index);
err = bt_tbs_terminate(g_call_index);
if (err != BT_TBS_RESULT_CODE_SUCCESS) {
FAIL("Could not terminate call: %d\n", err);
return err;
}
printk("Hold & retrieve test sucessfull\n");
printk("Hold & retrieve test successful\n");
return err;
}
@ -250,38 +260,38 @@ static int test_join(void)
printk("%s\n", __func__);
printk("Placing first call\n");
err = bt_tbs_originate(0, "tel:000000000001", &call_index);
err = bt_tbs_originate(0, "tel:000000000001", &g_call_index);
if (err != BT_TBS_RESULT_CODE_SUCCESS) {
FAIL("Could not originate first call: %d\n", err);
return err;
}
printk("Answering first call\n");
err = bt_tbs_remote_answer(call_index);
err = bt_tbs_remote_answer(g_call_index);
if (err != BT_TBS_RESULT_CODE_SUCCESS) {
FAIL("Could not answer first call: %d\n", err);
return err;
}
printk("First call answered\n");
call_indexes[0] = (uint8_t)call_index;
call_indexes[0] = (uint8_t)g_call_index;
printk("Placing second call\n");
err = bt_tbs_originate(0, "tel:000000000002", &call_index);
err = bt_tbs_originate(0, "tel:000000000002", &g_call_index);
if (err != BT_TBS_RESULT_CODE_SUCCESS) {
FAIL("Could not originate second call: %d\n", err);
return err;
}
printk("Answering second call\n");
err = bt_tbs_remote_answer(call_index);
err = bt_tbs_remote_answer(g_call_index);
if (err != BT_TBS_RESULT_CODE_SUCCESS) {
FAIL("Could not answer second call: %d\n", err);
return err;
}
printk("Second call answered\n");
call_indexes[1] = (uint8_t)call_index;
call_indexes[1] = (uint8_t)g_call_index;
printk("Joining calls\n");
err = bt_tbs_join(2, call_indexes);
@ -302,7 +312,7 @@ static int test_join(void)
return err;
}
printk("Join calls test succesfull\n");
printk("Join calls test successful\n");
return err;
}
@ -346,27 +356,27 @@ static void test_main(void)
WAIT_FOR_COND(call_placed);
err = bt_tbs_remote_answer(call_id);
err = bt_tbs_remote_answer(g_call_index);
if (err != BT_TBS_RESULT_CODE_SUCCESS) {
FAIL("Remote could not answer call: %d\n", err);
return;
}
printk("Remote answered %u\n", call_id);
printk("Remote answered %u\n", g_call_index);
err = bt_tbs_remote_hold(call_id);
err = bt_tbs_remote_hold(g_call_index);
if (err != BT_TBS_RESULT_CODE_SUCCESS) {
FAIL("Remote could not hold call: %d\n", err);
}
printk("Remote held %u\n", call_id);
printk("Remote held %u\n", g_call_index);
WAIT_FOR_COND(call_held);
err = bt_tbs_remote_retrieve(call_id);
err = bt_tbs_remote_retrieve(g_call_index);
if (err != BT_TBS_RESULT_CODE_SUCCESS) {
FAIL("Remote could not answer call: %d\n", err);
return;
}
printk("Remote retrieved %u\n", call_id);
printk("Remote retrieved %u\n", g_call_index);
PASS("TBS Passed\n");
}

View file

@ -4,22 +4,27 @@
* SPDX-License-Identifier: Apache-2.0
*/
#ifdef CONFIG_BT_TMAP
#include <stdbool.h>
#include <stdint.h>
#include <stddef.h>
#include <errno.h>
#include <zephyr/autoconf.h>
#include <zephyr/bluetooth/audio/tmap.h>
#include <zephyr/bluetooth/addr.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/gap.h>
#include <zephyr/bluetooth/uuid.h>
#include <zephyr/bluetooth/gatt.h>
#include <zephyr/net/buf.h>
#include <zephyr/sys/printk.h>
#include <zephyr/types.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/uuid.h>
#include <zephyr/bluetooth/gatt.h>
#include <zephyr/bluetooth/audio/tmap.h>
#include "bstests.h"
#include "common.h"
#ifdef CONFIG_BT_TMAP
extern enum bst_result_t bst_result;
CREATE_FLAG(flag_tmap_discovered);

View file

@ -3,24 +3,25 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifdef CONFIG_BT_TMAP
#include <stdint.h>
#include <stddef.h>
#include <errno.h>
#include <zephyr/types.h>
#include <stdint.h>
#include <zephyr/autoconf.h>
#include <zephyr/bluetooth/audio/tmap.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/gap.h>
#include <zephyr/bluetooth/hci.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/uuid.h>
#include <zephyr/bluetooth/gatt.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/util.h>
#include <zephyr/types.h>
#include <zephyr/bluetooth/audio/tmap.h>
#include "bstests.h"
#include "common.h"
#ifdef CONFIG_BT_TMAP
extern enum bst_result_t bst_result;
static uint8_t tmap_addata[] = {

View file

@ -3,16 +3,22 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#ifdef CONFIG_BT_VCP_VOL_CTLR
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/autoconf.h>
#include <zephyr/bluetooth/audio/aics.h>
#include <zephyr/bluetooth/audio/audio.h>
#include <zephyr/bluetooth/audio/vcp.h>
#include <zephyr/bluetooth/audio/vocs.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/sys/printk.h>
#include "bstests.h"
#include "common.h"
#ifdef CONFIG_BT_VCP_VOL_CTLR
#define VOCS_DESC_SIZE 64
#define AICS_DESC_SIZE 64

View file

@ -4,12 +4,23 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#ifdef CONFIG_BT_VCP_VOL_REND
#include <zephyr/autoconf.h>
#include <zephyr/bluetooth/audio/aics.h>
#include <zephyr/bluetooth/audio/audio.h>
#include <zephyr/bluetooth/audio/vcp.h>
#include <zephyr/bluetooth/audio/vocs.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/util.h>
#include "bstests.h"
#include "common.h"
#ifdef CONFIG_BT_VCP_VOL_REND
extern enum bst_result_t bst_result;
#if defined(CONFIG_BT_VOCS)