aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.de>2010-02-22 17:49:13 -0500
committerTakashi Iwai <tiwai@suse.de>2010-02-23 02:51:56 -0500
commitde48c7bc6f93c6c8e0be8612c9d72a2dc92eaa01 (patch)
treef27b2849a4f78959f7c448eaaafd7bca8cb8f8ac /include/linux/usb
parent7b8a043f2686af9f41e313a78ed5e98233e5fded (diff)
ALSA: usbaudio: consolidate header files
Use the definitions from linux/usb/audio.h all over the ALSA USB audio driver and add some missing definitions there as well. Use the endpoint attribute macros from linux/usb/ch9 and remove the own things from sound/usb/usbaudio.h. Now things are also nicely prefixed which makes understanding the code easier. Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/linux/usb')
-rw-r--r--include/linux/usb/audio.h31
1 files changed, 29 insertions, 2 deletions
diff --git a/include/linux/usb/audio.h b/include/linux/usb/audio.h
index fb1a97bf943d..6bb293684eb8 100644
--- a/include/linux/usb/audio.h
+++ b/include/linux/usb/audio.h
@@ -35,8 +35,17 @@
35#define UAC_MIXER_UNIT 0x04 35#define UAC_MIXER_UNIT 0x04
36#define UAC_SELECTOR_UNIT 0x05 36#define UAC_SELECTOR_UNIT 0x05
37#define UAC_FEATURE_UNIT 0x06 37#define UAC_FEATURE_UNIT 0x06
38#define UAC_PROCESSING_UNIT 0x07 38#define UAC_PROCESSING_UNIT_V1 0x07
39#define UAC_EXTENSION_UNIT 0x08 39#define UAC_EXTENSION_UNIT_V1 0x08
40
41/* UAC v2.0 types */
42#define UAC_EFFECT_UNIT 0x07
43#define UAC_PROCESSING_UNIT_V2 0x08
44#define UAC_EXTENSION_UNIT_V2 0x09
45#define UAC_CLOCK_SOURCE 0x0a
46#define UAC_CLOCK_SELECTOR 0x0b
47#define UAC_CLOCK_MULTIPLIER 0x0c
48#define UAC_SAMPLE_RATE_CONVERTER 0x0d
40 49
41/* A.6 Audio Class-Specific AS Interface Descriptor Subtypes */ 50/* A.6 Audio Class-Specific AS Interface Descriptor Subtypes */
42#define UAC_AS_GENERAL 0x01 51#define UAC_AS_GENERAL 0x01
@@ -69,6 +78,10 @@
69 78
70#define UAC_GET_STAT 0xff 79#define UAC_GET_STAT 0xff
71 80
81/* Audio class v2.0 handles all the parameter calls differently */
82#define UAC2_CS_CUR 0x01
83#define UAC2_CS_RANGE 0x02
84
72/* MIDI - A.1 MS Class-Specific Interface Descriptor Subtypes */ 85/* MIDI - A.1 MS Class-Specific Interface Descriptor Subtypes */
73#define UAC_MS_HEADER 0x01 86#define UAC_MS_HEADER 0x01
74#define UAC_MIDI_IN_JACK 0x02 87#define UAC_MIDI_IN_JACK 0x02
@@ -133,6 +146,10 @@ struct uac_input_terminal_descriptor {
133#define UAC_INPUT_TERMINAL_MICROPHONE_ARRAY 0x205 146#define UAC_INPUT_TERMINAL_MICROPHONE_ARRAY 0x205
134#define UAC_INPUT_TERMINAL_PROC_MICROPHONE_ARRAY 0x206 147#define UAC_INPUT_TERMINAL_PROC_MICROPHONE_ARRAY 0x206
135 148
149/* Terminals - control selectors */
150
151#define UAC_TERMINAL_CS_COPY_PROTECT_CONTROL 0x01
152
136/* 4.3.2.2 Output Terminal Descriptor */ 153/* 4.3.2.2 Output Terminal Descriptor */
137struct uac_output_terminal_descriptor_v1 { 154struct uac_output_terminal_descriptor_v1 {
138 __u8 bLength; /* in bytes: 9 */ 155 __u8 bLength; /* in bytes: 9 */
@@ -263,6 +280,9 @@ struct uac_format_type_i_ext_descriptor {
263 280
264/* Formats - Audio Data Format Type I Codes */ 281/* Formats - Audio Data Format Type I Codes */
265 282
283#define UAC_FORMAT_TYPE_II_MPEG 0x1001
284#define UAC_FORMAT_TYPE_II_AC3 0x1002
285
266struct uac_format_type_ii_discrete_descriptor { 286struct uac_format_type_ii_discrete_descriptor {
267 __u8 bLength; 287 __u8 bLength;
268 __u8 bDescriptorType; 288 __u8 bDescriptorType;
@@ -285,6 +305,13 @@ struct uac_format_type_ii_ext_descriptor {
285 __u8 bSideBandProtocol; 305 __u8 bSideBandProtocol;
286} __attribute__((packed)); 306} __attribute__((packed));
287 307
308/* type III */
309#define UAC_FORMAT_TYPE_III_IEC1937_AC3 0x2001
310#define UAC_FORMAT_TYPE_III_IEC1937_MPEG1_LAYER1 0x2002
311#define UAC_FORMAT_TYPE_III_IEC1937_MPEG2_NOEXT 0x2003
312#define UAC_FORMAT_TYPE_III_IEC1937_MPEG2_EXT 0x2004
313#define UAC_FORMAT_TYPE_III_IEC1937_MPEG2_LAYER1_LS 0x2005
314#define UAC_FORMAT_TYPE_III_IEC1937_MPEG2_LAYER23_LS 0x2006
288 315
289/* Formats - A.2 Format Type Codes */ 316/* Formats - A.2 Format Type Codes */
290#define UAC_FORMAT_TYPE_UNDEFINED 0x0 317#define UAC_FORMAT_TYPE_UNDEFINED 0x0