2023-03-16 17:18:08 +01:00
|
|
|
/** @file
|
|
|
|
* @brief Bluetooth audio shell functions
|
|
|
|
*
|
|
|
|
* This is not to be included by the application.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright (c) 2023 Nordic Semiconductor ASA
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __AUDIO_H
|
|
|
|
#define __AUDIO_H
|
|
|
|
|
|
|
|
#include <zephyr/bluetooth/bluetooth.h>
|
|
|
|
|
|
|
|
extern struct bt_csip_set_member_svc_inst *svc_inst;
|
|
|
|
|
|
|
|
ssize_t audio_ad_data_add(struct bt_data *data, const size_t data_size, const bool discoverable,
|
|
|
|
const bool connectable);
|
|
|
|
ssize_t audio_pa_data_add(struct bt_data *data_array, const size_t data_array_size);
|
|
|
|
ssize_t csis_ad_data_add(struct bt_data *data, const size_t data_size, const bool discoverable);
|
2022-12-17 16:42:13 +01:00
|
|
|
size_t cap_acceptor_ad_data_add(struct bt_data data[], size_t data_size, bool discoverable);
|
2023-03-16 17:18:08 +01:00
|
|
|
|
2023-05-04 13:44:49 +02:00
|
|
|
#if defined(CONFIG_BT_AUDIO)
|
|
|
|
/* Must guard before including audio.h as audio.h uses Kconfigs guarded by
|
|
|
|
* CONFIG_BT_AUDIO
|
|
|
|
*/
|
|
|
|
#include <zephyr/bluetooth/audio/audio.h>
|
|
|
|
#include <zephyr/bluetooth/audio/bap_lc3_preset.h>
|
|
|
|
#include <zephyr/bluetooth/audio/cap.h>
|
|
|
|
|
|
|
|
struct named_lc3_preset {
|
|
|
|
const char *name;
|
|
|
|
struct bt_bap_lc3_preset preset;
|
|
|
|
};
|
|
|
|
|
|
|
|
#if defined(CONFIG_BT_BAP_UNICAST)
|
|
|
|
|
|
|
|
#define UNICAST_SERVER_STREAM_COUNT \
|
|
|
|
COND_CODE_1(CONFIG_BT_ASCS, (CONFIG_BT_ASCS_ASE_SNK_COUNT + CONFIG_BT_ASCS_ASE_SRC_COUNT), \
|
|
|
|
(0))
|
|
|
|
#define UNICAST_CLIENT_STREAM_COUNT \
|
|
|
|
COND_CODE_1(CONFIG_BT_BAP_UNICAST_CLIENT, \
|
|
|
|
(CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SNK_COUNT + \
|
|
|
|
CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SRC_COUNT), \
|
|
|
|
(0))
|
|
|
|
|
|
|
|
struct unicast_stream {
|
|
|
|
struct bt_cap_stream stream;
|
|
|
|
struct bt_codec codec;
|
|
|
|
struct bt_codec_qos qos;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern struct unicast_stream unicast_streams[CONFIG_BT_MAX_CONN * (UNICAST_SERVER_STREAM_COUNT +
|
|
|
|
UNICAST_CLIENT_STREAM_COUNT)];
|
|
|
|
|
|
|
|
#if defined(CONFIG_BT_BAP_UNICAST_CLIENT)
|
|
|
|
|
|
|
|
extern struct bt_bap_unicast_group *default_unicast_group;
|
|
|
|
extern struct bt_bap_ep *snks[CONFIG_BT_MAX_CONN][CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SNK_COUNT];
|
|
|
|
extern struct bt_bap_ep *srcs[CONFIG_BT_MAX_CONN][CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SRC_COUNT];
|
|
|
|
extern const struct named_lc3_preset *default_sink_preset;
|
|
|
|
extern const struct named_lc3_preset *default_source_preset;
|
|
|
|
#endif /* CONFIG_BT_BAP_UNICAST_CLIENT */
|
|
|
|
#endif /* CONFIG_BT_BAP_UNICAST */
|
|
|
|
#endif /* CONFIG_BT_AUDIO */
|
|
|
|
|
2023-03-16 17:18:08 +01:00
|
|
|
#endif /* __AUDIO_H */
|