Zephyr API Documentation
3.7.0
A Scalable Open Source RTOS
|
BAP Broadcast APIs. More...
Modules | |
BAP Broadcast Sink APIs | |
BAP Broadcast Sink APIs. | |
BAP Broadcast Source APIs | |
BAP Broadcast Source APIs. | |
Data Structures | |
struct | bt_bap_base_codec_id |
Codec ID structure for a Broadcast Audio Source Endpoint (BASE) More... | |
struct | bt_bap_base_subgroup_bis |
BIS structure for each BIS in a Broadcast Audio Source Endpoint (BASE) subgroup. More... | |
Functions | |
const struct bt_bap_base * | bt_bap_base_get_base_from_ad (const struct bt_data *ad) |
Generate a pointer to a BASE from periodic advertising data. | |
int | bt_bap_base_get_size (const struct bt_bap_base *base) |
Get the size of a BASE. | |
int | bt_bap_base_get_pres_delay (const struct bt_bap_base *base) |
Get the presentation delay value of a BASE. | |
int | bt_bap_base_get_subgroup_count (const struct bt_bap_base *base) |
Get the subgroup count of a BASE. | |
int | bt_bap_base_get_bis_indexes (const struct bt_bap_base *base, uint32_t *bis_indexes) |
Get all BIS indexes of a BASE. | |
int | bt_bap_base_foreach_subgroup (const struct bt_bap_base *base, bool(*func)(const struct bt_bap_base_subgroup *subgroup, void *user_data), void *user_data) |
Iterate on all subgroups in the BASE. | |
int | bt_bap_base_get_subgroup_codec_id (const struct bt_bap_base_subgroup *subgroup, struct bt_bap_base_codec_id *codec_id) |
Get the codec ID of a subgroup. | |
int | bt_bap_base_get_subgroup_codec_data (const struct bt_bap_base_subgroup *subgroup, uint8_t **data) |
Get the codec configuration data of a subgroup. | |
int | bt_bap_base_get_subgroup_codec_meta (const struct bt_bap_base_subgroup *subgroup, uint8_t **meta) |
Get the codec metadata of a subgroup. | |
int | bt_bap_base_subgroup_codec_to_codec_cfg (const struct bt_bap_base_subgroup *subgroup, struct bt_audio_codec_cfg *codec_cfg) |
Store subgroup codec data in a Codec config parsing APIs. | |
int | bt_bap_base_get_subgroup_bis_count (const struct bt_bap_base_subgroup *subgroup) |
Get the BIS count of a subgroup. | |
int | bt_bap_base_subgroup_get_bis_indexes (const struct bt_bap_base_subgroup *subgroup, uint32_t *bis_indexes) |
Get all BIS indexes of a subgroup. | |
int | bt_bap_base_subgroup_foreach_bis (const struct bt_bap_base_subgroup *subgroup, bool(*func)(const struct bt_bap_base_subgroup_bis *bis, void *user_data), void *user_data) |
Iterate on all BIS in the subgroup. | |
int | bt_bap_base_subgroup_bis_codec_to_codec_cfg (const struct bt_bap_base_subgroup_bis *bis, struct bt_audio_codec_cfg *codec_cfg) |
Store BIS codec configuration data in a Codec config parsing APIs. | |
BAP Broadcast APIs.
int bt_bap_base_foreach_subgroup | ( | const struct bt_bap_base * | base, |
bool(*)(const struct bt_bap_base_subgroup *subgroup, void *user_data) | func, | ||
void * | user_data | ||
) |
#include <zephyr/bluetooth/audio/bap.h>
Iterate on all subgroups in the BASE.
base | The BASE pointer |
func | Callback function. Return true to continue iterating, or false to stop. |
user_data | Userdata supplied to func |
-EINVAL | if arguments are invalid |
-ECANCELED | if iterating over the subgroups stopped prematurely by func |
0 | if all subgroups were iterated |
const struct bt_bap_base * bt_bap_base_get_base_from_ad | ( | const struct bt_data * | ad | ) |
#include <zephyr/bluetooth/audio/bap.h>
Generate a pointer to a BASE from periodic advertising data.
ad | The periodic advertising data |
NULL | if the data does not contain a BASE |
Pointer | to a bt_bap_base structure |
int bt_bap_base_get_bis_indexes | ( | const struct bt_bap_base * | base, |
uint32_t * | bis_indexes | ||
) |
#include <zephyr/bluetooth/audio/bap.h>
Get all BIS indexes of a BASE.
[in] | base | The BASE pointer |
[out] | bis_indexes | 32-bit BIS index bitfield that will be populated |
-EINVAL | if arguments are invalid |
0 | on success |
int bt_bap_base_get_pres_delay | ( | const struct bt_bap_base * | base | ) |
#include <zephyr/bluetooth/audio/bap.h>
Get the presentation delay value of a BASE.
base | The BASE pointer |
-EINVAL | if arguments are invalid |
The | 24-bit presentation delay value |
int bt_bap_base_get_size | ( | const struct bt_bap_base * | base | ) |
#include <zephyr/bluetooth/audio/bap.h>
Get the size of a BASE.
base | The BASE pointer |
-EINVAL | if arguments are invalid |
The | size of the BASE |
int bt_bap_base_get_subgroup_bis_count | ( | const struct bt_bap_base_subgroup * | subgroup | ) |
#include <zephyr/bluetooth/audio/bap.h>
Get the BIS count of a subgroup.
subgroup | The subgroup pointer |
-EINVAL | if arguments are invalid |
The | 8-bit BIS count value |
int bt_bap_base_get_subgroup_codec_data | ( | const struct bt_bap_base_subgroup * | subgroup, |
uint8_t ** | data | ||
) |
#include <zephyr/bluetooth/audio/bap.h>
Get the codec configuration data of a subgroup.
[in] | subgroup | The subgroup pointer |
[out] | data | Pointer that will point to the resulting codec configuration data |
-EINVAL | if arguments are invalid |
0 | on success |
int bt_bap_base_get_subgroup_codec_id | ( | const struct bt_bap_base_subgroup * | subgroup, |
struct bt_bap_base_codec_id * | codec_id | ||
) |
#include <zephyr/bluetooth/audio/bap.h>
Get the codec ID of a subgroup.
[in] | subgroup | The subgroup pointer |
[out] | codec_id | Pointer to the struct where the results are placed |
-EINVAL | if arguments are invalid |
0 | on success |
int bt_bap_base_get_subgroup_codec_meta | ( | const struct bt_bap_base_subgroup * | subgroup, |
uint8_t ** | meta | ||
) |
#include <zephyr/bluetooth/audio/bap.h>
Get the codec metadata of a subgroup.
[in] | subgroup | The subgroup pointer |
[out] | meta | Pointer that will point to the resulting codec metadata |
-EINVAL | if arguments are invalid |
0 | on success |
int bt_bap_base_get_subgroup_count | ( | const struct bt_bap_base * | base | ) |
#include <zephyr/bluetooth/audio/bap.h>
Get the subgroup count of a BASE.
base | The BASE pointer |
-EINVAL | if arguments are invalid |
The | 8-bit subgroup count value |
int bt_bap_base_subgroup_bis_codec_to_codec_cfg | ( | const struct bt_bap_base_subgroup_bis * | bis, |
struct bt_audio_codec_cfg * | codec_cfg | ||
) |
#include <zephyr/bluetooth/audio/bap.h>
Store BIS codec configuration data in a Codec config parsing APIs.
This only sets the Codec config parsing APIs data and Codec config parsing APIs data_len, but is useful to use the BIS codec configuration data with the bt_audio_codec_cfg_* functions.
[in] | bis | The BIS pointer |
[out] | codec_cfg | Pointer to the struct where the results are placed |
-EINVAL | if arguments are invalid |
-ENOMEM | if the codec_cfg cannot store the subgroup codec data |
0 | on success |
int bt_bap_base_subgroup_codec_to_codec_cfg | ( | const struct bt_bap_base_subgroup * | subgroup, |
struct bt_audio_codec_cfg * | codec_cfg | ||
) |
#include <zephyr/bluetooth/audio/bap.h>
Store subgroup codec data in a Codec config parsing APIs.
[in] | subgroup | The subgroup pointer |
[out] | codec_cfg | Pointer to the struct where the results are placed |
-EINVAL | if arguments are invalid |
-ENOMEM | if the codec_cfg cannot store the subgroup codec data |
0 | on success |
int bt_bap_base_subgroup_foreach_bis | ( | const struct bt_bap_base_subgroup * | subgroup, |
bool(*)(const struct bt_bap_base_subgroup_bis *bis, void *user_data) | func, | ||
void * | user_data | ||
) |
#include <zephyr/bluetooth/audio/bap.h>
Iterate on all BIS in the subgroup.
subgroup | The subgroup pointer |
func | Callback function. Return true to continue iterating, or false to stop. |
user_data | Userdata supplied to func |
-EINVAL | if arguments are invalid |
-ECANCELED | if iterating over the subgroups stopped prematurely by func |
0 | if all BIS were iterated |
int bt_bap_base_subgroup_get_bis_indexes | ( | const struct bt_bap_base_subgroup * | subgroup, |
uint32_t * | bis_indexes | ||
) |
#include <zephyr/bluetooth/audio/bap.h>
Get all BIS indexes of a subgroup.
[in] | subgroup | The subgroup pointer |
[out] | bis_indexes | 32-bit BIS index bitfield that will be populated |
-EINVAL | if arguments are invalid |
0 | on success |