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

LC3. More...

Macros

#define BT_AUDIO_CODEC_CAP_LC3_DATA(_freq, _duration, _chan_count, _len_min, _len_max, _max_frames_per_sdu)
 Helper to declare LC3 codec capability.
 
#define BT_AUDIO_CODEC_CAP_LC3_META(_prefer_context)
 Helper to declare LC3 codec metadata.
 
#define BT_AUDIO_CODEC_CAP_LC3(_freq, _duration, _chan_count, _len_min, _len_max, _max_frames_per_sdu, _prefer_context)
 Helper to declare LC3 codec.
 
#define BT_AUDIO_CODEC_CFG_LC3_DATA(_freq, _duration, _loc, _len, _frames_per_sdu)
 Helper to declare LC3 codec data configuration.
 
#define BT_AUDIO_CODEC_CFG_LC3_META(_stream_context)
 Helper to declare LC3 codec metadata configuration.
 
#define BT_AUDIO_CODEC_LC3_CONFIG(_freq, _duration, _loc, _len, _frames_per_sdu, _stream_context)
 Helper to declare LC3 codec configuration.
 

Detailed Description

LC3.

Macro Definition Documentation

◆ BT_AUDIO_CODEC_CAP_LC3

#define BT_AUDIO_CODEC_CAP_LC3 (   _freq,
  _duration,
  _chan_count,
  _len_min,
  _len_max,
  _max_frames_per_sdu,
  _prefer_context 
)

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

Value:
BT_AUDIO_CODEC_CAP_LC3_DATA(_freq, _duration, _chan_count, _len_min, \
_len_max, _max_frames_per_sdu), \
BT_AUDIO_CODEC_CAP_LC3_META(_prefer_context))
#define BT_AUDIO_CODEC_CAP_LC3_DATA(_freq, _duration, _chan_count, _len_min, _len_max, _max_frames_per_sdu)
Helper to declare LC3 codec capability.
Definition: lc3.h:41
#define BT_AUDIO_CODEC_CAP_LC3_META(_prefer_context)
Helper to declare LC3 codec metadata.
Definition: lc3.h:58
#define BT_AUDIO_CODEC_CAP(_id, _cid, _vid, _data, _meta)
Helper to declare Codec capability parsing APIs structure.
Definition: audio.h:467
#define BT_HCI_CODING_FORMAT_LC3
Definition: hci_types.h:856

Helper to declare LC3 codec.

Parameters
_freqSupported Sampling Frequencies bitfield (see BT_AUDIO_CODEC_CAP_FREQ_*)
_durationSupported Frame Durations bitfield (see BT_AUDIO_CODEC_CAP_DURATION_*)
_chan_countSupported channels (see BT_AUDIO_CODEC_CAP_CHAN_COUNT_SUPPORT)
_len_minMinimum number of octets supported per codec frame
_len_maxMaximum number of octets supported per codec frame
_max_frames_per_sduSupported maximum codec frames per SDU
_prefer_contextPreferred contexts (bt_audio_context)

◆ BT_AUDIO_CODEC_CAP_LC3_DATA

#define BT_AUDIO_CODEC_CAP_LC3_DATA (   _freq,
  _duration,
  _chan_count,
  _len_min,
  _len_max,
  _max_frames_per_sdu 
)

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

Value:
{ \
BT_AUDIO_CODEC_DATA(BT_AUDIO_CODEC_CAP_TYPE_FREQ, BT_BYTES_LIST_LE16(_freq)), \
BT_AUDIO_CODEC_DATA(BT_AUDIO_CODEC_CAP_TYPE_DURATION, (_duration)), \
BT_AUDIO_CODEC_DATA(BT_AUDIO_CODEC_CAP_TYPE_CHAN_COUNT, (_chan_count)), \
BT_AUDIO_CODEC_DATA(BT_AUDIO_CODEC_CAP_TYPE_FRAME_LEN, \
BT_BYTES_LIST_LE16(_len_min), \
BT_BYTES_LIST_LE16(_len_max)), \
COND_CODE_1(_max_frames_per_sdu, (), \
(_max_frames_per_sdu)))) \
}
#define BT_AUDIO_CODEC_DATA(_type, _bytes...)
Helper to declare elements of bt_audio_codec_cap arrays.
Definition: audio.h:432
@ BT_AUDIO_CODEC_CAP_TYPE_CHAN_COUNT
Supported audio channel counts.
Definition: audio.h:58
@ BT_AUDIO_CODEC_CAP_TYPE_DURATION
Supported frame durations.
Definition: audio.h:55
@ BT_AUDIO_CODEC_CAP_TYPE_FRAME_COUNT
Supported maximum codec frames per SDU
Definition: audio.h:64
@ BT_AUDIO_CODEC_CAP_TYPE_FRAME_LEN
Supported octets per codec frame.
Definition: audio.h:61
@ BT_AUDIO_CODEC_CAP_TYPE_FREQ
Supported sampling frequencies.
Definition: audio.h:52
#define BT_BYTES_LIST_LE16(_v)
Encode 16-bit value into array values in little-endian format.
Definition: byteorder.h:36

