Zephyr API Documentation 4.0.0-rc2
A Scalable Open Source RTOS
|
Unicast Client callback structure. More...
#include <bap.h>
Data Fields | |
void(* | location )(struct bt_conn *conn, enum bt_audio_dir dir, enum bt_audio_location loc) |
Remote Unicast Server Audio Locations. | |
void(* | available_contexts )(struct bt_conn *conn, enum bt_audio_context snk_ctx, enum bt_audio_context src_ctx) |
Remote Unicast Server Available Contexts. | |
void(* | config )(struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason) |
Callback function for bt_bap_stream_config() and bt_bap_stream_reconfig(). | |
void(* | qos )(struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason) |
Callback function for bt_bap_stream_qos(). | |
void(* | enable )(struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason) |
Callback function for bt_bap_stream_enable(). | |
void(* | start )(struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason) |
Callback function for bt_bap_stream_start(). | |
void(* | stop )(struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason) |
Callback function for bt_bap_stream_stop(). | |
void(* | disable )(struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason) |
Callback function for bt_bap_stream_disable(). | |
void(* | metadata )(struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason) |
Callback function for bt_bap_stream_metadata(). | |
void(* | release )(struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason) |
Callback function for bt_bap_stream_release(). | |
void(* | pac_record )(struct bt_conn *conn, enum bt_audio_dir dir, const struct bt_audio_codec_cap *codec_cap) |
Remote Published Audio Capability (PAC) record discovered. | |
void(* | endpoint )(struct bt_conn *conn, enum bt_audio_dir dir, struct bt_bap_ep *ep) |
Remote Audio Stream Endpoint (ASE) discovered. | |
void(* | discover )(struct bt_conn *conn, int err, enum bt_audio_dir dir) |
BAP discovery callback function. | |
Unicast Client callback structure.
void(* bt_bap_unicast_client_cb::available_contexts) (struct bt_conn *conn, enum bt_audio_context snk_ctx, enum bt_audio_context src_ctx) |
Remote Unicast Server Available Contexts.
This callback is called whenever the available contexts are read from the server or otherwise notified to the client.
conn | Connection to the remote unicast server. |
snk_ctx | The sink context bitfield value. |
src_ctx | The source context bitfield value. |
void(* bt_bap_unicast_client_cb::config) (struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason) |
Callback function for bt_bap_stream_config() and bt_bap_stream_reconfig().
Called when the codec configure operation is completed on the server.
stream | Stream the operation was performed on. |
rsp_code | Response code. |
reason | Reason code. |
void(* bt_bap_unicast_client_cb::disable) (struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason) |
Callback function for bt_bap_stream_disable().
Called when the disable operation is completed on the server.
stream | Stream the operation was performed on. May be NULL if there is no stream associated with the ASE ID sent by the server. |
rsp_code | Response code. |
reason | Reason code. |
void(* bt_bap_unicast_client_cb::discover) (struct bt_conn *conn, int err, enum bt_audio_dir dir) |
BAP discovery callback function.
If discovery procedure has completed ep
is set to NULL and err
is 0.
conn | Connection to the remote unicast server. |
err | Error value. 0 on success, GATT error on positive value or errno on negative value. |
dir | The type of remote endpoints and capabilities discovered. |
If discovery procedure has complete both codec
and ep
are set to NULL.
void(* bt_bap_unicast_client_cb::enable) (struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason) |
Callback function for bt_bap_stream_enable().
Called when the enable operation is completed on the server.
stream | Stream the operation was performed on. May be NULL if there is no stream associated with the ASE ID sent by the server. |
rsp_code | Response code. |
reason | Reason code. |
void(* bt_bap_unicast_client_cb::endpoint) (struct bt_conn *conn, enum bt_audio_dir dir, struct bt_bap_ep *ep) |
Remote Audio Stream Endpoint (ASE) discovered.
Called when an ASE has been discovered as part of the discovery procedure.
conn | Connection to the remote unicast server. |
dir | The type of remote endpoints and capabilities discovered. |
ep | Remote endpoint. |
If discovery procedure has complete both codec
and ep
are set to NULL.
void(* bt_bap_unicast_client_cb::location) (struct bt_conn *conn, enum bt_audio_dir dir, enum bt_audio_location loc) |
Remote Unicast Server Audio Locations.
This callback is called whenever the audio locations is read from the server or otherwise notified to the client.
conn | Connection to the remote unicast server. |
dir | Direction of the location. |
loc | The location bitfield value. |
void(* bt_bap_unicast_client_cb::metadata) (struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason) |
Callback function for bt_bap_stream_metadata().
Called when the metadata operation is completed on the server.
stream | Stream the operation was performed on. May be NULL if there is no stream associated with the ASE ID sent by the server. |
rsp_code | Response code. |
reason | Reason code. |
void(* bt_bap_unicast_client_cb::pac_record) (struct bt_conn *conn, enum bt_audio_dir dir, const struct bt_audio_codec_cap *codec_cap) |
Remote Published Audio Capability (PAC) record discovered.
Called when a PAC record has been discovered as part of the discovery procedure.
The codec
is only valid while in the callback, so the values must be stored by the receiver if future use is wanted.
conn | Connection to the remote unicast server. |
dir | The type of remote endpoints and capabilities discovered. |
codec_cap | Remote capabilities. |
If discovery procedure has complete both codec
and ep
are set to NULL.
void(* bt_bap_unicast_client_cb::qos) (struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason) |
Callback function for bt_bap_stream_qos().
Called when the QoS configure operation is completed on the server. This will be called for each stream in the group that was being QoS configured.
stream | Stream the operation was performed on. May be NULL if there is no stream associated with the ASE ID sent by the server. |
rsp_code | Response code. |
reason | Reason code. |
void(* bt_bap_unicast_client_cb::release) (struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason) |
Callback function for bt_bap_stream_release().
Called when the release operation is completed on the server.
stream | Stream the operation was performed on. May be NULL if there is no stream associated with the ASE ID sent by the server. |
rsp_code | Response code. |
reason | Reason code. |
void(* bt_bap_unicast_client_cb::start) (struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason) |
Callback function for bt_bap_stream_start().
Called when the start operation is completed on the server. This will only be called if the stream supplied to bt_bap_stream_start() is for a BT_AUDIO_DIR_SOURCE endpoint.
stream | Stream the operation was performed on. May be NULL if there is no stream associated with the ASE ID sent by the server. |
rsp_code | Response code. |
reason | Reason code. |
void(* bt_bap_unicast_client_cb::stop) (struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason) |
Callback function for bt_bap_stream_stop().
Called when the stop operation is completed on the server. This will only be called if the stream supplied to bt_bap_stream_stop() is for a BT_AUDIO_DIR_SOURCE endpoint.
stream | Stream the operation was performed on. May be NULL if there is no stream associated with the ASE ID sent by the server. |
rsp_code | Response code. |
reason | Reason code. |