Zephyr API Documentation
4.1.99
A Scalable Open Source RTOS
4.1.99
Toggle main menu visibility
Main Page
Related Pages
Topics
Data Structures
Data Structures
Data Structure Index
Data Fields
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Enumerator
Files
File List
Globals
All
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
$
a
b
c
d
f
g
h
i
k
l
m
n
o
p
r
s
t
u
x
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Macros
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
▼
Zephyr API Documentation
►
Introduction
Deprecated List
►
Topics
►
Data Structures
▼
Files
▼
File List
►
doc
►
kernel
►
lib
►
subsys
▼
zephyr
►
acpi
►
app_memory
►
arch
►
audio
▼
bluetooth
▼
audio
►
aics.h
►
audio.h
►
bap.h
►
bap_lc3_preset.h
►
cap.h
►
ccid.h
►
ccp.h
►
csip.h
►
gmap.h
►
gmap_lc3_preset.h
►
has.h
►
lc3.h
►
mcc.h
►
mcs.h
►
media_proxy.h
►
micp.h
►
pacs.h
►
pbp.h
►
tbs.h
►
tmap.h
►
vcp.h
►
vocs.h
►
classic
►
mesh
►
services
►
addr.h
►
att.h
►
bluetooth.h
►
buf.h
►
byteorder.h
►
conn.h
►
controller.h
►
crypto.h
►
cs.h
►
direction.h
►
ead.h
►
gap.h
►
gatt.h
►
hci.h
►
hci_raw.h
►
hci_types.h
►
hci_vs.h
►
iso.h
►
l2cap.h
mesh.h
►
testing.h
►
uuid.h
►
canbus
►
console
►
crypto
►
data
►
debug
►
devicetree
►
dfu
►
display
►
drivers
►
dsp
►
dt-bindings
►
fs
►
input
►
internal
►
ipc
►
kernel
►
linker
►
llext
►
logging
►
lorawan
►
math
►
mem_mgmt
►
mgmt
►
misc
►
modbus
►
modem
►
multi_heap
►
net
►
platform
►
pm
►
pmci
►
portability
►
posix
►
psa
►
random
►
retention
►
rtio
►
sd
►
sensing
►
settings
►
shell
►
sip_svc
►
stats
►
storage
►
sys
►
task_wdt
►
timing
►
toolchain
►
tracing
►
usb
►
usb_c
►
xen
►
zbus
►
zvfs
►
bindesc.h
►
cache.h
►
device.h
►
devicetree.h
►
fatal.h
►
fatal_types.h
►
init.h
►
irq.h
►
irq_multilevel.h
►
irq_nextlevel.h
►
irq_offload.h
►
kernel.h
kernel_includes.h
►
kernel_structs.h
►
kernel_version.h
►
net_buf.h
►
shared_irq.h
►
smf.h
►
spinlock.h
►
sw_isr_table.h
►
sys_clock.h
►
syscall.h
►
toolchain.h
types.h
►
Globals
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
Loading...
Searching...
No Matches
lc3.h
Go to the documentation of this file.
1
6
/*
7
* Copyright (c) 2020 Intel Corporation
8
* Copyright (c) 2022-2024 Nordic Semiconductor ASA
9
*
10
* SPDX-License-Identifier: Apache-2.0
11
*/
12
#ifndef ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_LC3_H_
13
#define ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_LC3_H_
14
26
#include <
zephyr/sys/util_macro.h
>
27
#include <
zephyr/bluetooth/byteorder.h
>
28
#include <
zephyr/bluetooth/hci_types.h
>
29
30
#ifdef __cplusplus
31
extern
"C"
{
32
#endif
33
52
#define BT_AUDIO_CODEC_CAP_LC3_DATA(_freq, _duration, _chan_count, _len_min, _len_max, \
53
_max_frames_per_sdu) \
54
{ \
55
BT_AUDIO_CODEC_DATA(BT_AUDIO_CODEC_CAP_TYPE_FREQ, BT_BYTES_LIST_LE16(_freq)), \
56
BT_AUDIO_CODEC_DATA(BT_AUDIO_CODEC_CAP_TYPE_DURATION, (_duration)), \
57
BT_AUDIO_CODEC_DATA(BT_AUDIO_CODEC_CAP_TYPE_CHAN_COUNT, (_chan_count)), \
58
BT_AUDIO_CODEC_DATA(BT_AUDIO_CODEC_CAP_TYPE_FRAME_LEN, \
59
BT_BYTES_LIST_LE16(_len_min), \
60
BT_BYTES_LIST_LE16(_len_max)), \
61
COND_CODE_1(_max_frames_per_sdu, (), \
62
(BT_AUDIO_CODEC_DATA(BT_AUDIO_CODEC_CAP_TYPE_FRAME_COUNT, \
63
(_max_frames_per_sdu)))) \
64
}
65
71
#define BT_AUDIO_CODEC_CAP_LC3_META(_prefer_context) \
72
{ \
73
BT_AUDIO_CODEC_DATA(BT_AUDIO_METADATA_TYPE_PREF_CONTEXT, \
74
BT_BYTES_LIST_LE16(_prefer_context)) \
75
}
71
#define BT_AUDIO_CODEC_CAP_LC3_META(_prefer_context) \
…
76
88
#define BT_AUDIO_CODEC_CAP_LC3(_freq, _duration, _chan_count, _len_min, _len_max, \
89
_max_frames_per_sdu, _prefer_context) \
90
BT_AUDIO_CODEC_CAP(BT_HCI_CODING_FORMAT_LC3, 0x0000, 0x0000, \
91
BT_AUDIO_CODEC_CAP_LC3_DATA(_freq, _duration, _chan_count, _len_min, \
92
_len_max, _max_frames_per_sdu), \
93
BT_AUDIO_CODEC_CAP_LC3_META(_prefer_context))
94
105
#define BT_AUDIO_CODEC_CFG_LC3_DATA(_freq, _duration, _loc, _len, _frames_per_sdu) \
106
{ \
107
BT_AUDIO_CODEC_DATA(BT_AUDIO_CODEC_CFG_FREQ, (_freq)), \
108
BT_AUDIO_CODEC_DATA(BT_AUDIO_CODEC_CFG_DURATION, (_duration)), \
109
BT_AUDIO_CODEC_DATA(BT_AUDIO_CODEC_CFG_CHAN_ALLOC, BT_BYTES_LIST_LE32(_loc)), \
110
BT_AUDIO_CODEC_DATA(BT_AUDIO_CODEC_CFG_FRAME_LEN, BT_BYTES_LIST_LE16(_len)), \
111
COND_CODE_1(_frames_per_sdu, (), \
112
(BT_AUDIO_CODEC_DATA(BT_AUDIO_CODEC_CFG_FRAME_BLKS_PER_SDU, \
113
(_frames_per_sdu)))) \
114
}
105
#define BT_AUDIO_CODEC_CFG_LC3_DATA(_freq, _duration, _loc, _len, _frames_per_sdu) \
…
115
117
#define BT_AUDIO_CODEC_CFG_LC3_META(_stream_context) \
118
{ \
119
BT_AUDIO_CODEC_DATA(BT_AUDIO_METADATA_TYPE_STREAM_CONTEXT, \
120
BT_BYTES_LIST_LE16(_stream_context)) \
121
}
117
#define BT_AUDIO_CODEC_CFG_LC3_META(_stream_context) \
…
122
133
#define BT_AUDIO_CODEC_LC3_CONFIG(_freq, _duration, _loc, _len, _frames_per_sdu, _stream_context) \
134
BT_AUDIO_CODEC_CFG( \
135
BT_HCI_CODING_FORMAT_LC3, 0x0000, 0x0000, \
136
BT_AUDIO_CODEC_CFG_LC3_DATA(_freq, _duration, _loc, _len, _frames_per_sdu), \
137
BT_AUDIO_CODEC_CFG_LC3_META(_stream_context))
133
#define BT_AUDIO_CODEC_LC3_CONFIG(_freq, _duration, _loc, _len, _frames_per_sdu, _stream_context) \
…
138
139
#ifdef __cplusplus
140
}
141
#endif
142
147
#endif
/* ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_LC3_H_ */
byteorder.h
Bluetooth byteorder API.
hci_types.h
util_macro.h
Macro utilities.
zephyr
bluetooth
audio
lc3.h
Generated on Fri May 16 2025 06:06:18 for Zephyr API Documentation by
1.12.0