xref: /netbsd/sys/dev/usb/uaudioreg.h (revision dcd94671)
1 /*	$NetBSD: uaudioreg.h,v 1.19 2023/04/16 19:26:20 mlelstv Exp $	*/
2 
3 /*
4  * Copyright (c) 1999 The NetBSD Foundation, Inc.
5  * All rights reserved.
6  *
7  * This code is derived from software contributed to The NetBSD Foundation
8  * by Lennart Augustsson (lennart@augustsson.net) at
9  * Carlstedt Research & Technology.
10  *
11  * Redistribution and use in source and binary forms, with or without
12  * modification, are permitted provided that the following conditions
13  * are met:
14  * 1. Redistributions of source code must retain the above copyright
15  *    notice, this list of conditions and the following disclaimer.
16  * 2. Redistributions in binary form must reproduce the above copyright
17  *    notice, this list of conditions and the following disclaimer in the
18  *    documentation and/or other materials provided with the distribution.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
21  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
24  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30  * POSSIBILITY OF SUCH DAMAGE.
31  */
32 
33 #define UAUDIO_VERSION1		0x100
34 #define UAUDIO_VERSION2		0x200
35 
36 #define UDESC_CS_CONFIG		0x22
37 #define UDESC_CS_STRING		0x23
38 #define UDESC_CS_INTERFACE	0x24
39 #define UDESC_CS_ENDPOINT	0x25
40 
41 #define UDESCSUB_AC_HEADER	1
42 #define UDESCSUB_AC_INPUT	2
43 #define UDESCSUB_AC_OUTPUT	3
44 #define UDESCSUB_AC_MIXER	4
45 #define UDESCSUB_AC_SELECTOR	5
46 #define UDESCSUB_AC_FEATURE	6
47 #define UDESCSUB_AC_EFFECT      7
48 #define UDESCSUB_AC_PROCESSING	8
49 #define UDESCSUB_AC_EXTENSION	9
50 #define UDESCSUB_AC_CLKSRC	10
51 #define UDESCSUB_AC_CLKSEL	11
52 #define UDESCSUB_AC_CLKMULT	12
53 #define UDESCSUB_AC_RATECONV    13
54 
55 /* The first fields are identical to usb_endpoint_descriptor_t */
56 typedef struct {
57 	uByte		bLength;
58 	uByte		bDescriptorType;
59 	uByte		bEndpointAddress;
60 	uByte		bmAttributes;
61 	uWord		wMaxPacketSize;
62 	uByte		bInterval;
63 	/*
64 	 * The following two entries are only used by the Audio Class.
65 	 * And according to the specs the Audio Class is the only one
66 	 * allowed to extend the endpoint descriptor.
67 	 * Who knows what goes on in the minds of the people in the USB
68 	 * standardization?  :-(
69 	 *
70 	 * UAC2 no longer uses these extra fields. Check bLength to
71 	 * find out if these exist.
72 	 */
73 	uByte		bRefresh;
74 	uByte		bSynchAddress;
75 } UPACKED usb_endpoint_descriptor_audio_t;
76 
77 /* generic, for iteration */
78 typedef struct {
79 	uByte		bLength;
80 	uByte		bDescriptorType;
81 	uByte		bDescriptorSubtype;
82 } UPACKED uaudio_cs_descriptor_t;
83 
84 struct usb_audio_control_descriptor {
85 	uByte		bLength;
86 	uByte		bDescriptorType;
87 	uByte		bDescriptorSubtype;
88 	uWord		bcdADC;
89 	uWord		wTotalLength;
90 	uByte		bInCollection;
91 	uByte		baInterfaceNr[1];
92 } UPACKED;
93 
94 struct usb_audio_streaming_interface_v1_descriptor {
95 	uByte		bLength;
96 	uByte		bDescriptorType;
97 	uByte		bDescriptorSubtype;
98 	uByte		bTerminalLink;
99 	uByte		bDelay;
100 	uWord		wFormatTag;
101 } UPACKED;
102 
103 struct usb_audio_streaming_interface_v2_descriptor {
104 	uByte		bLength;
105 	uByte		bDescriptorType;
106 	uByte		bDescriptorSubtype;
107 	uByte		bTerminalLink;
108 	uByte		bmControls;
109 	uByte		bFormatType;
110 	uDWord		bmFormats;
111 	uByte		bNrChannels;
112 	uDWord		bmChannelConfig;
113 	uByte		iChannelNames;
114 } UPACKED;
115 
116 union usb_audio_streaming_interface_descriptor {
117 	struct usb_audio_streaming_interface_v1_descriptor v1;
118 	struct usb_audio_streaming_interface_v2_descriptor v2;
119 };
120 
121 struct usb_audio_streaming_endpoint_descriptor {
122 	uByte		bLength;
123 	uByte		bDescriptorType;
124 	uByte		bDescriptorSubtype;
125 	uByte		bmAttributes;
126 #define UA_SED_FREQ_CONTROL	0x01
127 #define UA_SED_PITCH_CONTROL	0x02
128 #define UA_SED_MAXPACKETSONLY	0x80
129 	uByte		bLockDelayUnits;
130 	uWord		wLockDelay;
131 } UPACKED;
132 
133 struct usb_audio_streaming_type1_v1_descriptor {
134 	uByte		bLength;
135 	uByte		bDescriptorType;
136 	uByte		bDescriptorSubtype;
137 	uByte		bFormatType;
138 	uByte		bNrChannels;
139 	uByte		bSubFrameSize;
140 	uByte		bBitResolution;
141 	uByte		bSamFreqType;
142 #define UA_SAMP_CONTINUOUS 0
143 	uByte		tSamFreq[3*AUFMT_MAX_FREQUENCIES];
144 #define UA_GETSAMP(p, n) ((p)->tSamFreq[(n)*3+0] | ((p)->tSamFreq[(n)*3+1] << 8) | ((p)->tSamFreq[(n)*3+2] << 16))
145 #define UA_SAMP_LO(p) UA_GETSAMP(p, 0)
146 #define UA_SAMP_HI(p) UA_GETSAMP(p, 1)
147 } UPACKED;
148 
149 struct usb_audio_streaming_type1_v2_descriptor {
150 	uByte		bLength;
151 	uByte		bDescriptorType;
152 	uByte		bDescriptorSubtype;
153 	uByte		bFormatType;
154 	uByte		bSubslotSize;
155 	uByte		bBitResolution;
156 } UPACKED;
157 
158 union usb_audio_streaming_type1_descriptor {
159 	struct usb_audio_streaming_type1_v1_descriptor v1;
160 	struct usb_audio_streaming_type1_v2_descriptor v2;
161 };
162 
163 struct usb_audio_v1_cluster {
164 	uByte		bNrChannels;
165 	uWord		wChannelConfig;
166 #define	UA_CHANNEL_LEFT		0x0001
167 #define	UA_CHANNEL_RIGHT	0x0002
168 #define	UA_CHANNEL_CENTER	0x0004
169 #define	UA_CHANNEL_LFE		0x0008
170 #define	UA_CHANNEL_L_SURROUND	0x0010
171 #define	UA_CHANNEL_R_SURROUND	0x0020
172 #define	UA_CHANNEL_L_CENTER	0x0040
173 #define	UA_CHANNEL_R_CENTER	0x0080
174 #define	UA_CHANNEL_SURROUND	0x0100
175 #define	UA_CHANNEL_L_SIDE	0x0200
176 #define	UA_CHANNEL_R_SIDE	0x0400
177 #define	UA_CHANNEL_TOP		0x0800
178 	uByte		iChannelNames;
179 } UPACKED;
180 
181 struct usb_audio_v2_cluster {
182 	uByte		bNrChannels;
183 	uDWord		bmChannelConfig;
184 /*#define	UA_CHANNEL_LEFT		0x00000001 */
185 /*#define	UA_CHANNEL_RIGHT	0x00000002 */
186 /*#define	UA_CHANNEL_CENTER	0x00000004 */
187 /*#define	UA_CHANNEL_LFE		0x00000008 */
188 #define	UA_CHANNEL_BL		0x00000010
189 #define	UA_CHANNEL_BR		0x00000020
190 #define	UA_CHANNEL_FLC		0x00000040
191 #define	UA_CHANNEL_FRC		0x00000080
192 #define	UA_CHANNEL_BC		0x00000100
193 #define	UA_CHANNEL_SL		0x00000200
194 #define	UA_CHANNEL_SR		0x00000400
195 #define	UA_CHANNEL_TC		0x00000800
196 #define	UA_CHANNEL_TFL		0x00001000
197 #define	UA_CHANNEL_TFC		0x00002000
198 #define	UA_CHANNEL_TFR		0x00004000
199 #define	UA_CHANNEL_TBL		0x00008000
200 #define	UA_CHANNEL_TBC		0x00010000
201 #define	UA_CHANNEL_TBR		0x00020000
202 #define	UA_CHANNEL_TFLC		0x00040000
203 #define	UA_CHANNEL_TFRC		0x00080000
204 #define	UA_CHANNEL_LLFE		0x00100000
205 #define	UA_CHANNEL_RLFE		0x00200000
206 #define	UA_CHANNEL_TSL		0x00400000
207 #define	UA_CHANNEL_TSR		0x00800000
208 #define	UA_CHANNEL_BOTTOM	0x01000000
209 #define	UA_CHANNEL_BOTTOMLC	0x02000000
210 #define	UA_CHANNEL_BOTTOMRC	0x04000000
211 #define	UA_CHANNEL_RD		0x80000000
212 	uByte		iChannelNames;
213 } UPACKED;
214 
215 union usb_audio_cluster {
216 	struct usb_audio_v1_cluster v1;
217 	struct usb_audio_v2_cluster v2;
218 };
219 
220 /* Shared by all units and terminals */
221 struct usb_audio_unit {
222 	uByte		bLength;
223 	uByte		bDescriptorType;
224 	uByte		bDescriptorSubtype;
225 	uByte		bUnitId;
226 };
227 
228 /* UDESCSUB_AC_INPUT */
229 struct usb_audio_input_v1_terminal {
230 	uByte		bLength;
231 	uByte		bDescriptorType;
232 	uByte		bDescriptorSubtype;
233 	uByte		bTerminalId;
234 	uWord		wTerminalType;
235 	uByte		bAssocTerminal;
236 	uByte		bNrChannels;
237 	uWord		wChannelConfig;
238 	uByte		iChannelNames;
239 	uByte		iTerminal;
240 } UPACKED;
241 struct usb_audio_input_v2_terminal {
242 	uByte		bLength;
243 	uByte		bDescriptorType;
244 	uByte		bDescriptorSubtype;
245 	uByte		bTerminalId;
246 	uWord		wTerminalType;
247 	uByte		bAssocTerminal;
248 	uByte		bCSourceId;
249 	uByte		bNrChannels;
250 	uDWord		bmChannelConfig;
251 	uByte		iChannelNames;
252 	uWord		bmControls;
253 	uByte		iTerminal;
254 } UPACKED;
255 
256 union usb_audio_input_terminal {
257 	struct usb_audio_input_v1_terminal v1;
258 	struct usb_audio_input_v2_terminal v2;
259 };
260 
261 /* UDESCSUB_AC_OUTPUT */
262 struct usb_audio_output_v1_terminal {
263 	uByte		bLength;
264 	uByte		bDescriptorType;
265 	uByte		bDescriptorSubtype;
266 	uByte		bTerminalId;
267 	uWord		wTerminalType;
268 	uByte		bAssocTerminal;
269 	uByte		bSourceId;
270 	uByte		iTerminal;
271 } UPACKED;
272 struct usb_audio_output_v2_terminal {
273 	uByte		bLength;
274 	uByte		bDescriptorType;
275 	uByte		bDescriptorSubtype;
276 	uByte		bTerminalId;
277 	uWord		wTerminalType;
278 	uByte		bAssocTerminal;
279 	uByte		bSourceId;
280 	uByte		bCSourceId;
281 	uWord		bmControls;
282 	uByte		iTerminal;
283 } UPACKED;
284 
285 union usb_audio_output_terminal {
286 	struct usb_audio_output_v1_terminal v1;
287 	struct usb_audio_output_v2_terminal v2;
288 };
289 
290 /* UDESCSUB_AC_MIXER */
291 struct usb_audio_mixer_unit {
292 	uByte		bLength;
293 	uByte		bDescriptorType;
294 	uByte		bDescriptorSubtype;
295 	uByte		bUnitId;
296 	uByte		bNrInPins;
297 	uByte		baSourceId[255]; /* [bNrInPins] */
298 	/* union usb_audio_mixer_unit_1 */
299 } UPACKED;
300 struct usb_audio_mixer_v1_unit_1 {
301 	uByte		bNrChannels;
302 	uWord		wChannelConfig;
303 	uByte		iChannelNames;
304 	uByte		bmControls[255]; /* [bNrChannels] */
305 	/*uByte		iMixer;*/
306 } UPACKED;
307 struct usb_audio_mixer_v2_unit_1 {
308 	uByte		bNrChannels;
309 	uDWord		bmChannelConfig;
310 	uByte		iChannelNames;
311 	uByte		bmMixerControls[255]; /* [bNrChannels] */
312 	/*uByte		bmControls;*/
313 	/*uByte		iMixer;*/
314 } UPACKED;
315 #define UA_MIX_CLUSTER_MASK	0x03
316 #define UA_MIX_CLUSTER_RO	0x01
317 #define UA_MIX_CLUSTER_RW	0x03
318 /* UAC2 */
319 #define UA_MIX_UNDERFLOW_MASK	0x0c
320 #define UA_MIX_UNDERFLOW_RO	0x04
321 #define UA_MIX_UNDERFLOW_RW	0x0c
322 #define UA_MIX_OVERFLOW_MASK	0x30
323 #define UA_MIX_OVERFLOW_RO	0x10
324 #define UA_MIX_OVERFLOW_RW	0x30
325 
326 union usb_audio_mixer_unit_1 {
327 	struct usb_audio_mixer_v1_unit_1 v1;
328 	struct usb_audio_mixer_v2_unit_1 v2;
329 };
330 
331 /* UDESCSUB_AC_SELECTOR */
332 struct usb_audio_selector_unit {
333 	uByte		bLength;
334 	uByte		bDescriptorType;
335 	uByte		bDescriptorSubtype;
336 	uByte		bUnitId;
337 	uByte		bNrInPins;
338 	uByte		baSourceId[255]; /* [bNrInPins] */
339 	/* uByte	iSelector; */
340 } UPACKED;
341 
342 /* UDESCSUB_AC_FEATURE */
343 struct usb_audio_feature_v1_unit {
344 	uByte		bLength;
345 	uByte		bDescriptorType;
346 	uByte		bDescriptorSubtype;
347 	uByte		bUnitId;
348 	uByte		bSourceId;
349 	uByte		bControlSize;
350 	uByte		bmaControls[255]; /* size for more than enough */
351 	/* uByte	iFeature; */
352 } UPACKED;
353 struct usb_audio_feature_v2_unit {
354 	uByte		bLength;
355 	uByte		bDescriptorType;
356 	uByte		bDescriptorSubtype;
357 	uByte		bUnitId;
358 	uByte		bSourceId;
359 	uDWord		bmaControls[255]; /* size for more than enough */
360 	/* uByte	iFeature; */
361 } UPACKED;
362 
363 union usb_audio_feature_unit {
364 	struct usb_audio_feature_v1_unit v1;
365 	struct usb_audio_feature_v2_unit v2;
366 };
367 
368 /* UDESCSUB_AC_PROCESSING */
369 struct usb_audio_processing_unit {
370 	uByte		bLength;
371 	uByte		bDescriptorType;
372 	uByte		bDescriptorSubtype;
373 	uByte		bUnitId;
374 	uWord		wProcessType;
375 	uByte		bNrInPins;
376 	uByte		baSourceId[255]; /* [bNrInPins] */
377 	/* struct usb_audio_processing_unit_1 */
378 } UPACKED;
379 struct usb_audio_processing_unit_1{
380 	uByte		bNrChannels;
381 	uWord		wChannelConfig;
382 	uByte		iChannelNames;
383 	uByte		bControlSize;
384 	uByte		bmControls[255]; /* [bControlSize] */
385 #define UA_PROC_ENABLE_MASK 1
386 } UPACKED;
387 
388 struct usb_audio_processing_unit_updown {
389 	uByte		iProcessing;
390 	uByte		bNrModes;
391 	uWord		waModes[255]; /* [bNrModes] */
392 } UPACKED;
393 
394 /* UDESCSUB_AC_EXTENSION */
395 struct usb_audio_extension_unit {
396 	uByte		bLength;
397 	uByte		bDescriptorType;
398 	uByte		bDescriptorSubtype;
399 	uByte		bUnitId;
400 	uWord		wExtensionCode;
401 	uByte		bNrInPins;
402 	uByte		baSourceId[255]; /* [bNrInPins] */
403 	/* struct usb_audio_extension_unit_1 */
404 } UPACKED;
405 struct usb_audio_extension_unit_1 {
406 	uByte		bNrChannels;
407 	uWord		wChannelConfig;
408 	uByte		iChannelNames;
409 	uByte		bControlSize;
410 	uByte		bmControls[255]; /* [bControlSize] */
411 #define UA_EXT_ENABLE_MASK 1
412 #define UA_EXT_ENABLE 1
413 	/*uByte		iExtension;*/
414 } UPACKED;
415 
416 /* UDESCSUB_AC_CLKSRC */
417 struct usb_audio_clksrc_unit {
418 	uByte		bLength;
419 	uByte		bDescriptorType;
420 	uByte		bDescriptorSubtype;
421 	uByte		bClockId;
422 	uByte		bmAttributes;
423 	uByte		bmControls;
424 	uByte		bAssocTerminal;
425 	uByte		iClockSource;
426 } UPACKED;
427 
428 /* UDESCSUB_AC_CLKSEL */
429 struct usb_audio_clksel_unit {
430 	uByte		bLength;
431 	uByte		bDescriptorType;
432 	uByte		bDescriptorSubtype;
433 	uByte		bClockId;
434 	uByte		bNrInPins;
435 	uByte		baCSourceId[255];
436 	/*uByte		bmControls;*/
437 	/*uByte		iClockSelector;*/
438 } UPACKED;
439 
440 /* UDESCSUB_AC_CLKMULT */
441 struct usb_audio_clkmult_unit {
442 	uByte		bLength;
443 	uByte		bDescriptorType;
444 	uByte		bDescriptorSubtype;
445 	uByte		bClockId;
446 	uByte		bCSourceId;
447 	uByte		bmControls;
448 	uByte		iClockMultiplier;
449 } UPACKED;
450 
451 /* USB terminal types */
452 #define UAT_UNDEFINED		0x0100
453 #define UAT_STREAM		0x0101
454 #define UAT_VENDOR		0x01ff
455 /* input terminal types */
456 #define UATI_UNDEFINED		0x0200
457 #define UATI_MICROPHONE		0x0201
458 #define UATI_DESKMICROPHONE	0x0202
459 #define UATI_PERSONALMICROPHONE	0x0203
460 #define UATI_OMNIMICROPHONE	0x0204
461 #define UATI_MICROPHONEARRAY	0x0205
462 #define UATI_PROCMICROPHONEARR	0x0206
463 /* output terminal types */
464 #define UATO_UNDEFINED		0x0300
465 #define UATO_SPEAKER		0x0301
466 #define UATO_HEADPHONES		0x0302
467 #define UATO_DISPLAYAUDIO	0x0303
468 #define UATO_DESKTOPSPEAKER	0x0304
469 #define UATO_ROOMSPEAKER	0x0305
470 #define UATO_COMMSPEAKER	0x0306
471 #define UATO_SUBWOOFER		0x0307
472 /* bidir terminal types */
473 #define UATB_UNDEFINED		0x0400
474 #define UATB_HANDSET		0x0401
475 #define UATB_HEADSET		0x0402
476 #define UATB_SPEAKERPHONE	0x0403
477 #define UATB_SPEAKERPHONEESUP	0x0404
478 #define UATB_SPEAKERPHONEECANC	0x0405
479 /* telephony terminal types */
480 #define UATT_UNDEFINED		0x0500
481 #define UATT_PHONELINE		0x0501
482 #define UATT_TELEPHONE		0x0502
483 #define UATT_DOWNLINEPHONE	0x0503
484 /* external terminal types */
485 #define UATE_UNDEFINED		0x0600
486 #define UATE_ANALOGCONN		0x0601
487 #define UATE_DIGITALAUIFC	0x0602
488 #define UATE_LINECONN		0x0603
489 #define UATE_LEGACYCONN		0x0604
490 #define UATE_SPDIF		0x0605
491 #define UATE_1394DA		0x0606
492 #define UATE_1394DV		0x0607
493 /* embedded function terminal types */
494 #define UATF_UNDEFINED		0x0700
495 #define UATF_CALIBNOISE		0x0701
496 #define UATF_EQUNOISE		0x0702
497 #define UATF_CDPLAYER		0x0703
498 #define UATF_DAT		0x0704
499 #define UATF_DCC		0x0705
500 #define UATF_MINIDISK		0x0706
501 #define UATF_ANALOGTAPE		0x0707
502 #define UATF_PHONOGRAPH		0x0708
503 #define UATF_VCRAUDIO		0x0709
504 #define UATF_VIDEODISCAUDIO	0x070a
505 #define UATF_DVDAUDIO		0x070b
506 #define UATF_TVTUNERAUDIO	0x070c
507 #define UATF_SATELLITE		0x070d
508 #define UATF_CABLETUNER		0x070e
509 #define UATF_DSS		0x070f
510 #define UATF_RADIORECV		0x0710
511 #define UATF_RADIOXMIT		0x0711
512 #define UATF_MULTITRACK		0x0712
513 #define UATF_SYNTHESIZER	0x0713
514 
515 
516 #define SET_CUR 0x01
517 #define GET_CUR 0x81
518 #define SET_MIN 0x02
519 #define GET_MIN 0x82
520 #define SET_MAX 0x03
521 #define GET_MAX 0x83
522 #define SET_RES 0x04
523 #define GET_RES 0x84
524 #define SET_MEM 0x05
525 #define GET_MEM 0x85
526 #define GET_STAT 0xff
527 
528 #define V2_CUR		0x01
529 #define V2_RANGES	0x02
530 
531 #define V2_CUR_CLKFREQ	0x01
532 #define V2_CUR_CLKSEL	0x01
533 #define V2_CUR_SELECTOR 0x01
534 
535 
536 #define MUTE_CONTROL	0x01
537 #define VOLUME_CONTROL	0x02
538 #define BASS_CONTROL	0x03
539 #define MID_CONTROL	0x04
540 #define TREBLE_CONTROL	0x05
541 #define GRAPHIC_EQUALIZER_CONTROL	0x06
542 #define AGC_CONTROL	0x07
543 #define DELAY_CONTROL	0x08
544 #define BASS_BOOST_CONTROL 0x09
545 #define LOUDNESS_CONTROL 0x0a
546 #define GAIN_CONTROL	0x0b
547 #define GAINPAD_CONTROL	0x0c
548 #define PHASEINV_CONTROL 0x0d
549 /* V2 */
550 #define UNDERFLOW_CONTROL 0x0e
551 #define OVERFLOW_CONTROL 0x0f
552 
553 #define FU_MASK(u) (1 << ((u)-1))
554 #define V2_FU_MASK(u) (3 << ((u)-1)*2)
555 
556 #define MASTER_CHAN	0
557 
558 #define AS_GENERAL	1
559 #define FORMAT_TYPE	2
560 #define FORMAT_SPECIFIC 3
561 
562 #define UA_FMT_PCM	1
563 #define UA_FMT_PCM8	2
564 #define UA_FMT_IEEE_FLOAT 3
565 #define UA_FMT_ALAW	4
566 #define UA_FMT_MULAW	5
567 #define UA_FMT_MPEG	0x1001
568 #define UA_FMT_AC3	0x1002
569 
570 #define UA_V2_FMT_PCM		0x01
571 #define UA_V2_FMT_PCM8		0x02
572 #define UA_V2_FMT_IEEE_FLOAT	0x04
573 #define UA_V2_FMT_ALAW		0x08
574 #define UA_V2_FMT_MULAW		0x10
575 
576 #define SAMPLING_FREQ_CONTROL	0x01
577 #define PITCH_CONTROL		0x02
578 
579 #define FORMAT_TYPE_UNDEFINED 0
580 #define FORMAT_TYPE_I 1
581 #define FORMAT_TYPE_II 2
582 #define FORMAT_TYPE_III 3
583 
584 #define UA_PROC_MASK(n) (1<< ((n)-1))
585 #define PROCESS_UNDEFINED		0
586 #define  XX_ENABLE_CONTROL			1
587 #define UPDOWNMIX_PROCESS		1
588 #define  UD_ENABLE_CONTROL			1
589 #define  UD_MODE_SELECT_CONTROL			2
590 #define DOLBY_PROLOGIC_PROCESS		2
591 #define  DP_ENABLE_CONTROL			1
592 #define  DP_MODE_SELECT_CONTROL			2
593 #define P3D_STEREO_EXTENDER_PROCESS	3
594 #define  P3D_ENABLE_CONTROL			1
595 #define  P3D_SPACIOUSNESS_CONTROL		2
596 #define REVERBATION_PROCESS		4
597 #define  RV_ENABLE_CONTROL			1
598 #define  RV_LEVEL_CONTROL			2
599 #define  RV_TIME_CONTROL			3
600 #define  RV_FEEDBACK_CONTROL			4
601 #define CHORUS_PROCESS			5
602 #define  CH_ENABLE_CONTROL			1
603 #define  CH_LEVEL_CONTROL			2
604 #define  CH_RATE_CONTROL			3
605 #define  CH_DEPTH_CONTROL			4
606 #define DYN_RANGE_COMP_PROCESS		6
607 #define  DR_ENABLE_CONTROL			1
608 #define  DR_COMPRESSION_RATE_CONTROL		2
609 #define  DR_MAXAMPL_CONTROL			3
610 #define  DR_THRESHOLD_CONTROL			4
611 #define  DR_ATTACK_TIME_CONTROL			5
612 #define  DR_RELEASE_TIME_CONTROL		6
613