Zephyr Project API  3.2.0
A Scalable Open Source RTOS
Microphone Input Control Profile (MICP)

Microphone Input Control Profile (MICP) More...

Data Structures

struct  bt_micp_mic_dev_register_param
 Register parameters structure for Microphone Input Control Service. More...
 
struct  bt_micp_included
 Microphone Input 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
 
#define BT_MICP_ERR_VAL_OUT_OF_RANGE   0x81
 
#define BT_MICP_MUTE_UNMUTED   0x00
 
#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 Input Control Profile Microphone Device. More...
 
int bt_micp_mic_dev_included_get (struct bt_micp_included *included)
 Get Microphone Device included services. More...
 
int bt_micp_mic_dev_unmute (void)
 Unmute the Microphone Device. More...
 
int bt_micp_mic_dev_mute (void)
 Mute the Microphone Device. More...
 
int bt_micp_mic_dev_mute_disable (void)
 Disable the mute functionality on the Microphone Device. More...
 
int bt_micp_mic_dev_mute_get (void)
 Read the mute state on the Microphone Device. More...
 
int bt_micp_mic_ctlr_included_get (struct bt_micp_mic_ctlr *mic_ctlr, struct bt_micp_included *included)
 Get Microphone Input Control Profile included services. More...
 
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. More...
 
int bt_micp_mic_ctlr_discover (struct bt_conn *conn, struct bt_micp_mic_ctlr **mic_ctlr)
 Discover Microphone Input Control Service. More...
 
int bt_micp_mic_ctlr_unmute (struct bt_micp_mic_ctlr *mic_ctlr)
 Unmute a remote Microphone Device. More...
 
int bt_micp_mic_ctlr_mute (struct bt_micp_mic_ctlr *mic_ctlr)
 Mute a remote Microphone Device. More...
 
int bt_micp_mic_ctlr_mute_get (struct bt_micp_mic_ctlr *mic_ctlr)
 Read the mute state of a remote Microphone Device. More...
 
int bt_micp_mic_ctlr_cb_register (struct bt_micp_mic_ctlr_cb *cb)
 Registers the callbacks used by Microphone Controller. More...
 

Detailed Description

Microphone Input Control Profile (MICP)

[Experimental] Users should note that the APIs can change as a part of ongoing development.

Macro Definition Documentation

◆ BT_MICP_ERR_MUTE_DISABLED

#define BT_MICP_ERR_MUTE_DISABLED   0x80

#include <include/zephyr/bluetooth/audio/micp.h>

Application error codes

◆ BT_MICP_ERR_VAL_OUT_OF_RANGE

#define BT_MICP_ERR_VAL_OUT_OF_RANGE   0x81

◆ BT_MICP_MIC_DEV_AICS_CNT

#define BT_MICP_MIC_DEV_AICS_CNT   0

◆ BT_MICP_MUTE_DISABLED

#define BT_MICP_MUTE_DISABLED   0x02

◆ BT_MICP_MUTE_MUTED

#define BT_MICP_MUTE_MUTED   0x01

◆ BT_MICP_MUTE_UNMUTED

#define BT_MICP_MUTE_UNMUTED   0x00

#include <include/zephyr/bluetooth/audio/micp.h>

Microphone Input Control Profile mute states

Function Documentation

◆ bt_micp_mic_ctlr_cb_register()

int bt_micp_mic_ctlr_cb_register ( struct bt_micp_mic_ctlr_cb cb)

#include <include/zephyr/bluetooth/audio/micp.h>

Registers the callbacks used by Microphone Controller.

This can only be done as the client.

Parameters
cbThe callback structure.
Returns
0 if success, errno on failure.

◆ bt_micp_mic_ctlr_conn_get()

int bt_micp_mic_ctlr_conn_get ( const struct bt_micp_mic_ctlr *  mic_ctlr,
struct bt_conn **  conn 
)

#include <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.

