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