nRF Connect SDK API 3.3.99
Loading...
Searching...
No Matches
LE Audio helper functions

LE Audio helper functions for Audio applications. More...

Topics

 Functions for LE Audio TX functionality.
 Helper functions to manage LE Audio TX functionality.
 
 Functions for broadcast sink functionality.
 Helper functions to manage broadcast sink functionality.
 
 Functions for broadcast source functionality.
 Helper functions to manage broadcast source functionality.
 
 Functions for unicast client functionality.
 Helper functions to manage unicast client (gateway side) functionality.
 
 Functions for unicast server functionality.
 Helper functions to manage unicast server (headset side) functionality.
 
 Storage on unicast client of remote unicast servers.
 Helper functions to manage how a unicast client (gateway side) stores the unicast server(s) (headset side) it is connected to.
 

Data Structures

struct  stream_index
 Stream index structure for identifying audio streams. More...
 

Macros

#define LE_AUDIO_ZBUS_EVENT_WAIT_TIME   K_MSEC(5)
 
#define LE_AUDIO_SDU_SIZE_OCTETS(bitrate, dur_us)
 
#define BT_BAP_LC3_PRESET_CONFIGURABLE(_loc, _stream_context, _bitrate)
 

Typedefs

typedef void(* le_audio_receive_cb) (struct net_buf *audio_frame, struct audio_metadata *meta, uint8_t location_index)
 Callback for receiving Bluetooth LE Audio data.
 

Functions

int le_audio_concurrent_sync_num_get (uint8_t *num_streams, enum bt_audio_location *locations)
 Get the number of active streams.
 
int le_audio_metadata_populate (struct audio_metadata *meta, const struct bt_bap_stream *stream, const struct bt_iso_recv_info *info, const struct net_buf *audio_frame)
 Function to populate the audio metadata.
 
int le_audio_ep_state_get (struct bt_bap_ep const *const ep, uint8_t *state)
 Get the current state of an endpoint.
 
bool le_audio_ep_state_check (struct bt_bap_ep const *const ep, enum bt_bap_ep_state state)
 Check if an endpoint is in the given state. If the endpoint is NULL, it is not in the given state, and this function returns false.
 
bool le_audio_ep_qos_configured (struct bt_bap_ep const *const ep)
 Check if an endpoint has had the QoS configured. If the endpoint is NULL, it is not in the state, and this function returns false.
 
int le_audio_freq_hz_get (const struct bt_audio_codec_cfg *codec, int *freq_hz)
 Decode the audio sampling frequency in the codec configuration.
 
int le_audio_duration_us_get (const struct bt_audio_codec_cfg *codec, int *frame_dur_us)
 Decode the audio frame duration in us in the codec configuration.
 
int le_audio_octets_per_frame_get (const struct bt_audio_codec_cfg *codec, uint32_t *octets_per_sdu)
 Decode the number of octets per frame in the codec configuration.
 
int le_audio_frame_blocks_per_sdu_get (const struct bt_audio_codec_cfg *codec, uint32_t *frame_blks_per_sdu)
 Decode the number of frame blocks per SDU in the codec configuration.
 
int le_audio_bitrate_get (const struct bt_audio_codec_cfg *const codec, uint32_t *bitrate)
 Get the bitrate for the codec configuration.
 
int le_audio_stream_dir_get (struct bt_bap_stream const *const stream)
 Get the direction of the stream provided.
 
bool le_audio_bitrate_check (const struct bt_audio_codec_cfg *codec)
 Check that the bitrate is within the supported range.
 
bool le_audio_freq_check (const struct bt_audio_codec_cfg *codec)
 Check that the sample rate is supported.
 
void le_audio_print_codec (const struct bt_audio_codec_cfg *codec, enum bt_audio_dir dir)
 Print the codec configuration.
 
int le_audio_print_qos_from_stream (struct bt_bap_stream const *const stream)
 Print the QoS configuration for a stream.
 
int le_audio_print_unicast_group (struct bt_cap_unicast_group const *const unicast_group)
 Print the unicast group information.
 

Detailed Description

LE Audio helper functions for Audio applications.

This module provides the core LE Audio helper functions for both unicast (CIS) and broadcast (BIS) modes.