Zephyr Project API  3.1.0
A Scalable Open Source RTOS
lc3.h File Reference

Bluetooth LC3 codec handling. More...

Go to the source code of this file.

Data Structures

struct  bt_codec_lc3_frame_len
 

Macros

#define BT_CODEC_LC3_ID   0x06
 LC3 codec ID. More...
 
#define BT_CODEC_LC3_FREQ_8KHZ   BIT(0)
 LC3 8 Khz frequency capability. More...
 
#define BT_CODEC_LC3_FREQ_11KHZ   BIT(1)
 LC3 11.025 Khz frequency capability. More...
 
#define BT_CODEC_LC3_FREQ_16KHZ   BIT(2)
 LC3 16 Khz frequency capability. More...
 
#define BT_CODEC_LC3_FREQ_22KHZ   BIT(3)
 LC3 22.05 Khz frequency capability. More...
 
#define BT_CODEC_LC3_FREQ_24KHZ   BIT(4)
 LC3 24 Khz frequency capability. More...
 
#define BT_CODEC_LC3_FREQ_32KHZ   BIT(5)
 LC3 32 Khz frequency capability. More...
 
#define BT_CODEC_LC3_FREQ_44KHZ   BIT(6)
 LC3 44.1 Khz frequency capability. More...
 
#define BT_CODEC_LC3_FREQ_48KHZ   BIT(7)
 LC3 48 Khz frequency capability. More...
 
#define BT_CODEC_LC3_FREQ_ANY
 LC3 any frequency capability. More...
 
#define BT_CODEC_LC3_DURATION_7_5   BIT(0)
 LC3 7.5 msec frame duration capability. More...
 
#define BT_CODEC_LC3_DURATION_10   BIT(1)
 LC3 10 msec frame duration capability. More...
 
#define BT_CODEC_LC3_DURATION_ANY
 LC3 any frame duration capability. More...
 
#define BT_CODEC_LC3_DURATION_PREFER_7_5   BIT(4)
 LC3 7.5 msec preferred frame duration capability. More...
 
#define BT_CODEC_LC3_DURATION_PREFER_10   BIT(5)
 LC3 10 msec preferred frame duration capability. More...
 
#define BT_CODEC_LC3_CHAN_COUNT_SUPPORT(_count)   ((uint8_t)BIT((_count) - 1))
 LC3 channel count support capability OR multiple supported counts together from 1 to 8 Example to support 1 and 3 channels: BT_CODEC_LC3_CHAN_COUNT_SUPPORT(1) | BT_CODEC_LC3_CHAN_COUNT_SUPPORT(3) More...
 
#define BT_CODEC_CONFIG_LC3_FREQ_8KHZ   0x01
 8 Khz codec Sample Frequency configuration More...
 
#define BT_CODEC_CONFIG_LC3_FREQ_11KHZ   0x02
 11.025 Khz codec Sample Frequency configuration More...
 
#define BT_CODEC_CONFIG_LC3_FREQ_16KHZ   0x03
 16 Khz codec Sample Frequency configuration More...
 
#define BT_CODEC_CONFIG_LC3_FREQ_22KHZ   0x04
 22.05 Khz codec Sample Frequency configuration More...
 
#define BT_CODEC_CONFIG_LC3_FREQ_24KHZ   0x05
 24 Khz codec Sample Frequency configuration More...
 
#define BT_CODEC_CONFIG_LC3_FREQ_32KHZ   0x06
 32 Khz codec Sample Frequency configuration More...
 
#define BT_CODEC_CONFIG_LC3_FREQ_44KHZ   0x07
 44.1 Khz codec Sample Frequency configuration More...
 
#define BT_CODEC_CONFIG_LC3_FREQ_48KHZ   0x08
 48 Khz codec Sample Frequency configuration More...
 
#define BT_CODEC_CONFIG_LC3_FREQ_88KHZ   0x09
 88.2 Khz codec Sample Frequency configuration More...
 
#define BT_CODEC_CONFIG_LC3_FREQ_96KHZ   0x0a
 96 Khz codec Sample Frequency configuration More...
 
#define BT_CODEC_CONFIG_LC3_FREQ_176KHZ   0x0b
 176.4 Khz codec Sample Frequency configuration More...
 
#define BT_CODEC_CONFIG_LC3_FREQ_192KHZ   0x0c
 192 Khz codec Sample Frequency configuration More...
 
#define BT_CODEC_CONFIG_LC3_FREQ_384KHZ   0x0d
 384 Khz codec Sample Frequency configuration More...
 
#define BT_CODEC_CONFIG_LC3_DURATION_7_5   0x00
 LC3 7.5 msec Frame Duration configuration. More...
 
#define BT_CODEC_CONFIG_LC3_DURATION_10   0x01
 LC3 10 msec Frame Duration configuration. More...
 
#define BT_CODEC_LC3_DATA(_freq, _duration, _chan_count, _len_min, _len_max, _max_frames_per_sdu)
 Helper to declare LC3 codec capability. More...
 
#define BT_CODEC_LC3_META(_prefer_context, _context)
 Helper to declare LC3 codec metadata. More...
 
#define BT_CODEC_LC3(_freq, _duration, _chan_count, _len_min, _len_max, _max_frames_per_sdu, _prefer_context, _context)
 Helper to declare LC3 codec. More...
 