Parameters
mic_ctlrMicrophone Controller instance pointer.
connConnection pointer.
Returns
0 if success, errno on failure.

◆ bt_micp_mic_ctlr_discover()

int bt_micp_mic_ctlr_discover ( struct bt_conn *  conn,
struct bt_micp_mic_ctlr **  mic_ctlr 
)

#include <include/zephyr/bluetooth/audio/micp.h>

Discover Microphone Input 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.

  • Parameters
    connThe connection to initialize the profile for.
    [out]mic_ctlrValid remote instance object on success.
    Returns
    0 on success, GATT error value on fail.

◆ bt_micp_mic_ctlr_included_get()

int bt_micp_mic_ctlr_included_get ( struct bt_micp_mic_ctlr *  mic_ctlr,
struct bt_micp_included included 
)

#include <include/zephyr/bluetooth/audio/micp.h>

Get Microphone Input Control Profile included services.

Returns a pointer to a struct that contains information about the Microphone Input 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.

Parameters
mic_ctlrMicrophone Controller instance pointer.
[out]includedPointer to store the result in.
Returns
0 if success, errno on failure.

◆ bt_micp_mic_ctlr_mute()

int bt_micp_mic_ctlr_mute ( struct bt_micp_mic_ctlr *  mic_ctlr)

#include <include/zephyr/bluetooth/audio/micp.h>

Mute a remote Microphone Device.

Parameters
mic_ctlrMicrophone Controller instance pointer.
Returns
0 on success, GATT error value on fail.

◆ bt_micp_mic_ctlr_mute_get()

int bt_micp_mic_ctlr_mute_get ( struct bt_micp_mic_ctlr *  mic_ctlr)

#include <include/zephyr/bluetooth/audio/micp.h>

Read the mute state of a remote Microphone Device.

Parameters
mic_ctlrMicrophone Controller instance pointer.
Returns
0 on success, GATT error value on fail.

◆ bt_micp_mic_ctlr_unmute()

int bt_micp_mic_ctlr_unmute ( struct bt_micp_mic_ctlr *  mic_ctlr)

#include <include/zephyr/bluetooth/audio/micp.h>

Unmute a remote Microphone Device.

Parameters
mic_ctlrMicrophone Controller instance pointer.
Returns
0 on success, GATT error value on fail.

◆ bt_micp_mic_dev_included_get()

int bt_micp_mic_dev_included_get ( struct bt_micp_included included)

#include <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.

Parameters
includedPointer to store the result in.
Returns
0 if success, errno on failure.

◆ bt_micp_mic_dev_mute()

int bt_micp_mic_dev_mute ( void  )

#include <include/zephyr/bluetooth/audio/micp.h>

Mute the Microphone Device.

Returns
0 on success, GATT error value on fail.

◆ bt_micp_mic_dev_mute_disable()

int bt_micp_mic_dev_mute_disable ( void  )

#include <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.

Returns
0 on success, GATT error value on fail.

◆ bt_micp_mic_dev_mute_get()

int bt_micp_mic_dev_mute_get ( void  )

#include <include/zephyr/bluetooth/audio/micp.h>

Read the mute state on the Microphone Device.

Returns
0 on success, GATT error value on fail.

◆ bt_micp_mic_dev_register()

int bt_micp_mic_dev_register ( struct bt_micp_mic_dev_register_param param)

#include <include/zephyr/bluetooth/audio/micp.h>

Initialize the Microphone Input Control Profile Microphone Device.

This will enable the Microphone Input Control Service instance and make it discoverable by Microphone Controllers.

Parameters
paramPointer to an initialization structure.
Returns
0 if success, errno on failure.

◆ bt_micp_mic_dev_unmute()

int bt_micp_mic_dev_unmute ( void  )

#include <include/zephyr/bluetooth/audio/micp.h>

Unmute the Microphone Device.

Returns
0 on success, GATT error value on fail.