Zephyr API Documentation  3.6.0
A Scalable Open Source RTOS
3.6.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages

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.
 
#define BT_AUDIO_CODEC_LC3_CONFIG_8_1(_loc, _stream_context)
 Helper to declare LC3 8.1 codec configuration.
 
#define BT_AUDIO_CODEC_LC3_CONFIG_8_2(_loc, _stream_context)
 Helper to declare LC3 8.2 codec configuration.
 
#define BT_AUDIO_CODEC_LC3_CONFIG_16_1(_loc, _stream_context)
 Helper to declare LC3 16.1 codec configuration.
 
#define BT_AUDIO_CODEC_LC3_CONFIG_16_2(_loc, _stream_context)
 Helper to declare LC3 16.2 codec configuration.
 
#define BT_AUDIO_CODEC_LC3_CONFIG_24_1(_loc, _stream_context)
 Helper to declare LC3 24.1 codec configuration.
 
#define BT_AUDIO_CODEC_LC3_CONFIG_24_2(_loc, _stream_context)
 Helper to declare LC3 24.2 codec configuration.
 
#define BT_AUDIO_CODEC_LC3_CONFIG_32_1(_loc, _stream_context)
 Helper to declare LC3 32.1 codec configuration.
 
#define BT_AUDIO_CODEC_LC3_CONFIG_32_2(_loc, _stream_context)
 Helper to declare LC3 32.2 codec configuration.
 
#define BT_AUDIO_CODEC_LC3_CONFIG_441_1(_loc, _stream_context)
 Helper to declare LC3 441.1 codec configuration.
 
#define BT_AUDIO_CODEC_LC3_CONFIG_441_2(_loc, _stream_context)
 Helper to declare LC3 441.2 codec configuration.
 
#define BT_AUDIO_CODEC_LC3_CONFIG_48_1(_loc, _stream_context)
 Helper to declare LC3 48.1 codec configuration.
 
#define BT_AUDIO_CODEC_LC3_CONFIG_48_2(_loc, _stream_context)
 Helper to declare LC3 48.2 codec configuration.
 
#define BT_AUDIO_CODEC_LC3_CONFIG_48_3(_loc, _stream_context)
 Helper to declare LC3 48.3 codec configuration.
 
#define BT_AUDIO_CODEC_LC3_CONFIG_48_4(_loc, _stream_context)
 Helper to declare LC3 48.4 codec configuration.
 
#define BT_AUDIO_CODEC_LC3_CONFIG_48_5(_loc, _stream_context)
 Helper to declare LC3 48.5 codec configuration.
 
#define BT_AUDIO_CODEC_LC3_CONFIG_48_6(_loc, _stream_context)
 Helper to declare LC3 48.6 codec configuration.
 
#define BT_AUDIO_CODEC_LC3_QOS_7_5(_framing, _sdu, _rtn, _latency, _pd)    BT_AUDIO_CODEC_QOS(7500u, _framing, BT_AUDIO_CODEC_QOS_2M, _sdu, _rtn, _latency, _pd)
 Helper to declare LC3 codec QoS for 7.5ms interval.
 
#define BT_AUDIO_CODEC_LC3_QOS_7_5_UNFRAMED(_sdu, _rtn, _latency, _pd)    BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, _sdu, _rtn, _latency, _pd)
 Helper to declare LC3 codec QoS for 7.5ms interval unframed input.
 
#define BT_AUDIO_CODEC_LC3_QOS_10(_framing, _sdu, _rtn, _latency, _pd)    BT_AUDIO_CODEC_QOS(10000u, _framing, BT_AUDIO_CODEC_QOS_2M, _sdu, _rtn, _latency, _pd)
 Helper to declare LC3 codec QoS for 10ms frame internal.
 
#define BT_AUDIO_CODEC_LC3_QOS_10_UNFRAMED(_sdu, _rtn, _latency, _pd)    BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, _sdu, _rtn, _latency, _pd)
 Helper to declare LC3 codec QoS for 10ms interval unframed input.
 

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:785

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_*)

◆ BT_AUDIO_CODEC_LC3_CONFIG_16_1

#define BT_AUDIO_CODEC_LC3_CONFIG_16_1 (   _loc,
  _stream_context 
)

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

Value:
_loc, 30u, 1, _stream_context)
#define BT_AUDIO_CODEC_LC3_CONFIG(_freq, _duration, _loc, _len, _frames_per_sdu, _stream_context)
Helper to declare LC3 codec configuration.
Definition: lc3.h:123
@ BT_AUDIO_CODEC_CFG_DURATION_7_5
7.5 msec Frame Duration configuration
Definition: audio.h:272
@ BT_AUDIO_CODEC_CFG_FREQ_16KHZ
16 Khz codec sampling frequency
Definition: audio.h:237