#define BT_CODEC_LC3_CONFIG_DATA(_freq, _duration, _loc, _len, _frame_blocks_per_sdu)
 Helper to declare LC3 codec data configuration. More...
 
#define BT_CODEC_LC3_CONFIG_META(_context)
 
#define BT_CODEC_LC3_CONFIG_N(_freq, _duration, _loc, _len, _frames_per_sdu, _context)
 Helper to declare LC3 codec configuration for multiple channels. More...
 
#define BT_CODEC_LC3_CONFIG(_freq, _duration, _len, _context)    BT_CODEC_LC3_CONFIG_N(_freq, _duration, BT_AUDIO_LOCATION_FRONT_LEFT, _len, 1, _context)
 Helper to declare LC3 codec configuration for left location and one frame per sdu. More...
 
#define BT_CODEC_LC3_CONFIG_8_1
 Helper to declare LC3 8.1 codec configuration. More...
 
#define BT_CODEC_LC3_CONFIG_8_2
 Helper to declare LC3 8.2 codec configuration. More...
 
#define BT_CODEC_LC3_CONFIG_16_1
 Helper to declare LC3 16.1 codec configuration. More...
 
#define BT_CODEC_LC3_CONFIG_16_2
 Helper to declare LC3 16.2 codec configuration. More...
 
#define BT_CODEC_LC3_CONFIG_24_1
 Helper to declare LC3 24.1 codec configuration. More...
 
#define BT_CODEC_LC3_CONFIG_24_2
 Helper to declare LC3 24.2 codec configuration. More...
 
#define BT_CODEC_LC3_CONFIG_32_1
 Helper to declare LC3 32.1 codec configuration. More...
 
#define BT_CODEC_LC3_CONFIG_32_2
 Helper to declare LC3 32.2 codec configuration. More...
 
#define BT_CODEC_LC3_CONFIG_441_1
 Helper to declare LC3 441.1 codec configuration. More...
 
#define BT_CODEC_LC3_CONFIG_441_2
 Helper to declare LC3 441.2 codec configuration. More...
 
#define BT_CODEC_LC3_CONFIG_48_1
 Helper to declare LC3 48.1 codec configuration. More...
 
#define BT_CODEC_LC3_CONFIG_48_2
 Helper to declare LC3 48.2 codec configuration. More...
 
#define BT_CODEC_LC3_CONFIG_48_3
 Helper to declare LC3 48.3 codec configuration. More...
 
#define BT_CODEC_LC3_CONFIG_48_4
 Helper to declare LC3 48.4 codec configuration. More...
 
#define BT_CODEC_LC3_CONFIG_48_5
 Helper to declare LC3 48.5 codec configuration. More...
 
#define BT_CODEC_LC3_CONFIG_48_6
 Helper to declare LC3 48.6 codec configuration. More...
 
#define BT_CODEC_LC3_QOS_7_5(_framing, _sdu, _rtn, _latency, _pd)
 Helper to declare LC3 codec QoS for 7.5ms interval. More...
 
#define BT_CODEC_LC3_QOS_7_5_UNFRAMED(_sdu, _rtn, _latency, _pd)    BT_CODEC_QOS_UNFRAMED(7500u, _sdu, _rtn, _latency, _pd)
 Helper to declare LC3 codec QoS for 7.5ms interval unframed input. More...
 
#define BT_CODEC_LC3_QOS_10(_framing, _sdu, _rtn, _latency, _pd)
 Helper to declare LC3 codec QoS for 10ms frame internal. More...
 
#define BT_CODEC_LC3_QOS_10_UNFRAMED(_sdu, _rtn, _latency, _pd)    BT_CODEC_QOS_UNFRAMED(10000u, _sdu, _rtn, _latency, _pd)
 Helper to declare LC3 codec QoS for 10ms interval unframed input. More...
 

Enumerations

enum  bt_codec_capability_type {
  BT_CODEC_LC3_FREQ = 0x01 , BT_CODEC_LC3_FREQ = 0x01 , BT_CODEC_LC3_DURATION = 0x02 , BT_CODEC_LC3_DURATION = 0x02 ,
  BT_CODEC_LC3_CHAN_COUNT = 0x03 , BT_CODEC_LC3_CHAN_COUNT = 0x03 , BT_CODEC_LC3_FRAME_LEN = 0x04 , BT_CODEC_LC3_FRAME_LEN = 0x04 ,
  BT_CODEC_LC3_FRAME_COUNT = 0x05 , BT_CODEC_LC3_FRAME_COUNT = 0x05
}
 Codec capability type id's. More...
 
enum  bt_codec_config_type {
  BT_CODEC_CONFIG_LC3_FREQ = 0x01 , BT_CODEC_CONFIG_LC3_DURATION = 0x02 , BT_CODEC_CONFIG_LC3_CHAN_ALLOC = 0x03 , BT_CODEC_CONFIG_LC3_FRAME_LEN = 0x04 ,
  BT_CODEC_CONFIG_LC3_FRAME_BLKS_PER_SDU = 0x05
}
 Codec configuration type IDs. More...
 

Detailed Description

Bluetooth LC3 codec handling.