Zephyr API Documentation
3.6.99
A Scalable Open Source RTOS
|
Microphone Control Profile (MICP) More...
Data Structures | |
struct | bt_micp_mic_dev_register_param |
Register parameters structure for Microphone Control Service. More... | |
struct | bt_micp_included |
Microphone Control Profile included services. More... | |
struct | bt_micp_mic_dev_cb |
struct | bt_micp_mic_ctlr_cb |
Macros | |
#define | BT_MICP_MIC_DEV_AICS_CNT 0 |
#define | BT_MICP_ERR_MUTE_DISABLED 0x80 |
Application error codes. | |
#define | BT_MICP_MUTE_UNMUTED 0x00 |
Microphone Control Profile mute states. | |
#define | BT_MICP_MUTE_MUTED 0x01 |
#define | BT_MICP_MUTE_DISABLED 0x02 |
Functions | |
int | bt_micp_mic_dev_register (struct bt_micp_mic_dev_register_param *param) |
Initialize the Microphone Control Profile Microphone Device. | |
int | bt_micp_mic_dev_included_get (struct bt_micp_included *included) |
Get Microphone Device included services. | |
int | bt_micp_mic_dev_unmute (void) |
Unmute the Microphone Device. | |
int | bt_micp_mic_dev_mute (void) |
Mute the Microphone Device. | |
int | bt_micp_mic_dev_mute_disable (void) |
Disable the mute functionality on the Microphone Device. | |
int | bt_micp_mic_dev_mute_get (void) |
Read the mute state on the Microphone Device. | |
int | bt_micp_mic_ctlr_included_get (struct bt_micp_mic_ctlr *mic_ctlr, struct bt_micp_included *included) |
Get Microphone Control Profile included services. | |
int | bt_micp_mic_ctlr_conn_get (const struct bt_micp_mic_ctlr *mic_ctlr, struct bt_conn **conn) |
Get the connection pointer of a Microphone Controller instance. | |
struct bt_micp_mic_ctlr * | bt_micp_mic_ctlr_get_by_conn (const struct bt_conn *conn) |
Get the volume controller from a connection pointer. | |
int | bt_micp_mic_ctlr_discover (struct bt_conn *conn, struct bt_micp_mic_ctlr **mic_ctlr) |
Discover Microphone Control Service. | |
int | bt_micp_mic_ctlr_unmute (struct bt_micp_mic_ctlr *mic_ctlr) |
Unmute a remote Microphone Device. | |
int | bt_micp_mic_ctlr_mute (struct bt_micp_mic_ctlr *mic_ctlr) |
Mute a remote Microphone Device. | |
int | bt_micp_mic_ctlr_mute_get (struct bt_micp_mic_ctlr *mic_ctlr) |
Read the mute state of a remote Microphone Device. | |
int | bt_micp_mic_ctlr_cb_register (struct bt_micp_mic_ctlr_cb *cb) |
Registers the callbacks used by Microphone Controller. | |
Microphone Control Profile (MICP)
#define BT_MICP_ERR_MUTE_DISABLED 0x80 |
#include <zephyr/bluetooth/audio/micp.h>
Application error codes.
#define BT_MICP_MIC_DEV_AICS_CNT 0 |
#include <zephyr/bluetooth/audio/micp.h>
#define BT_MICP_MUTE_DISABLED 0x02 |
#include <zephyr/bluetooth/audio/micp.h>
#define BT_MICP_MUTE_MUTED 0x01 |
#include <zephyr/bluetooth/audio/micp.h>
#define BT_MICP_MUTE_UNMUTED 0x00 |
#include <zephyr/bluetooth/audio/micp.h>
Microphone Control Profile mute states.
int bt_micp_mic_ctlr_cb_register | ( | struct bt_micp_mic_ctlr_cb * | cb | ) |
#include <zephyr/bluetooth/audio/micp.h>
Registers the callbacks used by Microphone Controller.
This can only be done as the client.
cb | The callback structure. |
int bt_micp_mic_ctlr_conn_get | ( | const struct bt_micp_mic_ctlr * | mic_ctlr, |
struct bt_conn ** | conn | ||
) |
#include <zephyr/bluetooth/audio/micp.h>
Get the connection pointer of a Microphone Controller instance.
Get the Bluetooth connection pointer of a Microphone Controller instance.
mic_ctlr | Microphone Controller instance pointer. |
conn | Connection pointer. |
int bt_micp_mic_ctlr_discover | ( | struct bt_conn * | conn, |
struct bt_micp_mic_ctlr ** | mic_ctlr | ||
) |
#include <zephyr/bluetooth/audio/micp.h>
Discover Microphone Control Service.
This will start a GATT discovery and setup handles and subscriptions. This shall be called once before any other actions can be executed for the peer device, and the bt_micp_mic_ctlr_cb::discover callback will notify when it is possible to start remote operations.
conn | The connection to initialize the profile for. | |
[out] | mic_ctlr | Valid remote instance object on success. |
struct bt_micp_mic_ctlr * bt_micp_mic_ctlr_get_by_conn | ( | const struct bt_conn * | conn | ) |
#include <zephyr/bluetooth/audio/micp.h>
Get the volume controller from a connection pointer.
Get the Volume Control Profile Volume Controller pointer from a connection pointer. Only volume controllers that have been initiated via bt_micp_mic_ctlr_discover() can be retrieved.
conn | Connection pointer. |
Pointer | to a Microphone Control Profile Microphone Controller instance |
NULL | if conn is NULL or if the connection has not done discovery yet |
int bt_micp_mic_ctlr_included_get | ( | struct bt_micp_mic_ctlr * | mic_ctlr, |
struct bt_micp_included * | included | ||
) |
#include <zephyr/bluetooth/audio/micp.h>
Get Microphone Control Profile included services.
Returns a pointer to a struct that contains information about the Microphone Control Profile included services instances, such as pointers to the Audio Input Control Service instances.
Requires that CONFIG_BT_MICP_MIC_CTLR_AICS
is enabled.
mic_ctlr | Microphone Controller instance pointer. | |
[out] | included | Pointer to store the result in. |
int bt_micp_mic_ctlr_mute | ( | struct bt_micp_mic_ctlr * | mic_ctlr | ) |
#include <zephyr/bluetooth/audio/micp.h>
Mute a remote Microphone Device.
mic_ctlr | Microphone Controller instance pointer. |
int bt_micp_mic_ctlr_mute_get | ( | struct bt_micp_mic_ctlr * | mic_ctlr | ) |
#include <zephyr/bluetooth/audio/micp.h>
Read the mute state of a remote Microphone Device.
mic_ctlr | Microphone Controller instance pointer. |
int bt_micp_mic_ctlr_unmute | ( | struct bt_micp_mic_ctlr * | mic_ctlr | ) |
#include <zephyr/bluetooth/audio/micp.h>
Unmute a remote Microphone Device.
mic_ctlr | Microphone Controller instance pointer. |
int bt_micp_mic_dev_included_get | ( | struct bt_micp_included * | included | ) |
#include <zephyr/bluetooth/audio/micp.h>
Get Microphone Device included services.
Returns a pointer to a struct that contains information about the Microphone Device included Audio Input Control Service instances.
Requires that CONFIG_BT_MICP_MIC_DEV_AICS
is enabled.
included | Pointer to store the result in. |
int bt_micp_mic_dev_mute | ( | void | ) |
#include <zephyr/bluetooth/audio/micp.h>
Mute the Microphone Device.
int bt_micp_mic_dev_mute_disable | ( | void | ) |
#include <zephyr/bluetooth/audio/micp.h>
Disable the mute functionality on the Microphone Device.
Can be reenabled by called bt_micp_mic_dev_mute or bt_micp_mic_dev_unmute.
int bt_micp_mic_dev_mute_get | ( | void | ) |
#include <zephyr/bluetooth/audio/micp.h>
Read the mute state on the Microphone Device.
int bt_micp_mic_dev_register | ( | struct bt_micp_mic_dev_register_param * | param | ) |
#include <zephyr/bluetooth/audio/micp.h>
Initialize the Microphone Control Profile Microphone Device.
This will enable the Microphone Control Service instance and make it discoverable by Microphone Controllers.
param | Pointer to an initialization structure. |
int bt_micp_mic_dev_unmute | ( | void | ) |
#include <zephyr/bluetooth/audio/micp.h>
Unmute the Microphone Device.