Helper to declare LC3 16.1 codec configuration.

Parameters
_locAudio channel location bitfield (bt_audio_location)
_stream_contextStream context (BT_AUDIO_CONTEXT_*)

◆ BT_AUDIO_CODEC_LC3_CONFIG_16_2

#define BT_AUDIO_CODEC_LC3_CONFIG_16_2 (   _loc,
  _stream_context 
)

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

Value:
_loc, 40u, 1, _stream_context)
@ BT_AUDIO_CODEC_CFG_DURATION_10
10 msec Frame Duration configuration
Definition: audio.h:275

Helper to declare LC3 16.2 codec configuration.

Parameters
_locAudio channel location bitfield (bt_audio_location)
_stream_contextStream context (BT_AUDIO_CONTEXT_*)

◆ BT_AUDIO_CODEC_LC3_CONFIG_24_1

#define BT_AUDIO_CODEC_LC3_CONFIG_24_1 (   _loc,
  _stream_context 
)

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

Value:
_loc, 45u, 1, _stream_context)
@ BT_AUDIO_CODEC_CFG_FREQ_24KHZ
24 Khz codec sampling frequency
Definition: audio.h:243

Helper to declare LC3 24.1 codec configuration.

Parameters
_locAudio channel location bitfield (bt_audio_location)
_stream_contextStream context (BT_AUDIO_CONTEXT_*)

◆ BT_AUDIO_CODEC_LC3_CONFIG_24_2

#define BT_AUDIO_CODEC_LC3_CONFIG_24_2 (   _loc,
  _stream_context 
)

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

Value:

Helper to declare LC3 24.2 codec configuration.

Parameters
_locAudio channel location bitfield (bt_audio_location)
_stream_contextStream context (BT_AUDIO_CONTEXT_*)

◆ BT_AUDIO_CODEC_LC3_CONFIG_32_1

#define BT_AUDIO_CODEC_LC3_CONFIG_32_1 (   _loc,
  _stream_context 
)

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

Value:
_loc, 60u, 1, _stream_context)
@ BT_AUDIO_CODEC_CFG_FREQ_32KHZ
32 Khz codec sampling frequency
Definition: audio.h:246

Helper to declare LC3 32.1 codec configuration.

Parameters
_locAudio channel location bitfield (bt_audio_location)
_stream_contextStream context (BT_AUDIO_CONTEXT_*)

◆ BT_AUDIO_CODEC_LC3_CONFIG_32_2

#define BT_AUDIO_CODEC_LC3_CONFIG_32_2 (   _loc,
  _stream_context 
)

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

Value:

Helper to declare LC3 32.2 codec configuration.

Parameters
_locAudio channel location bitfield (bt_audio_location)
_stream_contextStream context (BT_AUDIO_CONTEXT_*)

◆ BT_AUDIO_CODEC_LC3_CONFIG_441_1

#define BT_AUDIO_CODEC_LC3_CONFIG_441_1 (   _loc,
  _stream_context 
)

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

Value:
_loc, 98u, 1, _stream_context)
@ BT_AUDIO_CODEC_CFG_FREQ_44KHZ
44.1 Khz codec sampling frequency
Definition: audio.h:249

Helper to declare LC3 441.1 codec configuration.

Parameters
_locAudio channel location bitfield (bt_audio_location)
_stream_contextStream context (BT_AUDIO_CONTEXT_*)

◆ BT_AUDIO_CODEC_LC3_CONFIG_441_2

#define BT_AUDIO_CODEC_LC3_CONFIG_441_2 (   _loc,
  _stream_context 
)

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

Value:

Helper to declare LC3 441.2 codec configuration.

Parameters
_locAudio channel location bitfield (bt_audio_location)
_stream_contextStream context (BT_AUDIO_CONTEXT_*)

◆ BT_AUDIO_CODEC_LC3_CONFIG_48_1

#define BT_AUDIO_CODEC_LC3_CONFIG_48_1 (   _loc,
  _stream_context 
)

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

Value:
_loc, 75u, 1, _stream_context)
@ BT_AUDIO_CODEC_CFG_FREQ_48KHZ
48 Khz codec sampling frequency
Definition: audio.h:252

Helper to declare LC3 48.1 codec configuration.

Parameters
_locAudio channel location bitfield (bt_audio_location)
_stream_contextStream context (BT_AUDIO_CONTEXT_*)

◆ BT_AUDIO_CODEC_LC3_CONFIG_48_2

