12#ifndef ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_ASCS_H_
13#define ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_ASCS_H_
34#include <zephyr/autoconf.h>
174#define BT_BAP_ASCS_RSP(c, r) \
175 (struct bt_bap_ascs_rsp) \
177 .code = c, .reason = r \
260#define BT_BAP_QOS_CFG_PREF(_unframed_supported, _phy, _rtn, _latency, _pd_min, _pd_max, \
261 _pref_pd_min, _pref_pd_max) \
263 .unframed_supported = _unframed_supported, \
266 .latency = _latency, \
269 .pref_pd_min = _pref_pd_min, \
270 .pref_pd_max = _pref_pd_max, \
Bluetooth Assigned Numbers, codes and identifiers.
Bluetooth Audio handling.
Bluetooth connection handling.
int bt_ascs_register(const struct bt_ascs_register_param *param)
Register the Audio Stream Control Service (ASCS).
int bt_ascs_unregister(void)
Unregister the Audio Stream Control Service (ASCS).
bt_bap_ascs_reason
Response Reasons.
Definition ascs.h:90
bt_bap_ascs_rsp_code
Response Status Code.
Definition ascs.h:50
@ BT_BAP_ASCS_REASON_NONE
No reason.
Definition ascs.h:92
@ BT_BAP_ASCS_REASON_PD
Presentation delay.
Definition ascs.h:110
@ BT_BAP_ASCS_REASON_FRAMING
Framing.
Definition ascs.h:100
@ BT_BAP_ASCS_REASON_CODEC_DATA
Codec configuration.
Definition ascs.h:96
@ BT_BAP_ASCS_REASON_SDU
Maximum SDU size.
Definition ascs.h:104
@ BT_BAP_ASCS_REASON_CODEC
Codec ID.
Definition ascs.h:94
@ BT_BAP_ASCS_REASON_PHY
PHY.
Definition ascs.h:102
@ BT_BAP_ASCS_REASON_LATENCY
Max transport latency.
Definition ascs.h:108
@ BT_BAP_ASCS_REASON_CIS
Invalid CIS mapping.
Definition ascs.h:112
@ BT_BAP_ASCS_REASON_RTN
Retransmission number.
Definition ascs.h:106
@ BT_BAP_ASCS_REASON_INTERVAL
SDU interval.
Definition ascs.h:98
@ BT_BAP_ASCS_RSP_CODE_INVALID_ASE_STATE
Invalid ASE state.
Definition ascs.h:60
@ BT_BAP_ASCS_RSP_CODE_METADATA_INVALID
Invalid metadata.
Definition ascs.h:76
@ BT_BAP_ASCS_RSP_CODE_NOT_SUPPORTED
Server did not support operation by client.
Definition ascs.h:54
@ BT_BAP_ASCS_RSP_CODE_CONF_UNSUPPORTED
Configuration parameters not supported by server.
Definition ascs.h:66
@ BT_BAP_ASCS_RSP_CODE_INVALID_ASE
Invalid ASE ID.
Definition ascs.h:58
@ BT_BAP_ASCS_RSP_CODE_INVALID_DIR
Invalid operation for direction.
Definition ascs.h:62
@ BT_BAP_ASCS_RSP_CODE_CONF_INVALID
Invalid Configuration parameters.
Definition ascs.h:70
@ BT_BAP_ASCS_RSP_CODE_CAP_UNSUPPORTED
Capabilities not supported by server.
Definition ascs.h:64
@ BT_BAP_ASCS_RSP_CODE_NO_MEM
Server has insufficient resources.
Definition ascs.h:78
@ BT_BAP_ASCS_RSP_CODE_METADATA_REJECTED
Metadata rejected by server.
Definition ascs.h:74
@ BT_BAP_ASCS_RSP_CODE_UNSPECIFIED
Unspecified error.
Definition ascs.h:80
@ BT_BAP_ASCS_RSP_CODE_INVALID_LENGTH
Server rejected due to invalid operation length.
Definition ascs.h:56
@ BT_BAP_ASCS_RSP_CODE_METADATA_UNSUPPORTED
Unsupported metadata.
Definition ascs.h:72
@ BT_BAP_ASCS_RSP_CODE_SUCCESS
Server completed operation successfully.
Definition ascs.h:52
@ BT_BAP_ASCS_RSP_CODE_CONF_REJECTED
Configuration parameters rejected by server.
Definition ascs.h:68
bt_audio_metadata_type
Codec metadata type IDs.
Definition assigned_numbers.h:1308
bt_audio_dir
Audio direction from the perspective of the BAP Unicast Server / BAP Broadcast Sink.
Definition audio.h:318
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
ASCS callback structure.
Definition ascs.h:279
int(* qos)(struct bt_bap_stream *stream, const struct bt_bap_qos_cfg *qos, struct bt_bap_ascs_rsp *rsp)
Stream QoS request callback.
Definition ascs.h:334
int(* disable)(struct bt_bap_stream *stream, struct bt_bap_ascs_rsp *rsp)
Stream Disable request callback.
Definition ascs.h:393
int(* reconfig)(struct bt_bap_stream *stream, enum bt_audio_dir dir, const struct bt_audio_codec_cfg *codec_cfg, struct bt_bap_qos_cfg_pref *const pref, struct bt_bap_ascs_rsp *rsp)
Stream reconfig request callback.
Definition ascs.h:317
int(* stop)(struct bt_bap_stream *stream, struct bt_bap_ascs_rsp *rsp)
Stream Stop callback.
Definition ascs.h:406
int(* config)(struct bt_conn *conn, const struct bt_bap_ep *ep, enum bt_audio_dir dir, const struct bt_audio_codec_cfg *codec_cfg, struct bt_bap_stream **stream, struct bt_bap_qos_cfg_pref *const pref, struct bt_bap_ascs_rsp *rsp)
Endpoint config request callback.
Definition ascs.h:297
int(* start)(struct bt_bap_stream *stream, struct bt_bap_ascs_rsp *rsp)
Stream Start request callback.
Definition ascs.h:364
int(* release)(struct bt_bap_stream *stream, struct bt_bap_ascs_rsp *rsp)
Stream release callback.
Definition ascs.h:420
int(* enable)(struct bt_bap_stream *stream, const uint8_t meta[], size_t meta_len, struct bt_bap_ascs_rsp *rsp)
Stream Enable request callback.
Definition ascs.h:350
int(* metadata)(struct bt_bap_stream *stream, const uint8_t meta[], size_t meta_len, struct bt_bap_ascs_rsp *rsp)
Stream Metadata update request callback.
Definition ascs.h:379
Parameters for registering the Audio Stream Control Service (ASCS).
Definition ascs.h:424
uint8_t snk_cnt
Sink Count to register.
Definition ascs.h:430
const struct bt_ascs_cb * cb
Callback structure.
Definition ascs.h:442
uint8_t src_cnt
Source Count to register.
Definition ascs.h:437
Codec specific configuration structure.
Definition audio.h:228
Structure storing values of fields of ASE Control Point notification.
Definition ascs.h:116
enum bt_bap_ascs_reason reason
Response reason.
Definition ascs.h:153
enum bt_audio_metadata_type metadata_type
Response metadata type.
Definition ascs.h:163
enum bt_bap_ascs_rsp_code code
Value of the Response Code field.
Definition ascs.h:130
Abstract Audio Endpoint structure.
Audio Stream Quality of Service Preference structure.
Definition ascs.h:181
uint32_t pref_pd_min
Preferred minimum Presentation Delay in microseconds.
Definition ascs.h:236
uint8_t rtn
Preferred Retransmission Number.
Definition ascs.h:203
bool unframed_supported
Unframed PDUs supported.
Definition ascs.h:188
uint32_t pd_min
Minimum Presentation Delay in microseconds.
Definition ascs.h:219
uint32_t pd_max
Maximum Presentation Delay in microseconds.
Definition ascs.h:228
uint8_t phy
Preferred PHY bitfield.
Definition ascs.h:196
uint32_t pref_pd_max
Preferred maximum Presentation Delay in microseconds.
Definition ascs.h:245
uint16_t latency
Preferred Transport Latency in milliseconds.
Definition ascs.h:210
QoS configuration structure.
Definition bap.h:238
Basic Audio Profile stream structure.
Definition bap.h:704
Opaque type representing a connection to a remote device.