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

Stream operation. More...

#include <bap.h>

Data Fields

void(* configured )(struct bt_bap_stream *stream, const struct bt_bap_qos_cfg_pref *pref)
 Stream configured callback.
 
void(* qos_set )(struct bt_bap_stream *stream)
 Stream QoS set callback.
 
void(* enabled )(struct bt_bap_stream *stream)
 Stream enabled callback.
 
void(* metadata_updated )(struct bt_bap_stream *stream)
 Stream metadata updated callback.
 
void(* disabled )(struct bt_bap_stream *stream)
 Stream disabled callback.
 
void(* released )(struct bt_bap_stream *stream)
 Stream released callback.
 
void(* started )(struct bt_bap_stream *stream)
 Stream started callback.
 
void(* stopped )(struct bt_bap_stream *stream, uint8_t reason)
 Stream stopped callback.
 
void(* recv )(struct bt_bap_stream *stream, const struct bt_iso_recv_info *info, struct net_buf *buf)
 Stream audio HCI receive callback.
 
void(* sent )(struct bt_bap_stream *stream)
 Stream audio HCI sent callback.
 
void(* connected )(struct bt_bap_stream *stream)
 Isochronous channel connected callback.
 
void(* disconnected )(struct bt_bap_stream *stream, uint8_t reason)
 Isochronous channel disconnected callback.
 

Detailed Description

Stream operation.

Field Documentation

◆ configured

void(* bt_bap_stream_ops::configured) (struct bt_bap_stream *stream, const struct bt_bap_qos_cfg_pref *pref)

Stream configured callback.

Configured callback is called whenever an Audio Stream has been configured.

Parameters
streamStream object that has been configured.
prefRemote QoS preferences.

◆ connected

void(* bt_bap_stream_ops::connected) (struct bt_bap_stream *stream)

Isochronous channel connected callback.

If this callback is provided it will be called whenever the isochronous channel for the stream has been connected. This does not mean that the stream is ready to be used, which is indicated by the bt_bap_stream_ops::started callback.

If the stream shares an isochronous channel with another stream, then this callback may still be called, without the stream going into the started state.

Parameters
streamStream object.

◆ disabled

void(* bt_bap_stream_ops::disabled) (struct bt_bap_stream *stream)

Stream disabled callback.

Disabled callback is called whenever an Audio Stream has been disabled.

Parameters
streamStream object that has been disabled.

◆ disconnected

void(* bt_bap_stream_ops::disconnected) (struct bt_bap_stream *stream, uint8_t reason)

Isochronous channel disconnected callback.

If this callback is provided it will be called whenever the isochronous channel is disconnected, including when a connection gets rejected.

If the stream shares an isochronous channel with another stream, then this callback may not be called, even if the stream is leaving the streaming state.

Parameters
streamStream object.
reasonBT_HCI_ERR_* reason for the disconnection.

◆ enabled

void(* bt_bap_stream_ops::enabled) (struct bt_bap_stream *stream)

Stream enabled callback.

Enabled callback is called whenever an Audio Stream has been enabled.

Parameters
streamStream object that has been enabled.

◆ metadata_updated

void(* bt_bap_stream_ops::metadata_updated) (struct bt_bap_stream *stream)

Stream metadata updated callback.

Metadata Updated callback is called whenever an Audio Stream's metadata has been updated.

Parameters
streamStream object that had its metadata updated.

◆ qos_set

void(* bt_bap_stream_ops::qos_set) (struct bt_bap_stream *stream)

Stream QoS set callback.

QoS set callback is called whenever an Audio Stream Quality of Service has been set or updated.

Parameters
streamStream object that had its QoS updated.

◆ recv

void(* bt_bap_stream_ops::recv) (struct bt_bap_stream *stream, const struct bt_iso_recv_info *info, struct net_buf *buf)

Stream audio HCI receive callback.

This callback is only used if the ISO data path is HCI.

Parameters
streamStream object.
infoPointer to the metadata for the buffer. The lifetime of the pointer is linked to the lifetime of the net_buf. Metadata such as sequence number and timestamp can be provided by the bluetooth controller.
bufBuffer containing incoming audio data.

◆ released

void(* bt_bap_stream_ops::released) (struct bt_bap_stream *stream)

Stream released callback.

Released callback is called whenever a Audio Stream has been released and can be deallocated.

Parameters
streamStream object that has been released.

◆ sent

void(* bt_bap_stream_ops::sent) (struct bt_bap_stream *stream)

Stream audio HCI sent callback.

This callback will be called once the controller marks the SDU as completed. When the controller does so is implementation dependent. It could be after the SDU is enqueued for transmission, or after it is sent on air or flushed.

This callback is only used if the ISO data path is HCI.

Parameters
streamStream object.

◆ started

void(* bt_bap_stream_ops::started) (struct bt_bap_stream *stream)

Stream started callback.

Started callback is called whenever an Audio Stream has been started and will be usable for streaming.

Parameters
streamStream object that has been started.

◆ stopped

void(* bt_bap_stream_ops::stopped) (struct bt_bap_stream *stream, uint8_t reason)

Stream stopped callback.

Stopped callback is called whenever an Audio Stream has been stopped.

Parameters
streamStream object that has been stopped.
reasonBT_HCI_ERR_* reason for the disconnection.

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