Zephyr API Documentation 4.0.0-rc2
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
bt_bap_unicast_server_cb Struct Reference

Unicast Server callback structure. More...

#include <bap.h>

Data Fields

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.
 
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.
 
int(* qos )(struct bt_bap_stream *stream, const struct bt_bap_qos_cfg *qos, struct bt_bap_ascs_rsp *rsp)
 Stream QoS request callback.
 
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.
 
int(* start )(struct bt_bap_stream *stream, struct bt_bap_ascs_rsp *rsp)
 Stream Start request callback.
 
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.
 
int(* disable )(struct bt_bap_stream *stream, struct bt_bap_ascs_rsp *rsp)
 Stream Disable request callback.
 
int(* stop )(struct bt_bap_stream *stream, struct bt_bap_ascs_rsp *rsp)
 Stream Stop callback.
 
int(* release )(struct bt_bap_stream *stream, struct bt_bap_ascs_rsp *rsp)
 Stream release callback.
 

Detailed Description

Unicast Server callback structure.

Field Documentation

◆ config

int(* bt_bap_unicast_server_cb::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.

Config callback is called whenever an endpoint is requested to be configured

Parameters
[in]connConnection object.
[in]epLocal Audio Endpoint being configured.
[in]dirDirection of the endpoint.
[in]codec_cfgCodec configuration.
[out]streamPointer to stream that will be configured for the endpoint.
[out]prefPointer to a QoS preference object that shall be populated with values. Invalid values will reject the codec configuration request.
[out]rspObject for the ASE operation response. Only used if the return value is non-zero.
Returns
0 in case of success or negative value in case of error.

◆ disable

int(* bt_bap_unicast_server_cb::disable) (struct bt_bap_stream *stream, struct bt_bap_ascs_rsp *rsp)

Stream Disable request callback.

Disable callback is called whenever an Audio Stream is requested to disable the stream.

Parameters
[in]streamStream object being disabled.
[out]rspObject for the ASE operation response. Only used if the return value is non-zero.
Returns
0 in case of success or negative value in case of error.

◆ enable

int(* bt_bap_unicast_server_cb::enable) (struct bt_bap_stream *stream, const uint8_t meta[], size_t meta_len, struct bt_bap_ascs_rsp *rsp)

Stream Enable request callback.

Enable callback is called whenever an Audio Stream is requested to be enabled to stream.

Parameters
[in]streamStream object being enabled.
[in]metaMetadata entries.
[in]meta_lenLength of metadata.
[out]rspObject for the ASE operation response. Only used if the return value is non-zero.
Returns
0 in case of success or negative value in case of error.

◆ metadata

int(* bt_bap_unicast_server_cb::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.

Metadata callback is called whenever an Audio Stream is requested to update its metadata.

Parameters
[in]streamStream object.
[in]metaMetadata entries.
[in]meta_lenLength of metadata.
[out]rspObject for the ASE operation response. Only used if the return value is non-zero.
Returns
0 in case of success or negative value in case of error.

◆ qos

int(* bt_bap_unicast_server_cb::qos) (struct bt_bap_stream *stream, const struct bt_bap_qos_cfg *qos, struct bt_bap_ascs_rsp *rsp)

Stream QoS request callback.

QoS callback is called whenever an Audio Stream Quality of Service needs to be configured.

Parameters
[in]streamStream object being reconfigured.
[in]qosQuality of Service configuration.
[out]rspObject for the ASE operation response. Only used if the return value is non-zero.
Returns
0 in case of success or negative value in case of error.

◆ reconfig

int(* bt_bap_unicast_server_cb::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.

Reconfig callback is called whenever an Audio Stream needs to be reconfigured with different codec configuration.

Parameters
[in]streamStream object being reconfigured.
[in]dirDirection of the endpoint.
[in]codec_cfgCodec configuration.
[out]prefPointer to a QoS preference object that shall be populated with values. Invalid values will reject the codec configuration request.
[out]rspObject for the ASE operation response. Only used if the return value is non-zero.
Returns
0 in case of success or negative value in case of error.

◆ release

int(* bt_bap_unicast_server_cb::release) (struct bt_bap_stream *stream, struct bt_bap_ascs_rsp *rsp)

Stream release callback.

Release callback is called whenever a new Audio Stream needs to be released and thus deallocated.

Parameters
[in]streamStream object.
[out]rspObject for the ASE operation response. Only used if the return value is non-zero.
Returns
0 in case of success or negative value in case of error.

◆ start

int(* bt_bap_unicast_server_cb::start) (struct bt_bap_stream *stream, struct bt_bap_ascs_rsp *rsp)

Stream Start request callback.

Start callback is called whenever an Audio Stream is requested to start streaming.

Parameters
[in]streamStream object.
[out]rspObject for the ASE operation response. Only used if the return value is non-zero.
Returns
0 in case of success or negative value in case of error.

◆ stop

int(* bt_bap_unicast_server_cb::stop) (struct bt_bap_stream *stream, struct bt_bap_ascs_rsp *rsp)

Stream Stop callback.

Stop callback is called whenever an Audio Stream is requested to stop streaming.

Parameters
[in]streamStream object.
[out]rspObject for the ASE operation response. Only used if the return value is non-zero.
Returns
0 in case of success or negative value in case of error.

The documentation for this struct was generated from the following file: