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

BAP Broadcast APIs . More...

Topics

 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.
 

Detailed Description

BAP Broadcast APIs .

Function Documentation

◆ bt_bap_base_foreach_subgroup()

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 )

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

Iterate on all subgroups in the BASE.

Parameters
baseThe BASE pointer
funcCallback function. Return true to continue iterating, or false to stop.
user_dataUserdata supplied to func
Return values
-EINVALif arguments are invalid
-ECANCELEDif iterating over the subgroups stopped prematurely by func
0if all subgroups were iterated

◆ bt_bap_base_get_base_from_ad()

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.

Parameters
adThe periodic advertising data
Return values
NULLif the data does not contain a BASE
Pointerto a bt_bap_base structure

◆ bt_bap_base_get_bis_indexes()

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.

Parameters
[in]baseThe BASE pointer
[out]bis_indexes32-bit BIS index bitfield that will be populated
Return values
-EINVALif arguments are invalid
0on success

◆ bt_bap_base_get_pres_delay()

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.

Parameters
baseThe BASE pointer
Return values
-EINVALif arguments are invalid
The24-bit presentation delay value

◆ bt_bap_base_get_size()

int bt_bap_base_get_size ( const struct bt_bap_base * base)

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

Get the size of a BASE.

Parameters
baseThe BASE pointer
Return values
-EINVALif arguments are invalid
Thesize of the BASE

◆ bt_bap_base_get_subgroup_bis_count()

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.

Parameters
subgroupThe subgroup pointer
Return values
-EINVALif arguments are invalid
The8-bit BIS count value

◆ bt_bap_base_get_subgroup_codec_data()

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.

Parameters
[in]subgroupThe subgroup pointer
[out]dataPointer that will point to the resulting codec configuration data
Return values
-EINVALif arguments are invalid
0on success

◆ bt_bap_base_get_subgroup_codec_id()

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.

Parameters
[in]subgroupThe subgroup pointer
[out]codec_idPointer to the struct where the results are placed
Return values
-EINVALif arguments are invalid
0on success

◆ bt_bap_base_get_subgroup_codec_meta()

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.

Parameters
[in]subgroupThe subgroup pointer
[out]metaPointer that will point to the resulting codec metadata
Return values
-EINVALif arguments are invalid
0on success

◆ bt_bap_base_get_subgroup_count()

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.

Parameters
baseThe BASE pointer
Return values
-EINVALif arguments are invalid
The8-bit subgroup count value

◆ bt_bap_base_subgroup_bis_codec_to_codec_cfg()

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.

Parameters
[in]bisThe BIS pointer
[out]codec_cfgPointer to the struct where the results are placed
Return values
-EINVALif arguments are invalid
-ENOMEMif the codec_cfg cannot store the subgroup codec data
0on success

◆ bt_bap_base_subgroup_codec_to_codec_cfg()

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.

Parameters
[in]subgroupThe subgroup pointer
[out]codec_cfgPointer to the struct where the results are placed
Return values
-EINVALif arguments are invalid
-ENOMEMif the codec_cfg cannot store the subgroup codec data
0on success

◆ bt_bap_base_subgroup_foreach_bis()

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 )

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

Iterate on all BIS in the subgroup.

Parameters
subgroupThe subgroup pointer
funcCallback function. Return true to continue iterating, or false to stop.
user_dataUserdata supplied to func
Return values
-EINVALif arguments are invalid
-ECANCELEDif iterating over the subgroups stopped prematurely by func
0if all BIS were iterated

◆ bt_bap_base_subgroup_get_bis_indexes()

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.

Parameters
[in]subgroupThe subgroup pointer
[out]bis_indexes32-bit BIS index bitfield that will be populated
Return values
-EINVALif arguments are invalid
0on success