|
Zephyr API Documentation 4.3.0-rc1
A Scalable Open Source RTOS
|
Data Structures | |
| struct | bt_bap_unicast_group_stream_param |
| Parameter struct for each stream in the unicast group. More... | |
| struct | bt_bap_unicast_group_stream_pair_param |
| Parameter struct for the unicast group functions. More... | |
| struct | bt_bap_unicast_group_param |
| Parameters for the creating unicast groups with bt_bap_unicast_group_create() More... | |
| struct | bt_bap_unicast_group_info |
| Structure holding information of audio stream endpoint. More... | |
| struct | bt_bap_unicast_client_cb |
| Unicast Client callback structure. More... | |
Typedefs | |
| typedef bool(* | bt_bap_unicast_group_foreach_stream_func_t) (struct bt_bap_stream *stream, void *user_data) |
| Callback function for bt_bap_unicast_group_foreach_stream() | |
Functions | |
| int | bt_bap_unicast_group_create (struct bt_bap_unicast_group_param *param, struct bt_bap_unicast_group **unicast_group) |
| Create unicast group. | |
| int | bt_bap_unicast_group_reconfig (struct bt_bap_unicast_group *unicast_group, const struct bt_bap_unicast_group_param *param) |
| Reconfigure unicast group. | |
| int | bt_bap_unicast_group_add_streams (struct bt_bap_unicast_group *unicast_group, struct bt_bap_unicast_group_stream_pair_param params[], size_t num_param) |
| Add streams to a unicast group as a unicast client. | |
| int | bt_bap_unicast_group_delete (struct bt_bap_unicast_group *unicast_group) |
| Delete audio unicast group. | |
| int | bt_bap_unicast_group_foreach_stream (struct bt_bap_unicast_group *unicast_group, bt_bap_unicast_group_foreach_stream_func_t func, void *user_data) |
| Iterate through all streams in a unicast group. | |
| int | bt_bap_unicast_group_get_info (const struct bt_bap_unicast_group *unicast_group, struct bt_bap_unicast_group_info *info) |
| Return structure holding information of unicast group. | |
| int | bt_bap_unicast_client_register_cb (struct bt_bap_unicast_client_cb *cb) |
| Register unicast client callbacks. | |
| int | bt_bap_unicast_client_unregister_cb (struct bt_bap_unicast_client_cb *cb) |
| Unregister unicast client callbacks. | |
| int | bt_bap_unicast_client_discover (struct bt_conn *conn, enum bt_audio_dir dir) |
| Discover remote capabilities and endpoints. | |
| typedef bool(* bt_bap_unicast_group_foreach_stream_func_t) (struct bt_bap_stream *stream, void *user_data) |
#include <zephyr/bluetooth/audio/bap.h>
Callback function for bt_bap_unicast_group_foreach_stream()
| stream | The audio stream |
| user_data | User data |
| true | Stop iterating. |
| false | Continue iterating. |
| int bt_bap_unicast_client_discover | ( | struct bt_conn * | conn, |
| enum bt_audio_dir | dir ) |
#include <zephyr/bluetooth/audio/bap.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 |
| dir | The type of remote endpoints and capabilities to discover. |
| int bt_bap_unicast_client_register_cb | ( | struct bt_bap_unicast_client_cb * | cb | ) |
#include <zephyr/bluetooth/audio/bap.h>
Register unicast client callbacks.
| cb | Unicast client callback structure to register. |
| 0 | Success |
| -EINVAL | cb is NULL. |
| -EEXIST | cb is already registered. |
| int bt_bap_unicast_client_unregister_cb | ( | struct bt_bap_unicast_client_cb * | cb | ) |
#include <zephyr/bluetooth/audio/bap.h>
Unregister unicast client callbacks.
| cb | Unicast client callback structure to unregister. |
| 0 | Success |
| -EINVAL | cb is NULL or cb was not registered |
| int bt_bap_unicast_group_add_streams | ( | struct bt_bap_unicast_group * | unicast_group, |
| struct bt_bap_unicast_group_stream_pair_param | params[], | ||
| size_t | num_param ) |
#include <zephyr/bluetooth/audio/bap.h>
Add streams to a unicast group as a unicast client.
This function can be used to add additional streams to a bt_bap_unicast_group.
This can be called at any time before any of the streams in the group has been started (see bt_bap_stream_ops.started()). This can also be called after the streams have been stopped (see bt_bap_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_bap_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 parameters in params. |
| int bt_bap_unicast_group_create | ( | struct bt_bap_unicast_group_param * | param, |
| struct bt_bap_unicast_group ** | unicast_group ) |
#include <zephyr/bluetooth/audio/bap.h>
Create unicast group.
Create a new audio unicast group with one or more audio streams as a unicast client. All streams shall share the same framing. All streams in the same direction shall share the same interval and latency (see bt_bap_qos_cfg).
| [in] | param | The unicast group create parameters. |
| [out] | unicast_group | Pointer to the unicast group created. |
| int bt_bap_unicast_group_delete | ( | struct bt_bap_unicast_group * | unicast_group | ) |
#include <zephyr/bluetooth/audio/bap.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_bap_unicast_group_foreach_stream | ( | struct bt_bap_unicast_group * | unicast_group, |
| bt_bap_unicast_group_foreach_stream_func_t | func, | ||
| void * | user_data ) |
#include <zephyr/bluetooth/audio/bap.h>
Iterate through all streams in a unicast group.
| unicast_group | The unicast group |
| func | The callback function |
| user_data | User specified data that sent to the callback function |
| 0 | Success (even if no streams exists in the group). |
| -ECANCELED | Iteration was stopped by the callback function before complete. |
| -EINVAL | unicast_group or func were NULL. |
| int bt_bap_unicast_group_get_info | ( | const struct bt_bap_unicast_group * | unicast_group, |
| struct bt_bap_unicast_group_info * | info ) |
#include <zephyr/bluetooth/audio/bap.h>
Return structure holding information of unicast group.
| unicast_group | The unicast group object. |
| info | The structure object to be filled with the info. |
| 0 | Success |
| -EINVAL | unicast_group or info are NULL |
| int bt_bap_unicast_group_reconfig | ( | struct bt_bap_unicast_group * | unicast_group, |
| const struct bt_bap_unicast_group_param * | param ) |
#include <zephyr/bluetooth/audio/bap.h>
Reconfigure unicast group.
Reconfigure a unicast group with one or more audio streams as a unicast client. All streams shall share the same framing. All streams in the same direction shall share the same interval and latency (see bt_bap_qos_cfg). All streams in param shall already belong to unicast_group. Use bt_bap_unicast_group_add_streams() to add additional streams.
| unicast_group | Pointer to the unicast group created. |
| param | The unicast group reconfigure parameters. |