xref: /titanic_52/usr/src/uts/common/sys/usb/clients/audio/usb_audio.h (revision 643918928169438203a594dfc3fc1b3e9afe5ba3)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 
27 #ifndef _SYS_USB_AUDIO_H
28 #define	_SYS_USB_AUDIO_H
29 
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 /*
36  * macros from audio spec 1.0
37  *
38  * audio class-specific descriptor types (Appendix A.4)
39  */
40 #define	USB_AUDIO_CS_DEVICE		0x21
41 #define	USB_AUDIO_CS_CONFIGURATION	0x22
42 #define	USB_AUDIO_CS_STRING		0x23
43 #define	USB_AUDIO_CS_INTERFACE		0x24
44 #define	USB_AUDIO_CS_ENDPOINT		0x25
45 
46 /* audio class-specific AC Interface Descriptor Subtypes (A.5) */
47 #define	USB_AUDIO_HEADER		0x01
48 #define	USB_AUDIO_INPUT_TERMINAL	0x02
49 #define	USB_AUDIO_OUTPUT_TERMINAL	0x03
50 #define	USB_AUDIO_MIXER_UNIT		0x04
51 #define	USB_AUDIO_SELECTOR_UNIT		0x05
52 #define	USB_AUDIO_FEATURE_UNIT		0x06
53 #define	USB_AUDIO_PROCESSING_UNIT	0x07
54 #define	USB_AUDIO_EXTENSION_UNIT	0x08
55 
56 /* audio class-specific AS Interface descriptor Subtypes (A.6) */
57 #define	USB_AUDIO_AS_GENERAL		0x01
58 #define	USB_AUDIO_AS_FORMAT_TYPE	0x02
59 #define	USB_AUDIO_AS_FORMAT_SPECIFIC	0x03
60 
61 /* Processing Uniti Process Types (A.7) */
62 #define	USB_AUDIO_UP_DOWNMIX_PROCESS		0x01
63 #define	USB_AUDIO_DOLBY_PROLOGIC_PROCESS	0x02
64 #define	USB_AUDIO_3D_STEREO_EXTENDER_PROCESS	0x03
65 #define	USB_AUDIO_REVERBERATION_PROCESS		0x04
66 #define	USB_AUDIO_CHORUS_PROCESS		0x05
67 #define	USB_AUDIO_DYN_RANGE_COMP_PROCESS	0x06
68 
69 /* Audio Class-specific endpoint descriptor Subtypes (A.8) */
70 #define	USB_AUDIO_EP_GENERAL		0x07
71 
72 /* Audio Class-specific Request Codes */
73 #define	USB_AUDIO_SET_CUR		0x01
74 #define	USB_AUDIO_GET_CUR		0x81
75 #define	USB_AUDIO_SET_MIN		0x02
76 #define	USB_AUDIO_GET_MIN		0x82
77 #define	USB_AUDIO_SET_MAX		0x03
78 #define	USB_AUDIO_GET_MAX		0x83
79 #define	USB_AUDIO_SET_RES		0x04
80 #define	USB_AUDIO_GET_RES		0x84
81 #define	USB_AUDIO_SET_MEM		0x05
82 #define	USB_AUDIO_GET_MEM		0x85
83 #define	USB_AUDIO_GET_STAT		0xff
84 
85 /* Terminal Control Selectors (A.10.1) */
86 #define	USB_AUDIO_COPY_PROTECT_CONTROL	0x01
87 
88 /* Feature Unit Control Selectors (A.1.10.2) */
89 #define	USB_AUDIO_MUTE_CONTROL		0x01
90 #define	USB_AUDIO_VOLUME_CONTROL	0x02
91 #define	USB_AUDIO_BASS_CONTROL		0x03
92 #define	USB_AUDIO_MID_CONTROL		0x04
93 #define	USB_AUDIO_TREBLE_CONTROL	0x05
94 #define	USB_AUDIO_GRAPHIC_CONTROL	0x06
95 #define	USB_AUDIO_AUTOMATIC_GAIN_CONTROL 0x07
96 #define	USB_AUDIO_DELAY_CONTROL		0x08
97 #define	USB_AUDIO_BASS_BOOST_CONTROL	0x09
98 #define	USB_AUDIO_LOUDNESS_CONTROL	0x0A
99 
100 /* the spec defines volume control value of 0x8000 as silence */
101 #define	USB_AUDIO_VOLUME_SILENCE	0x8000
102 
103 /* Up/Down-mix Processing Unit Control Selectors (A.10.3.1) */
104 #define	USB_AUDIO_UD_ENABLE_CONTROL	0x01
105 #define	USB_AUDIO_UD_MODE_SELECT_CONTROL 0x02
106 
107 /* Dolby Prologic Processing Unit Control Selectors (A.10.3.2) */
108 #define	USB_AUDIO_DP_ENABLE_CONTROL	0x01
109 #define	USB_AUDIO_DP_MODE_SELECT_CONTROL 0x02
110 
111 /* Reverberation Processing Unit Control Selectors (A.10.3.3) */
112 #define	USB_AUDIO_RV_ENABLE_CONTROL	0x01
113 #define	USB_AUDIO_REVERB_LEVEL_CONTROL	0x02
114 #define	USB_AUDIO_REVERB_TIME_CONTROL	0x03
115 #define	USB_AUDIO_REVERB_FEEDBACK_CONTROL 0x04
116 
117 /* Chorus Processing Unit Control Selectors (A.10.3.5) */
118 #define	USB_AUDIO_CH_ENABLE_CONTROL	0x01
119 #define	USB_AUDIO_CHORUS_LEVEL_CONTROL	0x02
120 #define	USB_AUDIO_CHORUS_RATE_CONTROL	0x03
121 #define	USB_AUDIO_CHORUS_DEPTH_CONTROL	0x04
122 
123 /* Dynamic range compressor Processing Unit Control Selectors (A.10.3.6) */
124 #define	USB_AUDIO_DR_ENABLE_CONTROL	0x01
125 #define	USB_AUDIO_COMPRESSION_RATE_CONTROL 0x02
126 #define	USB_AUDIO_MAXAMPL_CONTROL	0x03
127 #define	USB_AUDIO_THRESHOLD_CONTROL	0x04
128 #define	USB_AUDIO_ATTACK_TIME		0x05
129 #define	USB_AUDIO_RELEASE_TIME		0x06
130 
131 /* Extension Unit Control Selectors (A.10.4) */
132 #define	USB_AUDIO_XU_ENABLE_CONTROL	0x01
133 
134 /* Endpoint Control Selectors (A.10.5) */
135 #define	USB_AUDIO_SAMPLING_FREQ_CONTROL	0x01
136 #define	USB_AUDIO_PITCH_CONTROL		0x02
137 
138 /* descriptors */
139 /* Class specific AC interface header descriptor (4.3.2) */
140 typedef struct usb_audio_cs_if_descr {
141 	uint8_t	bLength;	/* size */
142 	uint8_t	bDescriptorType; /* CS_INTERFACE */
143 	uint8_t bDescriptorSubType; /* HEADER */
144 	uint16_t bcdADC;	/* release # */
145 	uint16_t wTotalLength;	/* the whole wad */
146 	uint8_t blnCollection;	/* # interfaces */
147 	uint8_t baInterfaceNr[1]; /* interface # */
148 } usb_audio_cs_if_descr_t;
149 
150 #define	CS_AC_IF_HEADER_FORMAT "cccsscc"
151 #define	CS_AC_IF_HEADER_SIZE 9
152 
153 /* input terminal descriptor (4.3.2.1) */
154 typedef struct usb_audio_input_term_descr {
155 	uint8_t	bLength;	/* size */
156 	uint8_t	bDescriptorType; /* CS_INTERFACE */
157 	uint8_t bDescriptorSubType; /* INPUT_TERMINAL */
158 	uint8_t bTerminalID;	/* unique identifier */
159 	uint16_t wTerminalType;	/* type of terminal */
160 	uint8_t bAssocTerminal; /* identifier */
161 	uint8_t bNrChannels;	/* # channels */
162 	uint16_t wChannelConfig; /* logical channel loc */
163 	uint8_t iChannelNames;	/* string index */
164 	uint8_t iTerminal;	/* terminal string index */
165 } usb_audio_input_term_descr_t;
166 
167 #define	CS_AC_INPUT_TERM_FORMAT "ccccsccscc"
168 #define	CS_AC_INPUT_TERM_SIZE 12
169 
170 /* output terminal descriptor (4.3.2.2) */
171 typedef struct usb_audio_output_term_descr {
172 	uint8_t	bLength;	/* size */
173 	uint8_t	bDescriptorType; /* CS_INTERFACE */
174 	uint8_t bDescriptorSubType; /* OUTPUT_TERMINAL */
175 	uint8_t bTerminalID;	/* unique identifier */
176 	uint16_t wTerminalType;	/* type of terminal */
177 	uint8_t bAssocTerminal; /* identifier */
178 	uint8_t bSourceID;	/* identifier */
179 	uint8_t iTerminal;	/* terminal string index */
180 } usb_audio_output_term_descr_t;
181 
182 #define	CS_AC_OUTPUT_TERM_FORMAT "ccccsccc"
183 #define	CS_AC_OUTPUT_TERM_SIZE 9
184 
185 /*
186  * mixer unit descriptor (4.3.2.3)
187  * this is awkward descriptors because of the variable size array in
188  * the middle (baSourceID).
189  */
190 typedef struct usb_audio_mixer_unit_descr1 {
191 	uint8_t	bLength;	/* size */
192 	uint8_t	bDescriptorType; /* CS_INTERFACE */
193 	uint8_t bDescriptorSubType; /* MIXER_UNIT */
194 	uint8_t bUnitID;	/* identifier */
195 	uint8_t bNrInPins;	/* # input pins */
196 	uint8_t baSourceID[1];	/* idenfifiers */
197 } usb_audio_mixer_unit_descr1_t;
198 
199 #define	CS_AC_MIXER_UNIT_DESCR1_FORMAT "cccccc"
200 #define	CS_AC_MIXER_UNIT_DESCR1_SIZE 6
201 
202 typedef struct usb_audio_mixer_unit_descr2 {
203 	uint8_t bNrChannels;	/* # channels */
204 	uint16_t wChannelConfig; /* location of channels */
205 	uint8_t iChannelNames;	/* string index */
206 	uint8_t	bmControls[1];	/* bitmap prog. ctlrs */
207 } usb_audio_mixer_unit_descr2_t;
208 
209 typedef struct usb_audio_mixer_unit_descr3 {
210 	uint8_t iMixer;	/* string index */
211 } usb_audio_mixer_unit_descr3_t;
212 
213 /* selector unit descriptor (4.3.2.4) */
214 typedef struct usb_audio_selector_unit_descr1 {
215 	uint8_t	bLength;	/* size */
216 	uint8_t	bDescriptorType; /* CS_INTERFACE */
217 	uint8_t bDescriptorSubType; /* SELECTOR_UNIT */
218 	uint8_t bUnitID;	/* identifier */
219 	uint8_t bNrInPins;	/* input pins on the unit */
220 	uint8_t baSourceID[1];	/* ID of pins */
221 } usb_audio_selector_unit_descr1_t;
222 
223 #define	CS_AC_SELECTOR_UNIT_DESCR1_FORMAT "cccccc"
224 #define	CS_AC_SELECTOR_UNIT_DESCR1_SIZE 6
225 
226 typedef struct usb_audio_selector_unit_descr2 {
227 	uint8_t iSelector[1];	/* string index */
228 } usb_audio_selector_unit_descr2_t;
229 
230 /* feature unit descriptor (4.3.2.5) */
231 typedef struct usb_audio_feature_unit_descr1 {
232 	uint8_t	bLength;	/* size */
233 	uint8_t	bDescriptorType; /* CS_INTERFACE */
234 	uint8_t bDescriptorSubType; /* FEATURE_UNIT */
235 	uint8_t bUnitID;	/* identifier */
236 	uint8_t bSourceID;	/* identifier */
237 	uint8_t bControlSize;	/* size of bmaControls */
238 	uint8_t bmaControls[1];	/* bitmap of features */
239 } usb_audio_feature_unit_descr1_t;
240 
241 #define	CS_AC_FEATURE_UNIT_FORMAT	"ccccccc"
242 #define	CS_AC_FEATURE_UNIT_SIZE		7
243 
244 typedef struct usb_audio_feature_unit_descr2 {
245 	uint8_t iFeature;	/* string index */
246 } usb_audio_feature_unit_descr2_t;
247 
248 /* processing unit descriptor (4.3.2.6) */
249 typedef struct usb_audio_processing_unit_descr1 {
250 	uint8_t	bLength;	/* size */
251 	uint8_t	bDescriptorType; /* CS_INTERFACE */
252 	uint8_t bDescriptorSubType; /* PROCESSING_UNIT */
253 	uint8_t bUnitID;	/* identifier */
254 	uint8_t	wProcessType;	/* type of processing */
255 	uint8_t bNrInPins;	/* input pins on the unit */
256 	uint8_t baSourceID[1];	/* ID of pins */
257 } usb_audio_processing_unit_descr1_t;
258 
259 #define	CS_AC_PROCESSING_UNIT_DESCR1_FORMAT	"ccccccc"
260 #define	CS_AC_PROCESSING_UNIT_DESCR1_SIZE	7
261 
262 typedef struct usb_audio_processing_unit_descr2 {
263 	uint8_t	bNrChannels;	/* # log. output channels */
264 	uint16_t wChannelConfig; /* spatial location */
265 	uint8_t iChannelnames;	/* index to name */
266 	uint8_t bControlSize;	/* size in bytes */
267 	uint8_t bmControls[1];	/* control bits */
268 } usb_audio_processing_unit_descr2_t;
269 
270 typedef struct usb_audio_processing_unit_descr3 {
271 	uint8_t iProcessing;	/* index to string descr */
272 	uint8_t Process_specific[1];
273 } usb_audio_processing_unit_descr3_t;
274 
275 /* extension unit descriptor (4.3.2.7) */
276 typedef struct usb_audio_extension_unit_descr1 {
277 	uint8_t	bLength;	/* size */
278 	uint8_t	bDescriptorType; /* CS_INTERFACE */
279 	uint8_t bDescriptorSubType; /* PROCESSING_UNIT */
280 	uint8_t wExtensionCode; /* vendor spec. */
281 	uint8_t bUnitID;	/* identifier */
282 	uint8_t bNrInPins;	/* input pins on the unit */
283 	uint8_t baSourceID[1];	/* ID of pins */
284 } usb_audio_extension_unit_descr1_t;
285 
286 #define	CS_AC_EXTENSION_UNIT_DESCR1_FORMAT	"ccccccc"
287 #define	CS_AC_EXTENSION_UNIT_DESCR1_SIZE	7
288 
289 typedef struct usb_audio_extension_unit_descr2 {
290 	uint8_t	bNrChannels;	/* # log. output channels */
291 	uint16_t wChannelConfig; /* spatial location */
292 	uint8_t iChannelnames;	/* index to name */
293 	uint8_t bControlSize;	/* size in bytes */
294 	uint8_t bmControls[1];	/* control bits */
295 } usb_audio_extension_unit_descr2_t;
296 
297 typedef struct usb_audio_extension_unit_descr3 {
298 	uint8_t iExtension;	/* index to string descr */
299 } usb_audio_extension_unit_descr3_t;
300 
301 
302 
303 /* associated interface descriptor (4.3.2.8) */
304 typedef struct usb_audio_associated_if_descr {
305 	uint8_t	blength;	/* size */
306 	uint8_t	bDescriptorType; /* CS_INTERFACE */
307 	uint8_t bDescriptorSubType; /* ASSOC Interface */
308 	uint8_t bInterfaceNr;	/* interface number */
309 } usb_audio_associated_if_descr_t;
310 
311 
312 /*
313  * class specific AS interface descriptor (4.5.2)
314  */
315 typedef struct usb_audio_as_if_descr {
316 	uint8_t	blength;	/* size */
317 	uint8_t	bDescriptorType; /* CS_INTERFACE */
318 	uint8_t bDescriptorSubType; /* AS_GENERAL */
319 	uint8_t bTerminalLink;	/* identifier */
320 	uint8_t bDelay;		/* delay in data path */
321 	uint16_t wFormatTag;	/* data format */
322 } usb_audio_as_if_descr_t;
323 
324 #define	AS_IF_DESCR_FORMAT	"cccccs"
325 #define	AS_IF_DESCR_SIZE	7
326 
327 
328 /* class specific AS isochronous audio data ep descr (4.6.1.2) */
329 typedef struct usb_audio_as_isoc_ep_descr {
330 	uint8_t	blength;	/* size */
331 	uint8_t	bDescriptorType; /* CS_ENDPOINT */
332 	uint8_t bDescriptorSubType; /* EP_GENERAL */
333 	uint8_t bmAttributes;	/* bitmap of attributes */
334 	uint8_t bLockDelayUnits; /* type of units */
335 	uint16_t wLockDelay;	/* lock of internal clock */
336 } usb_audio_as_isoc_ep_descr_t;
337 
338 #define	AS_ISOC_EP_DESCR_FORMAT "5cs"
339 #define	AS_ISOC_EP_DESCR_SIZE 7
340 
341 /*
342  * data format descriptor, no need for parse format since
343  * all fields are chars
344  */
345 typedef struct usb_audio_type1_format_descr {
346 	uint8_t	blength;	/* size */
347 	uint8_t	bDescriptorType; /* CS_INTERFACE */
348 	uint8_t bDescriptorSubType; /* FORMAT_TYPE */
349 	uint8_t	bFormatType;	/* FORMAT_TYPE_1 */
350 	uint8_t bNrChannels;	/* #phys channels */
351 	uint8_t bSubFrameSize;	/* bytes per frame */
352 	uint8_t bBitResolution;	/* bits in subframe */
353 	uint8_t bSamFreqType;	/* sampling freq type */
354 	uint8_t bSamFreqs[6];	/* sampling freqs */
355 } usb_audio_type1_format_descr_t;
356 
357 #define	AUDIO_TYPE1_FORMAT_FORMAT "10c"
358 #define	AUDIO_TYPE1_FORMAT_SIZE	10
359 
360 /* audio data format codes */
361 #define	USB_AUDIO_FORMAT_TYPE1_PCM		0x0001
362 #define	USB_AUDIO_FORMAT_TYPE1_PCM8		0x0002
363 #define	USB_AUDIO_FORMAT_TYPE1_IEEE_FLOAT	0x0003
364 #define	USB_AUDIO_FORMAT_TYPE1_ALAW		0x0004
365 #define	USB_AUDIO_FORMAT_TYPE1_MULAW		0x0005
366 
367 #define	USB_AUDIO_FORMAT_TYPE2_MPEG		0x1001
368 #define	USB_AUDIO_FORMAT_TYPE2_AC		0x1002
369 
370 #define	USB_AUDIO_FORMAT_TYPE3_IEC1937_AC_3	0x2001
371 #define	USB_AUDIO_FORMAT_TYPE3_IEC1937_MPEG1_L1	0x2002
372 #define	USB_AUDIO_FORMAT_TYPE3_IEC1937_MPEG1_L2	0x2003
373 #define	USB_AUDIO_FORMAT_TYPE3_IEC1937_MPEG2_NOEXT 0x2003
374 #define	USB_AUDIO_FORMAT_TYPE3_IEC1937_MPEG2_EXT 0x2004
375 #define	USB_AUDIO_FORMAT_TYPE3_IEC1937_MPEG2_L1_LS 0x2005
376 #define	USB_AUDIO_FORMAT_TYPE3_IEC1937_MPEG2_L2_LS 0x2006
377 
378 #define	USB_AUDIO_FORMAT_TYPE_1			0x01
379 #define	USB_AUDIO_FORMAT_TYPE_2			0x02
380 #define	USB_AUDIO_FORMAT_TYPE_3			0x03
381 
382 /* format specific control selectors */
383 #define	USB_AUDIO_MP_DUAL_CHANNEL_CONTROL	0x01
384 #define	USB_AUDIO_MP_SECOND_STEREO_CONTROL	0x02
385 #define	USB_AUDIO_MP_MULTILINGUAL		0x03
386 #define	USB_AUDIO_MP_DYN_RANGE_CONTROL		0x04
387 #define	USB_AUDIO_MP_SCALING_CONTROL		0x05
388 #define	USB_AUDIO_MP_HILO_SCALING_CONTROL	0x06
389 
390 #define	USB_AUDIO_AC_MODE_CONTROL		0x01
391 #define	USB_AUDIO_AC_DYN_RANGE_CONTROL		0x02
392 #define	USB_AUDIO_AC_SCALING_CONTROL		0x03
393 #define	USB_AUDIO_AC_HILO_SCALING_CONTROL	0x04
394 
395 /* From USB Device Class Definition for Terminal Types */
396 /* USB Terminal Types (2.1) */
397 #define	USB_AUDIO_TERM_TYPE_STREAMING		0x0101
398 #define	USB_AUDIO_TERM_TYPE_VS			0x01ff
399 
400 /* Input term types (2.2) */
401 #define	USB_AUDIO_TERM_TYPE_MICROPHONE		0x0201
402 #define	USB_AUDIO_TERM_TYPE_DT_MICROPHONE	0x0202
403 #define	USB_AUDIO_TERM_TYPE_PERS_MICROPHONE	0x0203
404 #define	USB_AUDIO_TERM_TYPE_OMNI_DIR_MICROPHONE	0x0204
405 #define	USB_AUDIO_TERM_TYPE_MICROPHONE_ARRAY	0x0205
406 #define	USB_AUDIO_TERM_TYPE_PROCESSING_MIC_ARRAY 0x0206
407 
408 /* output term types (2.3) */
409 #define	USB_AUDIO_TERM_TYPE_SPEAKER		0x0301
410 #define	USB_AUDIO_TERM_TYPE_HEADPHONES		0x0302
411 #define	USB_AUDIO_TERM_TYPE_DISPLAY_AUDIO	0x0303
412 #define	USB_AUDIO_TERM_TYPE_DT_SPEAKER		0x0304
413 #define	USB_AUDIO_TERM_TYPE_ROOM_SPEAKER	0x0305
414 #define	USB_AUDIO_TERM_TYPE_COMM_SPEAKER	0x0306
415 #define	USB_AUDIO_TERM_TYPE_LF_EFFECTS_SPEAKER	0x0307
416 
417 /* bi-directional terminal types (2.4) */
418 #define	USB_AUDIO_TERM_TYPE_HANDSET		0x0401
419 #define	USB_AUDIO_TERM_TYPE_HEADSET		0x0402
420 #define	USB_AUDIO_TERM_TYPE_SPEAKERPHONE	0x0403
421 #define	USB_AUDIO_TERM_TYPE_ECHO_SUPP_SPEAKERPHONE 0x0404
422 #define	USB_AUDIO_TERM_TYPE_ECHO_CANCEL_SPEAKERPHONE 0x0405
423 
424 /* telephony terminal types (2.5) */
425 #define	USB_AUDIO_TERM_TYPE_PHONE_LINE		0x0501
426 #define	USB_AUDIO_TERM_TYPE_TELEPHONE		0x0502
427 #define	USB_AUDIO_TERM_TYPE_DOWN_LINE_PHONE	0x0503
428 
429 /* external terminal types (2.6) */
430 #define	USB_AUDIO_TERM_TYPE_ANALOG_CONNECTOR	0x0601
431 #define	USB_AUDIO_TERM_TYPE_DIGITAL_AUDIO_IF	0x0602
432 #define	USB_AUDIO_TERM_TYPE_LINE_CONNECTOR	0x0603
433 #define	USB_AUDIO_TERM_TYPE_LEGACY_AUDIO_CONNECTOR 0x0604
434 #define	USB_AUDIO_TERM_TYPE_SPDIF_IF		0x0605
435 #define	USB_AUDIO_TERM_TYPE_1394_DA_STREAM	0x0606
436 #define	USB_AUDIO_TERM_TYPE_1394_DV_STREAM_SNDTRCK 0x0607
437 
438 /* embedded function term types (2.7) */
439 #define	USB_AUDIO_TERM_TYPE_LVL_CAL_NOISE_SRC	0x0701
440 #define	USB_AUDIO_TERM_TYPE_EQUAL_NOISE		0x0702
441 #define	USB_AUDIO_TERM_TYPE_CD_PLAYER		0x0703
442 #define	USB_AUDIO_TERM_TYPE_DAT			0x0704
443 #define	USB_AUDIO_TERM_TYPE_DCC			0x0705
444 #define	USB_AUDIO_TERM_TYPE_MINIDISK		0x0706
445 #define	USB_AUDIO_TERM_TYPE_ANALOG_TAPE		0x0707
446 #define	USB_AUDIO_TERM_TYPE_PHONOGRAPH		0x0708
447 #define	USB_AUDIO_TERM_TYPE_VCR_AUDIO		0x0709
448 #define	USB_AUDIO_TERM_TYPE_VIDEO_DISK_AUDIO	0x070A
449 #define	USB_AUDIO_TERM_TYPE_DVD_AUDIO		0x070B
450 #define	USB_AUDIO_TERM_TYPE_TV_TUNER_AUDIO	0x070C
451 #define	USB_AUDIO_TERM_TYPE_SATELLITE_RCV_AUDIO	0x070D
452 #define	USB_AUDIO_TERM_TYPE_CABLE_TUNER_AUDIO	0x070E
453 #define	USB_AUDIO_TERM_TYPE_CABLE_DSS_AUDIO	0x070F
454 #define	USB_AUDIO_TERM_TYPE_RADIO_RECEIVER	0x0710
455 #define	USB_AUDIO_TERM_TYPE_RADIO_TRANSMITTER	0x0711
456 #define	USB_AUDIO_TERM_TYPE_MULTI_TRACK_RECORDER 0x0712
457 #define	USB_AUDIO_TERM_TYPE_SYNTHESIZER		0x0713
458 
459 #define	PRINT_MASK_ATTA		0x00000001
460 #define	PRINT_MASK_CLOSE	0x00000002
461 #define	PRINT_MASK_OPEN		0x00000004
462 #define	PRINT_MASK_EVENTS	0x00000008
463 #define	PRINT_MASK_PM		0x00000010
464 #define	PRINT_MASK_CB		0x00000020
465 #define	PRINT_MASK_ALL		0xFFFFFFFF
466 
467 #define	USB_AUDIO_MIN_PKTSZ	0
468 #define	USB_AUDIO_MAX_PKTSZ	(4 * 1024)
469 
470 #define	USB_AUDIO_MUTE_ON	1
471 #define	USB_AUDIO_MUTE_OFF	0
472 
473 #define	USB_AUDIO_PRECISION_8	8
474 #define	USB_AUDIO_PRECISION_16	16
475 #define	USB_AUDIO_PRECISION_24	24
476 #define	USB_AUDIO_PRECISION_32	32
477 
478 #define	USB_AUDIO_PLAY		0x0001
479 #define	USB_AUDIO_RECORD	0x0002
480 
481 #ifdef __cplusplus
482 }
483 #endif
484 
485 #endif	/* _SYS_USB_AUDIO_H */
486