Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

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_client_cb
 Unicast Client callback structure. More...
 

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_client_register_cb (struct bt_bap_unicast_client_cb *cb)
 Register unicast client callbacks.
 
int bt_bap_unicast_client_discover (struct bt_conn *conn, enum bt_audio_dir dir)
 Discover remote capabilities and endpoints.
 

Detailed Description

Function Documentation

◆ bt_bap_unicast_client_discover()

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.

Parameters
connConnection object
dirThe type of remote endpoints and capabilities to discover.

◆ bt_bap_unicast_client_register_cb()

int bt_bap_unicast_client_register_cb ( struct bt_bap_unicast_client_cb * cb)

#include <zephyr/bluetooth/audio/bap.h>

Register unicast client callbacks.

Only one callback structure can be registered, and attempting to registering more than one will result in an error.

Parameters
cbUnicast client callback structure.
Return values
0Success
-EINVALcb is NULL.
-EEXISTcb is already registered.

◆ bt_bap_unicast_group_add_streams()

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.

Parameters
unicast_groupPointer to the unicast group
paramsArray of stream parameters with streams being added to the group.
num_paramNumber of parameters in params.
Returns
0 in case of success or negative value in case of error.

◆ bt_bap_unicast_group_create()

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).

Parameters
[in]paramThe unicast group create parameters.
[out]unicast_groupPointer to the unicast group created.
Returns
Zero on success or (negative) error code otherwise.

◆ bt_bap_unicast_group_delete()

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.

Parameters
unicast_groupPointer to the unicast group to delete
Returns
Zero on success or (negative) error code otherwise.

◆ bt_bap_unicast_group_reconfig()

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.

Parameters
unicast_groupPointer to the unicast group created.
paramThe unicast group reconfigure parameters.
Returns
Zero on success or (negative) error code otherwise.