Zephyr Project API
3.1.0
A Scalable Open Source RTOS
|
#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... | |
int(* | publish_capability )(struct bt_conn *conn, uint8_t type, uint8_t index, struct bt_codec *const codec) |
Publish Capability callback. More... | |
Unicast Server callback structure
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
[in] | conn | Connection object. |
[in] | ep | Local Audio Endpoint being configured. |
[in] | dir | Direction of the endpoint. |
[in] | codec | Codec configuration. |
[out] | stream | Pointer to stream that will be configured for the endpoint. |
[out] | pref | Pointer to a QoS preference object that shall be populated with values. Invalid values will reject the codec configuration request. |
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.
stream | Stream object being disabled. |
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.
stream | Stream object being enabled. |
meta | Metadata entries |
meta_count | Number of metadata entries |
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.
stream | Stream object. |
meta | Metadata entries |
meta_count | Number of metadata entries |
int(* bt_audio_unicast_server_cb::publish_capability) (struct bt_conn *conn, uint8_t type, uint8_t index, struct bt_codec *const codec) |
Publish Capability callback.
Publish Capability callback is called whenever a remote client requests to read the Published Audio Capabilities (PAC) records. The callback will be called iteratively until it returns an error, increasing the index
each time. Once an error value (non-zero) is returned, the previously returned codec
values (if any) will be sent to the client that requested the value.
conn | The connection that requests the capabilities. Will be NULL if the capabilities is requested for sending a notification, as a result of calling bt_audio_capability_register() or bt_audio_capability_unregister(). |
type | Type of the endpoint. |
index | Index of the codec object requested. Multiple objects may be returned, and this value keep tracks of how many have previously been returned. |
codec | Codec object that shall be populated if returning success (0). Ignored if returning non-zero. |
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.
stream | Stream object being reconfigured. |
qos | Quality of Service configuration. |
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.
[in] | stream | Stream object being reconfigured. |
[in] | dir | Direction of the endpoint. |
[in] | codec | Codec configuration. |
[out] | pref | Pointer to a QoS preference object that shall be populated with values. Invalid values will reject the codec configuration request. |
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.
stream | Stream object. |
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.
stream | Stream object. |
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.
stream | Stream object. |