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

Data Structures

struct  bt_bap_unicast_server_cb
 Unicast Server callback structure. More...

Typedefs

typedef bool(* bt_bap_ep_func_t) (struct bt_bap_ep *ep, void *user_data)
 The callback function called for each endpoint.

Functions

int bt_bap_unicast_server_register (const struct bt_bap_unicast_server_register_param *param)
 Register the Unicast Server.
int bt_bap_unicast_server_unregister (void)
 Unregister the Unicast Server.
int bt_bap_unicast_server_register_cb (const struct bt_bap_unicast_server_cb *cb)
 Register unicast server callbacks.
int bt_bap_unicast_server_unregister_cb (const struct bt_bap_unicast_server_cb *cb)
 Unregister unicast server callbacks.
int bt_bap_unicast_server_foreach_ep (struct bt_conn *conn, bt_bap_ep_func_t func, void *user_data)
 Iterate through all endpoints of the given connection.
int bt_bap_unicast_server_config_ase (struct bt_conn *conn, struct bt_bap_stream *stream, const struct bt_audio_codec_cfg *codec_cfg, const struct bt_bap_qos_cfg_pref *qos_pref)
 Initialize and configure a new ASE.

Detailed Description

Typedef Documentation

◆ bt_bap_ep_func_t

typedef bool(* bt_bap_ep_func_t) (struct bt_bap_ep *ep, void *user_data)

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

The callback function called for each endpoint.

Parameters
epThe structure object with endpoint info.
user_dataData to pass to the function.
Return values
trueContinue iterating.
falseStop iterating.

Function Documentation

◆ bt_bap_unicast_server_config_ase()

int bt_bap_unicast_server_config_ase ( struct bt_conn * conn,
struct bt_bap_stream * stream,
const struct bt_audio_codec_cfg * codec_cfg,
const struct bt_bap_qos_cfg_pref * qos_pref )

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

Initialize and configure a new ASE.

Parameters
connConnection object
streamConfigured stream object to be attached to the ASE
codec_cfgCodec configuration
qos_prefAudio Stream Quality of Service Preference
Returns
0 in case of success or negative value in case of error.

◆ bt_bap_unicast_server_foreach_ep()

int bt_bap_unicast_server_foreach_ep ( struct bt_conn * conn,
bt_bap_ep_func_t func,
void * user_data )

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

Iterate through all endpoints of the given connection.

Parameters
connConnection object
funcFunction to call for each endpoint.
user_dataData to pass to the callback function.
Return values
0Success
-ECANCELEDIteration was stopped by the callback function before complete.
-EINVALconn or func were NULL.

◆ bt_bap_unicast_server_register()

int bt_bap_unicast_server_register ( const struct bt_bap_unicast_server_register_param * param)

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

Register the Unicast Server.

Register the Unicast Server. Only a single Unicast Server can be registered at any one time. This will register ASCS in the GATT database.

Parameters
paramRegistration parameters for ascs.
Returns
0 in case of success, negative error code otherwise.

◆ bt_bap_unicast_server_register_cb()

int bt_bap_unicast_server_register_cb ( const struct bt_bap_unicast_server_cb * cb)

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

Register unicast server callbacks.

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

Parameters
cbUnicast server callback structure.
Returns
0 in case of success or negative value in case of error.

◆ bt_bap_unicast_server_unregister()

int bt_bap_unicast_server_unregister ( void )

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

Unregister the Unicast Server.

Unregister the Unicast Server. This will unregister ASCS in the GATT database. Before calling this function, any callbacks registered through bt_bap_unicast_server_register_cb() needs to be unregistered with bt_bap_unicast_server_unregister_cb().

Calling this function will issue an release operation on any ASE in a non-idle state.

Returns
0 in case of success, negative error code otherwise.

◆ bt_bap_unicast_server_unregister_cb()

int bt_bap_unicast_server_unregister_cb ( const struct bt_bap_unicast_server_cb * cb)

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

Unregister unicast server callbacks.

May only unregister a callback structure that has previously been registered by bt_bap_unicast_server_register_cb().

Parameters
cbUnicast server callback structure.
Returns
0 in case of success or negative value in case of error.