Zephyr Project API
3.3.0
A Scalable Open Source RTOS
|
Data Structures | |
struct | bt_audio_discover_params |
struct | bt_audio_unicast_group_stream_param |
struct | bt_audio_unicast_group_stream_pair_param |
Parameter struct for the unicast group functions. More... | |
struct | bt_audio_unicast_group_param |
Typedefs | |
typedef void(* | bt_audio_discover_func_t) (struct bt_conn *conn, struct bt_codec *codec, struct bt_audio_ep *ep, struct bt_audio_discover_params *params) |
Discover Audio capabilities and endpoints callback function. More... | |
Functions | |
int | bt_audio_discover (struct bt_conn *conn, struct bt_audio_discover_params *params) |
Discover remote capabilities and endpoints. More... | |
int | bt_audio_stream_config (struct bt_conn *conn, struct bt_audio_stream *stream, struct bt_audio_ep *ep, struct bt_codec *codec) |
Configure Audio Stream. More... | |
int | bt_audio_stream_reconfig (struct bt_audio_stream *stream, struct bt_codec *codec) |
Reconfigure Audio Stream. More... | |
int | bt_audio_stream_qos (struct bt_conn *conn, struct bt_audio_unicast_group *group) |
Configure Audio Stream QoS. More... | |
int | bt_audio_stream_enable (struct bt_audio_stream *stream, struct bt_codec_data *meta, size_t meta_count) |
Enable Audio Stream. More... | |
int | bt_audio_stream_metadata (struct bt_audio_stream *stream, struct bt_codec_data *meta, size_t meta_count) |
Change Audio Stream Metadata. More... | |
int | bt_audio_stream_disable (struct bt_audio_stream *stream) |
Disable Audio Stream. More... | |
int | bt_audio_stream_start (struct bt_audio_stream *stream) |
Start Audio Stream. More... | |
int | bt_audio_stream_stop (struct bt_audio_stream *stream) |
Stop Audio Stream. More... | |
int | bt_audio_stream_release (struct bt_audio_stream *stream) |
Release Audio Stream. More... | |
int | bt_audio_stream_send (struct bt_audio_stream *stream, struct net_buf *buf, uint16_t seq_num, uint32_t ts) |
Send data to Audio stream. More... | |
int | bt_audio_unicast_group_create (struct bt_audio_unicast_group_param *param, struct bt_audio_unicast_group **unicast_group) |
Create audio unicast group. More... | |
int | bt_audio_unicast_group_add_streams (struct bt_audio_unicast_group *unicast_group, struct bt_audio_unicast_group_stream_pair_param params[], size_t num_param) |
Add streams to a unicast group as a unicast client. More... | |
int | bt_audio_unicast_group_delete (struct bt_audio_unicast_group *unicast_group) |
Delete audio unicast group. More... | |
bt_audio_discover_func_t |
#include <include/zephyr/bluetooth/audio/audio.h>
Discover Audio capabilities and endpoints callback function.
If discovery procedure has complete both cap and ep are set to NULL.
int bt_audio_discover | ( | struct bt_conn * | conn, |
struct bt_audio_discover_params * | params | ||
) |
#include <include/zephyr/bluetooth/audio/audio.h>
Discover remote capabilities and endpoints.
This procedure is used by a client to discover remote capabilities and endpoints and notifies via params callback.
conn | Connection object |
params | Discover parameters |
int bt_audio_stream_config | ( | struct bt_conn * | conn, |
struct bt_audio_stream * | stream, | ||
struct bt_audio_ep * | ep, | ||
struct bt_codec * | codec | ||
) |
#include <include/zephyr/bluetooth/audio/audio.h>
Configure Audio Stream.
This procedure is used by a client to configure a new stream using the remote endpoint, local capability and codec configuration.
conn | Connection object |
stream | Stream object being configured |
ep | Remote Audio Endpoint being configured |
codec | Codec configuration |
int bt_audio_stream_disable | ( | struct bt_audio_stream * | stream | ) |
#include <include/zephyr/bluetooth/audio/audio.h>
Disable Audio Stream.
This procedure is used by a unicast client or unicast server to disable a stream.
This shall only be called for unicast streams, as broadcast streams will always be enabled once created.
stream | Stream object |
int bt_audio_stream_enable | ( | struct bt_audio_stream * | stream, |
struct bt_codec_data * | meta, | ||
size_t | meta_count | ||
) |
#include <include/zephyr/bluetooth/audio/audio.h>
Enable Audio Stream.
This procedure is used by a client to enable a stream.
This shall only be called for unicast streams, as broadcast streams will always be enabled once created.
stream | Stream object |
meta_count | Number of metadata entries |
meta | Metadata entries |
int bt_audio_stream_metadata | ( | struct bt_audio_stream * | stream, |
struct bt_codec_data * | meta, | ||
size_t | meta_count | ||
) |
#include <include/zephyr/bluetooth/audio/audio.h>
Change Audio Stream Metadata.
This procedure is used by a unicast client or unicast server to change the metadata of a stream.
stream | Stream object |
meta_count | Number of metadata entries |
meta | Metadata entries |
int bt_audio_stream_qos | ( | struct bt_conn * | conn, |
struct bt_audio_unicast_group * | group | ||
) |
#include <include/zephyr/bluetooth/audio/audio.h>
Configure Audio Stream QoS.
This procedure is used by a client to configure the Quality of Service of streams in a unicast group. All streams in the group for the specified conn
will have the Quality of Service configured. This shall only be used to configure unicast streams.
conn | Connection object |
group | Unicast group object |
int bt_audio_stream_reconfig | ( | struct bt_audio_stream * | stream, |
struct bt_codec * | codec | ||
) |
#include <include/zephyr/bluetooth/audio/audio.h>
Reconfigure Audio Stream.
This procedure is used by a unicast client or unicast server to reconfigure a stream to use a different local codec configuration.
This can only be done for unicast streams.
stream | Stream object being reconfigured |
codec | Codec configuration |
int bt_audio_stream_release | ( | struct bt_audio_stream * | stream | ) |
#include <include/zephyr/bluetooth/audio/audio.h>
Release Audio Stream.
This procedure is used by a unicast client or unicast server to release a unicast stream.
Broadcast sink streams cannot be released, but can be deleted by bt_audio_broadcast_sink_delete(). Broadcast source streams cannot be released, but can be deleted by bt_audio_broadcast_source_delete().
stream | Stream object |
int bt_audio_stream_send | ( | struct bt_audio_stream * | stream, |
struct net_buf * | buf, | ||
uint16_t | seq_num, | ||
uint32_t | ts | ||
) |
#include <include/zephyr/bluetooth/audio/audio.h>
Send data to Audio stream.
Send data from buffer to the stream.
stream | Stream object. |
buf | Buffer containing data to be sent. |
seq_num | Packet Sequence number. This value shall be incremented for each call to this function and at least once per SDU interval for a specific channel. |
ts | Timestamp of the SDU in microseconds (us). This value can be used to transmit multiple SDUs in the same SDU interval in a CIG or BIG. Can be omitted by using BT_ISO_TIMESTAMP_NONE which will simply enqueue the ISO SDU in a FIFO manner. |
int bt_audio_stream_start | ( | struct bt_audio_stream * | stream | ) |
#include <include/zephyr/bluetooth/audio/audio.h>
Start Audio Stream.
This procedure is used by a unicast client or unicast server to make a stream start streaming.
This shall only be called for unicast streams. Broadcast sinks will always be started once synchronized, and broadcast source streams shall be started with bt_audio_broadcast_source_start().
stream | Stream object |
int bt_audio_stream_stop | ( | struct bt_audio_stream * | stream | ) |
#include <include/zephyr/bluetooth/audio/audio.h>
Stop Audio Stream.
This procedure is used by a client to make a stream stop streaming.
This shall only be called for unicast streams. Broadcast sinks cannot be stopped. Broadcast sources shall be stopped with bt_audio_broadcast_source_stop().
stream | Stream object |
int bt_audio_unicast_group_add_streams | ( | struct bt_audio_unicast_group * | unicast_group, |
struct bt_audio_unicast_group_stream_pair_param | params[], | ||
size_t | num_param | ||
) |
#include <include/zephyr/bluetooth/audio/audio.h>
Add streams to a unicast group as a unicast client.
This function can be used to add additional streams to a bt_audio_unicast_group.
This can be called at any time before any of the streams in the group has been started (see bt_audio_stream_ops.started()). This can also be called after the streams have been stopped (see bt_audio_stream_ops.stopped()).
Once a stream has been added to a unicast group, it cannot be removed. To remove a stream from a group, the group must be deleted with bt_audio_unicast_group_delete(), but this will require all streams in the group to be released first.
unicast_group | Pointer to the unicast group |
params | Array of stream parameters with streams being added to the group. |
num_param | Number of paramers in params . |
int bt_audio_unicast_group_create | ( | struct bt_audio_unicast_group_param * | param, |
struct bt_audio_unicast_group ** | unicast_group | ||
) |
#include <include/zephyr/bluetooth/audio/audio.h>
Create audio unicast group.
Create a new audio unicast group with one or more audio streams as a unicast client. Streams in a unicast group shall share the same interval, framing and latency (see bt_codec_qos).
[in] | param | The unicast group create parameters. |
[out] | unicast_group | Pointer to the unicast group created. |
int bt_audio_unicast_group_delete | ( | struct bt_audio_unicast_group * | unicast_group | ) |
#include <include/zephyr/bluetooth/audio/audio.h>
Delete audio unicast group.
Delete a audio unicast group as a client. All streams in the group shall be in the idle or configured state.
unicast_group | Pointer to the unicast group to delete |