Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LE Audio: Reach 100% documentation coverage #75219

Merged
merged 20 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
211eb16
Bluetooth: AICS: Add missing documentation in aics.h
Thalley Jun 29, 2024
4ba3b56
Bluetooth: Audio: Add missing documentation in audio.h
Thalley Jun 30, 2024
5dadb40
Bluetooth: BAP: Add missing documentation in bap_lc3_presets.h
Thalley Jul 2, 2024
2b7059f
Bluetooth: BAP: Add missing documentation in bap.h
Thalley Jul 1, 2024
b322310
Bluetooth: CAP: Add missing documentation in cap.h
Thalley Jul 1, 2024
b4b3592
Bluetooth: CSIP: Add missing documentation in csip.h
Thalley Jul 1, 2024
98e5ba4
Bluetooth: GMAP: Add missing documentation in gmap_lc3_presets.h
Thalley Jul 2, 2024
6c593c5
Bluetooth: GMAP: Add missing documentation in gmap.h
Thalley Jul 2, 2024
4c0e316
Bluetooth: HAS: Add missing documentation in has.h
Thalley Jul 1, 2024
426a52f
Bluetooth: LC3: Format documentation in lc3.h
Thalley Jul 3, 2024
055c430
Bluetooth: MCC: Add missing documentation in mcc.h
Thalley Jul 1, 2024
35666fd
Bluetooth: MCS: Add missing documentation in mcs.h
Thalley Jul 2, 2024
4d656ca
Bluetooth: Media Proxy: Add missing documentation in media_proxy.h
Thalley Jul 2, 2024
a69828b
Bluetooth: MICP: Add missing documentation in micp.h
Thalley Jul 2, 2024
67a1e29
Bluetooth: PACS: Add missing documentation in pacs.h
Thalley Jul 2, 2024
76edbf0
Bluetooth: PBP: Add missing documentation in pbp.h
Thalley Jul 2, 2024
6777204
Bluetooth: TBS: Add missing documentation in tbs.h
Thalley Jul 2, 2024
074cef3
Bluetooth: TMAP: Add missing documentation in tmap.h
Thalley Jul 3, 2024
caac398
Bluetooth: VCP: Add missing documentation in vcp.h
Thalley Jul 3, 2024
c0287bd
Bluetooth: VOCS: Add missing documentation in vocs.h
Thalley Jul 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 87 additions & 8 deletions include/zephyr/bluetooth/audio/aics.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
/**
* @file
* @brief Bluetooth Audio Input Control Service APIs.
*/

/*
* Copyright (c) 2020 Nordic Semiconductor ASA
* Copyright (c) 2020-2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -37,32 +42,88 @@
extern "C" {
#endif

/** Audio Input Control Service mute states */
/**
* @name Audio Input Control Service mute states
* @{
*/
/** The mute state is unmuted */
#define BT_AICS_STATE_UNMUTED 0x00
/** The mute state is muted */
#define BT_AICS_STATE_MUTED 0x01
/** The mute state is disabled */
#define BT_AICS_STATE_MUTE_DISABLED 0x02
/** @} */

/** Audio Input Control Service input modes */
/**
* @name Audio Input Control Service input modes
* @{
*/
/**
* @brief The gain mode is manual only and cannot be changed to automatic.
*
* The gain can be controlled by the client.
*/
#define BT_AICS_MODE_MANUAL_ONLY 0x00
/**
* @brief The gain mode is automatic only and cannot be changed to manual.
*
* The gain cannot be controlled by the client.
*/
#define BT_AICS_MODE_AUTO_ONLY 0x01
/**
* @brief The gain mode is manual.
*
* The gain can be controlled by the client.
*/
#define BT_AICS_MODE_MANUAL 0x02
/**
* @brief The gain mode is automatic.
*
* The gain cannot be controlled by the client.
*/
#define BT_AICS_MODE_AUTO 0x03
/** @} */

