diff options
Diffstat (limited to 'include/linux/usb')
-rw-r--r-- | include/linux/usb/audio.h | 258 |
1 files changed, 132 insertions, 126 deletions
diff --git a/include/linux/usb/audio.h b/include/linux/usb/audio.h index f75092aba02f..c3edfcb72c34 100644 --- a/include/linux/usb/audio.h +++ b/include/linux/usb/audio.h | |||
@@ -25,80 +25,77 @@ | |||
25 | #define USB_SUBCLASS_AUDIOSTREAMING 0x02 | 25 | #define USB_SUBCLASS_AUDIOSTREAMING 0x02 |
26 | #define USB_SUBCLASS_MIDISTREAMING 0x03 | 26 | #define USB_SUBCLASS_MIDISTREAMING 0x03 |
27 | 27 | ||
28 | /* A.5 Audio Class-Specific AC interface Descriptor Subtypes*/ | 28 | /* A.5 Audio Class-Specific AC Interface Descriptor Subtypes */ |
29 | #define HEADER 0x01 | 29 | #define UAC_HEADER 0x01 |
30 | #define INPUT_TERMINAL 0x02 | 30 | #define UAC_INPUT_TERMINAL 0x02 |
31 | #define OUTPUT_TERMINAL 0x03 | 31 | #define UAC_OUTPUT_TERMINAL 0x03 |
32 | #define MIXER_UNIT 0x04 | 32 | #define UAC_MIXER_UNIT 0x04 |
33 | #define SELECTOR_UNIT 0x05 | 33 | #define UAC_SELECTOR_UNIT 0x05 |
34 | #define FEATURE_UNIT 0x06 | 34 | #define UAC_FEATURE_UNIT 0x06 |
35 | #define PROCESSING_UNIT 0x07 | 35 | #define UAC_PROCESSING_UNIT 0x07 |
36 | #define EXTENSION_UNIT 0x08 | 36 | #define UAC_EXTENSION_UNIT 0x08 |
37 | 37 | ||
38 | #define AS_GENERAL 0x01 | 38 | /* A.6 Audio Class-Specific AS Interface Descriptor Subtypes */ |
39 | #define FORMAT_TYPE 0x02 | 39 | #define UAC_AS_GENERAL 0x01 |
40 | #define FORMAT_SPECIFIC 0x03 | 40 | #define UAC_FORMAT_TYPE 0x02 |
41 | 41 | #define UAC_FORMAT_SPECIFIC 0x03 | |
42 | #define EP_GENERAL 0x01 | 42 | |
43 | 43 | /* A.8 Audio Class-Specific Endpoint Descriptor Subtypes */ | |
44 | #define MS_GENERAL 0x01 | 44 | #define UAC_EP_GENERAL 0x01 |
45 | #define MIDI_IN_JACK 0x02 | 45 | |
46 | #define MIDI_OUT_JACK 0x03 | 46 | /* A.9 Audio Class-Specific Request Codes */ |
47 | 47 | #define UAC_SET_ 0x00 | |
48 | /* cs endpoint attributes */ | 48 | #define UAC_GET_ 0x80 |
49 | #define EP_CS_ATTR_SAMPLE_RATE 0x01 | 49 | |
50 | #define EP_CS_ATTR_PITCH_CONTROL 0x02 | 50 | #define UAC__CUR 0x1 |
51 | #define EP_CS_ATTR_FILL_MAX 0x80 | 51 | #define UAC__MIN 0x2 |
52 | 52 | #define UAC__MAX 0x3 | |
53 | /* Audio Class specific Request Codes */ | 53 | #define UAC__RES 0x4 |
54 | #define USB_AUDIO_SET_INTF 0x21 | 54 | #define UAC__MEM 0x5 |
55 | #define USB_AUDIO_SET_ENDPOINT 0x22 | 55 | |
56 | #define USB_AUDIO_GET_INTF 0xa1 | 56 | #define UAC_SET_CUR (UAC_SET_ | UAC__CUR) |
57 | #define USB_AUDIO_GET_ENDPOINT 0xa2 | 57 | #define UAC_GET_CUR (UAC_GET_ | UAC__CUR) |
58 | 58 | #define UAC_SET_MIN (UAC_SET_ | UAC__MIN) | |
59 | #define SET_ 0x00 | 59 | #define UAC_GET_MIN (UAC_GET_ | UAC__MIN) |
60 | #define GET_ 0x80 | 60 | #define UAC_SET_MAX (UAC_SET_ | UAC__MAX) |
61 | 61 | #define UAC_GET_MAX (UAC_GET_ | UAC__MAX) | |
62 | #define _CUR 0x1 | 62 | #define UAC_SET_RES (UAC_SET_ | UAC__RES) |
63 | #define _MIN 0x2 | 63 | #define UAC_GET_RES (UAC_GET_ | UAC__RES) |
64 | #define _MAX 0x3 | 64 | #define UAC_SET_MEM (UAC_SET_ | UAC__MEM) |
65 | #define _RES 0x4 | 65 | #define UAC_GET_MEM (UAC_GET_ | UAC__MEM) |
66 | #define _MEM 0x5 | 66 | |
67 | 67 | #define UAC_GET_STAT 0xff | |
68 | #define SET_CUR (SET_ | _CUR) | 68 | |
69 | #define GET_CUR (GET_ | _CUR) | 69 | /* MIDI - A.1 MS Class-Specific Interface Descriptor Subtypes */ |
70 | #define SET_MIN (SET_ | _MIN) | 70 | #define UAC_MS_HEADER 0x01 |
71 | #define GET_MIN (GET_ | _MIN) | 71 | #define UAC_MIDI_IN_JACK 0x02 |
72 | #define SET_MAX (SET_ | _MAX) | 72 | #define UAC_MIDI_OUT_JACK 0x03 |
73 | #define GET_MAX (GET_ | _MAX) | 73 | |
74 | #define SET_RES (SET_ | _RES) | 74 | /* MIDI - A.1 MS Class-Specific Endpoint Descriptor Subtypes */ |
75 | #define GET_RES (GET_ | _RES) | 75 | #define UAC_MS_GENERAL 0x01 |
76 | #define SET_MEM (SET_ | _MEM) | 76 | |
77 | #define GET_MEM (GET_ | _MEM) | 77 | /* Terminals - 2.1 USB Terminal Types */ |
78 | 78 | #define UAC_TERMINAL_UNDEFINED 0x100 | |
79 | #define GET_STAT 0xff | 79 | #define UAC_TERMINAL_STREAMING 0x101 |
80 | 80 | #define UAC_TERMINAL_VENDOR_SPEC 0x1FF | |
81 | #define USB_AC_TERMINAL_UNDEFINED 0x100 | ||
82 | #define USB_AC_TERMINAL_STREAMING 0x101 | ||
83 | #define USB_AC_TERMINAL_VENDOR_SPEC 0x1FF | ||
84 | 81 | ||
85 | /* Terminal Control Selectors */ | 82 | /* Terminal Control Selectors */ |
86 | /* 4.3.2 Class-Specific AC Interface Descriptor */ | 83 | /* 4.3.2 Class-Specific AC Interface Descriptor */ |
87 | struct usb_ac_header_descriptor { | 84 | struct uac_ac_header_descriptor { |
88 | __u8 bLength; /* 8 + n */ | 85 | __u8 bLength; /* 8 + n */ |
89 | __u8 bDescriptorType; /* USB_DT_CS_INTERFACE */ | 86 | __u8 bDescriptorType; /* USB_DT_CS_INTERFACE */ |
90 | __u8 bDescriptorSubtype; /* USB_MS_HEADER */ | 87 | __u8 bDescriptorSubtype; /* UAC_MS_HEADER */ |
91 | __le16 bcdADC; /* 0x0100 */ | 88 | __le16 bcdADC; /* 0x0100 */ |
92 | __le16 wTotalLength; /* includes Unit and Terminal desc. */ | 89 | __le16 wTotalLength; /* includes Unit and Terminal desc. */ |
93 | __u8 bInCollection; /* n */ | 90 | __u8 bInCollection; /* n */ |
94 | __u8 baInterfaceNr[]; /* [n] */ | 91 | __u8 baInterfaceNr[]; /* [n] */ |
95 | } __attribute__ ((packed)); | 92 | } __attribute__ ((packed)); |
96 | 93 | ||
97 | #define USB_DT_AC_HEADER_SIZE(n) (8 + (n)) | 94 | #define UAC_DT_AC_HEADER_SIZE(n) (8 + (n)) |
98 | 95 | ||
99 | /* As above, but more useful for defining your own descriptors: */ | 96 | /* As above, but more useful for defining your own descriptors: */ |
100 | #define DECLARE_USB_AC_HEADER_DESCRIPTOR(n) \ | 97 | #define DECLARE_UAC_AC_HEADER_DESCRIPTOR(n) \ |
101 | struct usb_ac_header_descriptor_##n { \ | 98 | struct uac_ac_header_descriptor_##n { \ |
102 | __u8 bLength; \ | 99 | __u8 bLength; \ |
103 | __u8 bDescriptorType; \ | 100 | __u8 bDescriptorType; \ |
104 | __u8 bDescriptorSubtype; \ | 101 | __u8 bDescriptorSubtype; \ |
@@ -109,7 +106,7 @@ struct usb_ac_header_descriptor_##n { \ | |||
109 | } __attribute__ ((packed)) | 106 | } __attribute__ ((packed)) |
110 | 107 | ||
111 | /* 4.3.2.1 Input Terminal Descriptor */ | 108 | /* 4.3.2.1 Input Terminal Descriptor */ |
112 | struct usb_input_terminal_descriptor { | 109 | struct uac_input_terminal_descriptor { |
113 | __u8 bLength; /* in bytes: 12 */ | 110 | __u8 bLength; /* in bytes: 12 */ |
114 | __u8 bDescriptorType; /* CS_INTERFACE descriptor type */ | 111 | __u8 bDescriptorType; /* CS_INTERFACE descriptor type */ |
115 | __u8 bDescriptorSubtype; /* INPUT_TERMINAL descriptor subtype */ | 112 | __u8 bDescriptorSubtype; /* INPUT_TERMINAL descriptor subtype */ |
@@ -122,18 +119,19 @@ struct usb_input_terminal_descriptor { | |||
122 | __u8 iTerminal; | 119 | __u8 iTerminal; |
123 | } __attribute__ ((packed)); | 120 | } __attribute__ ((packed)); |
124 | 121 | ||
125 | #define USB_DT_AC_INPUT_TERMINAL_SIZE 12 | 122 | #define UAC_DT_INPUT_TERMINAL_SIZE 12 |
126 | 123 | ||
127 | #define USB_AC_INPUT_TERMINAL_UNDEFINED 0x200 | 124 | /* Terminals - 2.2 Input Terminal Types */ |
128 | #define USB_AC_INPUT_TERMINAL_MICROPHONE 0x201 | 125 | #define UAC_INPUT_TERMINAL_UNDEFINED 0x200 |
129 | #define USB_AC_INPUT_TERMINAL_DESKTOP_MICROPHONE 0x202 | 126 | #define UAC_INPUT_TERMINAL_MICROPHONE 0x201 |
130 | #define USB_AC_INPUT_TERMINAL_PERSONAL_MICROPHONE 0x203 | 127 | #define UAC_INPUT_TERMINAL_DESKTOP_MICROPHONE 0x202 |
131 | #define USB_AC_INPUT_TERMINAL_OMNI_DIR_MICROPHONE 0x204 | 128 | #define UAC_INPUT_TERMINAL_PERSONAL_MICROPHONE 0x203 |
132 | #define USB_AC_INPUT_TERMINAL_MICROPHONE_ARRAY 0x205 | 129 | #define UAC_INPUT_TERMINAL_OMNI_DIR_MICROPHONE 0x204 |
133 | #define USB_AC_INPUT_TERMINAL_PROC_MICROPHONE_ARRAY 0x206 | 130 | #define UAC_INPUT_TERMINAL_MICROPHONE_ARRAY 0x205 |
131 | #define UAC_INPUT_TERMINAL_PROC_MICROPHONE_ARRAY 0x206 | ||
134 | 132 | ||
135 | /* 4.3.2.2 Output Terminal Descriptor */ | 133 | /* 4.3.2.2 Output Terminal Descriptor */ |
136 | struct usb_output_terminal_descriptor { | 134 | struct uac_output_terminal_descriptor { |
137 | __u8 bLength; /* in bytes: 9 */ | 135 | __u8 bLength; /* in bytes: 9 */ |
138 | __u8 bDescriptorType; /* CS_INTERFACE descriptor type */ | 136 | __u8 bDescriptorType; /* CS_INTERFACE descriptor type */ |
139 | __u8 bDescriptorSubtype; /* OUTPUT_TERMINAL descriptor subtype */ | 137 | __u8 bDescriptorSubtype; /* OUTPUT_TERMINAL descriptor subtype */ |
@@ -144,23 +142,24 @@ struct usb_output_terminal_descriptor { | |||
144 | __u8 iTerminal; | 142 | __u8 iTerminal; |
145 | } __attribute__ ((packed)); | 143 | } __attribute__ ((packed)); |
146 | 144 | ||
147 | #define USB_DT_AC_OUTPUT_TERMINAL_SIZE 9 | 145 | #define UAC_DT_OUTPUT_TERMINAL_SIZE 9 |
148 | 146 | ||
149 | #define USB_AC_OUTPUT_TERMINAL_UNDEFINED 0x300 | 147 | /* Terminals - 2.3 Output Terminal Types */ |
150 | #define USB_AC_OUTPUT_TERMINAL_SPEAKER 0x301 | 148 | #define UAC_OUTPUT_TERMINAL_UNDEFINED 0x300 |
151 | #define USB_AC_OUTPUT_TERMINAL_HEADPHONES 0x302 | 149 | #define UAC_OUTPUT_TERMINAL_SPEAKER 0x301 |
152 | #define USB_AC_OUTPUT_TERMINAL_HEAD_MOUNTED_DISPLAY_AUDIO 0x303 | 150 | #define UAC_OUTPUT_TERMINAL_HEADPHONES 0x302 |
153 | #define USB_AC_OUTPUT_TERMINAL_DESKTOP_SPEAKER 0x304 | 151 | #define UAC_OUTPUT_TERMINAL_HEAD_MOUNTED_DISPLAY_AUDIO 0x303 |
154 | #define USB_AC_OUTPUT_TERMINAL_ROOM_SPEAKER 0x305 | 152 | #define UAC_OUTPUT_TERMINAL_DESKTOP_SPEAKER 0x304 |
155 | #define USB_AC_OUTPUT_TERMINAL_COMMUNICATION_SPEAKER 0x306 | 153 | #define UAC_OUTPUT_TERMINAL_ROOM_SPEAKER 0x305 |
156 | #define USB_AC_OUTPUT_TERMINAL_LOW_FREQ_EFFECTS_SPEAKER 0x307 | 154 | #define UAC_OUTPUT_TERMINAL_COMMUNICATION_SPEAKER 0x306 |
155 | #define UAC_OUTPUT_TERMINAL_LOW_FREQ_EFFECTS_SPEAKER 0x307 | ||
157 | 156 | ||
158 | /* Set bControlSize = 2 as default setting */ | 157 | /* Set bControlSize = 2 as default setting */ |
159 | #define USB_DT_AC_FEATURE_UNIT_SIZE(ch) (7 + ((ch) + 1) * 2) | 158 | #define UAC_DT_FEATURE_UNIT_SIZE(ch) (7 + ((ch) + 1) * 2) |
160 | 159 | ||
161 | /* As above, but more useful for defining your own descriptors: */ | 160 | /* As above, but more useful for defining your own descriptors: */ |
162 | #define DECLARE_USB_AC_FEATURE_UNIT_DESCRIPTOR(ch) \ | 161 | #define DECLARE_UAC_FEATURE_UNIT_DESCRIPTOR(ch) \ |
163 | struct usb_ac_feature_unit_descriptor_##ch { \ | 162 | struct uac_feature_unit_descriptor_##ch { \ |
164 | __u8 bLength; \ | 163 | __u8 bLength; \ |
165 | __u8 bDescriptorType; \ | 164 | __u8 bDescriptorType; \ |
166 | __u8 bDescriptorSubtype; \ | 165 | __u8 bDescriptorSubtype; \ |
@@ -172,7 +171,7 @@ struct usb_ac_feature_unit_descriptor_##ch { \ | |||
172 | } __attribute__ ((packed)) | 171 | } __attribute__ ((packed)) |
173 | 172 | ||
174 | /* 4.5.2 Class-Specific AS Interface Descriptor */ | 173 | /* 4.5.2 Class-Specific AS Interface Descriptor */ |
175 | struct usb_as_header_descriptor { | 174 | struct uac_as_header_descriptor { |
176 | __u8 bLength; /* in bytes: 7 */ | 175 | __u8 bLength; /* in bytes: 7 */ |
177 | __u8 bDescriptorType; /* USB_DT_CS_INTERFACE */ | 176 | __u8 bDescriptorType; /* USB_DT_CS_INTERFACE */ |
178 | __u8 bDescriptorSubtype; /* AS_GENERAL */ | 177 | __u8 bDescriptorSubtype; /* AS_GENERAL */ |
@@ -181,16 +180,17 @@ struct usb_as_header_descriptor { | |||
181 | __le16 wFormatTag; /* The Audio Data Format */ | 180 | __le16 wFormatTag; /* The Audio Data Format */ |
182 | } __attribute__ ((packed)); | 181 | } __attribute__ ((packed)); |
183 | 182 | ||
184 | #define USB_DT_AS_HEADER_SIZE 7 | 183 | #define UAC_DT_AS_HEADER_SIZE 7 |
185 | 184 | ||
186 | #define USB_AS_AUDIO_FORMAT_TYPE_I_UNDEFINED 0x0 | 185 | /* Formats - A.1.1 Audio Data Format Type I Codes */ |
187 | #define USB_AS_AUDIO_FORMAT_TYPE_I_PCM 0x1 | 186 | #define UAC_FORMAT_TYPE_I_UNDEFINED 0x0 |
188 | #define USB_AS_AUDIO_FORMAT_TYPE_I_PCM8 0x2 | 187 | #define UAC_FORMAT_TYPE_I_PCM 0x1 |
189 | #define USB_AS_AUDIO_FORMAT_TYPE_I_IEEE_FLOAT 0x3 | 188 | #define UAC_FORMAT_TYPE_I_PCM8 0x2 |
190 | #define USB_AS_AUDIO_FORMAT_TYPE_I_ALAW 0x4 | 189 | #define UAC_FORMAT_TYPE_I_IEEE_FLOAT 0x3 |
191 | #define USB_AS_AUDIO_FORMAT_TYPE_I_MULAW 0x5 | 190 | #define UAC_FORMAT_TYPE_I_ALAW 0x4 |
191 | #define UAC_FORMAT_TYPE_I_MULAW 0x5 | ||
192 | 192 | ||
193 | struct usb_as_format_type_i_continuous_descriptor { | 193 | struct uac_format_type_i_continuous_descriptor { |
194 | __u8 bLength; /* in bytes: 8 + (ns * 3) */ | 194 | __u8 bLength; /* in bytes: 8 + (ns * 3) */ |
195 | __u8 bDescriptorType; /* USB_DT_CS_INTERFACE */ | 195 | __u8 bDescriptorType; /* USB_DT_CS_INTERFACE */ |
196 | __u8 bDescriptorSubtype; /* FORMAT_TYPE */ | 196 | __u8 bDescriptorSubtype; /* FORMAT_TYPE */ |
@@ -203,9 +203,9 @@ struct usb_as_format_type_i_continuous_descriptor { | |||
203 | __u8 tUpperSamFreq[3]; | 203 | __u8 tUpperSamFreq[3]; |
204 | } __attribute__ ((packed)); | 204 | } __attribute__ ((packed)); |
205 | 205 | ||
206 | #define USB_AS_FORMAT_TYPE_I_CONTINUOUS_DESC_SIZE 14 | 206 | #define UAC_FORMAT_TYPE_I_CONTINUOUS_DESC_SIZE 14 |
207 | 207 | ||
208 | struct usb_as_formate_type_i_discrete_descriptor { | 208 | struct uac_format_type_i_discrete_descriptor { |
209 | __u8 bLength; /* in bytes: 8 + (ns * 3) */ | 209 | __u8 bLength; /* in bytes: 8 + (ns * 3) */ |
210 | __u8 bDescriptorType; /* USB_DT_CS_INTERFACE */ | 210 | __u8 bDescriptorType; /* USB_DT_CS_INTERFACE */ |
211 | __u8 bDescriptorSubtype; /* FORMAT_TYPE */ | 211 | __u8 bDescriptorSubtype; /* FORMAT_TYPE */ |
@@ -217,8 +217,8 @@ struct usb_as_formate_type_i_discrete_descriptor { | |||
217 | __u8 tSamFreq[][3]; | 217 | __u8 tSamFreq[][3]; |
218 | } __attribute__ ((packed)); | 218 | } __attribute__ ((packed)); |
219 | 219 | ||
220 | #define DECLARE_USB_AS_FORMAT_TYPE_I_DISCRETE_DESC(n) \ | 220 | #define DECLARE_UAC_FORMAT_TYPE_I_DISCRETE_DESC(n) \ |
221 | struct usb_as_formate_type_i_discrete_descriptor_##n { \ | 221 | struct uac_format_type_i_discrete_descriptor_##n { \ |
222 | __u8 bLength; \ | 222 | __u8 bLength; \ |
223 | __u8 bDescriptorType; \ | 223 | __u8 bDescriptorType; \ |
224 | __u8 bDescriptorSubtype; \ | 224 | __u8 bDescriptorSubtype; \ |
@@ -230,14 +230,15 @@ struct usb_as_formate_type_i_discrete_descriptor_##n { \ | |||
230 | __u8 tSamFreq[n][3]; \ | 230 | __u8 tSamFreq[n][3]; \ |
231 | } __attribute__ ((packed)) | 231 | } __attribute__ ((packed)) |
232 | 232 | ||
233 | #define USB_AS_FORMAT_TYPE_I_DISCRETE_DESC_SIZE(n) (8 + (n * 3)) | 233 | #define UAC_FORMAT_TYPE_I_DISCRETE_DESC_SIZE(n) (8 + (n * 3)) |
234 | 234 | ||
235 | #define USB_AS_FORMAT_TYPE_UNDEFINED 0x0 | 235 | /* Formats - A.2 Format Type Codes */ |
236 | #define USB_AS_FORMAT_TYPE_I 0x1 | 236 | #define UAC_FORMAT_TYPE_UNDEFINED 0x0 |
237 | #define USB_AS_FORMAT_TYPE_II 0x2 | 237 | #define UAC_FORMAT_TYPE_I 0x1 |
238 | #define USB_AS_FORMAT_TYPE_III 0x3 | 238 | #define UAC_FORMAT_TYPE_II 0x2 |
239 | #define UAC_FORMAT_TYPE_III 0x3 | ||
239 | 240 | ||
240 | struct usb_as_iso_endpoint_descriptor { | 241 | struct uac_iso_endpoint_descriptor { |
241 | __u8 bLength; /* in bytes: 7 */ | 242 | __u8 bLength; /* in bytes: 7 */ |
242 | __u8 bDescriptorType; /* USB_DT_CS_ENDPOINT */ | 243 | __u8 bDescriptorType; /* USB_DT_CS_ENDPOINT */ |
243 | __u8 bDescriptorSubtype; /* EP_GENERAL */ | 244 | __u8 bDescriptorSubtype; /* EP_GENERAL */ |
@@ -245,30 +246,35 @@ struct usb_as_iso_endpoint_descriptor { | |||
245 | __u8 bLockDelayUnits; | 246 | __u8 bLockDelayUnits; |
246 | __le16 wLockDelay; | 247 | __le16 wLockDelay; |
247 | }; | 248 | }; |
248 | #define USB_AS_ISO_ENDPOINT_DESC_SIZE 7 | 249 | #define UAC_ISO_ENDPOINT_DESC_SIZE 7 |
249 | 250 | ||
250 | #define FU_CONTROL_UNDEFINED 0x00 | 251 | #define UAC_EP_CS_ATTR_SAMPLE_RATE 0x01 |
251 | #define MUTE_CONTROL 0x01 | 252 | #define UAC_EP_CS_ATTR_PITCH_CONTROL 0x02 |
252 | #define VOLUME_CONTROL 0x02 | 253 | #define UAC_EP_CS_ATTR_FILL_MAX 0x80 |
253 | #define BASS_CONTROL 0x03 | 254 | |
254 | #define MID_CONTROL 0x04 | 255 | /* A.10.2 Feature Unit Control Selectors */ |
255 | #define TREBLE_CONTROL 0x05 | 256 | #define UAC_FU_CONTROL_UNDEFINED 0x00 |
256 | #define GRAPHIC_EQUALIZER_CONTROL 0x06 | 257 | #define UAC_MUTE_CONTROL 0x01 |
257 | #define AUTOMATIC_GAIN_CONTROL 0x07 | 258 | #define UAC_VOLUME_CONTROL 0x02 |
258 | #define DELAY_CONTROL 0x08 | 259 | #define UAC_BASS_CONTROL 0x03 |
259 | #define BASS_BOOST_CONTROL 0x09 | 260 | #define UAC_MID_CONTROL 0x04 |
260 | #define LOUDNESS_CONTROL 0x0a | 261 | #define UAC_TREBLE_CONTROL 0x05 |
261 | 262 | #define UAC_GRAPHIC_EQUALIZER_CONTROL 0x06 | |
262 | #define FU_MUTE (1 << (MUTE_CONTROL - 1)) | 263 | #define UAC_AUTOMATIC_GAIN_CONTROL 0x07 |
263 | #define FU_VOLUME (1 << (VOLUME_CONTROL - 1)) | 264 | #define UAC_DELAY_CONTROL 0x08 |
264 | #define FU_BASS (1 << (BASS_CONTROL - 1)) | 265 | #define UAC_BASS_BOOST_CONTROL 0x09 |
265 | #define FU_MID (1 << (MID_CONTROL - 1)) | 266 | #define UAC_LOUDNESS_CONTROL 0x0a |
266 | #define FU_TREBLE (1 << (TREBLE_CONTROL - 1)) | 267 | |
267 | #define FU_GRAPHIC_EQ (1 << (GRAPHIC_EQUALIZER_CONTROL - 1)) | 268 | #define UAC_FU_MUTE (1 << (UAC_MUTE_CONTROL - 1)) |
268 | #define FU_AUTO_GAIN (1 << (AUTOMATIC_GAIN_CONTROL - 1)) | 269 | #define UAC_FU_VOLUME (1 << (UAC_VOLUME_CONTROL - 1)) |
269 | #define FU_DELAY (1 << (DELAY_CONTROL - 1)) | 270 | #define UAC_FU_BASS (1 << (UAC_BASS_CONTROL - 1)) |
270 | #define FU_BASS_BOOST (1 << (BASS_BOOST_CONTROL - 1)) | 271 | #define UAC_FU_MID (1 << (UAC_MID_CONTROL - 1)) |
271 | #define FU_LOUDNESS (1 << (LOUDNESS_CONTROL - 1)) | 272 | #define UAC_FU_TREBLE (1 << (UAC_TREBLE_CONTROL - 1)) |
273 | #define UAC_FU_GRAPHIC_EQ (1 << (UAC_GRAPHIC_EQUALIZER_CONTROL - 1)) | ||
274 | #define UAC_FU_AUTO_GAIN (1 << (UAC_AUTOMATIC_GAIN_CONTROL - 1)) | ||
275 | #define UAC_FU_DELAY (1 << (UAC_DELAY_CONTROL - 1)) | ||
276 | #define UAC_FU_BASS_BOOST (1 << (UAC_BASS_BOOST_CONTROL - 1)) | ||
277 | #define UAC_FU_LOUDNESS (1 << (UAC_LOUDNESS_CONTROL - 1)) | ||
272 | 278 | ||
273 | struct usb_audio_control { | 279 | struct usb_audio_control { |
274 | struct list_head list; | 280 | struct list_head list; |