Zephyr API Documentation  3.7.0
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:48
#define BT_AUDIO_CODEC_CAP_LC3_META(_prefer_context)
Helper to declare LC3 codec metadata.
Definition: lc3.h:67
#define BT_AUDIO_CODEC_CAP(_id, _cid, _vid, _data, _meta)
Helper to declare Codec capability parsing APIs structure.
Definition: audio.h:556
#define BT_HCI_CODING_FORMAT_LC3
Definition: hci_types.h:885

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:521
@ BT_AUDIO_CODEC_CAP_TYPE_CHAN_COUNT
Supported audio channel counts.
Definition: audio.h:75
@ BT_AUDIO_CODEC_CAP_TYPE_DURATION
Supported frame durations.
Definition: audio.h:72
@ BT_AUDIO_CODEC_CAP_TYPE_FRAME_COUNT
Supported maximum codec frames per SDU
Definition: audio.h:81
@ BT_AUDIO_CODEC_CAP_TYPE_FRAME_LEN
Supported octets per codec frame.
Definition: audio.h:78
@ BT_AUDIO_CODEC_CAP_TYPE_FREQ
Supported sampling frequencies.
Definition: audio.h:69
#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 is optional and will be included only if != 1

COND_CODE_1 is used to omit an LTV entry in case the _frames_per_sdu is 1. COND_CODE_1 will evaluate to second argument if the flag parameter(first argument) is 1

  • removing one layer of paranteses. If the flags argument is != 1 it will evaluate to the third argument which inserts a LTV entry for the max_frames_per_sdu value.
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

◆ 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:438

Helper to declare LC3 codec metadata.

Parameters
_prefer_contextPreferred contexts (bt_audio_context)

◆ 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:233
@ BT_AUDIO_CODEC_CFG_FRAME_LEN
Octets per codec frame.
Definition: audio.h:242
@ BT_AUDIO_CODEC_CFG_DURATION
Frame duration.
Definition: audio.h:236
@ BT_AUDIO_CODEC_CFG_FRAME_BLKS_PER_SDU
Codec frame blocks per SDU.
Definition: audio.h:245
@ BT_AUDIO_CODEC_CFG_CHAN_ALLOC
Audio channel allocation.
Definition: audio.h:239
#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:450

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:113
#define BT_AUDIO_CODEC_CFG_LC3_DATA(_freq, _duration, _loc, _len, _frames_per_sdu)
Helper to declare LC3 codec data configuration.
Definition: lc3.h:101
#define BT_AUDIO_CODEC_CFG(_id, _cid, _vid, _data, _meta)
Helper to declare Codec config parsing APIs.
Definition: audio.h:533

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