#define BT_AUDIO_CODEC_LC3_CONFIG_48_2 (   _loc,
  _stream_context 
)

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

Value:

Helper to declare LC3 48.2 codec configuration.

Parameters
_locAudio channel location bitfield (bt_audio_location)
_stream_contextStream context (BT_AUDIO_CONTEXT_*)

◆ BT_AUDIO_CODEC_LC3_CONFIG_48_3

#define BT_AUDIO_CODEC_LC3_CONFIG_48_3 (   _loc,
  _stream_context 
)

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

Value:

Helper to declare LC3 48.3 codec configuration.

Parameters
_locAudio channel location bitfield (bt_audio_location)
_stream_contextStream context (BT_AUDIO_CONTEXT_*)

◆ BT_AUDIO_CODEC_LC3_CONFIG_48_4

#define BT_AUDIO_CODEC_LC3_CONFIG_48_4 (   _loc,
  _stream_context 
)

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

Value:

Helper to declare LC3 48.4 codec configuration.

Parameters
_locAudio channel location bitfield (bt_audio_location)
_stream_contextStream context (BT_AUDIO_CONTEXT_*)

◆ BT_AUDIO_CODEC_LC3_CONFIG_48_5

#define BT_AUDIO_CODEC_LC3_CONFIG_48_5 (   _loc,
  _stream_context 
)

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

Value:

Helper to declare LC3 48.5 codec configuration.

Parameters
_locAudio channel location bitfield (bt_audio_location)
_stream_contextStream context (BT_AUDIO_CONTEXT_*)

◆ BT_AUDIO_CODEC_LC3_CONFIG_48_6

#define BT_AUDIO_CODEC_LC3_CONFIG_48_6 (   _loc,
  _stream_context 
)

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

Value:

Helper to declare LC3 48.6 codec configuration.

Parameters
_locAudio channel location bitfield (bt_audio_location)
_stream_contextStream context (BT_AUDIO_CONTEXT_*)

◆ BT_AUDIO_CODEC_LC3_CONFIG_8_1

#define BT_AUDIO_CODEC_LC3_CONFIG_8_1 (   _loc,
  _stream_context 
)

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

Value:
_loc, 26u, 1, _stream_context)
@ BT_AUDIO_CODEC_CFG_FREQ_8KHZ
8 Khz codec sampling frequency
Definition: audio.h:231

Helper to declare LC3 8.1 codec configuration.

Parameters
_locAudio channel location bitfield (bt_audio_location)
_stream_contextStream context (BT_AUDIO_CONTEXT_*)

◆ BT_AUDIO_CODEC_LC3_CONFIG_8_2

#define BT_AUDIO_CODEC_LC3_CONFIG_8_2 (   _loc,
  _stream_context 
)

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

Value:

Helper to declare LC3 8.2 codec configuration.

Parameters
_locAudio channel location bitfield (bt_audio_location)
_stream_contextStream context (BT_AUDIO_CONTEXT_*)

◆ BT_AUDIO_CODEC_LC3_QOS_10

#define BT_AUDIO_CODEC_LC3_QOS_10 (   _framing,
  _sdu,
  _rtn,
  _latency,
  _pd 
)     BT_AUDIO_CODEC_QOS(10000u, _framing, BT_AUDIO_CODEC_QOS_2M, _sdu, _rtn, _latency, _pd)

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

Helper to declare LC3 codec QoS for 10ms frame internal.

◆ BT_AUDIO_CODEC_LC3_QOS_10_UNFRAMED

#define BT_AUDIO_CODEC_LC3_QOS_10_UNFRAMED (   _sdu,
  _rtn,
  _latency,
  _pd 
)     BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, _sdu, _rtn, _latency, _pd)

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

Helper to declare LC3 codec QoS for 10ms interval unframed input.

◆ BT_AUDIO_CODEC_LC3_QOS_7_5

#define BT_AUDIO_CODEC_LC3_QOS_7_5 (   _framing,
  _sdu,
  _rtn,
  _latency,
  _pd 
)     BT_AUDIO_CODEC_QOS(7500u, _framing, BT_AUDIO_CODEC_QOS_2M, _sdu, _rtn, _latency, _pd)

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

Helper to declare LC3 codec QoS for 7.5ms interval.

◆ BT_AUDIO_CODEC_LC3_QOS_7_5_UNFRAMED

#define BT_AUDIO_CODEC_LC3_QOS_7_5_UNFRAMED (   _sdu,
  _rtn,
  _latency,
  _pd 
)     BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, _sdu, _rtn, _latency, _pd)

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

Helper to declare LC3 codec QoS for 7.5ms interval unframed input.