nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
le_audio.h File Reference
#include <zephyr/bluetooth/audio/bap.h>
#include <audio_defines.h>

Go to the source code of this file.

Data Structures

struct  le_audio_encoded_audio
 Encoded audio data and information. More...
 
struct  stream_index
 

Macros

#define LE_AUDIO_ZBUS_EVENT_WAIT_TIME   K_MSEC(5)
 
#define LE_AUDIO_SDU_SIZE_OCTETS(bitrate)   (bitrate / (1000000 / CONFIG_AUDIO_FRAME_DURATION_US) / 8)
 
#define BT_BAP_LC3_PRESET_CONFIGURABLE(_loc, _stream_context, _bitrate)
 

Typedefs

typedef void(* le_audio_receive_cb) (const uint8_t *const data, size_t size, bool bad_frame, uint32_t sdu_ref, enum audio_channel channel_index, size_t desired_size)
 Callback for receiving Bluetooth LE Audio data.
 

Functions

int le_audio_ep_state_get (struct bt_bap_ep *ep, uint8_t *state)
 Get the current state of an endpoint.
 
bool le_audio_ep_state_check (struct bt_bap_ep *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.