Helper to declare LC3 codec capability.

_max_frames_per_sdu value is optional and will be included only if != 1

◆ BT_AUDIO_CODEC_CAP_LC3_META

#define BT_AUDIO_CODEC_CAP_LC3_META (   _prefer_context)

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

Value:
{ \
BT_AUDIO_CODEC_DATA(BT_AUDIO_METADATA_TYPE_PREF_CONTEXT, \
BT_BYTES_LIST_LE16(_prefer_context)) \
}
@ BT_AUDIO_METADATA_TYPE_PREF_CONTEXT
Preferred audio context.
Definition: audio.h:360

Helper to declare LC3 codec metadata.

◆ BT_AUDIO_CODEC_CFG_LC3_DATA

#define BT_AUDIO_CODEC_CFG_LC3_DATA (   _freq,
  _duration,
  _loc,
  _len,
  _frames_per_sdu 
)

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

Value:
{ \
BT_AUDIO_CODEC_DATA(BT_AUDIO_CODEC_CFG_FREQ, (_freq)), \
BT_AUDIO_CODEC_DATA(BT_AUDIO_CODEC_CFG_DURATION, (_duration)), \
BT_AUDIO_CODEC_DATA(BT_AUDIO_CODEC_CFG_CHAN_ALLOC, BT_BYTES_LIST_LE32(_loc)), \
BT_AUDIO_CODEC_DATA(BT_AUDIO_CODEC_CFG_FRAME_LEN, BT_BYTES_LIST_LE16(_len)), \
COND_CODE_1(_frames_per_sdu, (), \
(_frames_per_sdu)))) \
}
@ BT_AUDIO_CODEC_CFG_FREQ
Sampling frequency.
Definition: audio.h:214
@ BT_AUDIO_CODEC_CFG_FRAME_LEN
Octets per codec frame.
Definition: audio.h:223
@ BT_AUDIO_CODEC_CFG_DURATION
Frame duration.
Definition: audio.h:217
@ BT_AUDIO_CODEC_CFG_FRAME_BLKS_PER_SDU
Codec frame blocks per SDU.
Definition: audio.h:226
@ BT_AUDIO_CODEC_CFG_CHAN_ALLOC
Audio channel allocation.
Definition: audio.h:220
#define BT_BYTES_LIST_LE32(_v)
Encode 32-bit value into array values in little-endian format.
Definition: byteorder.h:64

Helper to declare LC3 codec data configuration.

Parameters
_freqSampling frequency (BT_AUDIO_CODEC_CFG_FREQ_*)
_durationFrame duration (BT_AUDIO_CODEC_CFG_DURATION_*)
_locAudio channel location bitfield (bt_audio_location)
_lenOctets per frame (16-bit integer)
_frames_per_sduFrames per SDU (8-bit integer). This value is optional and will be included only if != 1

◆ BT_AUDIO_CODEC_CFG_LC3_META

#define BT_AUDIO_CODEC_CFG_LC3_META (   _stream_context)

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

Value:
{ \
BT_BYTES_LIST_LE16(_stream_context)) \
}
@ BT_AUDIO_METADATA_TYPE_STREAM_CONTEXT
Streaming audio context.
Definition: audio.h:371

Helper to declare LC3 codec metadata configuration.

◆ BT_AUDIO_CODEC_LC3_CONFIG

#define BT_AUDIO_CODEC_LC3_CONFIG (   _freq,
  _duration,
  _loc,
  _len,
  _frames_per_sdu,
  _stream_context 
)

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

Value:
BT_HCI_CODING_FORMAT_LC3, 0x0000, 0x0000, \
BT_AUDIO_CODEC_CFG_LC3_DATA(_freq, _duration, _loc, _len, _frames_per_sdu), \
BT_AUDIO_CODEC_CFG_LC3_META(_stream_context))
#define BT_AUDIO_CODEC_CFG_LC3_META(_stream_context)
Helper to declare LC3 codec metadata configuration.
Definition: lc3.h:107
#define BT_AUDIO_CODEC_CFG_LC3_DATA(_freq, _duration, _loc, _len, _frames_per_sdu)
Helper to declare LC3 codec data configuration.
Definition: lc3.h:93
#define BT_AUDIO_CODEC_CFG(_id, _cid, _vid, _data, _meta)
Helper to declare Codec config parsing APIs.
Definition: audio.h:444

Helper to declare LC3 codec configuration.

Parameters
_freqSampling frequency (BT_AUDIO_CODEC_CFG_FREQ_*)
_durationFrame duration (BT_AUDIO_CODEC_CFG_DURATION_*)
_locAudio channel location bitfield (bt_audio_location)
_lenOctets per frame (16-bit integer)
_frames_per_sduFrames per SDU (8-bit integer)
_stream_contextStream context (BT_AUDIO_CONTEXT_*)