* better
[mascara-docs.git] / i386 / linux-2.3.21 / drivers / usb / audio.h
bloba0ecb51eee2e8ce338d8fedfceff0252fd0f26ee
1 #define USB_DT_CS_DEVICE 0x21
2 #define USB_DT_CS_CONFIG 0x22
3 #define USB_DT_CS_STRING 0x23
4 #define USB_DT_CS_INTERFACE 0x24
5 #define USB_DT_CS_ENDPOINT 0x25
7 #define CS_AUDIO_UNDEFINED 0x20
8 #define CS_AUDIO_DEVICE 0x21
9 #define CS_AUDIO_CONFIGURATION 0x22
10 #define CS_AUDIO_STRING 0x23
11 #define CS_AUDIO_INTERFACE 0x24
12 #define CS_AUDIO_ENDPOINT 0x25
14 #define HEADER 0x01
15 #define INPUT_TERMINAL 0x02
16 #define OUTPUT_TERMINAL 0x03
17 #define MIXER_UNIT 0x04
18 #define SELECTOR_UNIT 0x05
19 #define FEATURE_UNIT 0x06
20 #define PROCESSING_UNIT 0x07
21 #define EXTENSION_UNIT 0x08
23 #define AS_GENERAL 0x01
24 #define FORMAT_TYPE 0x02
25 #define FORMAT_SPECIFIC 0x03
27 #define EP_GENERAL 0x01
29 #define MAX_CHAN 9
30 #define MAX_FREQ 16
31 #define MAX_IFACE 8
32 #define MAX_FORMAT 8
33 #define MAX_ALT 8
35 struct usb_audio_terminal
37 u8 flags;
38 u8 assoc;
39 u16 type; /* Mic etc */
40 u8 channels;
41 u8 source;
42 u16 chancfg;
45 struct usb_audio_format
47 u8 type;
48 u8 channels;
49 u8 num_freq;
50 u8 sfz;
51 u8 bits;
52 u16 freq[MAX_FREQ];
55 struct usb_audio_interface
57 u8 terminal;
58 u8 delay;
59 u16 num_formats;
60 u16 format_type;
61 u8 flags;
62 u8 idleconf; /* Idle config */
63 #define AU_IFACE_FOUND 1
64 struct usb_audio_format format[MAX_FORMAT];
67 struct usb_audio_device
69 struct list_head list;
70 u8 mixer;
71 u8 selector;
72 void *irq_handle;
73 u8 num_channels;
74 u8 num_dsp_iface;
75 u8 channel_map[MAX_CHAN];
76 struct usb_audio_terminal terminal[MAX_CHAN];
77 struct usb_audio_interface interface[MAX_IFACE][MAX_ALT];
82 /* Audio Class specific Request Codes */
84 #define SET_CUR 0x01
85 #define GET_CUR 0x81
86 #define SET_MIN 0x02
87 #define GET_MIN 0x82
88 #define SET_MAX 0x03
89 #define GET_MAX 0x83
90 #define SET_RES 0x04
91 #define GET_RES 0x84
92 #define SET_MEM 0x05
93 #define GET_MEM 0x85
94 #define GET_STAT 0xff
96 /* Terminal Control Selectors */
98 #define COPY_PROTECT_CONTROL 0x01
100 /* Feature Unit Control Selectors */
102 #define MUTE_CONTROL 0x01
103 #define VOLUME_CONTROL 0x02
104 #define BASS_CONTROL 0x03
105 #define MID_CONTROL 0x04
106 #define TREBLE_CONTROL 0x05
107 #define GRAPHIC_EQUALIZER_CONTROL 0x06
108 #define AUTOMATIC_GAIN_CONTROL 0x07
109 #define DELAY_CONTROL 0x08
110 #define BASS_BOOST_CONTROL 0x09
111 #define LOUDNESS_CONTROL 0x0a
113 /* Endpoint Control Selectors */
115 #define SAMPLING_FREQ_CONTROL 0x01
116 #define PITCH_CONTROL 0x02