Zephyr Project API
3.1.0
A Scalable Open Source RTOS
|
Data Structures | |
struct | bt_audio_discover_params |
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, struct bt_codec_qos *qos) |
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, bool cache) |
Release Audio Stream. More... | |
int | bt_audio_stream_send (struct bt_audio_stream *stream, struct net_buf *buf) |
Send data to Audio stream. More... | |
int | bt_audio_unicast_group_create (struct bt_audio_stream *streams[], size_t num_stream, 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_stream *streams[], size_t num_stream) |
Add streams to a unicast group as a unicast client. More... | |
int | bt_audio_unicast_group_remove_streams (struct bt_audio_unicast_group *unicast_group, struct bt_audio_stream *streams[], size_t num_stream) |
Remove streams from 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 client 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 client 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, | ||
struct bt_codec_qos * | qos | ||
) |
#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 |
qos | Quality of Service configuration |
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 client to reconfigure a stream using the a different local capability and/or 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, |
bool | cache | ||
) |
#include <include/zephyr/bluetooth/audio/audio.h>
Release Audio Stream.
This procedure is used by a client to release a unicast or broadcast source 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 |
cache | True to cache the codec configuration or false to forget it |
int bt_audio_stream_send | ( | struct bt_audio_stream * | stream, |
struct net_buf * | buf | ||
) |
#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. |
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 client 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_stream * | streams[], | ||
size_t | num_stream | ||
) |
#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()).
unicast_group | Pointer to the unicast group |
streams | Array of stream object pointers being added to the group. |
num_stream | Number of streams in streams . |
int bt_audio_unicast_group_create | ( | struct bt_audio_stream * | streams[], |
size_t | num_stream, | ||
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] | streams | Array of stream object pointers being used for the group. |
[in] | num_stream | Number of streams in streams . |
[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 |
int bt_audio_unicast_group_remove_streams | ( | struct bt_audio_unicast_group * | unicast_group, |
struct bt_audio_stream * | streams[], | ||
size_t | num_stream | ||
) |
#include <include/zephyr/bluetooth/audio/audio.h>
Remove streams from a unicast group as a unicast client.
This function can be used to remove streams from 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()).
unicast_group | Pointer to the unicast group |
streams | Array of stream object pointers removed from the group. |
num_stream | Number of streams in streams . |