/** Audio Input Control Service input types */
/**
* @name Audio Input Control Service input types
* @{
*/
/** The input is unspecified */
#define BT_AICS_INPUT_TYPE_UNSPECIFIED 0x00
/** The input is a Bluetooth Audio Stream */
#define BT_AICS_INPUT_TYPE_BLUETOOTH 0x01
/** The input is a microphone */
#define BT_AICS_INPUT_TYPE_MICROPHONE 0x02
/** The input is analog */
#define BT_AICS_INPUT_TYPE_ANALOG 0x03
/** The input is digital */
#define BT_AICS_INPUT_TYPE_DIGITAL 0x04
/** The input is a radio (AM/FM/XM/etc.) */
#define BT_AICS_INPUT_TYPE_RADIO 0x05
/** The input is a Streaming Audio Source */
#define BT_AICS_INPUT_TYPE_STREAMING 0x06
/** The input is transparent / pass-through */
#define BT_AICS_INPUT_TYPE_AMBIENT 0x07
/** @} */

/** Audio Input Control Service Error codes */
/**
* @name Audio Input Control Service Error codes
* @{
*/
/**
* The Change_Counter operand value does not match the Change_Counter field value of the
* Audio Input State characteristic.
*/
#define BT_AICS_ERR_INVALID_COUNTER 0x80
/** An invalid opcode has been used in a control point procedure */
#define BT_AICS_ERR_OP_NOT_SUPPORTED 0x81
/** Mute/unmute commands are disabled.(see @ref BT_AICS_STATE_MUTE_DISABLED) */
#define BT_AICS_ERR_MUTE_DISABLED 0x82
/** An operand value used in a control point procedure is outside the permissible range */
#define BT_AICS_ERR_OUT_OF_RANGE 0x83
/** A requested gain mode change is not allowed */
#define BT_AICS_ERR_GAIN_MODE_NOT_ALLOWED 0x84
/** @} */

/** @brief Opaque Audio Input Control Service instance. */
struct bt_aics;
Expand Down Expand Up @@ -105,12 +166,14 @@ struct bt_aics_register_param {

/** @brief Structure for discovering a Audio Input Control Service instance. */
struct bt_aics_discover_param {
/** @brief The start handle of the discovering.
/**
* @brief The start handle of the discovering.
*
* Typically the @p start_handle of a @ref bt_gatt_include.
*/
uint16_t start_handle;
/** @brief The end handle of the discovering.
/**
* @brief The end handle of the discovering.
*
* Typically the @p end_handle of a @ref bt_gatt_include.
*/
Expand Down Expand Up @@ -256,19 +319,35 @@ typedef void (*bt_aics_description_cb)(struct bt_aics *inst, int err,
*/
typedef void (*bt_aics_discover_cb)(struct bt_aics *inst, int err);

/**
* @brief Struct to hold callbacks for the Audio Input Control Service.
*
* Used by both clients and servers
*/
struct bt_aics_cb {
/** The audio input state has changed */
bt_aics_state_cb state;
/** The gain setting has changed */
bt_aics_gain_setting_cb gain_setting;
/** The audio input type has changed */
bt_aics_type_cb type;
/** The audio input status has changed */
bt_aics_status_cb status;
/** The audio input decscription has changed */
bt_aics_description_cb description;

#if defined(CONFIG_BT_AICS_CLIENT)
#if defined(CONFIG_BT_AICS_CLIENT) || defined(__DOXYGEN__)
/** The discovery has completed */
bt_aics_discover_cb discover;
/** The set gain operation has completed */
bt_aics_write_cb set_gain;
/** The unmute operation has completed */
bt_aics_write_cb unmute;
/** The mut operation has completed */
bt_aics_write_cb mute;
/** The set manual mode operation has completed */
bt_aics_write_cb set_manual_mode;
/** The set automatic mode has completed */
bt_aics_write_cb set_auto_mode;
#endif /* CONFIG_BT_AICS_CLIENT */
};
Expand Down
Loading
Loading