aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/usbaudio.h
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 /sound/usb/usbaudio.h
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 'sound/usb/usbaudio.h')
-rw-r--r--sound/usb/usbaudio.h100
1 files changed, 0 insertions, 100 deletions
diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h
index 26daf68631eb..6b016d4aac6b 100644
--- a/sound/usb/usbaudio.h
+++ b/sound/usb/usbaudio.h
@@ -21,106 +21,6 @@
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */ 22 */
23 23
24
25/*
26 */
27
28#define USB_SUBCLASS_AUDIO_CONTROL 0x01
29#define USB_SUBCLASS_AUDIO_STREAMING 0x02
30#define USB_SUBCLASS_MIDI_STREAMING 0x03
31#define USB_SUBCLASS_VENDOR_SPEC 0xff
32
33#define HEADER 0x01
34#define INPUT_TERMINAL 0x02
35#define OUTPUT_TERMINAL 0x03
36#define MIXER_UNIT 0x04
37#define SELECTOR_UNIT 0x05
38#define FEATURE_UNIT 0x06
39#define PROCESSING_UNIT_V1 0x07
40#define EXTENSION_UNIT_V1 0x08
41
42/* audio class v2 */
43#define EFFECT_UNIT 0x07
44#define PROCESSING_UNIT_V2 0x08
45#define EXTENSION_UNIT_V2 0x09
46#define CLOCK_SOURCE 0x0a
47#define CLOCK_SELECTOR 0x0b
48#define CLOCK_MULTIPLIER 0x0c
49#define SAMPLE_RATE_CONVERTER 0x0d
50
51#define AS_GENERAL 0x01
52#define FORMAT_TYPE 0x02
53#define FORMAT_SPECIFIC 0x03
54
55#define EP_GENERAL 0x01
56
57#define MS_GENERAL 0x01
58#define MIDI_IN_JACK 0x02
59#define MIDI_OUT_JACK 0x03
60
61/* endpoint attributes */
62#define EP_ATTR_MASK 0x0c
63#define EP_ATTR_ASYNC 0x04
64#define EP_ATTR_ADAPTIVE 0x08
65#define EP_ATTR_SYNC 0x0c
66
67/* cs endpoint attributes */
68#define EP_CS_ATTR_SAMPLE_RATE 0x01
69#define EP_CS_ATTR_PITCH_CONTROL 0x02
70#define EP_CS_ATTR_FILL_MAX 0x80
71
72/* Audio Class specific Request Codes (v1) */
73
74#define SET_CUR 0x01
75#define GET_CUR 0x81
76#define SET_MIN 0x02
77#define GET_MIN 0x82
78#define SET_MAX 0x03
79#define GET_MAX 0x83
80#define SET_RES 0x04
81#define GET_RES 0x84
82#define SET_MEM 0x05
83#define GET_MEM 0x85
84#define GET_STAT 0xff
85
86/* Audio Class specific Request Codes (v2) */
87#define CS_CUR 0x01
88#define CS_RANGE 0x02
89
90/* Terminal Control Selectors */
91
92#define COPY_PROTECT_CONTROL 0x01
93
94/* Endpoint Control Selectors */
95
96#define SAMPLING_FREQ_CONTROL 0x01
97#define PITCH_CONTROL 0x02
98
99/* Format Types */
100#define USB_FORMAT_TYPE_I 0x01
101#define USB_FORMAT_TYPE_II 0x02
102#define USB_FORMAT_TYPE_III 0x03
103
104/* type I */
105#define USB_AUDIO_FORMAT_PCM 0x01
106#define USB_AUDIO_FORMAT_PCM8 0x02
107#define USB_AUDIO_FORMAT_IEEE_FLOAT 0x03
108#define USB_AUDIO_FORMAT_ALAW 0x04
109#define USB_AUDIO_FORMAT_MU_LAW 0x05
110
111/* type II */
112#define USB_AUDIO_FORMAT_MPEG 0x1001
113#define USB_AUDIO_FORMAT_AC3 0x1002
114
115/* type III */
116#define USB_AUDIO_FORMAT_IEC1937_AC3 0x2001
117#define USB_AUDIO_FORMAT_IEC1937_MPEG1_LAYER1 0x2002
118#define USB_AUDIO_FORMAT_IEC1937_MPEG2_NOEXT 0x2003
119#define USB_AUDIO_FORMAT_IEC1937_MPEG2_EXT 0x2004
120#define USB_AUDIO_FORMAT_IEC1937_MPEG2_LAYER1_LS 0x2005
121#define USB_AUDIO_FORMAT_IEC1937_MPEG2_LAYER23_LS 0x2006
122
123
124/* maximum number of endpoints per interface */ 24/* maximum number of endpoints per interface */
125#define MIDI_MAX_ENDPOINTS 2 25#define MIDI_MAX_ENDPOINTS 2
126 26