mikroSDK Reference Manual
audio.h
1/*
2 * The MIT License (MIT)
3 *
4 * Copyright (c) 2019 Ha Thach (tinyusb.org)
5 * Copyright (c) 2020 Reinhard Panhuber
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 * of this software and associated documentation files (the "Software"), to deal
9 * in the Software without restriction, including without limitation the rights
10 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 * copies of the Software, and to permit persons to whom the Software is
12 * furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included in
15 * all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 * THE SOFTWARE.
24 *
25 * This file is part of the TinyUSB stack.
26 */
27
33#ifndef _TUSB_AUDIO_H__
34#define _TUSB_AUDIO_H__
35
36#include "common/tusb_common.h"
37
38#ifdef __cplusplus
39extern "C" {
40#endif
41
43
45typedef enum
46{
47 AUDIO_FUNCTION_SUBCLASS_UNDEFINED = 0x00,
49
51typedef enum
52{
53 AUDIO_FUNC_PROTOCOL_CODE_UNDEF = 0x00,
56
65
67typedef enum
68{
69 AUDIO_INT_PROTOCOL_CODE_UNDEF = 0x00,
72
74typedef enum
75{
76 AUDIO_FUNC_UNDEF = 0x00,
77 AUDIO_FUNC_DESKTOP_SPEAKER = 0x01,
78 AUDIO_FUNC_HOME_THEATER = 0x02,
79 AUDIO_FUNC_MICROPHONE = 0x03,
80 AUDIO_FUNC_HEADSET = 0x04,
81 AUDIO_FUNC_TELEPHONE = 0x05,
82 AUDIO_FUNC_CONVERTER = 0x06,
83 AUDIO_FUNC_SOUND_RECODER = 0x07,
84 AUDIO_FUNC_IO_BOX = 0x08,
85 AUDIO_FUNC_MUSICAL_INSTRUMENT = 0x09,
86 AUDIO_FUNC_PRO_AUDIO = 0x0A,
87 AUDIO_FUNC_AUDIO_VIDEO = 0x0B,
88 AUDIO_FUNC_CONTROL_PANEL = 0x0C,
89 AUDIO_FUNC_OTHER = 0xFF,
91
93typedef enum
94{
95 AUDIO_CS_AC_INTERFACE_AC_DESCRIPTOR_UNDEF = 0x00,
96 AUDIO_CS_AC_INTERFACE_HEADER = 0x01,
97 AUDIO_CS_AC_INTERFACE_INPUT_TERMINAL = 0x02,
98 AUDIO_CS_AC_INTERFACE_OUTPUT_TERMINAL = 0x03,
99 AUDIO_CS_AC_INTERFACE_MIXER_UNIT = 0x04,
100 AUDIO_CS_AC_INTERFACE_SELECTOR_UNIT = 0x05,
101 AUDIO_CS_AC_INTERFACE_FEATURE_UNIT = 0x06,
102 AUDIO_CS_AC_INTERFACE_EFFECT_UNIT = 0x07,
103 AUDIO_CS_AC_INTERFACE_PROCESSING_UNIT = 0x08,
104 AUDIO_CS_AC_INTERFACE_EXTENSION_UNIT = 0x09,
105 AUDIO_CS_AC_INTERFACE_CLOCK_SOURCE = 0x0A,
106 AUDIO_CS_AC_INTERFACE_CLOCK_SELECTOR = 0x0B,
107 AUDIO_CS_AC_INTERFACE_CLOCK_MULTIPLIER = 0x0C,
108 AUDIO_CS_AC_INTERFACE_SAMPLE_RATE_CONVERTER = 0x0D,
110
112typedef enum
113{
114 AUDIO_CS_AS_INTERFACE_AS_DESCRIPTOR_UNDEF = 0x00,
115 AUDIO_CS_AS_INTERFACE_AS_GENERAL = 0x01,
116 AUDIO_CS_AS_INTERFACE_FORMAT_TYPE = 0x02,
117 AUDIO_CS_AS_INTERFACE_ENCODER = 0x03,
118 AUDIO_CS_AS_INTERFACE_DECODER = 0x04,
120
122typedef enum
123{
124 AUDIO_EFFECT_TYPE_UNDEF = 0x00,
125 AUDIO_EFFECT_TYPE_PARAM_EQ_SECTION = 0x01,
126 AUDIO_EFFECT_TYPE_REVERBERATION = 0x02,
127 AUDIO_EFFECT_TYPE_MOD_DELAY = 0x03,
128 AUDIO_EFFECT_TYPE_DYN_RANGE_COMP = 0x04,
130
132typedef enum
133{
134 AUDIO_PROCESS_TYPE_UNDEF = 0x00,
135 AUDIO_PROCESS_TYPE_UP_DOWN_MIX = 0x01,
136 AUDIO_PROCESS_TYPE_DOLBY_PROLOGIC = 0x02,
137 AUDIO_PROCESS_TYPE_STEREO_EXTENDER = 0x03,
139
141typedef enum
142{
143 AUDIO_CS_EP_SUBTYPE_UNDEF = 0x00,
144 AUDIO_CS_EP_SUBTYPE_GENERAL = 0x01,
146
148typedef enum
149{
150 AUDIO_CS_REQ_UNDEF = 0x00,
151 AUDIO_CS_REQ_CUR = 0x01,
152 AUDIO_CS_REQ_RANGE = 0x02,
153 AUDIO_CS_REQ_MEM = 0x03,
155
157
159typedef enum
160{
161 AUDIO_CS_CTRL_UNDEF = 0x00,
162 AUDIO_CS_CTRL_SAM_FREQ = 0x01,
163 AUDIO_CS_CTRL_CLK_VALID = 0x02,
165
167typedef enum
168{
169 AUDIO_CX_CTRL_UNDEF = 0x00,
170 AUDIO_CX_CTRL_CONTROL = 0x01,
172
174typedef enum
175{
176 AUDIO_CM_CTRL_UNDEF = 0x00,
177 AUDIO_CM_CTRL_NUMERATOR_CONTROL = 0x01,
178 AUDIO_CM_CTRL_DENOMINATOR_CONTROL = 0x02,
180
182typedef enum
183{
184 AUDIO_TE_CTRL_UNDEF = 0x00,
185 AUDIO_TE_CTRL_COPY_PROTECT = 0x01,
186 AUDIO_TE_CTRL_CONNECTOR = 0x02,
187 AUDIO_TE_CTRL_OVERLOAD = 0x03,
188 AUDIO_TE_CTRL_CLUSTER = 0x04,
189 AUDIO_TE_CTRL_UNDERFLOW = 0x05,
190 AUDIO_TE_CTRL_OVERFLOW = 0x06,
191 AUDIO_TE_CTRL_LATENCY = 0x07,
193
195typedef enum
196{
197 AUDIO_MU_CTRL_UNDEF = 0x00,
198 AUDIO_MU_CTRL_MIXER = 0x01,
199 AUDIO_MU_CTRL_CLUSTER = 0x02,
200 AUDIO_MU_CTRL_UNDERFLOW = 0x03,
201 AUDIO_MU_CTRL_OVERFLOW = 0x04,
202 AUDIO_MU_CTRL_LATENCY = 0x05,
204
206typedef enum
207{
208 AUDIO_SU_CTRL_UNDEF = 0x00,
209 AUDIO_SU_CTRL_SELECTOR = 0x01,
210 AUDIO_SU_CTRL_LATENCY = 0x02,
212
214typedef enum
215{
216 AUDIO_FU_CTRL_UNDEF = 0x00,
217 AUDIO_FU_CTRL_MUTE = 0x01,
218 AUDIO_FU_CTRL_VOLUME = 0x02,
219 AUDIO_FU_CTRL_BASS = 0x03,
220 AUDIO_FU_CTRL_MID = 0x04,
221 AUDIO_FU_CTRL_TREBLE = 0x05,
222 AUDIO_FU_CTRL_GRAPHIC_EQUALIZER = 0x06,
223 AUDIO_FU_CTRL_AGC = 0x07,
224 AUDIO_FU_CTRL_DELAY = 0x08,
225 AUDIO_FU_CTRL_BASS_BOOST = 0x09,
226 AUDIO_FU_CTRL_LOUDNESS = 0x0A,
227 AUDIO_FU_CTRL_INPUT_GAIN = 0x0B,
228 AUDIO_FU_CTRL_GAIN_PAD = 0x0C,
229 AUDIO_FU_CTRL_INVERTER = 0x0D,
230 AUDIO_FU_CTRL_UNDERFLOW = 0x0E,
231 AUDIO_FU_CTRL_OVERVLOW = 0x0F,
232 AUDIO_FU_CTRL_LATENCY = 0x10,
234
236
238typedef enum
239{
240 AUDIO_PE_CTRL_UNDEF = 0x00,
241 AUDIO_PE_CTRL_ENABLE = 0x01,
242 AUDIO_PE_CTRL_CENTERFREQ = 0x02,
243 AUDIO_PE_CTRL_QFACTOR = 0x03,
244 AUDIO_PE_CTRL_GAIN = 0x04,
245 AUDIO_PE_CTRL_UNDERFLOW = 0x05,
246 AUDIO_PE_CTRL_OVERFLOW = 0x06,
247 AUDIO_PE_CTRL_LATENCY = 0x07,
249
251typedef enum
252{
253 AUDIO_RV_CTRL_UNDEF = 0x00,
254 AUDIO_RV_CTRL_ENABLE = 0x01,
255 AUDIO_RV_CTRL_TYPE = 0x02,
256 AUDIO_RV_CTRL_LEVEL = 0x03,
257 AUDIO_RV_CTRL_TIME = 0x04,
258 AUDIO_RV_CTRL_FEEDBACK = 0x05,
259 AUDIO_RV_CTRL_PREDELAY = 0x06,
260 AUDIO_RV_CTRL_DENSITY = 0x07,
261 AUDIO_RV_CTRL_HIFREQ_ROLLOFF = 0x08,
262 AUDIO_RV_CTRL_UNDERFLOW = 0x09,
263 AUDIO_RV_CTRL_OVERFLOW = 0x0A,
264 AUDIO_RV_CTRL_LATENCY = 0x0B,
266
268typedef enum
269{
270 AUDIO_MD_CTRL_UNDEF = 0x00,
271 AUDIO_MD_CTRL_ENABLE = 0x01,
272 AUDIO_MD_CTRL_BALANCE = 0x02,
273 AUDIO_MD_CTRL_RATE = 0x03,
274 AUDIO_MD_CTRL_DEPTH = 0x04,
275 AUDIO_MD_CTRL_TIME = 0x05,
276 AUDIO_MD_CTRL_FEEDBACK = 0x06,
277 AUDIO_MD_CTRL_UNDERFLOW = 0x07,
278 AUDIO_MD_CTRL_OVERFLOW = 0x08,
279 AUDIO_MD_CTRL_LATENCY = 0x09,
281
283typedef enum
284{
285 AUDIO_DR_CTRL_UNDEF = 0x00,
286 AUDIO_DR_CTRL_ENABLE = 0x01,
287 AUDIO_DR_CTRL_COMPRESSION_RATE = 0x02,
288 AUDIO_DR_CTRL_MAXAMPL = 0x03,
289 AUDIO_DR_CTRL_THRESHOLD = 0x04,
290 AUDIO_DR_CTRL_ATTACK_TIME = 0x05,
291 AUDIO_DR_CTRL_RELEASE_TIME = 0x06,
292 AUDIO_DR_CTRL_UNDERFLOW = 0x07,
293 AUDIO_DR_CTRL_OVERFLOW = 0x08,
294 AUDIO_DR_CTRL_LATENCY = 0x09,
296
298
300typedef enum
301{
302 AUDIO_UD_CTRL_UNDEF = 0x00,
303 AUDIO_UD_CTRL_ENABLE = 0x01,
304 AUDIO_UD_CTRL_MODE_SELECT = 0x02,
305 AUDIO_UD_CTRL_CLUSTER = 0x03,
306 AUDIO_UD_CTRL_UNDERFLOW = 0x04,
307 AUDIO_UD_CTRL_OVERFLOW = 0x05,
308 AUDIO_UD_CTRL_LATENCY = 0x06,
310
312typedef enum
313{
314 AUDIO_DP_CTRL_UNDEF = 0x00,
315 AUDIO_DP_CTRL_ENABLE = 0x01,
316 AUDIO_DP_CTRL_MODE_SELECT = 0x02,
317 AUDIO_DP_CTRL_CLUSTER = 0x03,
318 AUDIO_DP_CTRL_UNDERFLOW = 0x04,
319 AUDIO_DP_CTRL_OVERFLOW = 0x05,
320 AUDIO_DP_CTRL_LATENCY = 0x06,
322
324typedef enum
325{
326 AUDIO_ST_EXT_CTRL_UNDEF = 0x00,
327 AUDIO_ST_EXT_CTRL_ENABLE = 0x01,
328 AUDIO_ST_EXT_CTRL_WIDTH = 0x02,
329 AUDIO_ST_EXT_CTRL_UNDERFLOW = 0x03,
330 AUDIO_ST_EXT_CTRL_OVERFLOW = 0x04,
331 AUDIO_ST_EXT_CTRL_LATENCY = 0x05,
333
335typedef enum
336{
337 AUDIO_XU_CTRL_UNDEF = 0x00,
338 AUDIO_XU_CTRL_ENABLE = 0x01,
339 AUDIO_XU_CTRL_CLUSTER = 0x02,
340 AUDIO_XU_CTRL_UNDERFLOW = 0x03,
341 AUDIO_XU_CTRL_OVERFLOW = 0x04,
342 AUDIO_XU_CTRL_LATENCY = 0x05,
344
346typedef enum
347{
348 AUDIO_AS_CTRL_UNDEF = 0x00,
349 AUDIO_AS_CTRL_ACT_ALT_SETTING = 0x01,
350 AUDIO_AS_CTRL_VAL_ALT_SETTINGS = 0x02,
351 AUDIO_AS_CTRL_AUDIO_DATA_FORMAT = 0x03,
353
355typedef enum
356{
357 AUDIO_EN_CTRL_UNDEF = 0x00,
358 AUDIO_EN_CTRL_BIT_RATE = 0x01,
359 AUDIO_EN_CTRL_QUALITY = 0x02,
360 AUDIO_EN_CTRL_VBR = 0x03,
361 AUDIO_EN_CTRL_TYPE = 0x04,
362 AUDIO_EN_CTRL_UNDERFLOW = 0x05,
363 AUDIO_EN_CTRL_OVERFLOW = 0x06,
364 AUDIO_EN_CTRL_ENCODER_ERROR = 0x07,
365 AUDIO_EN_CTRL_PARAM1 = 0x08,
366 AUDIO_EN_CTRL_PARAM2 = 0x09,
367 AUDIO_EN_CTRL_PARAM3 = 0x0A,
368 AUDIO_EN_CTRL_PARAM4 = 0x0B,
369 AUDIO_EN_CTRL_PARAM5 = 0x0C,
370 AUDIO_EN_CTRL_PARAM6 = 0x0D,
371 AUDIO_EN_CTRL_PARAM7 = 0x0E,
372 AUDIO_EN_CTRL_PARAM8 = 0x0F,
374
376
378typedef enum
379{
380 AUDIO_MPD_CTRL_UNDEF = 0x00,
381 AUDIO_MPD_CTRL_DUAL_CHANNEL = 0x01,
382 AUDIO_MPD_CTRL_SECOND_STEREO = 0x02,
383 AUDIO_MPD_CTRL_MULTILINGUAL = 0x03,
384 AUDIO_MPD_CTRL_DYN_RANGE = 0x04,
385 AUDIO_MPD_CTRL_SCALING = 0x05,
386 AUDIO_MPD_CTRL_HILO_SCALING = 0x06,
387 AUDIO_MPD_CTRL_UNDERFLOW = 0x07,
388 AUDIO_MPD_CTRL_OVERFLOW = 0x08,
389 AUDIO_MPD_CTRL_DECODER_ERROR = 0x09,
391
393typedef enum
394{
395 AUDIO_AD_CTRL_UNDEF = 0x00,
396 AUDIO_AD_CTRL_MODE = 0x01,
397 AUDIO_AD_CTRL_DYN_RANGE = 0x02,
398 AUDIO_AD_CTRL_SCALING = 0x03,
399 AUDIO_AD_CTRL_HILO_SCALING = 0x04,
400 AUDIO_AD_CTRL_UNDERFLOW = 0x05,
401 AUDIO_AD_CTRL_OVERFLOW = 0x06,
402 AUDIO_AD_CTRL_DECODER_ERROR = 0x07,
404
406typedef enum
407{
408 AUDIO_WD_CTRL_UNDEF = 0x00,
409 AUDIO_WD_CTRL_UNDERFLOW = 0x01,
410 AUDIO_WD_CTRL_OVERFLOW = 0x02,
411 AUDIO_WD_CTRL_DECODER_ERROR = 0x03,
413
415typedef enum
416{
417 AUDIO_DD_CTRL_UNDEF = 0x00,
418 AUDIO_DD_CTRL_UNDERFLOW = 0x01,
419 AUDIO_DD_CTRL_OVERFLOW = 0x02,
420 AUDIO_DD_CTRL_DECODER_ERROR = 0x03,
422
424typedef enum
425{
426 AUDIO_EP_CTRL_UNDEF = 0x00,
427 AUDIO_EP_CTRL_PITCH = 0x01,
428 AUDIO_EP_CTRL_DATA_OVERRUN = 0x02,
429 AUDIO_EP_CTRL_DATA_UNDERRUN = 0x03,
431
433
435typedef enum
436{
437 AUDIO_TERM_TYPE_USB_UNDEFINED = 0x0100,
438 AUDIO_TERM_TYPE_USB_STREAMING = 0x0101,
439 AUDIO_TERM_TYPE_USB_VENDOR_SPEC = 0x01FF,
441
443typedef enum
444{
445 AUDIO_TERM_TYPE_IN_UNDEFINED = 0x0200,
446 AUDIO_TERM_TYPE_IN_GENERIC_MIC = 0x0201,
447 AUDIO_TERM_TYPE_IN_DESKTOP_MIC = 0x0202,
448 AUDIO_TERM_TYPE_IN_PERSONAL_MIC = 0x0203,
449 AUDIO_TERM_TYPE_IN_OMNI_MIC = 0x0204,
450 AUDIO_TERM_TYPE_IN_ARRAY_MIC = 0x0205,
451 AUDIO_TERM_TYPE_IN_PROC_ARRAY_MIC = 0x0206,
453
455typedef enum
456{
457 AUDIO_TERM_TYPE_OUT_UNDEFINED = 0x0300,
458 AUDIO_TERM_TYPE_OUT_GENERIC_SPEAKER = 0x0301,
459 AUDIO_TERM_TYPE_OUT_HEADPHONES = 0x0302,
460 AUDIO_TERM_TYPE_OUT_HEAD_MNT_DISP_AUIDO = 0x0303,
461 AUDIO_TERM_TYPE_OUT_DESKTOP_SPEAKER = 0x0304,
462 AUDIO_TERM_TYPE_OUT_ROOM_SPEAKER = 0x0305,
463 AUDIO_TERM_TYPE_OUT_COMMUNICATION_SPEAKER = 0x0306,
464 AUDIO_TERM_TYPE_OUT_LOW_FRQ_EFFECTS_SPEAKER = 0x0307,
466
468
470
472typedef enum
473{
474 AUDIO_FORMAT_TYPE_UNDEFINED = 0x00,
475 AUDIO_FORMAT_TYPE_I = 0x01,
476 AUDIO_FORMAT_TYPE_II = 0x02,
477 AUDIO_FORMAT_TYPE_III = 0x03,
478 AUDIO_FORMAT_TYPE_IV = 0x04,
479 AUDIO_EXT_FORMAT_TYPE_I = 0x81,
480 AUDIO_EXT_FORMAT_TYPE_II = 0x82,
481 AUDIO_EXT_FORMAT_TYPE_III = 0x83,
483
484// A.2.1 - Audio Class-Audio Data Format Type I UAC2
485typedef enum
486{
487 AUDIO_DATA_FORMAT_TYPE_I_PCM = (uint32_t) (1 << 0),
488 AUDIO_DATA_FORMAT_TYPE_I_PCM8 = (uint32_t) (1 << 1),
489 AUDIO_DATA_FORMAT_TYPE_I_IEEE_FLOAT = (uint32_t) (1 << 2),
490 AUDIO_DATA_FORMAT_TYPE_I_ALAW = (uint32_t) (1 << 3),
491 AUDIO_DATA_FORMAT_TYPE_I_MULAW = (uint32_t) (1 << 4),
492 AUDIO_DATA_FORMAT_TYPE_I_RAW_DATA = 0x80000000,
493} audio_data_format_type_I_t;
494
496
498typedef enum
499{
504
506typedef enum
507{
508 AUDIO_CS_AS_INTERFACE_CTRL_LATENCY_POS = 0,
510
512typedef enum
513{
514 AUDIO_CS_AS_INTERFACE_CTRL_ACTIVE_ALT_SET_POS = 0,
515 AUDIO_CS_AS_INTERFACE_CTRL_VALID_ALT_SET_POS = 2,
517
519typedef enum
520{
521 AUDIO_CS_AS_ISO_DATA_EP_ATT_MAX_PACKETS_ONLY = 0x80,
522 AUDIO_CS_AS_ISO_DATA_EP_ATT_NON_MAX_PACKETS_OK = 0x00,
524
526typedef enum
527{
528 AUDIO_CS_AS_ISO_DATA_EP_CTRL_PITCH_POS = 0,
529 AUDIO_CS_AS_ISO_DATA_EP_CTRL_DATA_OVERRUN_POS = 2,
530 AUDIO_CS_AS_ISO_DATA_EP_CTRL_DATA_UNDERRUN_POS = 4,
532
534typedef enum
535{
536 AUDIO_CS_AS_ISO_DATA_EP_LOCK_DELAY_UNIT_UNDEFINED = 0x00,
537 AUDIO_CS_AS_ISO_DATA_EP_LOCK_DELAY_UNIT_MILLISEC = 0x01,
538 AUDIO_CS_AS_ISO_DATA_EP_LOCK_DELAY_UNIT_PCM_SAMPLES = 0x02,
540
542typedef enum
543{
544 AUDIO_CLOCK_SOURCE_ATT_EXT_CLK = 0x00,
545 AUDIO_CLOCK_SOURCE_ATT_INT_FIX_CLK = 0x01,
546 AUDIO_CLOCK_SOURCE_ATT_INT_VAR_CLK = 0x02,
547 AUDIO_CLOCK_SOURCE_ATT_INT_PRO_CLK = 0x03,
548 AUDIO_CLOCK_SOURCE_ATT_CLK_SYC_SOF = 0x04,
550
552typedef enum
553{
554 AUDIO_CLOCK_SOURCE_CTRL_CLK_FRQ_POS = 0,
555 AUDIO_CLOCK_SOURCE_CTRL_CLK_VAL_POS = 2,
557
559typedef enum
560{
561 AUDIO_CLOCK_SELECTOR_CTRL_POS = 0,
563
565typedef enum
566{
567 AUDIO_CLOCK_MULTIPLIER_CTRL_NUMERATOR_POS = 0,
568 AUDIO_CLOCK_MULTIPLIER_CTRL_DENOMINATOR_POS = 2,
570
572typedef enum
573{
574 AUDIO_IN_TERM_CTRL_CPY_PROT_POS = 0,
575 AUDIO_IN_TERM_CTRL_CONNECTOR_POS = 2,
576 AUDIO_IN_TERM_CTRL_OVERLOAD_POS = 4,
577 AUDIO_IN_TERM_CTRL_CLUSTER_POS = 6,
578 AUDIO_IN_TERM_CTRL_UNDERFLOW_POS = 8,
579 AUDIO_IN_TERM_CTRL_OVERFLOW_POS = 10,
581
583typedef enum
584{
585 AUDIO_OUT_TERM_CTRL_CPY_PROT_POS = 0,
586 AUDIO_OUT_TERM_CTRL_CONNECTOR_POS = 2,
587 AUDIO_OUT_TERM_CTRL_OVERLOAD_POS = 4,
588 AUDIO_OUT_TERM_CTRL_UNDERFLOW_POS = 6,
589 AUDIO_OUT_TERM_CTRL_OVERFLOW_POS = 8,
591
593typedef enum
594{
595 AUDIO_FEATURE_UNIT_CTRL_MUTE_POS = 0,
596 AUDIO_FEATURE_UNIT_CTRL_VOLUME_POS = 2,
597 AUDIO_FEATURE_UNIT_CTRL_BASS_POS = 4,
598 AUDIO_FEATURE_UNIT_CTRL_MID_POS = 6,
599 AUDIO_FEATURE_UNIT_CTRL_TREBLE_POS = 8,
600 AUDIO_FEATURE_UNIT_CTRL_GRAPHIC_EQU_POS = 10,
601 AUDIO_FEATURE_UNIT_CTRL_AGC_POS = 12,
602 AUDIO_FEATURE_UNIT_CTRL_DELAY_POS = 14,
603 AUDIO_FEATURE_UNIT_CTRL_BASS_BOOST_POS = 16,
604 AUDIO_FEATURE_UNIT_CTRL_LOUDNESS_POS = 18,
605 AUDIO_FEATURE_UNIT_CTRL_INPUT_GAIN_POS = 20,
606 AUDIO_FEATURE_UNIT_CTRL_INPUT_GAIN_PAD_POS = 22,
607 AUDIO_FEATURE_UNIT_CTRL_PHASE_INV_POS = 24,
608 AUDIO_FEATURE_UNIT_CTRL_UNDERFLOW_POS = 26,
609 AUDIO_FEATURE_UNIT_CTRL_OVERFLOW_POS = 28,
611
613typedef enum
614{
615 AUDIO_CHANNEL_CONFIG_NON_PREDEFINED = 0x00000000,
616 AUDIO_CHANNEL_CONFIG_FRONT_LEFT = 0x00000001,
617 AUDIO_CHANNEL_CONFIG_FRONT_RIGHT = 0x00000002,
618 AUDIO_CHANNEL_CONFIG_FRONT_CENTER = 0x00000004,
619 AUDIO_CHANNEL_CONFIG_LOW_FRQ_EFFECTS = 0x00000008,
620 AUDIO_CHANNEL_CONFIG_BACK_LEFT = 0x00000010,
621 AUDIO_CHANNEL_CONFIG_BACK_RIGHT = 0x00000020,
622 AUDIO_CHANNEL_CONFIG_FRONT_LEFT_OF_CENTER = 0x00000040,
623 AUDIO_CHANNEL_CONFIG_FRONT_RIGHT_OF_CENTER = 0x00000080,
624 AUDIO_CHANNEL_CONFIG_BACK_CENTER = 0x00000100,
625 AUDIO_CHANNEL_CONFIG_SIDE_LEFT = 0x00000200,
626 AUDIO_CHANNEL_CONFIG_SIDE_RIGHT = 0x00000400,
627 AUDIO_CHANNEL_CONFIG_TOP_CENTER = 0x00000800,
628 AUDIO_CHANNEL_CONFIG_TOP_FRONT_LEFT = 0x00001000,
629 AUDIO_CHANNEL_CONFIG_TOP_FRONT_CENTER = 0x00002000,
630 AUDIO_CHANNEL_CONFIG_TOP_FRONT_RIGHT = 0x00004000,
631 AUDIO_CHANNEL_CONFIG_TOP_BACK_LEFT = 0x00008000,
632 AUDIO_CHANNEL_CONFIG_TOP_BACK_CENTER = 0x00010000,
633 AUDIO_CHANNEL_CONFIG_TOP_BACK_RIGHT = 0x00020000,
634 AUDIO_CHANNEL_CONFIG_TOP_FRONT_LEFT_OF_CENTER = 0x00040000,
635 AUDIO_CHANNEL_CONFIG_TOP_FRONT_RIGHT_OF_CENTER = 0x00080000,
636 AUDIO_CHANNEL_CONFIG_LEFT_LOW_FRQ_EFFECTS = 0x00100000,
637 AUDIO_CHANNEL_CONFIG_RIGHT_LOW_FRQ_EFFECTS = 0x00200000,
638 AUDIO_CHANNEL_CONFIG_TOP_SIDE_LEFT = 0x00400000,
639 AUDIO_CHANNEL_CONFIG_TOP_SIDE_RIGHT = 0x00800000,
640 AUDIO_CHANNEL_CONFIG_BOTTOM_CENTER = 0x01000000,
641 AUDIO_CHANNEL_CONFIG_BACK_LEFT_OF_CENTER = 0x02000000,
642 AUDIO_CHANNEL_CONFIG_BACK_RIGHT_OF_CENTER = 0x04000000,
643 AUDIO_CHANNEL_CONFIG_RAW_DATA = 0x80000000,
645
652
654typedef struct TU_ATTR_PACKED
655{
656 uint8_t bLength ;
659 uint16_t bcdADC ;
660 uint8_t bCategory ;
661 uint16_t wTotalLength ;
662 uint8_t bmControls ;
664
666typedef struct TU_ATTR_PACKED
667{
668 uint8_t bLength ;
669 uint8_t bDescriptorType ;
670 uint8_t bDescriptorSubType ;
671 uint8_t bClockID ;
672 uint8_t bmAttributes ;
673 uint8_t bmControls ;
674 uint8_t bAssocTerminal ;
675 uint8_t iClockSource ;
677
679typedef struct TU_ATTR_PACKED
680{
681 uint8_t bLength ;
682 uint8_t bDescriptorType ;
683 uint8_t bDescriptorSubType ;
684 uint8_t bClockID ;
685 uint8_t bNrInPins ;
686 uint8_t baCSourceID ;
687 uint8_t bmControls ;
688 uint8_t iClockSource ;
690
692#define audio_desc_clock_selector_n_t(source_num) \
693 struct TU_ATTR_PACKED { \
694 uint8_t bLength ; \
695 uint8_t bDescriptorType ; \
696 uint8_t bDescriptorSubType ; \
697 uint8_t bClockID ; \
698 uint8_t bNrInPins ; \
699 struct TU_ATTR_PACKED { \
700 uint8_t baSourceID ; \
701 } sourceID[source_num] ; \
702 uint8_t bmControls ; \
703 uint8_t iClockSource ; \
704}
705
707typedef struct TU_ATTR_PACKED
708{
709 uint8_t bLength ;
710 uint8_t bDescriptorType ;
711 uint8_t bDescriptorSubType ;
712 uint8_t bClockID ;
713 uint8_t bCSourceID ;
714 uint8_t bmControls ;
715 uint8_t iClockSource ;
717
719typedef struct TU_ATTR_PACKED
720{
721 uint8_t bLength ;
722 uint8_t bDescriptorType ;
723 uint8_t bDescriptorSubType ;
724 uint8_t bTerminalID ;
725 uint16_t wTerminalType ;
726 uint8_t bAssocTerminal ;
727 uint8_t bCSourceID ;
728 uint8_t bNrChannels ;
729 uint32_t bmChannelConfig ;
730 uint8_t iChannelNames ;
731 uint16_t bmControls ;
732 uint8_t iTerminal ;
734
736typedef struct TU_ATTR_PACKED
737{
738 uint8_t bLength ;
739 uint8_t bDescriptorType ;
740 uint8_t bDescriptorSubType ;
741 uint8_t bTerminalID ;
742 uint16_t wTerminalType ;
743 uint8_t bAssocTerminal ;
744 uint8_t bSourceID ;
745 uint8_t bCSourceID ;
746 uint16_t bmControls ;
747 uint8_t iTerminal ;
749
751typedef struct TU_ATTR_PACKED
752{
753 uint8_t bLength ;
754 uint8_t bDescriptorType ;
755 uint8_t bDescriptorSubType ;
756 uint8_t bUnitID ;
757 uint8_t bSourceID ;
759 uint32_t bmaControls ;
760 } controls[2] ;
761 uint8_t iTerminal ;
763
765#define audio_desc_feature_unit_n_t(ch_num)\
766 struct TU_ATTR_PACKED { \
767 uint8_t bLength ; /* 6+(ch_num+1)*4 */\
768 uint8_t bDescriptorType ; \
769 uint8_t bDescriptorSubType ; \
770 uint8_t bUnitID ; \
771 uint8_t bSourceID ; \
772 struct TU_ATTR_PACKED { \
773 uint32_t bmaControls ; \
774 } controls[ch_num+1] ; \
775 uint8_t iTerminal ; \
776}
777
779typedef struct TU_ATTR_PACKED
780{
781 uint8_t bLength ;
782 uint8_t bDescriptorType ;
783 uint8_t bDescriptorSubType ;
784 uint8_t bTerminalLink ;
785 uint8_t bmControls ;
786 uint8_t bFormatType ;
787 uint32_t bmFormats ;
788 uint8_t bNrChannels ;
789 uint32_t bmChannelConfig ;
790 uint8_t iChannelNames ;
792
794typedef struct TU_ATTR_PACKED
795{
796 uint8_t bLength ;
797 uint8_t bDescriptorType ;
798 uint8_t bDescriptorSubType ;
799 uint8_t bFormatType ;
800 uint8_t bSubslotSize ;
801 uint8_t bBitResolution ;
803
805typedef struct TU_ATTR_PACKED
806{
807 uint8_t bLength ;
808 uint8_t bDescriptorType ;
809 uint8_t bDescriptorSubType ;
810 uint8_t bmAttributes ;
811 uint8_t bmControls ;
813 uint16_t wLockDelay ;
815
816// 5.2.2 Control Request Layout
817typedef struct TU_ATTR_PACKED
818{
819 union
820 {
821 struct TU_ATTR_PACKED
822 {
823 uint8_t recipient : 5;
824 uint8_t type : 2;
825 uint8_t direction : 1;
826 } bmRequestType_bit;
827
828 uint8_t bmRequestType;
829 };
830
831 uint8_t bRequest;
832 uint8_t bChannelNumber;
833 uint8_t bControlSelector;
834 union
835 {
836 uint8_t bInterface;
837 uint8_t bEndpoint;
838 };
839 uint8_t bEntityID;
840 uint16_t wLength;
842
844
845// 5.2.3.1 1-byte Control CUR Parameter Block
846typedef struct TU_ATTR_PACKED
847{
848 int8_t bCur ;
850
851// 5.2.3.2 2-byte Control CUR Parameter Block
852typedef struct TU_ATTR_PACKED
853{
854 int16_t bCur ;
856
857// 5.2.3.3 4-byte Control CUR Parameter Block
858typedef struct TU_ATTR_PACKED
859{
860 int32_t bCur ;
862
863// Use the following ONLY for RECEIVED data - compiler does not know how many subranges are defined! Use the one below for predefined lengths - or if you know what you are doing do what you like
864// 5.2.3.1 1-byte Control RANGE Parameter Block
865typedef struct TU_ATTR_PACKED {
866 uint16_t wNumSubRanges;
867 struct TU_ATTR_PACKED {
868 int8_t bMin ; /*The setting for the MIN attribute of the nth subrange of the addressed Control*/
869 int8_t bMax ; /*The setting for the MAX attribute of the nth subrange of the addressed Control*/
870 uint8_t bRes ; /*The setting for the RES attribute of the nth subrange of the addressed Control*/
871 } subrange[] ;
873
874// 5.2.3.2 2-byte Control RANGE Parameter Block
875typedef struct TU_ATTR_PACKED {
876 uint16_t wNumSubRanges;
877 struct TU_ATTR_PACKED {
878 int16_t bMin ; /*The setting for the MIN attribute of the nth subrange of the addressed Control*/
879 int16_t bMax ; /*The setting for the MAX attribute of the nth subrange of the addressed Control*/
880 uint16_t bRes ; /*The setting for the RES attribute of the nth subrange of the addressed Control*/
881 } subrange[] ;
883
884// 5.2.3.3 4-byte Control RANGE Parameter Block
885typedef struct TU_ATTR_PACKED {
886 uint16_t wNumSubRanges;
887 struct TU_ATTR_PACKED {
888 int32_t bMin ; /*The setting for the MIN attribute of the nth subrange of the addressed Control*/
889 int32_t bMax ; /*The setting for the MAX attribute of the nth subrange of the addressed Control*/
890 uint32_t bRes ; /*The setting for the RES attribute of the nth subrange of the addressed Control*/
891 } subrange[] ;
893
894// 5.2.3.1 1-byte Control RANGE Parameter Block
895#define audio_control_range_1_n_t(numSubRanges) \
896 struct TU_ATTR_PACKED { \
897 uint16_t wNumSubRanges; \
898 struct TU_ATTR_PACKED { \
899 int8_t bMin ; /*The setting for the MIN attribute of the nth subrange of the addressed Control*/\
900 int8_t bMax ; /*The setting for the MAX attribute of the nth subrange of the addressed Control*/\
901 uint8_t bRes ; /*The setting for the RES attribute of the nth subrange of the addressed Control*/\
902 } subrange[numSubRanges] ; \
903}
904
906#define audio_control_range_2_n_t(numSubRanges) \
907 struct TU_ATTR_PACKED { \
908 uint16_t wNumSubRanges; \
909 struct TU_ATTR_PACKED { \
910 int16_t bMin ; /*The setting for the MIN attribute of the nth subrange of the addressed Control*/\
911 int16_t bMax ; /*The setting for the MAX attribute of the nth subrange of the addressed Control*/\
912 uint16_t bRes ; /*The setting for the RES attribute of the nth subrange of the addressed Control*/\
913 } subrange[numSubRanges]; \
914}
915
916// 5.2.3.3 4-byte Control RANGE Parameter Block
917#define audio_control_range_4_n_t(numSubRanges) \
918 struct TU_ATTR_PACKED { \
919 uint16_t wNumSubRanges; \
920 struct TU_ATTR_PACKED { \
921 int32_t bMin ; /*The setting for the MIN attribute of the nth subrange of the addressed Control*/\
922 int32_t bMax ; /*The setting for the MAX attribute of the nth subrange of the addressed Control*/\
923 uint32_t bRes ; /*The setting for the RES attribute of the nth subrange of the addressed Control*/\
924 } subrange[numSubRanges]; \
925}
926
929#ifdef __cplusplus
930}
931#endif
932
933#endif
934
struct TU_ATTR_PACKED audio_desc_clock_multiplier_t
AUDIO Clock Multiplier Descriptor (4.7.2.3)
audio_clock_source_attribute_t
Audio Class-Clock Source Attributes UAC2.
Definition audio.h:543
audio_cs_as_interface_subtype_t
A.10 - Audio Class-Specific AS Interface Descriptor Subtypes UAC2.
Definition audio.h:113
struct TU_ATTR_PACKED audio_desc_type_I_format_t
AUDIO Type I Format Type Descriptor(2.3.1.6 - Audio Formats)
audio_cs_ac_interface_subtype_t
A.9 - Audio Class-Specific AC Interface Descriptor Subtypes UAC2.
Definition audio.h:94
struct TU_ATTR_PACKED audio_desc_output_terminal_t
AUDIO Output Terminal Descriptor(4.7.2.5)
audio_DTS_decoder_control_selector_t
A.17.13.4 DTS Decoder Control Selectors.
Definition audio.h:416
audio_AC3_decoder_control_selector_t
A.17.13.2 AC-3 Decoder Control Selectors.
Definition audio.h:394
audio_encoder_control_selector_t
A.17.12 Encoder Control Selectors.
Definition audio.h:356
struct TU_ATTR_PACKED audio_desc_channel_cluster_t
AUDIO Channel Cluster Descriptor (4.1)
audio_modulation_delay_control_selector_t
A.17.8.3 Modulation Delay Effect Unit Control Selectors.
Definition audio.h:269
audio_effect_unit_effect_type_t
A.11 - Effect Unit Effect Types.
Definition audio.h:123
audio_EP_control_selector_t
A.17.14 Endpoint Control Selectors.
Definition audio.h:425
struct TU_ATTR_PACKED audio_desc_input_terminal_t
AUDIO Input Terminal Descriptor(4.7.2.4)
audio_terminal_input_type_t
2.2 - Audio Class-Input Terminal Types UAC2
Definition audio.h:444
audio_sel_control_selector_t
A.17.6 - Selector Control Selectors.
Definition audio.h:207
audio_clock_source_control_pos_t
Audio Class-Clock Source Controls UAC2.
Definition audio.h:553
audio_clock_selector_control_pos_t
Audio Class-Clock Selector Controls UAC2.
Definition audio.h:560
audio_parametric_equalizer_control_selector_t
A.17.8 Effect Unit Control Selectors.
Definition audio.h:239
struct TU_ATTR_PACKED audio_desc_feature_unit_t
AUDIO Feature Unit Descriptor(4.7.2.8) for ONE channel.
audio_clock_multiplier_control_pos_t
Audio Class-Clock Multiplier Controls UAC2.
Definition audio.h:566
struct TU_ATTR_PACKED audio_desc_clock_source_t
AUDIO Clock Source Descriptor (4.7.2.1)
audio_extension_unit_control_selector_t
A.17.10 Extension Unit Control Selectors.
Definition audio.h:336
audio_clock_src_control_selector_t
A.17 - Control Selector Codes.
Definition audio.h:160
audio_cs_as_iso_data_ep_lock_delay_unit_t
Audio Class-Specific AS Isochronous Data EP Lock Delay Units UAC2.
Definition audio.h:535
audio_cs_as_iso_data_ep_attribute_t
Audio Class-Specific AS Isochronous Data EP Attributes UAC2.
Definition audio.h:520
audio_clock_sel_control_selector_t
A.17.2 - Clock Selector Control Selectors.
Definition audio.h:168
audio_function_subclass_type_t
Audio Device Class Codes.
Definition audio.h:46
audio_stereo_extender_control_selector_t
A.17.9.3 Stereo Extender Processing Unit Control Selectors.
Definition audio.h:325
audio_audiostreaming_interface_control_selector_t
A.17.11 AudioStreaming Interface Control Selectors.
Definition audio.h:347
audio_terminal_control_selector_t
A.17.4 - Terminal Control Selectors.
Definition audio.h:183
struct TU_ATTR_PACKED audio_desc_cs_as_iso_data_ep_t
AUDIO Class-Specific AS Isochronous Audio Data Endpoint Descriptor(4.10.1.2)
audio_subclass_type_t
A.5 - Audio Interface Subclass Codes.
Definition audio.h:59
audio_clock_mul_control_selector_t
A.17.3 - Clock Multiplier Control Selectors.
Definition audio.h:175
audio_cs_ac_interface_control_pos_t
Audio Class-Specific AC Interface Descriptor Controls UAC2.
Definition audio.h:507
audio_dynamic_range_compression_control_selector_t
A.17.8.4 Dynamic Range Compressor Effect Unit Control Selectors.
Definition audio.h:284
audio_terminal_input_control_pos_t
Audio Class-Input Terminal Controls UAC2.
Definition audio.h:573
audio_feature_unit_control_pos_t
Audio Class-Feature Unit Controls UAC2.
Definition audio.h:594
audio_WMA_decoder_control_selector_t
A.17.13.3 WMA Decoder Control Selectors.
Definition audio.h:407
audio_cs_as_iso_data_ep_control_pos_t
Audio Class-Specific AS Isochronous Data EP Controls UAC2.
Definition audio.h:527
audio_cs_req_t
A.14 - Audio Class-Specific Request Codes.
Definition audio.h:149
audio_terminal_type_t
Terminal Types.
Definition audio.h:436
struct TU_ATTR_PACKED audio_desc_clock_selector_t
AUDIO Clock Selector Descriptor (4.7.2.2) for ONE pin.
audio_processing_unit_process_type_t
A.12 - Processing Unit Process Types.
Definition audio.h:133
struct TU_ATTR_PACKED audio_desc_cs_as_interface_t
AUDIO Class-Specific AS Interface Descriptor(4.9.2)
audio_up_down_mix_control_selector_t
A.17.9 Processing Unit Control Selectors.
Definition audio.h:301
audio_control_t
All remaining definitions are taken from the descriptor descriptions in the UAC2 main specification.
Definition audio.h:499
struct TU_ATTR_PACKED audio_desc_cs_ac_interface_t
AUDIO Class-Specific AC Interface Header Descriptor (4.7.2)
audio_cs_as_interface_control_pos_t
Audio Class-Specific AS Interface Descriptor Controls UAC2.
Definition audio.h:513
audio_cs_ep_subtype_t
A.13 - Audio Class-Specific EP Descriptor Subtypes UAC2.
Definition audio.h:142
audio_MPEG_decoder_control_selector_t
A.17.13 Decoder Control Selectors.
Definition audio.h:379
audio_interface_protocol_code_t
A.6 - Audio Interface Protocol Codes.
Definition audio.h:68
audio_function_code_t
A.7 - Audio Function Category Codes.
Definition audio.h:75
audio_feature_unit_control_selector_t
A.17.7 - Feature Unit Control Selectors.
Definition audio.h:215
audio_terminal_output_control_pos_t
Audio Class-Output Terminal Controls UAC2.
Definition audio.h:584
audio_format_type_t
Rest is yet to be implemented.
Definition audio.h:473
audio_channel_config_t
Audio Class-Audio Channel Configuration UAC2.
Definition audio.h:614
audio_function_protocol_code_t
A.3 - Audio Function Protocol Codes.
Definition audio.h:52
audio_mixer_control_selector_t
A.17.5 - Mixer Control Selectors.
Definition audio.h:196
audio_dolby_prologic_control_selector_t
A.17.9.2 Dolby Prologic ™ Processing Unit Control Selectors.
Definition audio.h:313
audio_terminal_output_type_t
2.3 - Audio Class-Output Terminal Types UAC2
Definition audio.h:456
audio_reverberation_effect_control_selector_t
A.17.8.2 Reverberation Effect Unit Control Selectors.
Definition audio.h:252
@ AUDIO_SUBCLASS_MIDI_STREAMING
MIDI Streaming.
Definition audio.h:63
@ AUDIO_SUBCLASS_CONTROL
Audio Control.
Definition audio.h:61
@ AUDIO_SUBCLASS_STREAMING
Audio Streaming.
Definition audio.h:62
@ AUDIO_CTRL_NONE
No Host access.
Definition audio.h:500
@ AUDIO_CTRL_R
Host read access only.
Definition audio.h:501
@ AUDIO_CTRL_RW
Host read write access.
Definition audio.h:502
@ AUDIO_INT_PROTOCOL_CODE_V2
Version 2.0.
Definition audio.h:70
@ AUDIO_FUNC_PROTOCOL_CODE_V2
Version 2.0.
Definition audio.h:54
uint8_t bDescriptorSubType
Descriptor SubType. Value: AUDIO_CS_AC_INTERFACE_HEADER.
Definition audio.h:658
uint8_t bDescriptorType
Descriptor Type. Value: TUSB_DESC_CS_INTERFACE.
Definition audio.h:657
uint8_t bLength
Size of this descriptor in bytes: 9.
Definition audio.h:656
Definition audio.h:758
uint32_t bmaControls
See: audio_feature_unit_control_pos_t. Controls0 is master channel 0 (always present) and Controls1 i...
Definition audio.h:759
AUDIO Channel Cluster Descriptor (4.1)
Definition audio.h:647
uint8_t bUnitID
Constant uniquely identifying the Unit within the audio function. This value is used in all requests ...
Definition audio.h:756
uint8_t bAssocTerminal
Terminal ID of the Terminal that is associated with this Clock Source.
Definition audio.h:674
uint8_t bCSourceID
ID of the Clock Entity to which the last Clock Input Pin of this Clock Selector Entity is connected.
Definition audio.h:713
uint8_t bmControls
See: audio_cs_ac_interface_control_pos_t.
Definition audio.h:662
uint8_t baCSourceID
ID of the Clock Entity to which the first Clock Input Pin of this Clock Selector Entity is connected....
Definition audio.h:686
uint8_t bBitResolution
The number of effectively used bits from the available bits in an audio subslot.
Definition audio.h:801
uint8_t type
Request type tusb_request_type_t.
Definition audio.h:824
int32_t bCur
The setting for the CUR attribute of the addressed Control.
Definition audio.h:860
uint16_t wTotalLength
Total number of bytes returned for the class-specific AudioControl interface descriptor....
Definition audio.h:661
uint8_t bTerminalID
Constant uniquely identifying the Terminal within the audio function. This value is used in all reque...
Definition audio.h:724
uint8_t bSourceID
ID of the Unit or Terminal to which this Terminal is connected.
Definition audio.h:744
uint32_t bmFormats
The Audio Data Format(s) that can be used to communicate with this interface.See: audio_data_format_t...
Definition audio.h:787
uint16_t bmControls
See: audio_terminal_input_control_pos_t.
Definition audio.h:731
uint16_t wTerminalType
Constant characterizing the type of Terminal. See: audio_terminal_type_t for USB streaming and audio_...
Definition audio.h:725
int16_t bCur
The setting for the CUR attribute of the addressed Control.
Definition audio.h:854
uint8_t bmAttributes
See: audio_clock_source_attribute_t.
Definition audio.h:672
uint16_t bcdADC
Audio Device Class Specification Release Number in Binary-Coded Decimal. Value: U16_TO_U8S_LE(0x0200)...
Definition audio.h:659
uint8_t bTerminalLink
The Terminal ID of the Terminal to which this interface is connected.
Definition audio.h:784
uint8_t iChannelNames
Index of a string descriptor, describing the name of the first inserted channel with a non-predefined...
Definition audio.h:650
uint8_t bCategory
Constant, indicating the primary use of this audio function, as intended by the manufacturer....
Definition audio.h:660
uint8_t iTerminal
Index of a string descriptor, describing the Input Terminal.
Definition audio.h:732
uint8_t direction
Direction type. tusb_dir_t.
Definition audio.h:825
uint8_t bLockDelayUnits
Indicates the units used for the wLockDelay field. See: audio_cs_as_iso_data_ep_lock_delay_unit_t.
Definition audio.h:812
uint8_t iClockSource
Index of a string descriptor, describing the Clock Source Entity.
Definition audio.h:675
uint8_t bSubslotSize
The number of bytes occupied by one audio subslot. Can be 1, 2, 3 or 4.
Definition audio.h:800
uint8_t bNrInPins
Number of Input Pins of this Unit: p = 1 thus bNrInPins = 1.
Definition audio.h:685
uint16_t wLockDelay
Indicates the time it takes this endpoint to reliably lock its internal clock recovery circuitry....
Definition audio.h:813
int8_t bCur
The setting for the CUR attribute of the addressed Control.
Definition audio.h:848
uint8_t bNrChannels
Number of channels currently connected.
Definition audio.h:648
uint8_t recipient
Recipient type tusb_request_recipient_t.
Definition audio.h:823
uint8_t bRequest
Request type audio_cs_req_t.
Definition audio.h:831
audio_channel_config_t bmChannelConfig
Bitmap according to 'audio_channel_config_t' with a 1 set if channel is connected and 0 else....
Definition audio.h:649
uint8_t bClockID
Constant uniquely identifying the Clock Source Entity within the audio function. This value is used i...
Definition audio.h:671
uint8_t bFormatType
Constant identifying the Format Type the AudioStreaming interface is using. See: audio_format_type_t.
Definition audio.h:786