1 /**
2  * @file
3  * @brief Header for Bluetooth BAP LC3 presets.
4  *
5  * Copyright (c) 2023-2024 Nordic Semiconductor ASA
6  *
7  * SPDX-License-Identifier: Apache-2.0
8  */
9 
10 #ifndef ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_BAP_LC3_PRESET_
11 #define ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_BAP_LC3_PRESET_
12 
13 /**
14  * @brief Basic Audio Profile (BAP) LC3 Presets
15  *
16  * @defgroup bt_bap_lc3_preset Basic Audio Profile (BAP) LC3 Presets
17  *
18  * @since 3.0
19  * @version 0.8.0
20  *
21  * @ingroup bluetooth
22  * @{
23  *
24  * These APIs provide preset for codec configuration and codec QoS based on values supplied by the
25  * codec configuration tables in the BAP specification.
26  *
27  */
28 
29 #include <zephyr/bluetooth/audio/audio.h>
30 #include <zephyr/bluetooth/audio/lc3.h>
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 /** Struct to hold a BAP defined LC3 preset */
37 struct bt_bap_lc3_preset {
38 	/** The LC3 Codec */
39 	struct bt_audio_codec_cfg codec_cfg;
40 	/** The BAP spec defined QoS values */
41 	struct bt_audio_codec_qos qos;
42 };
43 
44 /** Helper to declare an LC3 preset structure */
45 #define BT_BAP_LC3_PRESET(_codec, _qos)                                                            \
46 	{                                                                                          \
47 		.codec_cfg = _codec, .qos = _qos,                                                  \
48 	}
49 
50 /* LC3 Unicast presets defined by table 5.2 in the BAP v1.0 specification */
51 
52 /**
53  * @brief Helper to declare LC3 Unicast 8_1_1 codec configuration
54  *
55  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
56  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
57  */
58 #define BT_BAP_LC3_UNICAST_PRESET_8_1_1(_loc, _stream_context)                                     \
59 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_8KHZ,                  \
60 						    BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 26u, 1, \
61 						    _stream_context),                              \
62 			  BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 26u, 2u, 8u, 40000u))
63 
64 /**
65  * @brief Helper to declare LC3 Unicast 8_2_1 codec configuration
66  *
67  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
68  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
69  */
70 #define BT_BAP_LC3_UNICAST_PRESET_8_2_1(_loc, _stream_context)                                     \
71 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_8KHZ,                  \
72 						    BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 30U, 1,  \
73 						    _stream_context),                              \
74 			  BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 30u, 2u, 10u, 40000u))
75 
76 /**
77  * @brief Helper to declare LC3 Unicast 16_1_1 codec configuration
78  *
79  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
80  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
81  */
82 #define BT_BAP_LC3_UNICAST_PRESET_16_1_1(_loc, _stream_context)                                    \
83 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_16KHZ,                 \
84 						    BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 30U, 1, \
85 						    _stream_context),                              \
86 			  BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 30u, 2u, 8u, 40000u))
87 
88 /**
89  * @brief Helper to declare LC3 Unicast 16_2_1 codec configuration
90  *
91  * Mandatory to support as both unicast client and server
92  *
93  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
94  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
95  */
96 #define BT_BAP_LC3_UNICAST_PRESET_16_2_1(_loc, _stream_context)                                    \
97 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_16KHZ,                 \
98 						    BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 40U, 1,  \
99 						    _stream_context),                              \
100 			  BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 40u, 2u, 10u, 40000u))
101 
102 /**
103  * @brief Helper to declare LC3 Unicast 24_1_1 codec configuration
104  *
105  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
106  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
107  */
108 #define BT_BAP_LC3_UNICAST_PRESET_24_1_1(_loc, _stream_context)                                    \
109 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_24KHZ,                 \
110 						    BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 45U, 1, \
111 						    _stream_context),                              \
112 			  BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 45u, 2u, 8u, 40000u))
113 
114 /**
115  * @brief Helper to declare LC3 Unicast 24_2_1 codec configuration
116  *
117  * Mandatory to support as unicast server
118  *
119  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
120  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
121  */
122 #define BT_BAP_LC3_UNICAST_PRESET_24_2_1(_loc, _stream_context)                                    \
123 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_24KHZ,                 \
124 						    BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 60U, 1,  \
125 						    _stream_context),                              \
126 			  BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 60u, 2u, 10u, 40000u))
127 
128 /**
129  * @brief Helper to declare LC3 Unicast 32_1_1 codec configuration
130  *
131  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
132  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
133  */
134 #define BT_BAP_LC3_UNICAST_PRESET_32_1_1(_loc, _stream_context)                                    \
135 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_32KHZ,                 \
136 						    BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 60U, 1, \
137 						    _stream_context),                              \
138 			  BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 60u, 2u, 8u, 40000u))
139 
140 /**
141  * @brief Helper to declare LC3 Unicast 32_2_1 codec configuration
142  *
143  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
144  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
145  */
146 #define BT_BAP_LC3_UNICAST_PRESET_32_2_1(_loc, _stream_context)                                    \
147 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_32KHZ,                 \
148 						    BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 80U, 1,  \
149 						    _stream_context),                              \
150 			  BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 80u, 2u, 10u, 40000u))
151 
152 /**
153  * @brief Helper to declare LC3 Unicast 441_1_1 codec configuration
154  *
155  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
156  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
157  */
158 #define BT_BAP_LC3_UNICAST_PRESET_441_1_1(_loc, _stream_context)                                   \
159 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_44KHZ,                 \
160 						    BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 97U, 1, \
161 						    _stream_context),                              \
162 			  BT_AUDIO_CODEC_QOS_FRAMED(8163u, 97u, 5u, 24u, 40000u))
163 
164 /**
165  * @brief Helper to declare LC3 Unicast 441_2_1 codec configuration
166  *
167  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
168  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
169  */
170 #define BT_BAP_LC3_UNICAST_PRESET_441_2_1(_loc, _stream_context)                                   \
171 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_44KHZ,                 \
172 						    BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 130U, 1, \
173 						    _stream_context),                              \
174 			  BT_AUDIO_CODEC_QOS_FRAMED(10884u, 130u, 5u, 31u, 40000u))
175 
176 /**
177  * @brief Helper to declare LC3 Unicast 48_1_1 codec configuration
178  *
179  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
180  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
181  */
182 #define BT_BAP_LC3_UNICAST_PRESET_48_1_1(_loc, _stream_context)                                    \
183 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
184 						    BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 75U, 1, \
185 						    _stream_context),                              \
186 			  BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 75u, 5u, 15u, 40000u))
187 
188 /**
189  * @brief Helper to declare LC3 Unicast 48_2_1 codec configuration
190  *
191  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
192  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
193  */
194 #define BT_BAP_LC3_UNICAST_PRESET_48_2_1(_loc, _stream_context)                                    \
195 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
196 						    BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 100U, 1, \
197 						    _stream_context),                              \
198 			  BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 100u, 5u, 20u, 40000u))
199 
200 /**
201  * @brief Helper to declare LC3 Unicast 48_3_1 codec configuration
202  *
203  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
204  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
205  */
206 #define BT_BAP_LC3_UNICAST_PRESET_48_3_1(_loc, _stream_context)                                    \
207 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
208 						    BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 90U, 1, \
209 						    _stream_context),                              \
210 			  BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 90u, 5u, 15u, 40000u))
211 
212 /**
213  * @brief Helper to declare LC3 Unicast 48_4_1 codec configuration
214  *
215  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
216  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
217  */
218 #define BT_BAP_LC3_UNICAST_PRESET_48_4_1(_loc, _stream_context)                                    \
219 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
220 						    BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 120u, 1, \
221 						    _stream_context),                              \
222 			  BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 120u, 5u, 20u, 40000u))
223 
224 /**
225  * @brief Helper to declare LC3 Unicast 8_5_1 codec configuration
226  *
227  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
228  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
229  */
230 #define BT_BAP_LC3_UNICAST_PRESET_48_5_1(_loc, _stream_context)                                    \
231 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
232 						    BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 117u,   \
233 						    1, _stream_context),                           \
234 			  BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 117u, 5u, 15u, 40000u))
235 
236 /**
237  * @brief Helper to declare LC3 Unicast 48_6_1 codec configuration
238  *
239  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
240  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
241  */
242 #define BT_BAP_LC3_UNICAST_PRESET_48_6_1(_loc, _stream_context)                                    \
243 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
244 						    BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 155u, 1, \
245 						    _stream_context),                              \
246 			  BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 155u, 5u, 20u, 40000u))
247 
248 /**
249  * @brief Helper to declare LC3 Unicast 8_1_2 codec configuration
250  *
251  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
252  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
253  */
254 /* Following presets are for unicast high reliability audio data */
255 #define BT_BAP_LC3_UNICAST_PRESET_8_1_2(_loc, _stream_context)                                     \
256 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_8KHZ,                  \
257 						    BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 26u, 1, \
258 						    _stream_context),                              \
259 			  BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 26u, 13u, 75u, 40000u))
260 
261 /**
262  * @brief Helper to declare LC3 Unicast 8_2_2 codec configuration
263  *
264  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
265  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
266  */
267 #define BT_BAP_LC3_UNICAST_PRESET_8_2_2(_loc, _stream_context)                                     \
268 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_8KHZ,                  \
269 						    BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 30U, 1,  \
270 						    _stream_context),                              \
271 			  BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 30u, 13u, 95u, 40000u))
272 
273 /**
274  * @brief Helper to declare LC3 Unicast 16_1_2 codec configuration
275  *
276  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
277  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
278  */
279 #define BT_BAP_LC3_UNICAST_PRESET_16_1_2(_loc, _stream_context)                                    \
280 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_16KHZ,                 \
281 						    BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 30U, 1, \
282 						    _stream_context),                              \
283 			  BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 30u, 13u, 75u, 40000u))
284 
285 /**
286  * @brief Helper to declare LC3 Unicast 16_2_2 codec configuration
287  *
288  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
289  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
290  */
291 #define BT_BAP_LC3_UNICAST_PRESET_16_2_2(_loc, _stream_context)                                    \
292 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_16KHZ,                 \
293 						    BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 40U, 1,  \
294 						    _stream_context),                              \
295 			  BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 40u, 13u, 95u, 40000u))
296 
297 /**
298  * @brief Helper to declare LC3 Unicast 24_1_2 codec configuration
299  *
300  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
301  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
302  */
303 #define BT_BAP_LC3_UNICAST_PRESET_24_1_2(_loc, _stream_context)                                    \
304 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_24KHZ,                 \
305 						    BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 45U, 1, \
306 						    _stream_context),                              \
307 			  BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 45u, 13u, 75u, 40000u))
308 
309 /**
310  * @brief Helper to declare LC3 Unicast 24_2_2 codec configuration
311  *
312  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
313  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
314  */
315 #define BT_BAP_LC3_UNICAST_PRESET_24_2_2(_loc, _stream_context)                                    \
316 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_24KHZ,                 \
317 						    BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 60U, 1,  \
318 						    _stream_context),                              \
319 			  BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 60u, 13u, 95u, 40000u))
320 
321 /**
322  * @brief Helper to declare LC3 Unicast 32_1_2 codec configuration
323  *
324  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
325  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
326  */
327 #define BT_BAP_LC3_UNICAST_PRESET_32_1_2(_loc, _stream_context)                                    \
328 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_32KHZ,                 \
329 						    BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 60U, 1, \
330 						    _stream_context),                              \
331 			  BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 60u, 13u, 75u, 40000u))
332 
333 /**
334  * @brief Helper to declare LC3 Unicast 32_2_2 codec configuration
335  *
336  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
337  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
338  */
339 #define BT_BAP_LC3_UNICAST_PRESET_32_2_2(_loc, _stream_context)                                    \
340 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_32KHZ,                 \
341 						    BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 80U, 1,  \
342 						    _stream_context),                              \
343 			  BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 80u, 13u, 95u, 40000u))
344 
345 /**
346  * @brief Helper to declare LC3 Unicast 441_1_2 codec configuration
347  *
348  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
349  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
350  */
351 #define BT_BAP_LC3_UNICAST_PRESET_441_1_2(_loc, _stream_context)                                   \
352 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_44KHZ,                 \
353 						    BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 97U, 1, \
354 						    _stream_context),                              \
355 			  BT_AUDIO_CODEC_QOS_FRAMED(8163u, 97u, 13u, 80u, 40000u))
356 
357 /**
358  * @brief Helper to declare LC3 Unicast 441_2_2 codec configuration
359  *
360  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
361  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
362  */
363 #define BT_BAP_LC3_UNICAST_PRESET_441_2_2(_loc, _stream_context)                                   \
364 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_44KHZ,                 \
365 						    BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 130U, 1, \
366 						    _stream_context),                              \
367 			  BT_AUDIO_CODEC_QOS_FRAMED(10884u, 130u, 13u, 85u, 40000u))
368 
369 /**
370  * @brief Helper to declare LC3 Unicast 48_1_2 codec configuration
371  *
372  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
373  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
374  */
375 #define BT_BAP_LC3_UNICAST_PRESET_48_1_2(_loc, _stream_context)                                    \
376 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
377 						    BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 75U, 1, \
378 						    _stream_context),                              \
379 			  BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 75u, 13u, 75u, 40000u))
380 
381 /**
382  * @brief Helper to declare LC3 Unicast 48_2_2 codec configuration
383  *
384  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
385  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
386  */
387 #define BT_BAP_LC3_UNICAST_PRESET_48_2_2(_loc, _stream_context)                                    \
388 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
389 						    BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 100U, 1, \
390 						    _stream_context),                              \
391 			  BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 100u, 13u, 95u, 40000u))
392 
393 /**
394  * @brief Helper to declare LC3 Unicast 48_3_2 codec configuration
395  *
396  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
397  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
398  */
399 #define BT_BAP_LC3_UNICAST_PRESET_48_3_2(_loc, _stream_context)                                    \
400 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
401 						    BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 90U, 1, \
402 						    _stream_context),                              \
403 			  BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 90u, 13u, 75u, 40000u))
404 
405 /**
406  * @brief Helper to declare LC3 Unicast 48_4_2 codec configuration
407  *
408  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
409  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
410  */
411 #define BT_BAP_LC3_UNICAST_PRESET_48_4_2(_loc, _stream_context)                                    \
412 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
413 						    BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 120u, 1, \
414 						    _stream_context),                              \
415 			  BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 120u, 13u, 100u, 40000u))
416 
417 /**
418  * @brief Helper to declare LC3 Unicast 48_5_2 codec configuration
419  *
420  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
421  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
422  */
423 #define BT_BAP_LC3_UNICAST_PRESET_48_5_2(_loc, _stream_context)                                    \
424 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
425 						    BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 117u,   \
426 						    1, _stream_context),                           \
427 			  BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 117u, 13u, 75u, 40000u))
428 
429 /**
430  * @brief Helper to declare LC3 Unicast 48_6_2 codec configuration
431  *
432  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
433  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
434  */
435 #define BT_BAP_LC3_UNICAST_PRESET_48_6_2(_loc, _stream_context)                                    \
436 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
437 						    BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 155u, 1, \
438 						    _stream_context),                              \
439 			  BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 155u, 13u, 100u, 40000u))
440 
441 /**
442  * @brief Helper to declare LC3 Broadcast 8_1_1 codec configuration
443  *
444  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
445  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
446  */
447 /* LC3 Broadcast presets defined by table 6.4 in the BAP v1.0 specification */
448 #define BT_BAP_LC3_BROADCAST_PRESET_8_1_1(_loc, _stream_context)                                   \
449 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_8KHZ,                  \
450 						    BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 26u, 1, \
451 						    _stream_context),                              \
452 			  BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 26u, 2u, 8u, 40000u))
453 
454 /**
455  * @brief Helper to declare LC3 Broadcast 8_2_1 codec configuration
456  *
457  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
458  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
459  */
460 #define BT_BAP_LC3_BROADCAST_PRESET_8_2_1(_loc, _stream_context)                                   \
461 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_8KHZ,                  \
462 						    BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 30U, 1,  \
463 						    _stream_context),                              \
464 			  BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 30u, 2u, 10u, 40000u))
465 
466 /**
467  * @brief Helper to declare LC3 Broadcast 16_1_1 codec configuration
468  *
469  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
470  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
471  */
472 #define BT_BAP_LC3_BROADCAST_PRESET_16_1_1(_loc, _stream_context)                                  \
473 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_16KHZ,                 \
474 						    BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 30U, 1, \
475 						    _stream_context),                              \
476 			  BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 30u, 2u, 8u, 40000u))
477 
478 /**
479  * @brief Helper to declare LC3 Broadcast 16_2_1 codec configuration
480  *
481  * Mandatory to support as both broadcast source and sink
482  *
483  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
484  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
485  */
486 #define BT_BAP_LC3_BROADCAST_PRESET_16_2_1(_loc, _stream_context)                                  \
487 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_16KHZ,                 \
488 						    BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 40U, 1,  \
489 						    _stream_context),                              \
490 			  BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 40u, 2u, 10u, 40000u))
491 
492 /**
493  * @brief Helper to declare LC3 Broadcast 24_1_1 codec configuration
494  *
495  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
496  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
497  */
498 #define BT_BAP_LC3_BROADCAST_PRESET_24_1_1(_loc, _stream_context)                                  \
499 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_24KHZ,                 \
500 						    BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 45U, 1, \
501 						    _stream_context),                              \
502 			  BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 45u, 2u, 8u, 40000u))
503 
504 /**
505  * @brief Helper to declare LC3 Broadcast 24_2_1 codec configuration
506  *
507  * Mandatory to support as broadcast sink
508  *
509  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
510  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
511  */
512 #define BT_BAP_LC3_BROADCAST_PRESET_24_2_1(_loc, _stream_context)                                  \
513 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_24KHZ,                 \
514 						    BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 60U, 1,  \
515 						    _stream_context),                              \
516 			  BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 60u, 2u, 10u, 40000u))
517 
518 /**
519  * @brief Helper to declare LC3 Broadcast 32_1_1 codec configuration
520  *
521  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
522  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
523  */
524 #define BT_BAP_LC3_BROADCAST_PRESET_32_1_1(_loc, _stream_context)                                  \
525 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_32KHZ,                 \
526 						    BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 60U, 1, \
527 						    _stream_context),                              \
528 			  BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 60u, 2u, 8u, 40000u))
529 
530 /**
531  * @brief Helper to declare LC3 Broadcast 32_2_1 codec configuration
532  *
533  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
534  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
535  */
536 #define BT_BAP_LC3_BROADCAST_PRESET_32_2_1(_loc, _stream_context)                                  \
537 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_32KHZ,                 \
538 						    BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 80U, 1,  \
539 						    _stream_context),                              \
540 			  BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 80u, 2u, 10u, 40000u))
541 
542 /**
543  * @brief Helper to declare LC3 Broadcast 441_1_1 codec configuration
544  *
545  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
546  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
547  */
548 #define BT_BAP_LC3_BROADCAST_PRESET_441_1_1(_loc, _stream_context)                                 \
549 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_44KHZ,                 \
550 						    BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 97U, 1, \
551 						    _stream_context),                              \
552 			  BT_AUDIO_CODEC_QOS_FRAMED(8163u, 97u, 4u, 24u, 40000u))
553 
554 /**
555  * @brief Helper to declare LC3 Broadcast 441_2_1 codec configuration
556  *
557  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
558  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
559  */
560 #define BT_BAP_LC3_BROADCAST_PRESET_441_2_1(_loc, _stream_context)                                 \
561 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_44KHZ,                 \
562 						    BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 130U, 1, \
563 						    _stream_context),                              \
564 			  BT_AUDIO_CODEC_QOS_FRAMED(10884u, 130u, 4u, 31u, 40000u))
565 
566 /**
567  * @brief Helper to declare LC3 Broadcast 48_1_1 codec configuration
568  *
569  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
570  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
571  */
572 #define BT_BAP_LC3_BROADCAST_PRESET_48_1_1(_loc, _stream_context)                                  \
573 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
574 						    BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 75U, 1, \
575 						    _stream_context),                              \
576 			  BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 75u, 4u, 15u, 40000u))
577 
578 /**
579  * @brief Helper to declare LC3 Broadcast 48_2_1 codec configuration
580  *
581  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
582  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
583  */
584 #define BT_BAP_LC3_BROADCAST_PRESET_48_2_1(_loc, _stream_context)                                  \
585 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
586 						    BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 100U, 1, \
587 						    _stream_context),                              \
588 			  BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 100u, 4u, 20u, 40000u))
589 
590 /**
591  * @brief Helper to declare LC3 Broadcast 48_3_1 codec configuration
592  *
593  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
594  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
595  */
596 #define BT_BAP_LC3_BROADCAST_PRESET_48_3_1(_loc, _stream_context)                                  \
597 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
598 						    BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 90U, 1, \
599 						    _stream_context),                              \
600 			  BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 90u, 4u, 15u, 40000u))
601 
602 /**
603  * @brief Helper to declare LC3 Broadcast 48_4_1 codec configuration
604  *
605  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
606  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
607  */
608 #define BT_BAP_LC3_BROADCAST_PRESET_48_4_1(_loc, _stream_context)                                  \
609 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
610 						    BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 120u, 1, \
611 						    _stream_context),                              \
612 			  BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 120u, 4u, 20u, 40000u))
613 
614 /**
615  * @brief Helper to declare LC3 Broadcast 48_5_1 codec configuration
616  *
617  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
618  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
619  */
620 #define BT_BAP_LC3_BROADCAST_PRESET_48_5_1(_loc, _stream_context)                                  \
621 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
622 						    BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 117u,   \
623 						    1, _stream_context),                           \
624 			  BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 117u, 4u, 15u, 40000u))
625 
626 /**
627  * @brief Helper to declare LC3 Broadcast 48_6_1 codec configuration
628  *
629  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
630  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
631  */
632 #define BT_BAP_LC3_BROADCAST_PRESET_48_6_1(_loc, _stream_context)                                  \
633 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
634 						    BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 155u, 1, \
635 						    _stream_context),                              \
636 			  BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 155u, 4u, 20u, 40000u))
637 
638 /**
639  * @brief Helper to declare LC3 Broadcast 8_1_2 codec configuration
640  *
641  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
642  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
643  */
644 /* Following presets are for broadcast high reliability audio data */
645 #define BT_BAP_LC3_BROADCAST_PRESET_8_1_2(_loc, _stream_context)                                   \
646 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_8KHZ,                  \
647 						    BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 26u, 1, \
648 						    _stream_context),                              \
649 			  BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 26u, 4u, 45u, 40000u))
650 
651 /**
652  * @brief Helper to declare LC3 Broadcast 8_2_2 codec configuration
653  *
654  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
655  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
656  */
657 #define BT_BAP_LC3_BROADCAST_PRESET_8_2_2(_loc, _stream_context)                                   \
658 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_8KHZ,                  \
659 						    BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 30U, 1,  \
660 						    _stream_context),                              \
661 			  BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 30u, 4u, 60u, 40000u))
662 
663 /**
664  * @brief Helper to declare LC3 Broadcast 16_1_2 codec configuration
665  *
666  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
667  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
668  */
669 #define BT_BAP_LC3_BROADCAST_PRESET_16_1_2(_loc, _stream_context)                                  \
670 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_16KHZ,                 \
671 						    BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 30U, 1, \
672 						    _stream_context),                              \
673 			  BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 30u, 4u, 45u, 40000u))
674 
675 /**
676  * @brief Helper to declare LC3 Broadcast 16_2_2 codec configuration
677  *
678  * Mandatory to support as both broadcast source and sink
679  *
680  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
681  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
682  */
683 #define BT_BAP_LC3_BROADCAST_PRESET_16_2_2(_loc, _stream_context)                                  \
684 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_16KHZ,                 \
685 						    BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 40U, 1,  \
686 						    _stream_context),                              \
687 			  BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 40u, 4u, 60u, 40000u))
688 
689 /**
690  * @brief Helper to declare LC3 Broadcast 24_1_2 codec configuration
691  *
692  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
693  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
694  */
695 #define BT_BAP_LC3_BROADCAST_PRESET_24_1_2(_loc, _stream_context)                                  \
696 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_24KHZ,                 \
697 						    BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 45U, 1, \
698 						    _stream_context),                              \
699 			  BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 45u, 4u, 45u, 40000u))
700 
701 /**
702  * @brief Helper to declare LC3 Broadcast 24_2_2 codec configuration
703  *
704  * Mandatory to support as broadcast sink
705  *
706  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
707  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
708  */
709 #define BT_BAP_LC3_BROADCAST_PRESET_24_2_2(_loc, _stream_context)                                  \
710 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_24KHZ,                 \
711 						    BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 60U, 1,  \
712 						    _stream_context),                              \
713 			  BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 60u, 4u, 60u, 40000u))
714 
715 /**
716  * @brief Helper to declare LC3 Broadcast 32_1_2 codec configuration
717  *
718  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
719  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
720  */
721 #define BT_BAP_LC3_BROADCAST_PRESET_32_1_2(_loc, _stream_context)                                  \
722 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_32KHZ,                 \
723 						    BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 60U, 1, \
724 						    _stream_context),                              \
725 			  BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 60u, 4u, 45u, 40000u))
726 
727 /**
728  * @brief Helper to declare LC3 Broadcast 32_2_2 codec configuration
729  *
730  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
731  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
732  */
733 #define BT_BAP_LC3_BROADCAST_PRESET_32_2_2(_loc, _stream_context)                                  \
734 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_32KHZ,                 \
735 						    BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 80U, 1,  \
736 						    _stream_context),                              \
737 			  BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 80u, 4u, 60u, 40000u))
738 
739 /**
740  * @brief Helper to declare LC3 Broadcast 441_1_2 codec configuration
741  *
742  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
743  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
744  */
745 #define BT_BAP_LC3_BROADCAST_PRESET_441_1_2(_loc, _stream_context)                                 \
746 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_44KHZ,                 \
747 						    BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 97U, 1, \
748 						    _stream_context),                              \
749 			  BT_AUDIO_CODEC_QOS_FRAMED(8163u, 97u, 4u, 54u, 40000u))
750 
751 /**
752  * @brief Helper to declare LC3 Broadcast 441_2_2 codec configuration
753  *
754  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
755  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
756  */
757 #define BT_BAP_LC3_BROADCAST_PRESET_441_2_2(_loc, _stream_context)                                 \
758 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_44KHZ,                 \
759 						    BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 130U, 1, \
760 						    _stream_context),                              \
761 			  BT_AUDIO_CODEC_QOS_FRAMED(10884u, 130u, 4u, 60u, 40000u))
762 
763 /**
764  * @brief Helper to declare LC3 Broadcast 48_1_2 codec configuration
765  *
766  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
767  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
768  */
769 #define BT_BAP_LC3_BROADCAST_PRESET_48_1_2(_loc, _stream_context)                                  \
770 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
771 						    BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 75U, 1, \
772 						    _stream_context),                              \
773 			  BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 75u, 4u, 50u, 40000u))
774 
775 /**
776  * @brief Helper to declare LC3 Broadcast 48_2_2 codec configuration
777  *
778  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
779  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
780  */
781 #define BT_BAP_LC3_BROADCAST_PRESET_48_2_2(_loc, _stream_context)                                  \
782 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
783 						    BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 100U, 1, \
784 						    _stream_context),                              \
785 			  BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 100u, 4u, 65u, 40000u))
786 
787 /**
788  * @brief Helper to declare LC3 Broadcast 48_3_2 codec configuration
789  *
790  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
791  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
792  */
793 #define BT_BAP_LC3_BROADCAST_PRESET_48_3_2(_loc, _stream_context)                                  \
794 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
795 						    BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 90U, 1, \
796 						    _stream_context),                              \
797 			  BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 90u, 4u, 50u, 40000u))
798 
799 /**
800  * @brief Helper to declare LC3 Broadcast 48_4_2 codec configuration
801  *
802  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
803  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
804  */
805 #define BT_BAP_LC3_BROADCAST_PRESET_48_4_2(_loc, _stream_context)                                  \
806 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
807 						    BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 120u, 1, \
808 						    _stream_context),                              \
809 			  BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 120u, 4u, 65u, 40000u))
810 
811 /**
812  * @brief Helper to declare LC3 Broadcast 48_5_2 codec configuration
813  *
814  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
815  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
816  */
817 #define BT_BAP_LC3_BROADCAST_PRESET_48_5_2(_loc, _stream_context)                                  \
818 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
819 						    BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 117u,   \
820 						    1, _stream_context),                           \
821 			  BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 117u, 4u, 50u, 40000u))
822 
823 /**
824  * @brief Helper to declare LC3 Broadcast 48_6_2 codec configuration
825  *
826  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
827  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
828  */
829 #define BT_BAP_LC3_BROADCAST_PRESET_48_6_2(_loc, _stream_context)                                  \
830 	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
831 						    BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 155u, 1, \
832 						    _stream_context),                              \
833 			  BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 155u, 4u, 65u, 40000u))
834 
835 #ifdef __cplusplus
836 }
837 #endif
838 /** @} */
839 
840 #endif /* ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_BAP_LC3_PRESET_ */
841