Zephyr Project API  3.3.0
A Scalable Open Source RTOS
bt_audio_unicast_server_cb Struct Reference

#include <audio.h>

Data Fields

int(* config )(struct bt_conn *conn, const struct bt_audio_ep *ep, enum bt_audio_dir dir, const struct bt_codec *codec, struct bt_audio_stream **stream, struct bt_codec_qos_pref *const pref)
 Endpoint config request callback. More...
 
int(* reconfig )(struct bt_audio_stream *stream, enum bt_audio_dir dir, const struct bt_codec *codec, struct bt_codec_qos_pref *const pref)
 Stream reconfig request callback. More...
 
int(* qos )(struct bt_audio_stream *stream, const struct bt_codec_qos *qos)
 Stream QoS request callback. More...
 
int(* enable )(struct bt_audio_stream *stream, const struct bt_codec_data *meta, size_t meta_count)
 Stream Enable request callback. More...
 
int(* start )(struct bt_audio_stream *stream)
 Stream Start request callback. More...
 
int(* metadata )(struct bt_audio_stream *stream, const struct bt_codec_data *meta, size_t meta_count)
 Stream Metadata update request callback. More...
 
int(* disable )(struct bt_audio_stream *stream)
 Stream Disable request callback. More...
 
int(* stop )(struct bt_audio_stream *stream)
 Stream Stop callback. More...
 
int(* release )(struct bt_audio_stream *stream)
 Stream release callback. More...
 

Detailed Description

Unicast Server callback structure

Field Documentation

◆ config

int(* bt_audio_unicast_server_cb::config) (struct bt_conn *conn, const struct bt_audio_ep *ep, enum bt_audio_dir dir, const struct bt_codec *codec, struct bt_audio_stream **stream, struct bt_codec_qos_pref *const pref)

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]codecCodec 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.
Returns
0 in case of success or negative value in case of error.

◆ disable

int(* bt_audio_unicast_server_cb::disable) (struct bt_audio_stream *stream)

Stream Disable request callback.

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

Parameters
streamStream object being disabled.
Returns
0 in case of success or negative value in case of error.

◆ enable

int(* bt_audio_unicast_server_cb::enable) (struct bt_audio_stream *stream, const struct bt_codec_data *meta, size_t meta_count)

Stream Enable request callback.

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

Parameters
streamStream object being enabled.
metaMetadata entries
meta_countNumber of metadata entries
Returns
0 in case of success or negative value in case of error.

◆ metadata

int(* bt_audio_unicast_server_cb::metadata) (struct bt_audio_stream *stream, const struct bt_codec_data *meta, size_t meta_count)

Stream Metadata update request callback.

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

Parameters
streamStream object.
metaMetadata entries
meta_countNumber of metadata entries
Returns
0 in case of success or negative value in case of error.

◆ qos

int(* bt_audio_unicast_server_cb::qos) (struct bt_audio_stream *stream, const struct bt_codec_qos *qos)

Stream QoS request callback.

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

Parameters
streamStream object being reconfigured.
qosQuality of Service configuration.
Returns
0 in case of success or negative value in case of error.

◆ reconfig

int(* bt_audio_unicast_server_cb::reconfig) (struct bt_audio_stream *stream, enum bt_audio_dir dir, const struct bt_codec *codec, struct bt_codec_qos_pref *const pref)

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]codecCodec configuration.
[out]prefPointer to a QoS preference object that shall be populated with values. Invalid values will reject the codec configuration request.
Returns
0 in case of success or negative value in case of error.

◆ release

int(* bt_audio_unicast_server_cb::release) (struct bt_audio_stream *stream)

Stream release callback.

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

Parameters
streamStream object.
Returns
0 in case of success or negative value in case of error.

◆ start

int(* bt_audio_unicast_server_cb::start) (struct bt_audio_stream *stream)

Stream Start request callback.

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

Parameters
streamStream object.
Returns
0 in case of success or negative value in case of error.

◆ stop

int(* bt_audio_unicast_server_cb::stop) (struct bt_audio_stream *stream)

Stream Stop callback.

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

Parameters
streamStream object.
Returns
0 in case of success or negative value in case of error.

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