mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
feat(ble_audio): Miscellaneous update for verifying with PTS cases
This commit is contained in:
@@ -395,6 +395,12 @@ esp_err_t esp_ble_audio_bap_unicast_server_unregister_cb(const esp_ble_audio_bap
|
||||
/**
|
||||
* @brief Initialize and configure a new ASE.
|
||||
*
|
||||
* @note Direction-agnostic: configures the first free ASE by index. Sink ASEs
|
||||
* are ordered before source ASEs, so this picks a sink ASE whenever one
|
||||
* is free and only falls back to a source ASE when all sink ASEs are in
|
||||
* use. Use esp_ble_audio_bap_unicast_server_config_ase_with_dir() to
|
||||
* target a specific direction.
|
||||
*
|
||||
* @param conn_handle Connection handle.
|
||||
* @param stream Configured stream object to be attached to the ASE.
|
||||
* @param codec_cfg Codec configuration.
|
||||
@@ -407,6 +413,27 @@ esp_err_t esp_ble_audio_bap_unicast_server_config_ase(uint16_t conn_handle,
|
||||
esp_ble_audio_codec_cfg_t *codec_cfg,
|
||||
const esp_ble_audio_bap_qos_cfg_pref_t *qos_pref);
|
||||
|
||||
/**
|
||||
* @brief Initialize and configure a new ASE of a specific direction.
|
||||
*
|
||||
* Like esp_ble_audio_bap_unicast_server_config_ase(), but configures the first
|
||||
* free ASE of the requested direction, letting a server initiate a config on a
|
||||
* source ASE (the direction-agnostic variant picks the first free ASE).
|
||||
*
|
||||
* @param conn_handle Connection handle.
|
||||
* @param stream Configured stream object to be attached to the ASE.
|
||||
* @param codec_cfg Codec configuration.
|
||||
* @param qos_pref Audio Stream Quality of Service Preference.
|
||||
* @param dir ASE direction to configure (sink or source).
|
||||
*
|
||||
* @return ESP_OK on success, or an error code on failure.
|
||||
*/
|
||||
esp_err_t esp_ble_audio_bap_unicast_server_config_ase_with_dir(uint16_t conn_handle,
|
||||
esp_ble_audio_bap_stream_t *stream,
|
||||
esp_ble_audio_codec_cfg_t *codec_cfg,
|
||||
const esp_ble_audio_bap_qos_cfg_pref_t *qos_pref,
|
||||
esp_ble_audio_dir_t dir);
|
||||
|
||||
/**
|
||||
* @brief Create unicast group.
|
||||
*
|
||||
|
||||
@@ -26,7 +26,38 @@ typedef struct bt_bap_lc3_preset esp_ble_audio_bap_lc3_preset_t;
|
||||
BT_BAP_LC3_PRESET(_codec, _qos)
|
||||
|
||||
/**
|
||||
* @brief Define an LC3 preset configuration.
|
||||
* @brief Define an LC3 preset from a pre-built QoS configuration.
|
||||
*
|
||||
* @param _name Preset configuration name.
|
||||
* @param _freq Sample frequency (in Hz).
|
||||
* @param _duration Frame duration (in microseconds).
|
||||
* @param _loc Audio channel location.
|
||||
* @param _len Frame length in octets.
|
||||
* @param _frames_per_sdu Number of frames per SDU.
|
||||
* @param _stream_context Stream context (e.g., Media, Conversational, etc.).
|
||||
* @param _qos BAP QoS configuration (framed or unframed).
|
||||
*
|
||||
* Backing buffers are sized to `CONFIG_BT_AUDIO_CODEC_CFG_MAX_*_SIZE` so
|
||||
* the preset is safe to mutate via `esp_ble_audio_codec_cfg_*_set_*`.
|
||||
*/
|
||||
#define ESP_BLE_AUDIO_BAP_LC3_PRESET_DEFINE_QOS(_name, _freq, _duration, _loc, _len, \
|
||||
_frames_per_sdu, _stream_context, _qos) \
|
||||
static uint8_t codec_cfg_data_##_name[CONFIG_BT_AUDIO_CODEC_CFG_MAX_DATA_SIZE] = \
|
||||
ESP_BLE_AUDIO_CODEC_CFG_LC3_DATA(_freq, _duration, _loc, _len, _frames_per_sdu); \
|
||||
static uint8_t codec_cfg_meta_##_name[CONFIG_BT_AUDIO_CODEC_CFG_MAX_METADATA_SIZE] = \
|
||||
ESP_BLE_AUDIO_CODEC_CFG_LC3_META(_stream_context); \
|
||||
static esp_ble_audio_bap_lc3_preset_t _name = \
|
||||
ESP_BLE_AUDIO_BAP_LC3_PRESET( \
|
||||
ESP_BLE_AUDIO_CODEC_CFG_LC3_LEN( \
|
||||
codec_cfg_data_##_name, \
|
||||
sizeof((uint8_t[])ESP_BLE_AUDIO_CODEC_CFG_LC3_DATA(_freq, _duration, _loc, \
|
||||
_len, _frames_per_sdu)), \
|
||||
codec_cfg_meta_##_name, \
|
||||
sizeof((uint8_t[])ESP_BLE_AUDIO_CODEC_CFG_LC3_META(_stream_context))), \
|
||||
_qos);
|
||||
|
||||
/**
|
||||
* @brief Define an LC3 preset configuration with unframed QoS.
|
||||
*
|
||||
* @param _name Preset configuration name.
|
||||
* @param _freq Sample frequency (in Hz).
|
||||
@@ -40,26 +71,41 @@ typedef struct bt_bap_lc3_preset esp_ble_audio_bap_lc3_preset_t;
|
||||
* @param _rtn Number of retransmissions.
|
||||
* @param _latency Maximum transport latency (in milliseconds).
|
||||
* @param _pd Presentation delay (in microseconds).
|
||||
*
|
||||
* Backing buffers are sized to `CONFIG_BT_AUDIO_CODEC_CFG_MAX_*_SIZE` so
|
||||
* the preset is safe to mutate via `esp_ble_audio_codec_cfg_*_set_*`.
|
||||
*/
|
||||
#define ESP_BLE_AUDIO_BAP_LC3_PRESET_DEFINE(_name, _freq, _duration, _loc, _len, \
|
||||
_frames_per_sdu, _stream_context, \
|
||||
_interval, _sdu, _rtn, _latency, _pd) \
|
||||
static uint8_t codec_cfg_data_##_name[CONFIG_BT_AUDIO_CODEC_CFG_MAX_DATA_SIZE] = \
|
||||
ESP_BLE_AUDIO_CODEC_CFG_LC3_DATA(_freq, _duration, _loc, _len, _frames_per_sdu); \
|
||||
static uint8_t codec_cfg_meta_##_name[CONFIG_BT_AUDIO_CODEC_CFG_MAX_METADATA_SIZE] = \
|
||||
ESP_BLE_AUDIO_CODEC_CFG_LC3_META(_stream_context); \
|
||||
static esp_ble_audio_bap_lc3_preset_t _name = \
|
||||
ESP_BLE_AUDIO_BAP_LC3_PRESET( \
|
||||
ESP_BLE_AUDIO_CODEC_CFG_LC3_LEN( \
|
||||
codec_cfg_data_##_name, \
|
||||
sizeof((uint8_t[])ESP_BLE_AUDIO_CODEC_CFG_LC3_DATA(_freq, _duration, _loc, \
|
||||
_len, _frames_per_sdu)), \
|
||||
codec_cfg_meta_##_name, \
|
||||
sizeof((uint8_t[])ESP_BLE_AUDIO_CODEC_CFG_LC3_META(_stream_context))), \
|
||||
ESP_BLE_AUDIO_BAP_QOS_CFG_UNFRAMED(_interval, _sdu, _rtn, _latency, _pd));
|
||||
ESP_BLE_AUDIO_BAP_LC3_PRESET_DEFINE_QOS(_name, _freq, _duration, _loc, _len, \
|
||||
_frames_per_sdu, _stream_context, \
|
||||
ESP_BLE_AUDIO_BAP_QOS_CFG_UNFRAMED(_interval, _sdu, \
|
||||
_rtn, _latency, _pd))
|
||||
|
||||
/**
|
||||
* @brief Define an LC3 preset configuration with framed QoS.
|
||||
*
|
||||
* Required for 44.1 kHz configs: their SDU interval is not an integer number of
|
||||
* microseconds, so unframed PDUs are invalid (BAP spec Table 5.2).
|
||||
*
|
||||
* @param _name Preset configuration name.
|
||||
* @param _freq Sample frequency (in Hz).
|
||||
* @param _duration Frame duration (in microseconds).
|
||||
* @param _loc Audio channel location.
|
||||
* @param _len Frame length in octets.
|
||||
* @param _frames_per_sdu Number of frames per SDU.
|
||||
* @param _stream_context Stream context (e.g., Media, Conversational, etc.).
|
||||
* @param _interval Audio frame interval (in microseconds).
|
||||
* @param _sdu SDU size in octets.
|
||||
* @param _rtn Number of retransmissions.
|
||||
* @param _latency Maximum transport latency (in milliseconds).
|
||||
* @param _pd Presentation delay (in microseconds).
|
||||
*/
|
||||
#define ESP_BLE_AUDIO_BAP_LC3_PRESET_DEFINE_FRAMED(_name, _freq, _duration, _loc, _len, \
|
||||
_frames_per_sdu, _stream_context, \
|
||||
_interval, _sdu, _rtn, _latency, _pd) \
|
||||
ESP_BLE_AUDIO_BAP_LC3_PRESET_DEFINE_QOS(_name, _freq, _duration, _loc, _len, \
|
||||
_frames_per_sdu, _stream_context, \
|
||||
ESP_BLE_AUDIO_BAP_QOS_CFG_FRAMED(_interval, _sdu, \
|
||||
_rtn, _latency, _pd))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 8_1_1 codec configuration.
|
||||
@@ -191,12 +237,12 @@ typedef struct bt_bap_lc3_preset esp_ble_audio_bap_lc3_preset_t;
|
||||
* @param _stream_context Stream context.
|
||||
*/
|
||||
#define ESP_BLE_AUDIO_BAP_LC3_UNICAST_PRESET_441_1_1_DEFINE(_name, _loc, _stream_context) \
|
||||
ESP_BLE_AUDIO_BAP_LC3_PRESET_DEFINE(_name, \
|
||||
BT_AUDIO_CODEC_CFG_FREQ_44KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, \
|
||||
_loc, 97U, 1, \
|
||||
_stream_context, \
|
||||
8163u, 97u, 5u, 24u, 40000u)
|
||||
ESP_BLE_AUDIO_BAP_LC3_PRESET_DEFINE_FRAMED(_name, \
|
||||
BT_AUDIO_CODEC_CFG_FREQ_44KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, \
|
||||
_loc, 97U, 1, \
|
||||
_stream_context, \
|
||||
8163u, 97u, 5u, 24u, 40000u)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 441_2_1 codec configuration.
|
||||
@@ -206,12 +252,12 @@ typedef struct bt_bap_lc3_preset esp_ble_audio_bap_lc3_preset_t;
|
||||
* @param _stream_context Stream context.
|
||||
*/
|
||||
#define ESP_BLE_AUDIO_BAP_LC3_UNICAST_PRESET_441_2_1_DEFINE(_name, _loc, _stream_context) \
|
||||
ESP_BLE_AUDIO_BAP_LC3_PRESET_DEFINE(_name, \
|
||||
BT_AUDIO_CODEC_CFG_FREQ_44KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, \
|
||||
_loc, 130U, 1, \
|
||||
_stream_context, \
|
||||
10884u, 130u, 5u, 31u, 40000u)
|
||||
ESP_BLE_AUDIO_BAP_LC3_PRESET_DEFINE_FRAMED(_name, \
|
||||
BT_AUDIO_CODEC_CFG_FREQ_44KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, \
|
||||
_loc, 130U, 1, \
|
||||
_stream_context, \
|
||||
10884u, 130u, 5u, 31u, 40000u)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 48_1_1 codec configuration.
|
||||
@@ -431,12 +477,12 @@ typedef struct bt_bap_lc3_preset esp_ble_audio_bap_lc3_preset_t;
|
||||
* @param _stream_context Stream context.
|
||||
*/
|
||||
#define ESP_BLE_AUDIO_BAP_LC3_UNICAST_PRESET_441_1_2_DEFINE(_name, _loc, _stream_context) \
|
||||
ESP_BLE_AUDIO_BAP_LC3_PRESET_DEFINE(_name, \
|
||||
BT_AUDIO_CODEC_CFG_FREQ_44KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, \
|
||||
_loc, 97U, 1, \
|
||||
_stream_context, \
|
||||
8163u, 97u, 13u, 80u, 40000u)
|
||||
ESP_BLE_AUDIO_BAP_LC3_PRESET_DEFINE_FRAMED(_name, \
|
||||
BT_AUDIO_CODEC_CFG_FREQ_44KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, \
|
||||
_loc, 97U, 1, \
|
||||
_stream_context, \
|
||||
8163u, 97u, 13u, 80u, 40000u)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 441_2_2 codec configuration.
|
||||
@@ -446,12 +492,12 @@ typedef struct bt_bap_lc3_preset esp_ble_audio_bap_lc3_preset_t;
|
||||
* @param _stream_context Stream context.
|
||||
*/
|
||||
#define ESP_BLE_AUDIO_BAP_LC3_UNICAST_PRESET_441_2_2_DEFINE(_name, _loc, _stream_context) \
|
||||
ESP_BLE_AUDIO_BAP_LC3_PRESET_DEFINE(_name, \
|
||||
BT_AUDIO_CODEC_CFG_FREQ_44KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, \
|
||||
_loc, 130U, 1, \
|
||||
_stream_context, \
|
||||
10884u, 130u, 13u, 85u, 40000u)
|
||||
ESP_BLE_AUDIO_BAP_LC3_PRESET_DEFINE_FRAMED(_name, \
|
||||
BT_AUDIO_CODEC_CFG_FREQ_44KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, \
|
||||
_loc, 130U, 1, \
|
||||
_stream_context, \
|
||||
10884u, 130u, 13u, 85u, 40000u)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 48_1_2 codec configuration.
|
||||
@@ -675,12 +721,12 @@ typedef struct bt_bap_lc3_preset esp_ble_audio_bap_lc3_preset_t;
|
||||
* @param _stream_context Stream context.
|
||||
*/
|
||||
#define ESP_BLE_AUDIO_BAP_LC3_BROADCAST_PRESET_441_1_1_DEFINE(_name, _loc, _stream_context) \
|
||||
ESP_BLE_AUDIO_BAP_LC3_PRESET_DEFINE(_name, \
|
||||
BT_AUDIO_CODEC_CFG_FREQ_44KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, \
|
||||
_loc, 97U, 1, \
|
||||
_stream_context, \
|
||||
8163u, 97u, 4u, 24u, 40000u)
|
||||
ESP_BLE_AUDIO_BAP_LC3_PRESET_DEFINE_FRAMED(_name, \
|
||||
BT_AUDIO_CODEC_CFG_FREQ_44KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, \
|
||||
_loc, 97U, 1, \
|
||||
_stream_context, \
|
||||
8163u, 97u, 4u, 24u, 40000u)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 441_2_1 codec configuration.
|
||||
@@ -690,12 +736,12 @@ typedef struct bt_bap_lc3_preset esp_ble_audio_bap_lc3_preset_t;
|
||||
* @param _stream_context Stream context.
|
||||
*/
|
||||
#define ESP_BLE_AUDIO_BAP_LC3_BROADCAST_PRESET_441_2_1_DEFINE(_name, _loc, _stream_context) \
|
||||
ESP_BLE_AUDIO_BAP_LC3_PRESET_DEFINE(_name, \
|
||||
BT_AUDIO_CODEC_CFG_FREQ_44KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, \
|
||||
_loc, 130U, 1, \
|
||||
_stream_context, \
|
||||
10884u, 130u, 4u, 31u, 40000u)
|
||||
ESP_BLE_AUDIO_BAP_LC3_PRESET_DEFINE_FRAMED(_name, \
|
||||
BT_AUDIO_CODEC_CFG_FREQ_44KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, \
|
||||
_loc, 130U, 1, \
|
||||
_stream_context, \
|
||||
10884u, 130u, 4u, 31u, 40000u)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_1_1 codec configuration.
|
||||
@@ -919,12 +965,12 @@ typedef struct bt_bap_lc3_preset esp_ble_audio_bap_lc3_preset_t;
|
||||
* @param _stream_context Stream context.
|
||||
*/
|
||||
#define ESP_BLE_AUDIO_BAP_LC3_BROADCAST_PRESET_441_1_2_DEFINE(_name, _loc, _stream_context) \
|
||||
ESP_BLE_AUDIO_BAP_LC3_PRESET_DEFINE(_name, \
|
||||
BT_AUDIO_CODEC_CFG_FREQ_44KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, \
|
||||
_loc, 97U, 1, \
|
||||
_stream_context, \
|
||||
8163u, 97u, 4u, 54u, 40000u)
|
||||
ESP_BLE_AUDIO_BAP_LC3_PRESET_DEFINE_FRAMED(_name, \
|
||||
BT_AUDIO_CODEC_CFG_FREQ_44KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, \
|
||||
_loc, 97U, 1, \
|
||||
_stream_context, \
|
||||
8163u, 97u, 4u, 54u, 40000u)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 441_2_2 codec configuration.
|
||||
@@ -934,12 +980,12 @@ typedef struct bt_bap_lc3_preset esp_ble_audio_bap_lc3_preset_t;
|
||||
* @param _stream_context Stream context.
|
||||
*/
|
||||
#define ESP_BLE_AUDIO_BAP_LC3_BROADCAST_PRESET_441_2_2_DEFINE(_name, _loc, _stream_context) \
|
||||
ESP_BLE_AUDIO_BAP_LC3_PRESET_DEFINE(_name, \
|
||||
BT_AUDIO_CODEC_CFG_FREQ_44KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, \
|
||||
_loc, 130U, 1, \
|
||||
_stream_context, \
|
||||
10884u, 130u, 4u, 60u, 40000u)
|
||||
ESP_BLE_AUDIO_BAP_LC3_PRESET_DEFINE_FRAMED(_name, \
|
||||
BT_AUDIO_CODEC_CFG_FREQ_44KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, \
|
||||
_loc, 130U, 1, \
|
||||
_stream_context, \
|
||||
10884u, 130u, 4u, 60u, 40000u)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_1_2 codec configuration.
|
||||
|
||||
@@ -498,7 +498,9 @@ esp_err_t esp_ble_audio_cap_handover_unregister_cb(const esp_ble_audio_cap_hando
|
||||
* esp_ble_audio_bap_broadcast_assistant_discover() must have been successfully perform for
|
||||
* all members in @p param before starting this procedure.
|
||||
*
|
||||
* @param param The parameters for the handover.
|
||||
* @param param The parameters for the handover. Its @c ext_adv field is resolved
|
||||
* internally from @c param->adv_handle, so the caller sets adv_handle
|
||||
* and leaves ext_adv NULL.
|
||||
*
|
||||
* @return ESP_OK on success, or an error code on failure.
|
||||
*/
|
||||
|
||||
@@ -26,10 +26,13 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/*!< Size of the Set Identification Resolving Key (SIRK) */
|
||||
#define ESP_BLE_AUDIO_CSIP_SIRK_SIZE BT_CSIP_SIRK_SIZE
|
||||
#define ESP_BLE_AUDIO_CSIP_SIRK_SIZE BT_CSIP_SIRK_SIZE
|
||||
|
||||
/*!< Size of the Resolvable Set Identifier (RSI) */
|
||||
#define ESP_BLE_AUDIO_CSIP_RSI_SIZE BT_CSIP_RSI_SIZE
|
||||
#define ESP_BLE_AUDIO_CSIP_RSI_SIZE BT_CSIP_RSI_SIZE
|
||||
|
||||
/*!< Maximum length of the Coordinated Set Name (CSIS v1.1), a 0-128 octet UTF-8 string */
|
||||
#define ESP_BLE_AUDIO_CSIP_SET_NAME_MAX_LEN BT_CSIP_SET_NAME_MAX_LEN
|
||||
|
||||
/*!< Accept the request to read the SIRK as plaintext */
|
||||
#define ESP_BLE_AUDIO_CSIP_READ_SIRK_REQ_RSP_ACCEPT BT_CSIP_READ_SIRK_REQ_RSP_ACCEPT
|
||||
@@ -142,6 +145,21 @@ esp_err_t esp_ble_audio_csip_set_member_sirk(esp_ble_audio_csip_set_member_svc_i
|
||||
esp_err_t esp_ble_audio_csip_set_member_set_size_and_rank(esp_ble_audio_csip_set_member_svc_inst_t *svc_inst,
|
||||
uint8_t size, uint8_t rank);
|
||||
|
||||
/**
|
||||
* @brief Set the Coordinated Set Name (CSIS v1.1) for a service instance.
|
||||
*
|
||||
* If CONFIG_BT_CSIP_SET_MEMBER_SET_NAME_NOTIFIABLE is enabled, this also notifies subscribed
|
||||
* clients (the first ATT_MTU-3 octets if the name is longer).
|
||||
*
|
||||
* @param svc_inst The service instance.
|
||||
* @param name The new name (UTF-8). May be NULL only if @p len is 0.
|
||||
* @param len Length of @p name in octets (0 to BT_CSIP_SET_NAME_MAX_LEN).
|
||||
*
|
||||
* @return ESP_OK on success, or an error code on failure.
|
||||
*/
|
||||
esp_err_t esp_ble_audio_csip_set_member_set_name(esp_ble_audio_csip_set_member_svc_inst_t *svc_inst,
|
||||
const uint8_t *name, uint8_t len);
|
||||
|
||||
/**
|
||||
* @brief Get information about a service instances.
|
||||
*
|
||||
|
||||
@@ -341,6 +341,8 @@ typedef enum bt_audio_assisted_listening_stream esp_ble_audio_assist
|
||||
#define ESP_BLE_AUDIO_UUID_CSIS_SET_LOCK_VAL BT_UUID_CSIS_SET_LOCK_VAL
|
||||
/*!< Rank value */
|
||||
#define ESP_BLE_AUDIO_UUID_CSIS_RANK_VAL BT_UUID_CSIS_RANK_VAL
|
||||
/*!< Coordinated Set Name value */
|
||||
#define ESP_BLE_AUDIO_UUID_CSIS_SET_NAME_VAL BT_UUID_CSIS_SET_NAME_VAL
|
||||
|
||||
/*!< Gaming Audio Profile Role UUID value */
|
||||
#define ESP_BLE_AUDIO_UUID_GMAP_ROLE_VAL BT_UUID_GMAP_ROLE_VAL
|
||||
|
||||
@@ -161,6 +161,20 @@ esp_err_t esp_ble_audio_has_client_preset_next(esp_ble_audio_has_t *has, bool sy
|
||||
*/
|
||||
esp_err_t esp_ble_audio_has_client_preset_prev(esp_ble_audio_has_t *has, bool sync);
|
||||
|
||||
/**
|
||||
* @brief Write Preset Name.
|
||||
*
|
||||
* Client procedure to change the name of the preset identified by @p index.
|
||||
*
|
||||
* @param has Pointer to the Hearing Access Service object.
|
||||
* @param index Preset index whose name to change.
|
||||
* @param name New preset name (1..40 octets).
|
||||
*
|
||||
* @return ESP_OK on success, or an error code on failure.
|
||||
*/
|
||||
esp_err_t esp_ble_audio_has_client_preset_name_write(esp_ble_audio_has_t *has,
|
||||
uint8_t index, const char *name);
|
||||
|
||||
/**
|
||||
* @brief Register the Hearing Access Service instance.
|
||||
*
|
||||
|
||||
@@ -729,6 +729,24 @@ esp_err_t esp_ble_audio_media_proxy_pl_register(esp_ble_audio_media_proxy_pl_cal
|
||||
*/
|
||||
esp_err_t esp_ble_audio_media_proxy_pl_init(void);
|
||||
|
||||
/**
|
||||
* @brief Set the local player name and notify it.
|
||||
*
|
||||
* @param name New player name. Copied internally; may be freed after the call returns.
|
||||
*
|
||||
* @return ESP_OK on success, or an error code on failure.
|
||||
*/
|
||||
esp_err_t esp_ble_audio_media_proxy_pl_set_player_name(char *name);
|
||||
|
||||
/**
|
||||
* @brief Set the current track title and notify it.
|
||||
*
|
||||
* @param title New track title. Copied internally; may be freed after the call returns.
|
||||
*
|
||||
* @return ESP_OK on success, or an error code on failure.
|
||||
*/
|
||||
esp_err_t esp_ble_audio_media_proxy_pl_set_track_title(char *title);
|
||||
|
||||
/**
|
||||
* @brief Get the pointer of the Object Transfer Service used by the Media Control Service.
|
||||
*
|
||||
|
||||
@@ -271,6 +271,47 @@ esp_err_t esp_ble_audio_tbs_remote_incoming(uint8_t bearer_index,
|
||||
const char *friendly_name,
|
||||
uint8_t *call_index);
|
||||
|
||||
/**
|
||||
* @brief Create a call directly in a given state (test setup helper).
|
||||
*
|
||||
* Allocates a call and sets it to @p state without running the call state
|
||||
* machine, bypassing the single-outgoing-call restriction and the
|
||||
* Dialing->Alerting auto-promotion. Intended for setting up the fixed call
|
||||
* configurations required by the Join test procedures.
|
||||
*
|
||||
* @param bearer_index The index of the Telephone Bearer.
|
||||
* @param state The initial call state (ESP_BLE_AUDIO_TBS_CALL_STATE_*).
|
||||
* @param uri The remote URI stored for the call.
|
||||
* @param call_index The call index on success.
|
||||
*
|
||||
* @return ESP_OK on success, or an error code on failure.
|
||||
*/
|
||||
esp_err_t esp_ble_audio_tbs_add_call(uint8_t bearer_index, uint8_t state,
|
||||
const char *uri, uint8_t *call_index);
|
||||
|
||||
/**
|
||||
* @brief Enable/disable automatic Dialing->Alerting promotion (test control).
|
||||
*
|
||||
* When disabled, an originated call on the bearer stays in Dialing until
|
||||
* esp_ble_audio_tbs_set_call_alerting() is called. Lets a test harness control
|
||||
* the transition timing and hold several outgoing calls in Dialing at once.
|
||||
*
|
||||
* @param bearer_index The index of the Telephone Bearer or GTBS index.
|
||||
* @param enable true to auto-promote (default), false to keep Dialing.
|
||||
*
|
||||
* @return ESP_OK on success, or an error code on failure.
|
||||
*/
|
||||
esp_err_t esp_ble_audio_tbs_set_auto_alerting(uint8_t bearer_index, bool enable);
|
||||
|
||||
/**
|
||||
* @brief Move a Dialing call to the Alerting state (test setup helper).
|
||||
*
|
||||
* @param call_index The call index to promote.
|
||||
*
|
||||
* @return ESP_OK on success, or an error code on failure.
|
||||
*/
|
||||
esp_err_t esp_ble_audio_tbs_set_call_alerting(uint8_t call_index);
|
||||
|
||||
/**
|
||||
* @brief Set a new bearer provider.
|
||||
*
|
||||
|
||||
@@ -29,6 +29,11 @@ extern "C" {
|
||||
/*!< The volume state is muted */
|
||||
#define ESP_BLE_AUDIO_VCP_STATE_MUTED BT_VCP_STATE_MUTED
|
||||
|
||||
/*!< Reset selector: apply the volume field (clears persisted flag) */
|
||||
#define ESP_BLE_AUDIO_VCP_RESET_VOLUME BT_VCP_VOL_REND_RESET_VOLUME
|
||||
/*!< Reset selector: apply the mute field */
|
||||
#define ESP_BLE_AUDIO_VCP_RESET_MUTE BT_VCP_VOL_REND_RESET_MUTE
|
||||
|
||||
/** Volume Control Service included services */
|
||||
typedef struct bt_vcp_included esp_ble_audio_vcp_included_t;
|
||||
|
||||
@@ -44,6 +49,9 @@ typedef struct bt_vcp_vol_rend_cb esp_ble_audio_vcp_vol_rend_cb_t;
|
||||
/** Register structure for Volume Control Service */
|
||||
typedef struct bt_vcp_vol_rend_register_param esp_ble_audio_vcp_vol_rend_register_param_t;
|
||||
|
||||
/** Parameters for resetting the Volume Renderer state */
|
||||
typedef struct bt_vcp_vol_rend_reset_param esp_ble_audio_vcp_vol_rend_reset_state_param_t;
|
||||
|
||||
/**
|
||||
* @brief Get Volume Control Service included services.
|
||||
*
|
||||
@@ -146,6 +154,21 @@ esp_err_t esp_ble_audio_vcp_vol_rend_unmute(void);
|
||||
*/
|
||||
esp_err_t esp_ble_audio_vcp_vol_rend_mute(void);
|
||||
|
||||
/**
|
||||
* @brief Reset selected volume state fields to an initial/reset value.
|
||||
*
|
||||
* For each field selected in @p param->fields (ESP_BLE_AUDIO_VCP_RESET_*), sets
|
||||
* it to the provided value without treating it as a user change. Resetting the
|
||||
* volume returns Volume_Setting_Persisted to Reset Volume Setting (0) per VCS
|
||||
* v1.0.1 Section 3.3.1. Use to establish a starting state that must report
|
||||
* persisted = 0.
|
||||
*
|
||||
* @param param Reset parameters. Must not be NULL.
|
||||
*
|
||||
* @return ESP_OK on success, or an error code on failure.
|
||||
*/
|
||||
esp_err_t esp_ble_audio_vcp_vol_rend_reset_state(const esp_ble_audio_vcp_vol_rend_reset_state_param_t *param);
|
||||
|
||||
/**
|
||||
* @brief Registers the callbacks used by the Volume Controller.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user