Commit 066624c6a1733a72a67f1d06d35a2153e7d9082b

Authored by Przemek Rudy
Committed by Takashi Iwai
1 parent accaf69da1

ALSA: usb-audio: Add Audio Advantage Micro II

This patch is adding extensive support (beside standard usb audio class)
for Audio Advantage Micro II usb sound card.
Features included:
- Access to AES bits (so now sending the IEC61937 compliant stream is
possible).
- Mixer SPDIF control added to turn on/off the optical transmitter.

Signed-off-by: Przemek Rudy <prudy1@o2.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

Showing 2 changed files with 224 additions and 0 deletions Inline Diff

sound/usb/mixer_quirks.c
1 /* 1 /*
2 * USB Audio Driver for ALSA 2 * USB Audio Driver for ALSA
3 * 3 *
4 * Quirks and vendor-specific extensions for mixer interfaces 4 * Quirks and vendor-specific extensions for mixer interfaces
5 * 5 *
6 * Copyright (c) 2002 by Takashi Iwai <tiwai@suse.de> 6 * Copyright (c) 2002 by Takashi Iwai <tiwai@suse.de>
7 * 7 *
8 * Many codes borrowed from audio.c by 8 * Many codes borrowed from audio.c by
9 * Alan Cox (alan@lxorguk.ukuu.org.uk) 9 * Alan Cox (alan@lxorguk.ukuu.org.uk)
10 * Thomas Sailer (sailer@ife.ee.ethz.ch) 10 * Thomas Sailer (sailer@ife.ee.ethz.ch)
11 * 11 *
12 * Audio Advantage Micro II support added by:
13 * Przemek Rudy (prudy1@o2.pl)
12 * 14 *
13 * This program is free software; you can redistribute it and/or modify 15 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by 16 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or 17 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version. 18 * (at your option) any later version.
17 * 19 *
18 * This program is distributed in the hope that it will be useful, 20 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details. 23 * GNU General Public License for more details.
22 * 24 *
23 * You should have received a copy of the GNU General Public License 25 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software 26 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 27 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 */ 28 */
27 29
28 #include <linux/init.h> 30 #include <linux/init.h>
29 #include <linux/slab.h> 31 #include <linux/slab.h>
30 #include <linux/usb.h> 32 #include <linux/usb.h>
31 #include <linux/usb/audio.h> 33 #include <linux/usb/audio.h>
32 34
35 #include <sound/asoundef.h>
33 #include <sound/core.h> 36 #include <sound/core.h>
34 #include <sound/control.h> 37 #include <sound/control.h>
35 #include <sound/hwdep.h> 38 #include <sound/hwdep.h>
36 #include <sound/info.h> 39 #include <sound/info.h>
37 40
38 #include "usbaudio.h" 41 #include "usbaudio.h"
39 #include "mixer.h" 42 #include "mixer.h"
40 #include "mixer_quirks.h" 43 #include "mixer_quirks.h"
41 #include "helper.h" 44 #include "helper.h"
42 45
43 extern struct snd_kcontrol_new *snd_usb_feature_unit_ctl; 46 extern struct snd_kcontrol_new *snd_usb_feature_unit_ctl;
44 47
45 struct std_mono_table { 48 struct std_mono_table {
46 unsigned int unitid, control, cmask; 49 unsigned int unitid, control, cmask;
47 int val_type; 50 int val_type;
48 const char *name; 51 const char *name;
49 snd_kcontrol_tlv_rw_t *tlv_callback; 52 snd_kcontrol_tlv_rw_t *tlv_callback;
50 }; 53 };
51 54
52 /* private_free callback */ 55 /* private_free callback */
53 static void usb_mixer_elem_free(struct snd_kcontrol *kctl) 56 static void usb_mixer_elem_free(struct snd_kcontrol *kctl)
54 { 57 {
55 kfree(kctl->private_data); 58 kfree(kctl->private_data);
56 kctl->private_data = NULL; 59 kctl->private_data = NULL;
57 } 60 }
58 61
59 /* This function allows for the creation of standard UAC controls. 62 /* This function allows for the creation of standard UAC controls.
60 * See the quirks for M-Audio FTUs or Ebox-44. 63 * See the quirks for M-Audio FTUs or Ebox-44.
61 * If you don't want to set a TLV callback pass NULL. 64 * If you don't want to set a TLV callback pass NULL.
62 * 65 *
63 * Since there doesn't seem to be a devices that needs a multichannel 66 * Since there doesn't seem to be a devices that needs a multichannel
64 * version, we keep it mono for simplicity. 67 * version, we keep it mono for simplicity.
65 */ 68 */
66 static int snd_create_std_mono_ctl_offset(struct usb_mixer_interface *mixer, 69 static int snd_create_std_mono_ctl_offset(struct usb_mixer_interface *mixer,
67 unsigned int unitid, 70 unsigned int unitid,
68 unsigned int control, 71 unsigned int control,
69 unsigned int cmask, 72 unsigned int cmask,
70 int val_type, 73 int val_type,
71 unsigned int idx_off, 74 unsigned int idx_off,
72 const char *name, 75 const char *name,
73 snd_kcontrol_tlv_rw_t *tlv_callback) 76 snd_kcontrol_tlv_rw_t *tlv_callback)
74 { 77 {
75 int err; 78 int err;
76 struct usb_mixer_elem_info *cval; 79 struct usb_mixer_elem_info *cval;
77 struct snd_kcontrol *kctl; 80 struct snd_kcontrol *kctl;
78 81
79 cval = kzalloc(sizeof(*cval), GFP_KERNEL); 82 cval = kzalloc(sizeof(*cval), GFP_KERNEL);
80 if (!cval) 83 if (!cval)
81 return -ENOMEM; 84 return -ENOMEM;
82 85
83 cval->id = unitid; 86 cval->id = unitid;
84 cval->mixer = mixer; 87 cval->mixer = mixer;
85 cval->val_type = val_type; 88 cval->val_type = val_type;
86 cval->channels = 1; 89 cval->channels = 1;
87 cval->control = control; 90 cval->control = control;
88 cval->cmask = cmask; 91 cval->cmask = cmask;
89 cval->idx_off = idx_off; 92 cval->idx_off = idx_off;
90 93
91 /* get_min_max() is called only for integer volumes later, 94 /* get_min_max() is called only for integer volumes later,
92 * so provide a short-cut for booleans */ 95 * so provide a short-cut for booleans */
93 cval->min = 0; 96 cval->min = 0;
94 cval->max = 1; 97 cval->max = 1;
95 cval->res = 0; 98 cval->res = 0;
96 cval->dBmin = 0; 99 cval->dBmin = 0;
97 cval->dBmax = 0; 100 cval->dBmax = 0;
98 101
99 /* Create control */ 102 /* Create control */
100 kctl = snd_ctl_new1(snd_usb_feature_unit_ctl, cval); 103 kctl = snd_ctl_new1(snd_usb_feature_unit_ctl, cval);
101 if (!kctl) { 104 if (!kctl) {
102 kfree(cval); 105 kfree(cval);
103 return -ENOMEM; 106 return -ENOMEM;
104 } 107 }
105 108
106 /* Set name */ 109 /* Set name */
107 snprintf(kctl->id.name, sizeof(kctl->id.name), name); 110 snprintf(kctl->id.name, sizeof(kctl->id.name), name);
108 kctl->private_free = usb_mixer_elem_free; 111 kctl->private_free = usb_mixer_elem_free;
109 112
110 /* set TLV */ 113 /* set TLV */
111 if (tlv_callback) { 114 if (tlv_callback) {
112 kctl->tlv.c = tlv_callback; 115 kctl->tlv.c = tlv_callback;
113 kctl->vd[0].access |= 116 kctl->vd[0].access |=
114 SNDRV_CTL_ELEM_ACCESS_TLV_READ | 117 SNDRV_CTL_ELEM_ACCESS_TLV_READ |
115 SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK; 118 SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK;
116 } 119 }
117 /* Add control to mixer */ 120 /* Add control to mixer */
118 err = snd_usb_mixer_add_control(mixer, kctl); 121 err = snd_usb_mixer_add_control(mixer, kctl);
119 if (err < 0) 122 if (err < 0)
120 return err; 123 return err;
121 124
122 return 0; 125 return 0;
123 } 126 }
124 127
125 static int snd_create_std_mono_ctl(struct usb_mixer_interface *mixer, 128 static int snd_create_std_mono_ctl(struct usb_mixer_interface *mixer,
126 unsigned int unitid, 129 unsigned int unitid,
127 unsigned int control, 130 unsigned int control,
128 unsigned int cmask, 131 unsigned int cmask,
129 int val_type, 132 int val_type,
130 const char *name, 133 const char *name,
131 snd_kcontrol_tlv_rw_t *tlv_callback) 134 snd_kcontrol_tlv_rw_t *tlv_callback)
132 { 135 {
133 return snd_create_std_mono_ctl_offset(mixer, unitid, control, cmask, 136 return snd_create_std_mono_ctl_offset(mixer, unitid, control, cmask,
134 val_type, 0 /* Offset */, name, tlv_callback); 137 val_type, 0 /* Offset */, name, tlv_callback);
135 } 138 }
136 139
137 /* 140 /*
138 * Create a set of standard UAC controls from a table 141 * Create a set of standard UAC controls from a table
139 */ 142 */
140 static int snd_create_std_mono_table(struct usb_mixer_interface *mixer, 143 static int snd_create_std_mono_table(struct usb_mixer_interface *mixer,
141 struct std_mono_table *t) 144 struct std_mono_table *t)
142 { 145 {
143 int err; 146 int err;
144 147
145 while (t->name != NULL) { 148 while (t->name != NULL) {
146 err = snd_create_std_mono_ctl(mixer, t->unitid, t->control, 149 err = snd_create_std_mono_ctl(mixer, t->unitid, t->control,
147 t->cmask, t->val_type, t->name, t->tlv_callback); 150 t->cmask, t->val_type, t->name, t->tlv_callback);
148 if (err < 0) 151 if (err < 0)
149 return err; 152 return err;
150 t++; 153 t++;
151 } 154 }
152 155
153 return 0; 156 return 0;
154 } 157 }
155 158
156 /* 159 /*
157 * Sound Blaster remote control configuration 160 * Sound Blaster remote control configuration
158 * 161 *
159 * format of remote control data: 162 * format of remote control data:
160 * Extigy: xx 00 163 * Extigy: xx 00
161 * Audigy 2 NX: 06 80 xx 00 00 00 164 * Audigy 2 NX: 06 80 xx 00 00 00
162 * Live! 24-bit: 06 80 xx yy 22 83 165 * Live! 24-bit: 06 80 xx yy 22 83
163 */ 166 */
164 static const struct rc_config { 167 static const struct rc_config {
165 u32 usb_id; 168 u32 usb_id;
166 u8 offset; 169 u8 offset;
167 u8 length; 170 u8 length;
168 u8 packet_length; 171 u8 packet_length;
169 u8 min_packet_length; /* minimum accepted length of the URB result */ 172 u8 min_packet_length; /* minimum accepted length of the URB result */
170 u8 mute_mixer_id; 173 u8 mute_mixer_id;
171 u32 mute_code; 174 u32 mute_code;
172 } rc_configs[] = { 175 } rc_configs[] = {
173 { USB_ID(0x041e, 0x3000), 0, 1, 2, 1, 18, 0x0013 }, /* Extigy */ 176 { USB_ID(0x041e, 0x3000), 0, 1, 2, 1, 18, 0x0013 }, /* Extigy */
174 { USB_ID(0x041e, 0x3020), 2, 1, 6, 6, 18, 0x0013 }, /* Audigy 2 NX */ 177 { USB_ID(0x041e, 0x3020), 2, 1, 6, 6, 18, 0x0013 }, /* Audigy 2 NX */
175 { USB_ID(0x041e, 0x3040), 2, 2, 6, 6, 2, 0x6e91 }, /* Live! 24-bit */ 178 { USB_ID(0x041e, 0x3040), 2, 2, 6, 6, 2, 0x6e91 }, /* Live! 24-bit */
176 { USB_ID(0x041e, 0x3042), 0, 1, 1, 1, 1, 0x000d }, /* Usb X-Fi S51 */ 179 { USB_ID(0x041e, 0x3042), 0, 1, 1, 1, 1, 0x000d }, /* Usb X-Fi S51 */
177 { USB_ID(0x041e, 0x30df), 0, 1, 1, 1, 1, 0x000d }, /* Usb X-Fi S51 Pro */ 180 { USB_ID(0x041e, 0x30df), 0, 1, 1, 1, 1, 0x000d }, /* Usb X-Fi S51 Pro */
178 { USB_ID(0x041e, 0x3048), 2, 2, 6, 6, 2, 0x6e91 }, /* Toshiba SB0500 */ 181 { USB_ID(0x041e, 0x3048), 2, 2, 6, 6, 2, 0x6e91 }, /* Toshiba SB0500 */
179 }; 182 };
180 183
181 static void snd_usb_soundblaster_remote_complete(struct urb *urb) 184 static void snd_usb_soundblaster_remote_complete(struct urb *urb)
182 { 185 {
183 struct usb_mixer_interface *mixer = urb->context; 186 struct usb_mixer_interface *mixer = urb->context;
184 const struct rc_config *rc = mixer->rc_cfg; 187 const struct rc_config *rc = mixer->rc_cfg;
185 u32 code; 188 u32 code;
186 189
187 if (urb->status < 0 || urb->actual_length < rc->min_packet_length) 190 if (urb->status < 0 || urb->actual_length < rc->min_packet_length)
188 return; 191 return;
189 192
190 code = mixer->rc_buffer[rc->offset]; 193 code = mixer->rc_buffer[rc->offset];
191 if (rc->length == 2) 194 if (rc->length == 2)
192 code |= mixer->rc_buffer[rc->offset + 1] << 8; 195 code |= mixer->rc_buffer[rc->offset + 1] << 8;
193 196
194 /* the Mute button actually changes the mixer control */ 197 /* the Mute button actually changes the mixer control */
195 if (code == rc->mute_code) 198 if (code == rc->mute_code)
196 snd_usb_mixer_notify_id(mixer, rc->mute_mixer_id); 199 snd_usb_mixer_notify_id(mixer, rc->mute_mixer_id);
197 mixer->rc_code = code; 200 mixer->rc_code = code;
198 wmb(); 201 wmb();
199 wake_up(&mixer->rc_waitq); 202 wake_up(&mixer->rc_waitq);
200 } 203 }
201 204
202 static long snd_usb_sbrc_hwdep_read(struct snd_hwdep *hw, char __user *buf, 205 static long snd_usb_sbrc_hwdep_read(struct snd_hwdep *hw, char __user *buf,
203 long count, loff_t *offset) 206 long count, loff_t *offset)
204 { 207 {
205 struct usb_mixer_interface *mixer = hw->private_data; 208 struct usb_mixer_interface *mixer = hw->private_data;
206 int err; 209 int err;
207 u32 rc_code; 210 u32 rc_code;
208 211
209 if (count != 1 && count != 4) 212 if (count != 1 && count != 4)
210 return -EINVAL; 213 return -EINVAL;
211 err = wait_event_interruptible(mixer->rc_waitq, 214 err = wait_event_interruptible(mixer->rc_waitq,
212 (rc_code = xchg(&mixer->rc_code, 0)) != 0); 215 (rc_code = xchg(&mixer->rc_code, 0)) != 0);
213 if (err == 0) { 216 if (err == 0) {
214 if (count == 1) 217 if (count == 1)
215 err = put_user(rc_code, buf); 218 err = put_user(rc_code, buf);
216 else 219 else
217 err = put_user(rc_code, (u32 __user *)buf); 220 err = put_user(rc_code, (u32 __user *)buf);
218 } 221 }
219 return err < 0 ? err : count; 222 return err < 0 ? err : count;
220 } 223 }
221 224
222 static unsigned int snd_usb_sbrc_hwdep_poll(struct snd_hwdep *hw, struct file *file, 225 static unsigned int snd_usb_sbrc_hwdep_poll(struct snd_hwdep *hw, struct file *file,
223 poll_table *wait) 226 poll_table *wait)
224 { 227 {
225 struct usb_mixer_interface *mixer = hw->private_data; 228 struct usb_mixer_interface *mixer = hw->private_data;
226 229
227 poll_wait(file, &mixer->rc_waitq, wait); 230 poll_wait(file, &mixer->rc_waitq, wait);
228 return mixer->rc_code ? POLLIN | POLLRDNORM : 0; 231 return mixer->rc_code ? POLLIN | POLLRDNORM : 0;
229 } 232 }
230 233
231 static int snd_usb_soundblaster_remote_init(struct usb_mixer_interface *mixer) 234 static int snd_usb_soundblaster_remote_init(struct usb_mixer_interface *mixer)
232 { 235 {
233 struct snd_hwdep *hwdep; 236 struct snd_hwdep *hwdep;
234 int err, len, i; 237 int err, len, i;
235 238
236 for (i = 0; i < ARRAY_SIZE(rc_configs); ++i) 239 for (i = 0; i < ARRAY_SIZE(rc_configs); ++i)
237 if (rc_configs[i].usb_id == mixer->chip->usb_id) 240 if (rc_configs[i].usb_id == mixer->chip->usb_id)
238 break; 241 break;
239 if (i >= ARRAY_SIZE(rc_configs)) 242 if (i >= ARRAY_SIZE(rc_configs))
240 return 0; 243 return 0;
241 mixer->rc_cfg = &rc_configs[i]; 244 mixer->rc_cfg = &rc_configs[i];
242 245
243 len = mixer->rc_cfg->packet_length; 246 len = mixer->rc_cfg->packet_length;
244 247
245 init_waitqueue_head(&mixer->rc_waitq); 248 init_waitqueue_head(&mixer->rc_waitq);
246 err = snd_hwdep_new(mixer->chip->card, "SB remote control", 0, &hwdep); 249 err = snd_hwdep_new(mixer->chip->card, "SB remote control", 0, &hwdep);
247 if (err < 0) 250 if (err < 0)
248 return err; 251 return err;
249 snprintf(hwdep->name, sizeof(hwdep->name), 252 snprintf(hwdep->name, sizeof(hwdep->name),
250 "%s remote control", mixer->chip->card->shortname); 253 "%s remote control", mixer->chip->card->shortname);
251 hwdep->iface = SNDRV_HWDEP_IFACE_SB_RC; 254 hwdep->iface = SNDRV_HWDEP_IFACE_SB_RC;
252 hwdep->private_data = mixer; 255 hwdep->private_data = mixer;
253 hwdep->ops.read = snd_usb_sbrc_hwdep_read; 256 hwdep->ops.read = snd_usb_sbrc_hwdep_read;
254 hwdep->ops.poll = snd_usb_sbrc_hwdep_poll; 257 hwdep->ops.poll = snd_usb_sbrc_hwdep_poll;
255 hwdep->exclusive = 1; 258 hwdep->exclusive = 1;
256 259
257 mixer->rc_urb = usb_alloc_urb(0, GFP_KERNEL); 260 mixer->rc_urb = usb_alloc_urb(0, GFP_KERNEL);
258 if (!mixer->rc_urb) 261 if (!mixer->rc_urb)
259 return -ENOMEM; 262 return -ENOMEM;
260 mixer->rc_setup_packet = kmalloc(sizeof(*mixer->rc_setup_packet), GFP_KERNEL); 263 mixer->rc_setup_packet = kmalloc(sizeof(*mixer->rc_setup_packet), GFP_KERNEL);
261 if (!mixer->rc_setup_packet) { 264 if (!mixer->rc_setup_packet) {
262 usb_free_urb(mixer->rc_urb); 265 usb_free_urb(mixer->rc_urb);
263 mixer->rc_urb = NULL; 266 mixer->rc_urb = NULL;
264 return -ENOMEM; 267 return -ENOMEM;
265 } 268 }
266 mixer->rc_setup_packet->bRequestType = 269 mixer->rc_setup_packet->bRequestType =
267 USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE; 270 USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE;
268 mixer->rc_setup_packet->bRequest = UAC_GET_MEM; 271 mixer->rc_setup_packet->bRequest = UAC_GET_MEM;
269 mixer->rc_setup_packet->wValue = cpu_to_le16(0); 272 mixer->rc_setup_packet->wValue = cpu_to_le16(0);
270 mixer->rc_setup_packet->wIndex = cpu_to_le16(0); 273 mixer->rc_setup_packet->wIndex = cpu_to_le16(0);
271 mixer->rc_setup_packet->wLength = cpu_to_le16(len); 274 mixer->rc_setup_packet->wLength = cpu_to_le16(len);
272 usb_fill_control_urb(mixer->rc_urb, mixer->chip->dev, 275 usb_fill_control_urb(mixer->rc_urb, mixer->chip->dev,
273 usb_rcvctrlpipe(mixer->chip->dev, 0), 276 usb_rcvctrlpipe(mixer->chip->dev, 0),
274 (u8*)mixer->rc_setup_packet, mixer->rc_buffer, len, 277 (u8*)mixer->rc_setup_packet, mixer->rc_buffer, len,
275 snd_usb_soundblaster_remote_complete, mixer); 278 snd_usb_soundblaster_remote_complete, mixer);
276 return 0; 279 return 0;
277 } 280 }
278 281
279 #define snd_audigy2nx_led_info snd_ctl_boolean_mono_info 282 #define snd_audigy2nx_led_info snd_ctl_boolean_mono_info
280 283
281 static int snd_audigy2nx_led_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 284 static int snd_audigy2nx_led_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
282 { 285 {
283 struct usb_mixer_interface *mixer = snd_kcontrol_chip(kcontrol); 286 struct usb_mixer_interface *mixer = snd_kcontrol_chip(kcontrol);
284 int index = kcontrol->private_value; 287 int index = kcontrol->private_value;
285 288
286 ucontrol->value.integer.value[0] = mixer->audigy2nx_leds[index]; 289 ucontrol->value.integer.value[0] = mixer->audigy2nx_leds[index];
287 return 0; 290 return 0;
288 } 291 }
289 292
290 static int snd_audigy2nx_led_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 293 static int snd_audigy2nx_led_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
291 { 294 {
292 struct usb_mixer_interface *mixer = snd_kcontrol_chip(kcontrol); 295 struct usb_mixer_interface *mixer = snd_kcontrol_chip(kcontrol);
293 int index = kcontrol->private_value; 296 int index = kcontrol->private_value;
294 int value = ucontrol->value.integer.value[0]; 297 int value = ucontrol->value.integer.value[0];
295 int err, changed; 298 int err, changed;
296 299
297 if (value > 1) 300 if (value > 1)
298 return -EINVAL; 301 return -EINVAL;
299 changed = value != mixer->audigy2nx_leds[index]; 302 changed = value != mixer->audigy2nx_leds[index];
300 down_read(&mixer->chip->shutdown_rwsem); 303 down_read(&mixer->chip->shutdown_rwsem);
301 if (mixer->chip->shutdown) { 304 if (mixer->chip->shutdown) {
302 err = -ENODEV; 305 err = -ENODEV;
303 goto out; 306 goto out;
304 } 307 }
305 if (mixer->chip->usb_id == USB_ID(0x041e, 0x3042)) 308 if (mixer->chip->usb_id == USB_ID(0x041e, 0x3042))
306 err = snd_usb_ctl_msg(mixer->chip->dev, 309 err = snd_usb_ctl_msg(mixer->chip->dev,
307 usb_sndctrlpipe(mixer->chip->dev, 0), 0x24, 310 usb_sndctrlpipe(mixer->chip->dev, 0), 0x24,
308 USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER, 311 USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER,
309 !value, 0, NULL, 0); 312 !value, 0, NULL, 0);
310 /* USB X-Fi S51 Pro */ 313 /* USB X-Fi S51 Pro */
311 if (mixer->chip->usb_id == USB_ID(0x041e, 0x30df)) 314 if (mixer->chip->usb_id == USB_ID(0x041e, 0x30df))
312 err = snd_usb_ctl_msg(mixer->chip->dev, 315 err = snd_usb_ctl_msg(mixer->chip->dev,
313 usb_sndctrlpipe(mixer->chip->dev, 0), 0x24, 316 usb_sndctrlpipe(mixer->chip->dev, 0), 0x24,
314 USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER, 317 USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER,
315 !value, 0, NULL, 0); 318 !value, 0, NULL, 0);
316 else 319 else
317 err = snd_usb_ctl_msg(mixer->chip->dev, 320 err = snd_usb_ctl_msg(mixer->chip->dev,
318 usb_sndctrlpipe(mixer->chip->dev, 0), 0x24, 321 usb_sndctrlpipe(mixer->chip->dev, 0), 0x24,
319 USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER, 322 USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER,
320 value, index + 2, NULL, 0); 323 value, index + 2, NULL, 0);
321 out: 324 out:
322 up_read(&mixer->chip->shutdown_rwsem); 325 up_read(&mixer->chip->shutdown_rwsem);
323 if (err < 0) 326 if (err < 0)
324 return err; 327 return err;
325 mixer->audigy2nx_leds[index] = value; 328 mixer->audigy2nx_leds[index] = value;
326 return changed; 329 return changed;
327 } 330 }
328 331
329 static struct snd_kcontrol_new snd_audigy2nx_controls[] = { 332 static struct snd_kcontrol_new snd_audigy2nx_controls[] = {
330 { 333 {
331 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 334 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
332 .name = "CMSS LED Switch", 335 .name = "CMSS LED Switch",
333 .info = snd_audigy2nx_led_info, 336 .info = snd_audigy2nx_led_info,
334 .get = snd_audigy2nx_led_get, 337 .get = snd_audigy2nx_led_get,
335 .put = snd_audigy2nx_led_put, 338 .put = snd_audigy2nx_led_put,
336 .private_value = 0, 339 .private_value = 0,
337 }, 340 },
338 { 341 {
339 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 342 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
340 .name = "Power LED Switch", 343 .name = "Power LED Switch",
341 .info = snd_audigy2nx_led_info, 344 .info = snd_audigy2nx_led_info,
342 .get = snd_audigy2nx_led_get, 345 .get = snd_audigy2nx_led_get,
343 .put = snd_audigy2nx_led_put, 346 .put = snd_audigy2nx_led_put,
344 .private_value = 1, 347 .private_value = 1,
345 }, 348 },
346 { 349 {
347 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 350 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
348 .name = "Dolby Digital LED Switch", 351 .name = "Dolby Digital LED Switch",
349 .info = snd_audigy2nx_led_info, 352 .info = snd_audigy2nx_led_info,
350 .get = snd_audigy2nx_led_get, 353 .get = snd_audigy2nx_led_get,
351 .put = snd_audigy2nx_led_put, 354 .put = snd_audigy2nx_led_put,
352 .private_value = 2, 355 .private_value = 2,
353 }, 356 },
354 }; 357 };
355 358
356 static int snd_audigy2nx_controls_create(struct usb_mixer_interface *mixer) 359 static int snd_audigy2nx_controls_create(struct usb_mixer_interface *mixer)
357 { 360 {
358 int i, err; 361 int i, err;
359 362
360 for (i = 0; i < ARRAY_SIZE(snd_audigy2nx_controls); ++i) { 363 for (i = 0; i < ARRAY_SIZE(snd_audigy2nx_controls); ++i) {
361 /* USB X-Fi S51 doesn't have a CMSS LED */ 364 /* USB X-Fi S51 doesn't have a CMSS LED */
362 if ((mixer->chip->usb_id == USB_ID(0x041e, 0x3042)) && i == 0) 365 if ((mixer->chip->usb_id == USB_ID(0x041e, 0x3042)) && i == 0)
363 continue; 366 continue;
364 /* USB X-Fi S51 Pro doesn't have one either */ 367 /* USB X-Fi S51 Pro doesn't have one either */
365 if ((mixer->chip->usb_id == USB_ID(0x041e, 0x30df)) && i == 0) 368 if ((mixer->chip->usb_id == USB_ID(0x041e, 0x30df)) && i == 0)
366 continue; 369 continue;
367 if (i > 1 && /* Live24ext has 2 LEDs only */ 370 if (i > 1 && /* Live24ext has 2 LEDs only */
368 (mixer->chip->usb_id == USB_ID(0x041e, 0x3040) || 371 (mixer->chip->usb_id == USB_ID(0x041e, 0x3040) ||
369 mixer->chip->usb_id == USB_ID(0x041e, 0x3042) || 372 mixer->chip->usb_id == USB_ID(0x041e, 0x3042) ||
370 mixer->chip->usb_id == USB_ID(0x041e, 0x30df) || 373 mixer->chip->usb_id == USB_ID(0x041e, 0x30df) ||
371 mixer->chip->usb_id == USB_ID(0x041e, 0x3048))) 374 mixer->chip->usb_id == USB_ID(0x041e, 0x3048)))
372 break; 375 break;
373 err = snd_ctl_add(mixer->chip->card, 376 err = snd_ctl_add(mixer->chip->card,
374 snd_ctl_new1(&snd_audigy2nx_controls[i], mixer)); 377 snd_ctl_new1(&snd_audigy2nx_controls[i], mixer));
375 if (err < 0) 378 if (err < 0)
376 return err; 379 return err;
377 } 380 }
378 mixer->audigy2nx_leds[1] = 1; /* Power LED is on by default */ 381 mixer->audigy2nx_leds[1] = 1; /* Power LED is on by default */
379 return 0; 382 return 0;
380 } 383 }
381 384
382 static void snd_audigy2nx_proc_read(struct snd_info_entry *entry, 385 static void snd_audigy2nx_proc_read(struct snd_info_entry *entry,
383 struct snd_info_buffer *buffer) 386 struct snd_info_buffer *buffer)
384 { 387 {
385 static const struct sb_jack { 388 static const struct sb_jack {
386 int unitid; 389 int unitid;
387 const char *name; 390 const char *name;
388 } jacks_audigy2nx[] = { 391 } jacks_audigy2nx[] = {
389 {4, "dig in "}, 392 {4, "dig in "},
390 {7, "line in"}, 393 {7, "line in"},
391 {19, "spk out"}, 394 {19, "spk out"},
392 {20, "hph out"}, 395 {20, "hph out"},
393 {-1, NULL} 396 {-1, NULL}
394 }, jacks_live24ext[] = { 397 }, jacks_live24ext[] = {
395 {4, "line in"}, /* &1=Line, &2=Mic*/ 398 {4, "line in"}, /* &1=Line, &2=Mic*/
396 {3, "hph out"}, /* headphones */ 399 {3, "hph out"}, /* headphones */
397 {0, "RC "}, /* last command, 6 bytes see rc_config above */ 400 {0, "RC "}, /* last command, 6 bytes see rc_config above */
398 {-1, NULL} 401 {-1, NULL}
399 }; 402 };
400 const struct sb_jack *jacks; 403 const struct sb_jack *jacks;
401 struct usb_mixer_interface *mixer = entry->private_data; 404 struct usb_mixer_interface *mixer = entry->private_data;
402 int i, err; 405 int i, err;
403 u8 buf[3]; 406 u8 buf[3];
404 407
405 snd_iprintf(buffer, "%s jacks\n\n", mixer->chip->card->shortname); 408 snd_iprintf(buffer, "%s jacks\n\n", mixer->chip->card->shortname);
406 if (mixer->chip->usb_id == USB_ID(0x041e, 0x3020)) 409 if (mixer->chip->usb_id == USB_ID(0x041e, 0x3020))
407 jacks = jacks_audigy2nx; 410 jacks = jacks_audigy2nx;
408 else if (mixer->chip->usb_id == USB_ID(0x041e, 0x3040) || 411 else if (mixer->chip->usb_id == USB_ID(0x041e, 0x3040) ||
409 mixer->chip->usb_id == USB_ID(0x041e, 0x3048)) 412 mixer->chip->usb_id == USB_ID(0x041e, 0x3048))
410 jacks = jacks_live24ext; 413 jacks = jacks_live24ext;
411 else 414 else
412 return; 415 return;
413 416
414 for (i = 0; jacks[i].name; ++i) { 417 for (i = 0; jacks[i].name; ++i) {
415 snd_iprintf(buffer, "%s: ", jacks[i].name); 418 snd_iprintf(buffer, "%s: ", jacks[i].name);
416 down_read(&mixer->chip->shutdown_rwsem); 419 down_read(&mixer->chip->shutdown_rwsem);
417 if (mixer->chip->shutdown) 420 if (mixer->chip->shutdown)
418 err = 0; 421 err = 0;
419 else 422 else
420 err = snd_usb_ctl_msg(mixer->chip->dev, 423 err = snd_usb_ctl_msg(mixer->chip->dev,
421 usb_rcvctrlpipe(mixer->chip->dev, 0), 424 usb_rcvctrlpipe(mixer->chip->dev, 0),
422 UAC_GET_MEM, USB_DIR_IN | USB_TYPE_CLASS | 425 UAC_GET_MEM, USB_DIR_IN | USB_TYPE_CLASS |
423 USB_RECIP_INTERFACE, 0, 426 USB_RECIP_INTERFACE, 0,
424 jacks[i].unitid << 8, buf, 3); 427 jacks[i].unitid << 8, buf, 3);
425 up_read(&mixer->chip->shutdown_rwsem); 428 up_read(&mixer->chip->shutdown_rwsem);
426 if (err == 3 && (buf[0] == 3 || buf[0] == 6)) 429 if (err == 3 && (buf[0] == 3 || buf[0] == 6))
427 snd_iprintf(buffer, "%02x %02x\n", buf[1], buf[2]); 430 snd_iprintf(buffer, "%02x %02x\n", buf[1], buf[2]);
428 else 431 else
429 snd_iprintf(buffer, "?\n"); 432 snd_iprintf(buffer, "?\n");
430 } 433 }
431 } 434 }
432 435
433 /* ASUS Xonar U1 / U3 controls */ 436 /* ASUS Xonar U1 / U3 controls */
434 437
435 static int snd_xonar_u1_switch_get(struct snd_kcontrol *kcontrol, 438 static int snd_xonar_u1_switch_get(struct snd_kcontrol *kcontrol,
436 struct snd_ctl_elem_value *ucontrol) 439 struct snd_ctl_elem_value *ucontrol)
437 { 440 {
438 struct usb_mixer_interface *mixer = snd_kcontrol_chip(kcontrol); 441 struct usb_mixer_interface *mixer = snd_kcontrol_chip(kcontrol);
439 442
440 ucontrol->value.integer.value[0] = !!(mixer->xonar_u1_status & 0x02); 443 ucontrol->value.integer.value[0] = !!(mixer->xonar_u1_status & 0x02);
441 return 0; 444 return 0;
442 } 445 }
443 446
444 static int snd_xonar_u1_switch_put(struct snd_kcontrol *kcontrol, 447 static int snd_xonar_u1_switch_put(struct snd_kcontrol *kcontrol,
445 struct snd_ctl_elem_value *ucontrol) 448 struct snd_ctl_elem_value *ucontrol)
446 { 449 {
447 struct usb_mixer_interface *mixer = snd_kcontrol_chip(kcontrol); 450 struct usb_mixer_interface *mixer = snd_kcontrol_chip(kcontrol);
448 u8 old_status, new_status; 451 u8 old_status, new_status;
449 int err, changed; 452 int err, changed;
450 453
451 old_status = mixer->xonar_u1_status; 454 old_status = mixer->xonar_u1_status;
452 if (ucontrol->value.integer.value[0]) 455 if (ucontrol->value.integer.value[0])
453 new_status = old_status | 0x02; 456 new_status = old_status | 0x02;
454 else 457 else
455 new_status = old_status & ~0x02; 458 new_status = old_status & ~0x02;
456 changed = new_status != old_status; 459 changed = new_status != old_status;
457 down_read(&mixer->chip->shutdown_rwsem); 460 down_read(&mixer->chip->shutdown_rwsem);
458 if (mixer->chip->shutdown) 461 if (mixer->chip->shutdown)
459 err = -ENODEV; 462 err = -ENODEV;
460 else 463 else
461 err = snd_usb_ctl_msg(mixer->chip->dev, 464 err = snd_usb_ctl_msg(mixer->chip->dev,
462 usb_sndctrlpipe(mixer->chip->dev, 0), 0x08, 465 usb_sndctrlpipe(mixer->chip->dev, 0), 0x08,
463 USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER, 466 USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER,
464 50, 0, &new_status, 1); 467 50, 0, &new_status, 1);
465 up_read(&mixer->chip->shutdown_rwsem); 468 up_read(&mixer->chip->shutdown_rwsem);
466 if (err < 0) 469 if (err < 0)
467 return err; 470 return err;
468 mixer->xonar_u1_status = new_status; 471 mixer->xonar_u1_status = new_status;
469 return changed; 472 return changed;
470 } 473 }
471 474
472 static struct snd_kcontrol_new snd_xonar_u1_output_switch = { 475 static struct snd_kcontrol_new snd_xonar_u1_output_switch = {
473 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 476 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
474 .name = "Digital Playback Switch", 477 .name = "Digital Playback Switch",
475 .info = snd_ctl_boolean_mono_info, 478 .info = snd_ctl_boolean_mono_info,
476 .get = snd_xonar_u1_switch_get, 479 .get = snd_xonar_u1_switch_get,
477 .put = snd_xonar_u1_switch_put, 480 .put = snd_xonar_u1_switch_put,
478 }; 481 };
479 482
480 static int snd_xonar_u1_controls_create(struct usb_mixer_interface *mixer) 483 static int snd_xonar_u1_controls_create(struct usb_mixer_interface *mixer)
481 { 484 {
482 int err; 485 int err;
483 486
484 err = snd_ctl_add(mixer->chip->card, 487 err = snd_ctl_add(mixer->chip->card,
485 snd_ctl_new1(&snd_xonar_u1_output_switch, mixer)); 488 snd_ctl_new1(&snd_xonar_u1_output_switch, mixer));
486 if (err < 0) 489 if (err < 0)
487 return err; 490 return err;
488 mixer->xonar_u1_status = 0x05; 491 mixer->xonar_u1_status = 0x05;
489 return 0; 492 return 0;
490 } 493 }
491 494
492 /* Native Instruments device quirks */ 495 /* Native Instruments device quirks */
493 496
494 #define _MAKE_NI_CONTROL(bRequest,wIndex) ((bRequest) << 16 | (wIndex)) 497 #define _MAKE_NI_CONTROL(bRequest,wIndex) ((bRequest) << 16 | (wIndex))
495 498
496 static int snd_nativeinstruments_control_get(struct snd_kcontrol *kcontrol, 499 static int snd_nativeinstruments_control_get(struct snd_kcontrol *kcontrol,
497 struct snd_ctl_elem_value *ucontrol) 500 struct snd_ctl_elem_value *ucontrol)
498 { 501 {
499 struct usb_mixer_interface *mixer = snd_kcontrol_chip(kcontrol); 502 struct usb_mixer_interface *mixer = snd_kcontrol_chip(kcontrol);
500 struct usb_device *dev = mixer->chip->dev; 503 struct usb_device *dev = mixer->chip->dev;
501 u8 bRequest = (kcontrol->private_value >> 16) & 0xff; 504 u8 bRequest = (kcontrol->private_value >> 16) & 0xff;
502 u16 wIndex = kcontrol->private_value & 0xffff; 505 u16 wIndex = kcontrol->private_value & 0xffff;
503 u8 tmp; 506 u8 tmp;
504 int ret; 507 int ret;
505 508
506 down_read(&mixer->chip->shutdown_rwsem); 509 down_read(&mixer->chip->shutdown_rwsem);
507 if (mixer->chip->shutdown) 510 if (mixer->chip->shutdown)
508 ret = -ENODEV; 511 ret = -ENODEV;
509 else 512 else
510 ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), bRequest, 513 ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), bRequest,
511 USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN, 514 USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
512 0, wIndex, 515 0, wIndex,
513 &tmp, sizeof(tmp), 1000); 516 &tmp, sizeof(tmp), 1000);
514 up_read(&mixer->chip->shutdown_rwsem); 517 up_read(&mixer->chip->shutdown_rwsem);
515 518
516 if (ret < 0) { 519 if (ret < 0) {
517 snd_printk(KERN_ERR 520 snd_printk(KERN_ERR
518 "unable to issue vendor read request (ret = %d)", ret); 521 "unable to issue vendor read request (ret = %d)", ret);
519 return ret; 522 return ret;
520 } 523 }
521 524
522 ucontrol->value.integer.value[0] = tmp; 525 ucontrol->value.integer.value[0] = tmp;
523 526
524 return 0; 527 return 0;
525 } 528 }
526 529
527 static int snd_nativeinstruments_control_put(struct snd_kcontrol *kcontrol, 530 static int snd_nativeinstruments_control_put(struct snd_kcontrol *kcontrol,
528 struct snd_ctl_elem_value *ucontrol) 531 struct snd_ctl_elem_value *ucontrol)
529 { 532 {
530 struct usb_mixer_interface *mixer = snd_kcontrol_chip(kcontrol); 533 struct usb_mixer_interface *mixer = snd_kcontrol_chip(kcontrol);
531 struct usb_device *dev = mixer->chip->dev; 534 struct usb_device *dev = mixer->chip->dev;
532 u8 bRequest = (kcontrol->private_value >> 16) & 0xff; 535 u8 bRequest = (kcontrol->private_value >> 16) & 0xff;
533 u16 wIndex = kcontrol->private_value & 0xffff; 536 u16 wIndex = kcontrol->private_value & 0xffff;
534 u16 wValue = ucontrol->value.integer.value[0]; 537 u16 wValue = ucontrol->value.integer.value[0];
535 int ret; 538 int ret;
536 539
537 down_read(&mixer->chip->shutdown_rwsem); 540 down_read(&mixer->chip->shutdown_rwsem);
538 if (mixer->chip->shutdown) 541 if (mixer->chip->shutdown)
539 ret = -ENODEV; 542 ret = -ENODEV;
540 else 543 else
541 ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), bRequest, 544 ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), bRequest,
542 USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT, 545 USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT,
543 wValue, wIndex, 546 wValue, wIndex,
544 NULL, 0, 1000); 547 NULL, 0, 1000);
545 up_read(&mixer->chip->shutdown_rwsem); 548 up_read(&mixer->chip->shutdown_rwsem);
546 549
547 if (ret < 0) { 550 if (ret < 0) {
548 snd_printk(KERN_ERR 551 snd_printk(KERN_ERR
549 "unable to issue vendor write request (ret = %d)", ret); 552 "unable to issue vendor write request (ret = %d)", ret);
550 return ret; 553 return ret;
551 } 554 }
552 555
553 return 0; 556 return 0;
554 } 557 }
555 558
556 static struct snd_kcontrol_new snd_nativeinstruments_ta6_mixers[] = { 559 static struct snd_kcontrol_new snd_nativeinstruments_ta6_mixers[] = {
557 { 560 {
558 .name = "Direct Thru Channel A", 561 .name = "Direct Thru Channel A",
559 .private_value = _MAKE_NI_CONTROL(0x01, 0x03), 562 .private_value = _MAKE_NI_CONTROL(0x01, 0x03),
560 }, 563 },
561 { 564 {
562 .name = "Direct Thru Channel B", 565 .name = "Direct Thru Channel B",
563 .private_value = _MAKE_NI_CONTROL(0x01, 0x05), 566 .private_value = _MAKE_NI_CONTROL(0x01, 0x05),
564 }, 567 },
565 { 568 {
566 .name = "Phono Input Channel A", 569 .name = "Phono Input Channel A",
567 .private_value = _MAKE_NI_CONTROL(0x02, 0x03), 570 .private_value = _MAKE_NI_CONTROL(0x02, 0x03),
568 }, 571 },
569 { 572 {
570 .name = "Phono Input Channel B", 573 .name = "Phono Input Channel B",
571 .private_value = _MAKE_NI_CONTROL(0x02, 0x05), 574 .private_value = _MAKE_NI_CONTROL(0x02, 0x05),
572 }, 575 },
573 }; 576 };
574 577
575 static struct snd_kcontrol_new snd_nativeinstruments_ta10_mixers[] = { 578 static struct snd_kcontrol_new snd_nativeinstruments_ta10_mixers[] = {
576 { 579 {
577 .name = "Direct Thru Channel A", 580 .name = "Direct Thru Channel A",
578 .private_value = _MAKE_NI_CONTROL(0x01, 0x03), 581 .private_value = _MAKE_NI_CONTROL(0x01, 0x03),
579 }, 582 },
580 { 583 {
581 .name = "Direct Thru Channel B", 584 .name = "Direct Thru Channel B",
582 .private_value = _MAKE_NI_CONTROL(0x01, 0x05), 585 .private_value = _MAKE_NI_CONTROL(0x01, 0x05),
583 }, 586 },
584 { 587 {
585 .name = "Direct Thru Channel C", 588 .name = "Direct Thru Channel C",
586 .private_value = _MAKE_NI_CONTROL(0x01, 0x07), 589 .private_value = _MAKE_NI_CONTROL(0x01, 0x07),
587 }, 590 },
588 { 591 {
589 .name = "Direct Thru Channel D", 592 .name = "Direct Thru Channel D",
590 .private_value = _MAKE_NI_CONTROL(0x01, 0x09), 593 .private_value = _MAKE_NI_CONTROL(0x01, 0x09),
591 }, 594 },
592 { 595 {
593 .name = "Phono Input Channel A", 596 .name = "Phono Input Channel A",
594 .private_value = _MAKE_NI_CONTROL(0x02, 0x03), 597 .private_value = _MAKE_NI_CONTROL(0x02, 0x03),
595 }, 598 },
596 { 599 {
597 .name = "Phono Input Channel B", 600 .name = "Phono Input Channel B",
598 .private_value = _MAKE_NI_CONTROL(0x02, 0x05), 601 .private_value = _MAKE_NI_CONTROL(0x02, 0x05),
599 }, 602 },
600 { 603 {
601 .name = "Phono Input Channel C", 604 .name = "Phono Input Channel C",
602 .private_value = _MAKE_NI_CONTROL(0x02, 0x07), 605 .private_value = _MAKE_NI_CONTROL(0x02, 0x07),
603 }, 606 },
604 { 607 {
605 .name = "Phono Input Channel D", 608 .name = "Phono Input Channel D",
606 .private_value = _MAKE_NI_CONTROL(0x02, 0x09), 609 .private_value = _MAKE_NI_CONTROL(0x02, 0x09),
607 }, 610 },
608 }; 611 };
609 612
610 static int snd_nativeinstruments_create_mixer(struct usb_mixer_interface *mixer, 613 static int snd_nativeinstruments_create_mixer(struct usb_mixer_interface *mixer,
611 const struct snd_kcontrol_new *kc, 614 const struct snd_kcontrol_new *kc,
612 unsigned int count) 615 unsigned int count)
613 { 616 {
614 int i, err = 0; 617 int i, err = 0;
615 struct snd_kcontrol_new template = { 618 struct snd_kcontrol_new template = {
616 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 619 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
617 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, 620 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
618 .get = snd_nativeinstruments_control_get, 621 .get = snd_nativeinstruments_control_get,
619 .put = snd_nativeinstruments_control_put, 622 .put = snd_nativeinstruments_control_put,
620 .info = snd_ctl_boolean_mono_info, 623 .info = snd_ctl_boolean_mono_info,
621 }; 624 };
622 625
623 for (i = 0; i < count; i++) { 626 for (i = 0; i < count; i++) {
624 struct snd_kcontrol *c; 627 struct snd_kcontrol *c;
625 628
626 template.name = kc[i].name; 629 template.name = kc[i].name;
627 template.private_value = kc[i].private_value; 630 template.private_value = kc[i].private_value;
628 631
629 c = snd_ctl_new1(&template, mixer); 632 c = snd_ctl_new1(&template, mixer);
630 err = snd_ctl_add(mixer->chip->card, c); 633 err = snd_ctl_add(mixer->chip->card, c);
631 634
632 if (err < 0) 635 if (err < 0)
633 break; 636 break;
634 } 637 }
635 638
636 return err; 639 return err;
637 } 640 }
638 641
639 /* M-Audio FastTrack Ultra quirks */ 642 /* M-Audio FastTrack Ultra quirks */
640 /* FTU Effect switch (also used by C400/C600) */ 643 /* FTU Effect switch (also used by C400/C600) */
641 struct snd_ftu_eff_switch_priv_val { 644 struct snd_ftu_eff_switch_priv_val {
642 struct usb_mixer_interface *mixer; 645 struct usb_mixer_interface *mixer;
643 int cached_value; 646 int cached_value;
644 int is_cached; 647 int is_cached;
645 int bUnitID; 648 int bUnitID;
646 int validx; 649 int validx;
647 }; 650 };
648 651
649 static int snd_ftu_eff_switch_info(struct snd_kcontrol *kcontrol, 652 static int snd_ftu_eff_switch_info(struct snd_kcontrol *kcontrol,
650 struct snd_ctl_elem_info *uinfo) 653 struct snd_ctl_elem_info *uinfo)
651 { 654 {
652 static const char *texts[8] = {"Room 1", 655 static const char *texts[8] = {"Room 1",
653 "Room 2", 656 "Room 2",
654 "Room 3", 657 "Room 3",
655 "Hall 1", 658 "Hall 1",
656 "Hall 2", 659 "Hall 2",
657 "Plate", 660 "Plate",
658 "Delay", 661 "Delay",
659 "Echo" 662 "Echo"
660 }; 663 };
661 664
662 uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; 665 uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
663 uinfo->count = 1; 666 uinfo->count = 1;
664 uinfo->value.enumerated.items = 8; 667 uinfo->value.enumerated.items = 8;
665 if (uinfo->value.enumerated.item > 7) 668 if (uinfo->value.enumerated.item > 7)
666 uinfo->value.enumerated.item = 7; 669 uinfo->value.enumerated.item = 7;
667 strcpy(uinfo->value.enumerated.name, 670 strcpy(uinfo->value.enumerated.name,
668 texts[uinfo->value.enumerated.item]); 671 texts[uinfo->value.enumerated.item]);
669 672
670 return 0; 673 return 0;
671 } 674 }
672 675
673 static int snd_ftu_eff_switch_get(struct snd_kcontrol *kctl, 676 static int snd_ftu_eff_switch_get(struct snd_kcontrol *kctl,
674 struct snd_ctl_elem_value *ucontrol) 677 struct snd_ctl_elem_value *ucontrol)
675 { 678 {
676 struct snd_usb_audio *chip; 679 struct snd_usb_audio *chip;
677 struct usb_mixer_interface *mixer; 680 struct usb_mixer_interface *mixer;
678 struct snd_ftu_eff_switch_priv_val *pval; 681 struct snd_ftu_eff_switch_priv_val *pval;
679 int err; 682 int err;
680 unsigned char value[2]; 683 unsigned char value[2];
681 int id, validx; 684 int id, validx;
682 685
683 const int val_len = 2; 686 const int val_len = 2;
684 687
685 value[0] = 0x00; 688 value[0] = 0x00;
686 value[1] = 0x00; 689 value[1] = 0x00;
687 690
688 pval = (struct snd_ftu_eff_switch_priv_val *) 691 pval = (struct snd_ftu_eff_switch_priv_val *)
689 kctl->private_value; 692 kctl->private_value;
690 693
691 if (pval->is_cached) { 694 if (pval->is_cached) {
692 ucontrol->value.enumerated.item[0] = pval->cached_value; 695 ucontrol->value.enumerated.item[0] = pval->cached_value;
693 return 0; 696 return 0;
694 } 697 }
695 698
696 mixer = (struct usb_mixer_interface *) pval->mixer; 699 mixer = (struct usb_mixer_interface *) pval->mixer;
697 if (snd_BUG_ON(!mixer)) 700 if (snd_BUG_ON(!mixer))
698 return -EINVAL; 701 return -EINVAL;
699 702
700 chip = (struct snd_usb_audio *) mixer->chip; 703 chip = (struct snd_usb_audio *) mixer->chip;
701 if (snd_BUG_ON(!chip)) 704 if (snd_BUG_ON(!chip))
702 return -EINVAL; 705 return -EINVAL;
703 706
704 id = pval->bUnitID; 707 id = pval->bUnitID;
705 validx = pval->validx; 708 validx = pval->validx;
706 709
707 down_read(&mixer->chip->shutdown_rwsem); 710 down_read(&mixer->chip->shutdown_rwsem);
708 if (mixer->chip->shutdown) 711 if (mixer->chip->shutdown)
709 err = -ENODEV; 712 err = -ENODEV;
710 else 713 else
711 err = snd_usb_ctl_msg(chip->dev, 714 err = snd_usb_ctl_msg(chip->dev,
712 usb_rcvctrlpipe(chip->dev, 0), UAC_GET_CUR, 715 usb_rcvctrlpipe(chip->dev, 0), UAC_GET_CUR,
713 USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_IN, 716 USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_IN,
714 validx << 8, snd_usb_ctrl_intf(chip) | (id << 8), 717 validx << 8, snd_usb_ctrl_intf(chip) | (id << 8),
715 value, val_len); 718 value, val_len);
716 up_read(&mixer->chip->shutdown_rwsem); 719 up_read(&mixer->chip->shutdown_rwsem);
717 if (err < 0) 720 if (err < 0)
718 return err; 721 return err;
719 722
720 ucontrol->value.enumerated.item[0] = value[0]; 723 ucontrol->value.enumerated.item[0] = value[0];
721 pval->cached_value = value[0]; 724 pval->cached_value = value[0];
722 pval->is_cached = 1; 725 pval->is_cached = 1;
723 726
724 return 0; 727 return 0;
725 } 728 }
726 729
727 static int snd_ftu_eff_switch_put(struct snd_kcontrol *kctl, 730 static int snd_ftu_eff_switch_put(struct snd_kcontrol *kctl,
728 struct snd_ctl_elem_value *ucontrol) 731 struct snd_ctl_elem_value *ucontrol)
729 { 732 {
730 struct snd_usb_audio *chip; 733 struct snd_usb_audio *chip;
731 struct snd_ftu_eff_switch_priv_val *pval; 734 struct snd_ftu_eff_switch_priv_val *pval;
732 735
733 struct usb_mixer_interface *mixer; 736 struct usb_mixer_interface *mixer;
734 int changed, cur_val, err, new_val; 737 int changed, cur_val, err, new_val;
735 unsigned char value[2]; 738 unsigned char value[2];
736 int id, validx; 739 int id, validx;
737 740
738 const int val_len = 2; 741 const int val_len = 2;
739 742
740 changed = 0; 743 changed = 0;
741 744
742 pval = (struct snd_ftu_eff_switch_priv_val *) 745 pval = (struct snd_ftu_eff_switch_priv_val *)
743 kctl->private_value; 746 kctl->private_value;
744 cur_val = pval->cached_value; 747 cur_val = pval->cached_value;
745 new_val = ucontrol->value.enumerated.item[0]; 748 new_val = ucontrol->value.enumerated.item[0];
746 749
747 mixer = (struct usb_mixer_interface *) pval->mixer; 750 mixer = (struct usb_mixer_interface *) pval->mixer;
748 if (snd_BUG_ON(!mixer)) 751 if (snd_BUG_ON(!mixer))
749 return -EINVAL; 752 return -EINVAL;
750 753
751 chip = (struct snd_usb_audio *) mixer->chip; 754 chip = (struct snd_usb_audio *) mixer->chip;
752 if (snd_BUG_ON(!chip)) 755 if (snd_BUG_ON(!chip))
753 return -EINVAL; 756 return -EINVAL;
754 757
755 id = pval->bUnitID; 758 id = pval->bUnitID;
756 validx = pval->validx; 759 validx = pval->validx;
757 760
758 if (!pval->is_cached) { 761 if (!pval->is_cached) {
759 /* Read current value */ 762 /* Read current value */
760 down_read(&mixer->chip->shutdown_rwsem); 763 down_read(&mixer->chip->shutdown_rwsem);
761 if (mixer->chip->shutdown) 764 if (mixer->chip->shutdown)
762 err = -ENODEV; 765 err = -ENODEV;
763 else 766 else
764 err = snd_usb_ctl_msg(chip->dev, 767 err = snd_usb_ctl_msg(chip->dev,
765 usb_rcvctrlpipe(chip->dev, 0), UAC_GET_CUR, 768 usb_rcvctrlpipe(chip->dev, 0), UAC_GET_CUR,
766 USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_IN, 769 USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_IN,
767 validx << 8, snd_usb_ctrl_intf(chip) | (id << 8), 770 validx << 8, snd_usb_ctrl_intf(chip) | (id << 8),
768 value, val_len); 771 value, val_len);
769 up_read(&mixer->chip->shutdown_rwsem); 772 up_read(&mixer->chip->shutdown_rwsem);
770 if (err < 0) 773 if (err < 0)
771 return err; 774 return err;
772 775
773 cur_val = value[0]; 776 cur_val = value[0];
774 pval->cached_value = cur_val; 777 pval->cached_value = cur_val;
775 pval->is_cached = 1; 778 pval->is_cached = 1;
776 } 779 }
777 /* update value if needed */ 780 /* update value if needed */
778 if (cur_val != new_val) { 781 if (cur_val != new_val) {
779 value[0] = new_val; 782 value[0] = new_val;
780 value[1] = 0; 783 value[1] = 0;
781 down_read(&mixer->chip->shutdown_rwsem); 784 down_read(&mixer->chip->shutdown_rwsem);
782 if (mixer->chip->shutdown) 785 if (mixer->chip->shutdown)
783 err = -ENODEV; 786 err = -ENODEV;
784 else 787 else
785 err = snd_usb_ctl_msg(chip->dev, 788 err = snd_usb_ctl_msg(chip->dev,
786 usb_sndctrlpipe(chip->dev, 0), UAC_SET_CUR, 789 usb_sndctrlpipe(chip->dev, 0), UAC_SET_CUR,
787 USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_OUT, 790 USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_OUT,
788 validx << 8, snd_usb_ctrl_intf(chip) | (id << 8), 791 validx << 8, snd_usb_ctrl_intf(chip) | (id << 8),
789 value, val_len); 792 value, val_len);
790 up_read(&mixer->chip->shutdown_rwsem); 793 up_read(&mixer->chip->shutdown_rwsem);
791 if (err < 0) 794 if (err < 0)
792 return err; 795 return err;
793 796
794 pval->cached_value = new_val; 797 pval->cached_value = new_val;
795 pval->is_cached = 1; 798 pval->is_cached = 1;
796 changed = 1; 799 changed = 1;
797 } 800 }
798 801
799 return changed; 802 return changed;
800 } 803 }
801 804
802 static int snd_ftu_create_effect_switch(struct usb_mixer_interface *mixer, 805 static int snd_ftu_create_effect_switch(struct usb_mixer_interface *mixer,
803 int validx, int bUnitID) 806 int validx, int bUnitID)
804 { 807 {
805 static struct snd_kcontrol_new template = { 808 static struct snd_kcontrol_new template = {
806 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 809 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
807 .name = "Effect Program Switch", 810 .name = "Effect Program Switch",
808 .index = 0, 811 .index = 0,
809 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, 812 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
810 .info = snd_ftu_eff_switch_info, 813 .info = snd_ftu_eff_switch_info,
811 .get = snd_ftu_eff_switch_get, 814 .get = snd_ftu_eff_switch_get,
812 .put = snd_ftu_eff_switch_put 815 .put = snd_ftu_eff_switch_put
813 }; 816 };
814 817
815 int err; 818 int err;
816 struct snd_kcontrol *kctl; 819 struct snd_kcontrol *kctl;
817 struct snd_ftu_eff_switch_priv_val *pval; 820 struct snd_ftu_eff_switch_priv_val *pval;
818 821
819 pval = kzalloc(sizeof(*pval), GFP_KERNEL); 822 pval = kzalloc(sizeof(*pval), GFP_KERNEL);
820 if (!pval) 823 if (!pval)
821 return -ENOMEM; 824 return -ENOMEM;
822 825
823 pval->cached_value = 0; 826 pval->cached_value = 0;
824 pval->is_cached = 0; 827 pval->is_cached = 0;
825 pval->mixer = mixer; 828 pval->mixer = mixer;
826 pval->bUnitID = bUnitID; 829 pval->bUnitID = bUnitID;
827 pval->validx = validx; 830 pval->validx = validx;
828 831
829 template.private_value = (unsigned long) pval; 832 template.private_value = (unsigned long) pval;
830 kctl = snd_ctl_new1(&template, mixer->chip); 833 kctl = snd_ctl_new1(&template, mixer->chip);
831 if (!kctl) { 834 if (!kctl) {
832 kfree(pval); 835 kfree(pval);
833 return -ENOMEM; 836 return -ENOMEM;
834 } 837 }
835 838
836 err = snd_ctl_add(mixer->chip->card, kctl); 839 err = snd_ctl_add(mixer->chip->card, kctl);
837 if (err < 0) 840 if (err < 0)
838 return err; 841 return err;
839 842
840 return 0; 843 return 0;
841 } 844 }
842 845
843 /* Create volume controls for FTU devices*/ 846 /* Create volume controls for FTU devices*/
844 static int snd_ftu_create_volume_ctls(struct usb_mixer_interface *mixer) 847 static int snd_ftu_create_volume_ctls(struct usb_mixer_interface *mixer)
845 { 848 {
846 char name[64]; 849 char name[64];
847 unsigned int control, cmask; 850 unsigned int control, cmask;
848 int in, out, err; 851 int in, out, err;
849 852
850 const unsigned int id = 5; 853 const unsigned int id = 5;
851 const int val_type = USB_MIXER_S16; 854 const int val_type = USB_MIXER_S16;
852 855
853 for (out = 0; out < 8; out++) { 856 for (out = 0; out < 8; out++) {
854 control = out + 1; 857 control = out + 1;
855 for (in = 0; in < 8; in++) { 858 for (in = 0; in < 8; in++) {
856 cmask = 1 << in; 859 cmask = 1 << in;
857 snprintf(name, sizeof(name), 860 snprintf(name, sizeof(name),
858 "AIn%d - Out%d Capture Volume", 861 "AIn%d - Out%d Capture Volume",
859 in + 1, out + 1); 862 in + 1, out + 1);
860 err = snd_create_std_mono_ctl(mixer, id, control, 863 err = snd_create_std_mono_ctl(mixer, id, control,
861 cmask, val_type, name, 864 cmask, val_type, name,
862 &snd_usb_mixer_vol_tlv); 865 &snd_usb_mixer_vol_tlv);
863 if (err < 0) 866 if (err < 0)
864 return err; 867 return err;
865 } 868 }
866 for (in = 8; in < 16; in++) { 869 for (in = 8; in < 16; in++) {
867 cmask = 1 << in; 870 cmask = 1 << in;
868 snprintf(name, sizeof(name), 871 snprintf(name, sizeof(name),
869 "DIn%d - Out%d Playback Volume", 872 "DIn%d - Out%d Playback Volume",
870 in - 7, out + 1); 873 in - 7, out + 1);
871 err = snd_create_std_mono_ctl(mixer, id, control, 874 err = snd_create_std_mono_ctl(mixer, id, control,
872 cmask, val_type, name, 875 cmask, val_type, name,
873 &snd_usb_mixer_vol_tlv); 876 &snd_usb_mixer_vol_tlv);
874 if (err < 0) 877 if (err < 0)
875 return err; 878 return err;
876 } 879 }
877 } 880 }
878 881
879 return 0; 882 return 0;
880 } 883 }
881 884
882 /* This control needs a volume quirk, see mixer.c */ 885 /* This control needs a volume quirk, see mixer.c */
883 static int snd_ftu_create_effect_volume_ctl(struct usb_mixer_interface *mixer) 886 static int snd_ftu_create_effect_volume_ctl(struct usb_mixer_interface *mixer)
884 { 887 {
885 static const char name[] = "Effect Volume"; 888 static const char name[] = "Effect Volume";
886 const unsigned int id = 6; 889 const unsigned int id = 6;
887 const int val_type = USB_MIXER_U8; 890 const int val_type = USB_MIXER_U8;
888 const unsigned int control = 2; 891 const unsigned int control = 2;
889 const unsigned int cmask = 0; 892 const unsigned int cmask = 0;
890 893
891 return snd_create_std_mono_ctl(mixer, id, control, cmask, val_type, 894 return snd_create_std_mono_ctl(mixer, id, control, cmask, val_type,
892 name, snd_usb_mixer_vol_tlv); 895 name, snd_usb_mixer_vol_tlv);
893 } 896 }
894 897
895 /* This control needs a volume quirk, see mixer.c */ 898 /* This control needs a volume quirk, see mixer.c */
896 static int snd_ftu_create_effect_duration_ctl(struct usb_mixer_interface *mixer) 899 static int snd_ftu_create_effect_duration_ctl(struct usb_mixer_interface *mixer)
897 { 900 {
898 static const char name[] = "Effect Duration"; 901 static const char name[] = "Effect Duration";
899 const unsigned int id = 6; 902 const unsigned int id = 6;
900 const int val_type = USB_MIXER_S16; 903 const int val_type = USB_MIXER_S16;
901 const unsigned int control = 3; 904 const unsigned int control = 3;
902 const unsigned int cmask = 0; 905 const unsigned int cmask = 0;
903 906
904 return snd_create_std_mono_ctl(mixer, id, control, cmask, val_type, 907 return snd_create_std_mono_ctl(mixer, id, control, cmask, val_type,
905 name, snd_usb_mixer_vol_tlv); 908 name, snd_usb_mixer_vol_tlv);
906 } 909 }
907 910
908 /* This control needs a volume quirk, see mixer.c */ 911 /* This control needs a volume quirk, see mixer.c */
909 static int snd_ftu_create_effect_feedback_ctl(struct usb_mixer_interface *mixer) 912 static int snd_ftu_create_effect_feedback_ctl(struct usb_mixer_interface *mixer)
910 { 913 {
911 static const char name[] = "Effect Feedback Volume"; 914 static const char name[] = "Effect Feedback Volume";
912 const unsigned int id = 6; 915 const unsigned int id = 6;
913 const int val_type = USB_MIXER_U8; 916 const int val_type = USB_MIXER_U8;
914 const unsigned int control = 4; 917 const unsigned int control = 4;
915 const unsigned int cmask = 0; 918 const unsigned int cmask = 0;
916 919
917 return snd_create_std_mono_ctl(mixer, id, control, cmask, val_type, 920 return snd_create_std_mono_ctl(mixer, id, control, cmask, val_type,
918 name, NULL); 921 name, NULL);
919 } 922 }
920 923
921 static int snd_ftu_create_effect_return_ctls(struct usb_mixer_interface *mixer) 924 static int snd_ftu_create_effect_return_ctls(struct usb_mixer_interface *mixer)
922 { 925 {
923 unsigned int cmask; 926 unsigned int cmask;
924 int err, ch; 927 int err, ch;
925 char name[48]; 928 char name[48];
926 929
927 const unsigned int id = 7; 930 const unsigned int id = 7;
928 const int val_type = USB_MIXER_S16; 931 const int val_type = USB_MIXER_S16;
929 const unsigned int control = 7; 932 const unsigned int control = 7;
930 933
931 for (ch = 0; ch < 4; ++ch) { 934 for (ch = 0; ch < 4; ++ch) {
932 cmask = 1 << ch; 935 cmask = 1 << ch;
933 snprintf(name, sizeof(name), 936 snprintf(name, sizeof(name),
934 "Effect Return %d Volume", ch + 1); 937 "Effect Return %d Volume", ch + 1);
935 err = snd_create_std_mono_ctl(mixer, id, control, 938 err = snd_create_std_mono_ctl(mixer, id, control,
936 cmask, val_type, name, 939 cmask, val_type, name,
937 snd_usb_mixer_vol_tlv); 940 snd_usb_mixer_vol_tlv);
938 if (err < 0) 941 if (err < 0)
939 return err; 942 return err;
940 } 943 }
941 944
942 return 0; 945 return 0;
943 } 946 }
944 947
945 static int snd_ftu_create_effect_send_ctls(struct usb_mixer_interface *mixer) 948 static int snd_ftu_create_effect_send_ctls(struct usb_mixer_interface *mixer)
946 { 949 {
947 unsigned int cmask; 950 unsigned int cmask;
948 int err, ch; 951 int err, ch;
949 char name[48]; 952 char name[48];
950 953
951 const unsigned int id = 5; 954 const unsigned int id = 5;
952 const int val_type = USB_MIXER_S16; 955 const int val_type = USB_MIXER_S16;
953 const unsigned int control = 9; 956 const unsigned int control = 9;
954 957
955 for (ch = 0; ch < 8; ++ch) { 958 for (ch = 0; ch < 8; ++ch) {
956 cmask = 1 << ch; 959 cmask = 1 << ch;
957 snprintf(name, sizeof(name), 960 snprintf(name, sizeof(name),
958 "Effect Send AIn%d Volume", ch + 1); 961 "Effect Send AIn%d Volume", ch + 1);
959 err = snd_create_std_mono_ctl(mixer, id, control, cmask, 962 err = snd_create_std_mono_ctl(mixer, id, control, cmask,
960 val_type, name, 963 val_type, name,
961 snd_usb_mixer_vol_tlv); 964 snd_usb_mixer_vol_tlv);
962 if (err < 0) 965 if (err < 0)
963 return err; 966 return err;
964 } 967 }
965 for (ch = 8; ch < 16; ++ch) { 968 for (ch = 8; ch < 16; ++ch) {
966 cmask = 1 << ch; 969 cmask = 1 << ch;
967 snprintf(name, sizeof(name), 970 snprintf(name, sizeof(name),
968 "Effect Send DIn%d Volume", ch - 7); 971 "Effect Send DIn%d Volume", ch - 7);
969 err = snd_create_std_mono_ctl(mixer, id, control, cmask, 972 err = snd_create_std_mono_ctl(mixer, id, control, cmask,
970 val_type, name, 973 val_type, name,
971 snd_usb_mixer_vol_tlv); 974 snd_usb_mixer_vol_tlv);
972 if (err < 0) 975 if (err < 0)
973 return err; 976 return err;
974 } 977 }
975 return 0; 978 return 0;
976 } 979 }
977 980
978 static int snd_ftu_create_mixer(struct usb_mixer_interface *mixer) 981 static int snd_ftu_create_mixer(struct usb_mixer_interface *mixer)
979 { 982 {
980 int err; 983 int err;
981 984
982 err = snd_ftu_create_volume_ctls(mixer); 985 err = snd_ftu_create_volume_ctls(mixer);
983 if (err < 0) 986 if (err < 0)
984 return err; 987 return err;
985 988
986 err = snd_ftu_create_effect_switch(mixer, 1, 6); 989 err = snd_ftu_create_effect_switch(mixer, 1, 6);
987 if (err < 0) 990 if (err < 0)
988 return err; 991 return err;
989 992
990 err = snd_ftu_create_effect_volume_ctl(mixer); 993 err = snd_ftu_create_effect_volume_ctl(mixer);
991 if (err < 0) 994 if (err < 0)
992 return err; 995 return err;
993 996
994 err = snd_ftu_create_effect_duration_ctl(mixer); 997 err = snd_ftu_create_effect_duration_ctl(mixer);
995 if (err < 0) 998 if (err < 0)
996 return err; 999 return err;
997 1000
998 err = snd_ftu_create_effect_feedback_ctl(mixer); 1001 err = snd_ftu_create_effect_feedback_ctl(mixer);
999 if (err < 0) 1002 if (err < 0)
1000 return err; 1003 return err;
1001 1004
1002 err = snd_ftu_create_effect_return_ctls(mixer); 1005 err = snd_ftu_create_effect_return_ctls(mixer);
1003 if (err < 0) 1006 if (err < 0)
1004 return err; 1007 return err;
1005 1008
1006 err = snd_ftu_create_effect_send_ctls(mixer); 1009 err = snd_ftu_create_effect_send_ctls(mixer);
1007 if (err < 0) 1010 if (err < 0)
1008 return err; 1011 return err;
1009 1012
1010 return 0; 1013 return 0;
1011 } 1014 }
1012 1015
1013 void snd_emuusb_set_samplerate(struct snd_usb_audio *chip, 1016 void snd_emuusb_set_samplerate(struct snd_usb_audio *chip,
1014 unsigned char samplerate_id) 1017 unsigned char samplerate_id)
1015 { 1018 {
1016 struct usb_mixer_interface *mixer; 1019 struct usb_mixer_interface *mixer;
1017 struct usb_mixer_elem_info *cval; 1020 struct usb_mixer_elem_info *cval;
1018 int unitid = 12; /* SamleRate ExtensionUnit ID */ 1021 int unitid = 12; /* SamleRate ExtensionUnit ID */
1019 1022
1020 list_for_each_entry(mixer, &chip->mixer_list, list) { 1023 list_for_each_entry(mixer, &chip->mixer_list, list) {
1021 cval = mixer->id_elems[unitid]; 1024 cval = mixer->id_elems[unitid];
1022 if (cval) { 1025 if (cval) {
1023 snd_usb_mixer_set_ctl_value(cval, UAC_SET_CUR, 1026 snd_usb_mixer_set_ctl_value(cval, UAC_SET_CUR,
1024 cval->control << 8, 1027 cval->control << 8,
1025 samplerate_id); 1028 samplerate_id);
1026 snd_usb_mixer_notify_id(mixer, unitid); 1029 snd_usb_mixer_notify_id(mixer, unitid);
1027 } 1030 }
1028 break; 1031 break;
1029 } 1032 }
1030 } 1033 }
1031 1034
1032 /* M-Audio Fast Track C400/C600 */ 1035 /* M-Audio Fast Track C400/C600 */
1033 /* C400/C600 volume controls, this control needs a volume quirk, see mixer.c */ 1036 /* C400/C600 volume controls, this control needs a volume quirk, see mixer.c */
1034 static int snd_c400_create_vol_ctls(struct usb_mixer_interface *mixer) 1037 static int snd_c400_create_vol_ctls(struct usb_mixer_interface *mixer)
1035 { 1038 {
1036 char name[64]; 1039 char name[64];
1037 unsigned int cmask, offset; 1040 unsigned int cmask, offset;
1038 int out, chan, err; 1041 int out, chan, err;
1039 int num_outs = 0; 1042 int num_outs = 0;
1040 int num_ins = 0; 1043 int num_ins = 0;
1041 1044
1042 const unsigned int id = 0x40; 1045 const unsigned int id = 0x40;
1043 const int val_type = USB_MIXER_S16; 1046 const int val_type = USB_MIXER_S16;
1044 const int control = 1; 1047 const int control = 1;
1045 1048
1046 switch (mixer->chip->usb_id) { 1049 switch (mixer->chip->usb_id) {
1047 case USB_ID(0x0763, 0x2030): 1050 case USB_ID(0x0763, 0x2030):
1048 num_outs = 6; 1051 num_outs = 6;
1049 num_ins = 4; 1052 num_ins = 4;
1050 break; 1053 break;
1051 case USB_ID(0x0763, 0x2031): 1054 case USB_ID(0x0763, 0x2031):
1052 num_outs = 8; 1055 num_outs = 8;
1053 num_ins = 6; 1056 num_ins = 6;
1054 break; 1057 break;
1055 } 1058 }
1056 1059
1057 for (chan = 0; chan < num_outs + num_ins; chan++) { 1060 for (chan = 0; chan < num_outs + num_ins; chan++) {
1058 for (out = 0; out < num_outs; out++) { 1061 for (out = 0; out < num_outs; out++) {
1059 if (chan < num_outs) { 1062 if (chan < num_outs) {
1060 snprintf(name, sizeof(name), 1063 snprintf(name, sizeof(name),
1061 "PCM%d-Out%d Playback Volume", 1064 "PCM%d-Out%d Playback Volume",
1062 chan + 1, out + 1); 1065 chan + 1, out + 1);
1063 } else { 1066 } else {
1064 snprintf(name, sizeof(name), 1067 snprintf(name, sizeof(name),
1065 "In%d-Out%d Playback Volume", 1068 "In%d-Out%d Playback Volume",
1066 chan - num_outs + 1, out + 1); 1069 chan - num_outs + 1, out + 1);
1067 } 1070 }
1068 1071
1069 cmask = (out == 0) ? 0 : 1 << (out - 1); 1072 cmask = (out == 0) ? 0 : 1 << (out - 1);
1070 offset = chan * num_outs; 1073 offset = chan * num_outs;
1071 err = snd_create_std_mono_ctl_offset(mixer, id, control, 1074 err = snd_create_std_mono_ctl_offset(mixer, id, control,
1072 cmask, val_type, offset, name, 1075 cmask, val_type, offset, name,
1073 &snd_usb_mixer_vol_tlv); 1076 &snd_usb_mixer_vol_tlv);
1074 if (err < 0) 1077 if (err < 0)
1075 return err; 1078 return err;
1076 } 1079 }
1077 } 1080 }
1078 1081
1079 return 0; 1082 return 0;
1080 } 1083 }
1081 1084
1082 /* This control needs a volume quirk, see mixer.c */ 1085 /* This control needs a volume quirk, see mixer.c */
1083 static int snd_c400_create_effect_volume_ctl(struct usb_mixer_interface *mixer) 1086 static int snd_c400_create_effect_volume_ctl(struct usb_mixer_interface *mixer)
1084 { 1087 {
1085 static const char name[] = "Effect Volume"; 1088 static const char name[] = "Effect Volume";
1086 const unsigned int id = 0x43; 1089 const unsigned int id = 0x43;
1087 const int val_type = USB_MIXER_U8; 1090 const int val_type = USB_MIXER_U8;
1088 const unsigned int control = 3; 1091 const unsigned int control = 3;
1089 const unsigned int cmask = 0; 1092 const unsigned int cmask = 0;
1090 1093
1091 return snd_create_std_mono_ctl(mixer, id, control, cmask, val_type, 1094 return snd_create_std_mono_ctl(mixer, id, control, cmask, val_type,
1092 name, snd_usb_mixer_vol_tlv); 1095 name, snd_usb_mixer_vol_tlv);
1093 } 1096 }
1094 1097
1095 /* This control needs a volume quirk, see mixer.c */ 1098 /* This control needs a volume quirk, see mixer.c */
1096 static int snd_c400_create_effect_duration_ctl(struct usb_mixer_interface *mixer) 1099 static int snd_c400_create_effect_duration_ctl(struct usb_mixer_interface *mixer)
1097 { 1100 {
1098 static const char name[] = "Effect Duration"; 1101 static const char name[] = "Effect Duration";
1099 const unsigned int id = 0x43; 1102 const unsigned int id = 0x43;
1100 const int val_type = USB_MIXER_S16; 1103 const int val_type = USB_MIXER_S16;
1101 const unsigned int control = 4; 1104 const unsigned int control = 4;
1102 const unsigned int cmask = 0; 1105 const unsigned int cmask = 0;
1103 1106
1104 return snd_create_std_mono_ctl(mixer, id, control, cmask, val_type, 1107 return snd_create_std_mono_ctl(mixer, id, control, cmask, val_type,
1105 name, snd_usb_mixer_vol_tlv); 1108 name, snd_usb_mixer_vol_tlv);
1106 } 1109 }
1107 1110
1108 /* This control needs a volume quirk, see mixer.c */ 1111 /* This control needs a volume quirk, see mixer.c */
1109 static int snd_c400_create_effect_feedback_ctl(struct usb_mixer_interface *mixer) 1112 static int snd_c400_create_effect_feedback_ctl(struct usb_mixer_interface *mixer)
1110 { 1113 {
1111 static const char name[] = "Effect Feedback Volume"; 1114 static const char name[] = "Effect Feedback Volume";
1112 const unsigned int id = 0x43; 1115 const unsigned int id = 0x43;
1113 const int val_type = USB_MIXER_U8; 1116 const int val_type = USB_MIXER_U8;
1114 const unsigned int control = 5; 1117 const unsigned int control = 5;
1115 const unsigned int cmask = 0; 1118 const unsigned int cmask = 0;
1116 1119
1117 return snd_create_std_mono_ctl(mixer, id, control, cmask, val_type, 1120 return snd_create_std_mono_ctl(mixer, id, control, cmask, val_type,
1118 name, NULL); 1121 name, NULL);
1119 } 1122 }
1120 1123
1121 static int snd_c400_create_effect_vol_ctls(struct usb_mixer_interface *mixer) 1124 static int snd_c400_create_effect_vol_ctls(struct usb_mixer_interface *mixer)
1122 { 1125 {
1123 char name[64]; 1126 char name[64];
1124 unsigned int cmask; 1127 unsigned int cmask;
1125 int chan, err; 1128 int chan, err;
1126 int num_outs = 0; 1129 int num_outs = 0;
1127 int num_ins = 0; 1130 int num_ins = 0;
1128 1131
1129 const unsigned int id = 0x42; 1132 const unsigned int id = 0x42;
1130 const int val_type = USB_MIXER_S16; 1133 const int val_type = USB_MIXER_S16;
1131 const int control = 1; 1134 const int control = 1;
1132 1135
1133 switch (mixer->chip->usb_id) { 1136 switch (mixer->chip->usb_id) {
1134 case USB_ID(0x0763, 0x2030): 1137 case USB_ID(0x0763, 0x2030):
1135 num_outs = 6; 1138 num_outs = 6;
1136 num_ins = 4; 1139 num_ins = 4;
1137 break; 1140 break;
1138 case USB_ID(0x0763, 0x2031): 1141 case USB_ID(0x0763, 0x2031):
1139 num_outs = 8; 1142 num_outs = 8;
1140 num_ins = 6; 1143 num_ins = 6;
1141 break; 1144 break;
1142 } 1145 }
1143 1146
1144 for (chan = 0; chan < num_outs + num_ins; chan++) { 1147 for (chan = 0; chan < num_outs + num_ins; chan++) {
1145 if (chan < num_outs) { 1148 if (chan < num_outs) {
1146 snprintf(name, sizeof(name), 1149 snprintf(name, sizeof(name),
1147 "Effect Send DOut%d", 1150 "Effect Send DOut%d",
1148 chan + 1); 1151 chan + 1);
1149 } else { 1152 } else {
1150 snprintf(name, sizeof(name), 1153 snprintf(name, sizeof(name),
1151 "Effect Send AIn%d", 1154 "Effect Send AIn%d",
1152 chan - num_outs + 1); 1155 chan - num_outs + 1);
1153 } 1156 }
1154 1157
1155 cmask = (chan == 0) ? 0 : 1 << (chan - 1); 1158 cmask = (chan == 0) ? 0 : 1 << (chan - 1);
1156 err = snd_create_std_mono_ctl(mixer, id, control, 1159 err = snd_create_std_mono_ctl(mixer, id, control,
1157 cmask, val_type, name, 1160 cmask, val_type, name,
1158 &snd_usb_mixer_vol_tlv); 1161 &snd_usb_mixer_vol_tlv);
1159 if (err < 0) 1162 if (err < 0)
1160 return err; 1163 return err;
1161 } 1164 }
1162 1165
1163 return 0; 1166 return 0;
1164 } 1167 }
1165 1168
1166 static int snd_c400_create_effect_ret_vol_ctls(struct usb_mixer_interface *mixer) 1169 static int snd_c400_create_effect_ret_vol_ctls(struct usb_mixer_interface *mixer)
1167 { 1170 {
1168 char name[64]; 1171 char name[64];
1169 unsigned int cmask; 1172 unsigned int cmask;
1170 int chan, err; 1173 int chan, err;
1171 int num_outs = 0; 1174 int num_outs = 0;
1172 int offset = 0; 1175 int offset = 0;
1173 1176
1174 const unsigned int id = 0x40; 1177 const unsigned int id = 0x40;
1175 const int val_type = USB_MIXER_S16; 1178 const int val_type = USB_MIXER_S16;
1176 const int control = 1; 1179 const int control = 1;
1177 1180
1178 switch (mixer->chip->usb_id) { 1181 switch (mixer->chip->usb_id) {
1179 case USB_ID(0x0763, 0x2030): 1182 case USB_ID(0x0763, 0x2030):
1180 num_outs = 6; 1183 num_outs = 6;
1181 offset = 0x3c; 1184 offset = 0x3c;
1182 /* { 0x3c, 0x43, 0x3e, 0x45, 0x40, 0x47 } */ 1185 /* { 0x3c, 0x43, 0x3e, 0x45, 0x40, 0x47 } */
1183 break; 1186 break;
1184 case USB_ID(0x0763, 0x2031): 1187 case USB_ID(0x0763, 0x2031):
1185 num_outs = 8; 1188 num_outs = 8;
1186 offset = 0x70; 1189 offset = 0x70;
1187 /* { 0x70, 0x79, 0x72, 0x7b, 0x74, 0x7d, 0x76, 0x7f } */ 1190 /* { 0x70, 0x79, 0x72, 0x7b, 0x74, 0x7d, 0x76, 0x7f } */
1188 break; 1191 break;
1189 } 1192 }
1190 1193
1191 for (chan = 0; chan < num_outs; chan++) { 1194 for (chan = 0; chan < num_outs; chan++) {
1192 snprintf(name, sizeof(name), 1195 snprintf(name, sizeof(name),
1193 "Effect Return %d", 1196 "Effect Return %d",
1194 chan + 1); 1197 chan + 1);
1195 1198
1196 cmask = (chan == 0) ? 0 : 1199 cmask = (chan == 0) ? 0 :
1197 1 << (chan + (chan % 2) * num_outs - 1); 1200 1 << (chan + (chan % 2) * num_outs - 1);
1198 err = snd_create_std_mono_ctl_offset(mixer, id, control, 1201 err = snd_create_std_mono_ctl_offset(mixer, id, control,
1199 cmask, val_type, offset, name, 1202 cmask, val_type, offset, name,
1200 &snd_usb_mixer_vol_tlv); 1203 &snd_usb_mixer_vol_tlv);
1201 if (err < 0) 1204 if (err < 0)
1202 return err; 1205 return err;
1203 } 1206 }
1204 1207
1205 return 0; 1208 return 0;
1206 } 1209 }
1207 1210
1208 static int snd_c400_create_mixer(struct usb_mixer_interface *mixer) 1211 static int snd_c400_create_mixer(struct usb_mixer_interface *mixer)
1209 { 1212 {
1210 int err; 1213 int err;
1211 1214
1212 err = snd_c400_create_vol_ctls(mixer); 1215 err = snd_c400_create_vol_ctls(mixer);
1213 if (err < 0) 1216 if (err < 0)
1214 return err; 1217 return err;
1215 1218
1216 err = snd_c400_create_effect_vol_ctls(mixer); 1219 err = snd_c400_create_effect_vol_ctls(mixer);
1217 if (err < 0) 1220 if (err < 0)
1218 return err; 1221 return err;
1219 1222
1220 err = snd_c400_create_effect_ret_vol_ctls(mixer); 1223 err = snd_c400_create_effect_ret_vol_ctls(mixer);
1221 if (err < 0) 1224 if (err < 0)
1222 return err; 1225 return err;
1223 1226
1224 err = snd_ftu_create_effect_switch(mixer, 2, 0x43); 1227 err = snd_ftu_create_effect_switch(mixer, 2, 0x43);
1225 if (err < 0) 1228 if (err < 0)
1226 return err; 1229 return err;
1227 1230
1228 err = snd_c400_create_effect_volume_ctl(mixer); 1231 err = snd_c400_create_effect_volume_ctl(mixer);
1229 if (err < 0) 1232 if (err < 0)
1230 return err; 1233 return err;
1231 1234
1232 err = snd_c400_create_effect_duration_ctl(mixer); 1235 err = snd_c400_create_effect_duration_ctl(mixer);
1233 if (err < 0) 1236 if (err < 0)
1234 return err; 1237 return err;
1235 1238
1236 err = snd_c400_create_effect_feedback_ctl(mixer); 1239 err = snd_c400_create_effect_feedback_ctl(mixer);
1237 if (err < 0) 1240 if (err < 0)
1238 return err; 1241 return err;
1239 1242
1240 return 0; 1243 return 0;
1241 } 1244 }
1242 1245
1243 /* 1246 /*
1244 * The mixer units for Ebox-44 are corrupt, and even where they 1247 * The mixer units for Ebox-44 are corrupt, and even where they
1245 * are valid they presents mono controls as L and R channels of 1248 * are valid they presents mono controls as L and R channels of
1246 * stereo. So we provide a good mixer here. 1249 * stereo. So we provide a good mixer here.
1247 */ 1250 */
1248 static struct std_mono_table ebox44_table[] = { 1251 static struct std_mono_table ebox44_table[] = {
1249 { 1252 {
1250 .unitid = 4, 1253 .unitid = 4,
1251 .control = 1, 1254 .control = 1,
1252 .cmask = 0x0, 1255 .cmask = 0x0,
1253 .val_type = USB_MIXER_INV_BOOLEAN, 1256 .val_type = USB_MIXER_INV_BOOLEAN,
1254 .name = "Headphone Playback Switch" 1257 .name = "Headphone Playback Switch"
1255 }, 1258 },
1256 { 1259 {
1257 .unitid = 4, 1260 .unitid = 4,
1258 .control = 2, 1261 .control = 2,
1259 .cmask = 0x1, 1262 .cmask = 0x1,
1260 .val_type = USB_MIXER_S16, 1263 .val_type = USB_MIXER_S16,
1261 .name = "Headphone A Mix Playback Volume" 1264 .name = "Headphone A Mix Playback Volume"
1262 }, 1265 },
1263 { 1266 {
1264 .unitid = 4, 1267 .unitid = 4,
1265 .control = 2, 1268 .control = 2,
1266 .cmask = 0x2, 1269 .cmask = 0x2,
1267 .val_type = USB_MIXER_S16, 1270 .val_type = USB_MIXER_S16,
1268 .name = "Headphone B Mix Playback Volume" 1271 .name = "Headphone B Mix Playback Volume"
1269 }, 1272 },
1270 1273
1271 { 1274 {
1272 .unitid = 7, 1275 .unitid = 7,
1273 .control = 1, 1276 .control = 1,
1274 .cmask = 0x0, 1277 .cmask = 0x0,
1275 .val_type = USB_MIXER_INV_BOOLEAN, 1278 .val_type = USB_MIXER_INV_BOOLEAN,
1276 .name = "Output Playback Switch" 1279 .name = "Output Playback Switch"
1277 }, 1280 },
1278 { 1281 {
1279 .unitid = 7, 1282 .unitid = 7,
1280 .control = 2, 1283 .control = 2,
1281 .cmask = 0x1, 1284 .cmask = 0x1,
1282 .val_type = USB_MIXER_S16, 1285 .val_type = USB_MIXER_S16,
1283 .name = "Output A Playback Volume" 1286 .name = "Output A Playback Volume"
1284 }, 1287 },
1285 { 1288 {
1286 .unitid = 7, 1289 .unitid = 7,
1287 .control = 2, 1290 .control = 2,
1288 .cmask = 0x2, 1291 .cmask = 0x2,
1289 .val_type = USB_MIXER_S16, 1292 .val_type = USB_MIXER_S16,
1290 .name = "Output B Playback Volume" 1293 .name = "Output B Playback Volume"
1291 }, 1294 },
1292 1295
1293 { 1296 {
1294 .unitid = 10, 1297 .unitid = 10,
1295 .control = 1, 1298 .control = 1,
1296 .cmask = 0x0, 1299 .cmask = 0x0,
1297 .val_type = USB_MIXER_INV_BOOLEAN, 1300 .val_type = USB_MIXER_INV_BOOLEAN,
1298 .name = "Input Capture Switch" 1301 .name = "Input Capture Switch"
1299 }, 1302 },
1300 { 1303 {
1301 .unitid = 10, 1304 .unitid = 10,
1302 .control = 2, 1305 .control = 2,
1303 .cmask = 0x1, 1306 .cmask = 0x1,
1304 .val_type = USB_MIXER_S16, 1307 .val_type = USB_MIXER_S16,
1305 .name = "Input A Capture Volume" 1308 .name = "Input A Capture Volume"
1306 }, 1309 },
1307 { 1310 {
1308 .unitid = 10, 1311 .unitid = 10,
1309 .control = 2, 1312 .control = 2,
1310 .cmask = 0x2, 1313 .cmask = 0x2,
1311 .val_type = USB_MIXER_S16, 1314 .val_type = USB_MIXER_S16,
1312 .name = "Input B Capture Volume" 1315 .name = "Input B Capture Volume"
1313 }, 1316 },
1314 1317
1315 {} 1318 {}
1316 }; 1319 };
1317 1320
1321 /* Audio Advantage Micro II findings:
1322 *
1323 * Mapping spdif AES bits to vendor register.bit:
1324 * AES0: [0 0 0 0 2.3 2.2 2.1 2.0] - default 0x00
1325 * AES1: [3.3 3.2.3.1.3.0 2.7 2.6 2.5 2.4] - default: 0x01
1326 * AES2: [0 0 0 0 0 0 0 0]
1327 * AES3: [0 0 0 0 0 0 x 0] - 'x' bit is set basing on standard usb request
1328 * (UAC_EP_CS_ATTR_SAMPLE_RATE) for Audio Devices
1329 *
1330 * power on values:
1331 * r2: 0x10
1332 * r3: 0x20 (b7 is zeroed just before playback (except IEC61937) and set
1333 * just after it to 0xa0, presumably it disables/mutes some analog
1334 * parts when there is no audio.)
1335 * r9: 0x28
1336 *
1337 * Optical transmitter on/off:
1338 * vendor register.bit: 9.1
1339 * 0 - on (0x28 register value)
1340 * 1 - off (0x2a register value)
1341 *
1342 */
1343 static int snd_microii_spdif_info(struct snd_kcontrol *kcontrol,
1344 struct snd_ctl_elem_info *uinfo)
1345 {
1346 uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
1347 uinfo->count = 1;
1348 return 0;
1349 }
1350
1351 static int snd_microii_spdif_default_get(struct snd_kcontrol *kcontrol,
1352 struct snd_ctl_elem_value *ucontrol)
1353 {
1354 struct usb_mixer_interface *mixer = snd_kcontrol_chip(kcontrol);
1355 int err;
1356 struct usb_interface *iface;
1357 struct usb_host_interface *alts;
1358 unsigned int ep;
1359 unsigned char data[3];
1360 int rate;
1361
1362 ucontrol->value.iec958.status[0] = kcontrol->private_value & 0xff;
1363 ucontrol->value.iec958.status[1] = (kcontrol->private_value >> 8) & 0xff;
1364 ucontrol->value.iec958.status[2] = 0x00;
1365
1366 /* use known values for that card: interface#1 altsetting#1 */
1367 iface = usb_ifnum_to_if(mixer->chip->dev, 1);
1368 alts = &iface->altsetting[1];
1369 ep = get_endpoint(alts, 0)->bEndpointAddress;
1370
1371 err = snd_usb_ctl_msg(mixer->chip->dev,
1372 usb_rcvctrlpipe(mixer->chip->dev, 0),
1373 UAC_GET_CUR,
1374 USB_TYPE_CLASS | USB_RECIP_ENDPOINT | USB_DIR_IN,
1375 UAC_EP_CS_ATTR_SAMPLE_RATE << 8,
1376 ep,
1377 data,
1378 sizeof(data));
1379 if (err < 0)
1380 goto end;
1381
1382 rate = data[0] | (data[1] << 8) | (data[2] << 16);
1383 ucontrol->value.iec958.status[3] = (rate == 48000) ?
1384 IEC958_AES3_CON_FS_48000 : IEC958_AES3_CON_FS_44100;
1385
1386 err = 0;
1387 end:
1388 return err;
1389 }
1390
1391 static int snd_microii_spdif_default_put(struct snd_kcontrol *kcontrol,
1392 struct snd_ctl_elem_value *ucontrol)
1393 {
1394 struct usb_mixer_interface *mixer = snd_kcontrol_chip(kcontrol);
1395 int err;
1396 u8 reg;
1397 unsigned long priv_backup = kcontrol->private_value;
1398
1399 reg = ((ucontrol->value.iec958.status[1] & 0x0f) << 4) |
1400 (ucontrol->value.iec958.status[0] & 0x0f);
1401 err = snd_usb_ctl_msg(mixer->chip->dev,
1402 usb_sndctrlpipe(mixer->chip->dev, 0),
1403 UAC_SET_CUR,
1404 USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER,
1405 reg,
1406 2,
1407 NULL,
1408 0);
1409 if (err < 0)
1410 goto end;
1411
1412 kcontrol->private_value &= 0xfffff0f0;
1413 kcontrol->private_value |= (ucontrol->value.iec958.status[1] & 0x0f) << 8;
1414 kcontrol->private_value |= (ucontrol->value.iec958.status[0] & 0x0f);
1415
1416 reg = (ucontrol->value.iec958.status[0] & IEC958_AES0_NONAUDIO) ?
1417 0xa0 : 0x20;
1418 reg |= (ucontrol->value.iec958.status[1] >> 4) & 0x0f;
1419 err = snd_usb_ctl_msg(mixer->chip->dev,
1420 usb_sndctrlpipe(mixer->chip->dev, 0),
1421 UAC_SET_CUR,
1422 USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER,
1423 reg,
1424 3,
1425 NULL,
1426 0);
1427 if (err < 0)
1428 goto end;
1429
1430 kcontrol->private_value &= 0xffff0fff;
1431 kcontrol->private_value |= (ucontrol->value.iec958.status[1] & 0xf0) << 8;
1432
1433 /* The frequency bits in AES3 cannot be set via register access. */
1434
1435 /* Silently ignore any bits from the request that cannot be set. */
1436
1437 err = (priv_backup != kcontrol->private_value);
1438 end:
1439 return err;
1440 }
1441
1442 static int snd_microii_spdif_mask_get(struct snd_kcontrol *kcontrol,
1443 struct snd_ctl_elem_value *ucontrol)
1444 {
1445 ucontrol->value.iec958.status[0] = 0x0f;
1446 ucontrol->value.iec958.status[1] = 0xff;
1447 ucontrol->value.iec958.status[2] = 0x00;
1448 ucontrol->value.iec958.status[3] = 0x00;
1449
1450 return 0;
1451 }
1452
1453 static int snd_microii_spdif_switch_get(struct snd_kcontrol *kcontrol,
1454 struct snd_ctl_elem_value *ucontrol)
1455 {
1456 ucontrol->value.integer.value[0] = !(kcontrol->private_value & 0x02);
1457
1458 return 0;
1459 }
1460
1461 static int snd_microii_spdif_switch_put(struct snd_kcontrol *kcontrol,
1462 struct snd_ctl_elem_value *ucontrol)
1463 {
1464 struct usb_mixer_interface *mixer = snd_kcontrol_chip(kcontrol);
1465 int err;
1466 u8 reg = ucontrol->value.integer.value[0] ? 0x28 : 0x2a;
1467
1468 err = snd_usb_ctl_msg(mixer->chip->dev,
1469 usb_sndctrlpipe(mixer->chip->dev, 0),
1470 UAC_SET_CUR,
1471 USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER,
1472 reg,
1473 9,
1474 NULL,
1475 0);
1476
1477 if (!err) {
1478 err = (reg != (kcontrol->private_value & 0x0ff));
1479 if (err)
1480 kcontrol->private_value = reg;
1481 }
1482
1483 return err;
1484 }
1485
1486 static struct snd_kcontrol_new snd_microii_mixer_spdif[] = {
1487 {
1488 .iface = SNDRV_CTL_ELEM_IFACE_PCM,
1489 .name = SNDRV_CTL_NAME_IEC958("", PLAYBACK, DEFAULT),
1490 .info = snd_microii_spdif_info,
1491 .get = snd_microii_spdif_default_get,
1492 .put = snd_microii_spdif_default_put,
1493 .private_value = 0x00000100UL,/* reset value */
1494 },
1495 {
1496 .access = SNDRV_CTL_ELEM_ACCESS_READ,
1497 .iface = SNDRV_CTL_ELEM_IFACE_PCM,
1498 .name = SNDRV_CTL_NAME_IEC958("", PLAYBACK, MASK),
1499 .info = snd_microii_spdif_info,
1500 .get = snd_microii_spdif_mask_get,
1501 },
1502 {
1503 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1504 .name = SNDRV_CTL_NAME_IEC958("", PLAYBACK, SWITCH),
1505 .info = snd_ctl_boolean_mono_info,
1506 .get = snd_microii_spdif_switch_get,
1507 .put = snd_microii_spdif_switch_put,
1508 .private_value = 0x00000028UL,/* reset value */
1509 }
1510 };
1511
1512 static int snd_microii_controls_create(struct usb_mixer_interface *mixer)
1513 {
1514 int err, i;
1515
1516 for (i = 0; i < ARRAY_SIZE(snd_microii_mixer_spdif); ++i) {
1517 err = snd_ctl_add(mixer->chip->card,
1518 snd_ctl_new1(&snd_microii_mixer_spdif[i], mixer));
1519 if (err < 0)
1520 return err;
1521 }
1522
1523 return err;
1524 }
1525
1318 int snd_usb_mixer_apply_create_quirk(struct usb_mixer_interface *mixer) 1526 int snd_usb_mixer_apply_create_quirk(struct usb_mixer_interface *mixer)
1319 { 1527 {
1320 int err = 0; 1528 int err = 0;
1321 struct snd_info_entry *entry; 1529 struct snd_info_entry *entry;
1322 1530
1323 if ((err = snd_usb_soundblaster_remote_init(mixer)) < 0) 1531 if ((err = snd_usb_soundblaster_remote_init(mixer)) < 0)
1324 return err; 1532 return err;
1325 1533
1326 switch (mixer->chip->usb_id) { 1534 switch (mixer->chip->usb_id) {
1327 case USB_ID(0x041e, 0x3020): 1535 case USB_ID(0x041e, 0x3020):
1328 case USB_ID(0x041e, 0x3040): 1536 case USB_ID(0x041e, 0x3040):
1329 case USB_ID(0x041e, 0x3042): 1537 case USB_ID(0x041e, 0x3042):
1330 case USB_ID(0x041e, 0x30df): 1538 case USB_ID(0x041e, 0x30df):
1331 case USB_ID(0x041e, 0x3048): 1539 case USB_ID(0x041e, 0x3048):
1332 err = snd_audigy2nx_controls_create(mixer); 1540 err = snd_audigy2nx_controls_create(mixer);
1333 if (err < 0) 1541 if (err < 0)
1334 break; 1542 break;
1335 if (!snd_card_proc_new(mixer->chip->card, "audigy2nx", &entry)) 1543 if (!snd_card_proc_new(mixer->chip->card, "audigy2nx", &entry))
1336 snd_info_set_text_ops(entry, mixer, 1544 snd_info_set_text_ops(entry, mixer,
1337 snd_audigy2nx_proc_read); 1545 snd_audigy2nx_proc_read);
1338 break; 1546 break;
1339 1547
1340 case USB_ID(0x0763, 0x2030): /* M-Audio Fast Track C400 */ 1548 case USB_ID(0x0763, 0x2030): /* M-Audio Fast Track C400 */
1341 case USB_ID(0x0763, 0x2031): /* M-Audio Fast Track C400 */ 1549 case USB_ID(0x0763, 0x2031): /* M-Audio Fast Track C400 */
1342 err = snd_c400_create_mixer(mixer); 1550 err = snd_c400_create_mixer(mixer);
1343 break; 1551 break;
1344 1552
1345 case USB_ID(0x0763, 0x2080): /* M-Audio Fast Track Ultra */ 1553 case USB_ID(0x0763, 0x2080): /* M-Audio Fast Track Ultra */
1346 case USB_ID(0x0763, 0x2081): /* M-Audio Fast Track Ultra 8R */ 1554 case USB_ID(0x0763, 0x2081): /* M-Audio Fast Track Ultra 8R */
1347 err = snd_ftu_create_mixer(mixer); 1555 err = snd_ftu_create_mixer(mixer);
1348 break; 1556 break;
1349 1557
1350 case USB_ID(0x0b05, 0x1739): /* ASUS Xonar U1 */ 1558 case USB_ID(0x0b05, 0x1739): /* ASUS Xonar U1 */
1351 case USB_ID(0x0b05, 0x1743): /* ASUS Xonar U1 (2) */ 1559 case USB_ID(0x0b05, 0x1743): /* ASUS Xonar U1 (2) */
1352 case USB_ID(0x0b05, 0x17a0): /* ASUS Xonar U3 */ 1560 case USB_ID(0x0b05, 0x17a0): /* ASUS Xonar U3 */
1353 err = snd_xonar_u1_controls_create(mixer); 1561 err = snd_xonar_u1_controls_create(mixer);
1562 break;
1563
1564 case USB_ID(0x0d8c, 0x0103): /* Audio Advantage Micro II */
1565 err = snd_microii_controls_create(mixer);
1354 break; 1566 break;
1355 1567
1356 case USB_ID(0x17cc, 0x1011): /* Traktor Audio 6 */ 1568 case USB_ID(0x17cc, 0x1011): /* Traktor Audio 6 */
1357 err = snd_nativeinstruments_create_mixer(mixer, 1569 err = snd_nativeinstruments_create_mixer(mixer,
1358 snd_nativeinstruments_ta6_mixers, 1570 snd_nativeinstruments_ta6_mixers,
1359 ARRAY_SIZE(snd_nativeinstruments_ta6_mixers)); 1571 ARRAY_SIZE(snd_nativeinstruments_ta6_mixers));
1360 break; 1572 break;
1361 1573
1362 case USB_ID(0x17cc, 0x1021): /* Traktor Audio 10 */ 1574 case USB_ID(0x17cc, 0x1021): /* Traktor Audio 10 */
1363 err = snd_nativeinstruments_create_mixer(mixer, 1575 err = snd_nativeinstruments_create_mixer(mixer,
1364 snd_nativeinstruments_ta10_mixers, 1576 snd_nativeinstruments_ta10_mixers,
1365 ARRAY_SIZE(snd_nativeinstruments_ta10_mixers)); 1577 ARRAY_SIZE(snd_nativeinstruments_ta10_mixers));
1366 break; 1578 break;
1367 1579
1368 case USB_ID(0x200c, 0x1018): /* Electrix Ebox-44 */ 1580 case USB_ID(0x200c, 0x1018): /* Electrix Ebox-44 */
1369 /* detection is disabled in mixer_maps.c */ 1581 /* detection is disabled in mixer_maps.c */
1370 err = snd_create_std_mono_table(mixer, ebox44_table); 1582 err = snd_create_std_mono_table(mixer, ebox44_table);
1371 break; 1583 break;
1372 } 1584 }
1373 1585
1374 return err; 1586 return err;
1375 } 1587 }
1376 1588
1377 void snd_usb_mixer_rc_memory_change(struct usb_mixer_interface *mixer, 1589 void snd_usb_mixer_rc_memory_change(struct usb_mixer_interface *mixer,
1378 int unitid) 1590 int unitid)
1379 { 1591 {
1380 if (!mixer->rc_cfg) 1592 if (!mixer->rc_cfg)
1381 return; 1593 return;
1382 /* unit ids specific to Extigy/Audigy 2 NX: */ 1594 /* unit ids specific to Extigy/Audigy 2 NX: */
1383 switch (unitid) { 1595 switch (unitid) {
1384 case 0: /* remote control */ 1596 case 0: /* remote control */
1385 mixer->rc_urb->dev = mixer->chip->dev; 1597 mixer->rc_urb->dev = mixer->chip->dev;
1386 usb_submit_urb(mixer->rc_urb, GFP_ATOMIC); 1598 usb_submit_urb(mixer->rc_urb, GFP_ATOMIC);
1387 break; 1599 break;
1388 case 4: /* digital in jack */ 1600 case 4: /* digital in jack */
1389 case 7: /* line in jacks */ 1601 case 7: /* line in jacks */
1390 case 19: /* speaker out jacks */ 1602 case 19: /* speaker out jacks */
1391 case 20: /* headphones out jack */ 1603 case 20: /* headphones out jack */
1392 break; 1604 break;
1393 /* live24ext: 4 = line-in jack */ 1605 /* live24ext: 4 = line-in jack */
1394 case 3: /* hp-out jack (may actuate Mute) */ 1606 case 3: /* hp-out jack (may actuate Mute) */
1395 if (mixer->chip->usb_id == USB_ID(0x041e, 0x3040) || 1607 if (mixer->chip->usb_id == USB_ID(0x041e, 0x3040) ||
1396 mixer->chip->usb_id == USB_ID(0x041e, 0x3048)) 1608 mixer->chip->usb_id == USB_ID(0x041e, 0x3048))
1397 snd_usb_mixer_notify_id(mixer, mixer->rc_cfg->mute_mixer_id); 1609 snd_usb_mixer_notify_id(mixer, mixer->rc_cfg->mute_mixer_id);
1398 break; 1610 break;
1399 default: 1611 default:
1400 snd_printd(KERN_DEBUG "memory change in unknown unit %d\n", unitid); 1612 snd_printd(KERN_DEBUG "memory change in unknown unit %d\n", unitid);
1401 break; 1613 break;
1402 } 1614 }
1403 } 1615 }
1404 1616
1405 1617
sound/usb/quirks-table.h
1 /* 1 /*
2 * ALSA USB Audio Driver 2 * ALSA USB Audio Driver
3 * 3 *
4 * Copyright (c) 2002 by Takashi Iwai <tiwai@suse.de>, 4 * Copyright (c) 2002 by Takashi Iwai <tiwai@suse.de>,
5 * Clemens Ladisch <clemens@ladisch.de> 5 * Clemens Ladisch <clemens@ladisch.de>
6 * 6 *
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or 10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version. 11 * (at your option) any later version.
12 * 12 *
13 * This program is distributed in the hope that it will be useful, 13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details. 16 * GNU General Public License for more details.
17 * 17 *
18 * You should have received a copy of the GNU General Public License 18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software 19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */ 21 */
22 22
23 /* 23 /*
24 * The contents of this file are part of the driver's id_table. 24 * The contents of this file are part of the driver's id_table.
25 * 25 *
26 * In a perfect world, this file would be empty. 26 * In a perfect world, this file would be empty.
27 */ 27 */
28 28
29 /* 29 /*
30 * Use this for devices where other interfaces are standard compliant, 30 * Use this for devices where other interfaces are standard compliant,
31 * to prevent the quirk being applied to those interfaces. (To work with 31 * to prevent the quirk being applied to those interfaces. (To work with
32 * hotplugging, bDeviceClass must be set to USB_CLASS_PER_INTERFACE.) 32 * hotplugging, bDeviceClass must be set to USB_CLASS_PER_INTERFACE.)
33 */ 33 */
34 #define USB_DEVICE_VENDOR_SPEC(vend, prod) \ 34 #define USB_DEVICE_VENDOR_SPEC(vend, prod) \
35 .match_flags = USB_DEVICE_ID_MATCH_VENDOR | \ 35 .match_flags = USB_DEVICE_ID_MATCH_VENDOR | \
36 USB_DEVICE_ID_MATCH_PRODUCT | \ 36 USB_DEVICE_ID_MATCH_PRODUCT | \
37 USB_DEVICE_ID_MATCH_INT_CLASS, \ 37 USB_DEVICE_ID_MATCH_INT_CLASS, \
38 .idVendor = vend, \ 38 .idVendor = vend, \
39 .idProduct = prod, \ 39 .idProduct = prod, \
40 .bInterfaceClass = USB_CLASS_VENDOR_SPEC 40 .bInterfaceClass = USB_CLASS_VENDOR_SPEC
41 41
42 /* FTDI devices */ 42 /* FTDI devices */
43 { 43 {
44 USB_DEVICE(0x0403, 0xb8d8), 44 USB_DEVICE(0x0403, 0xb8d8),
45 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 45 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
46 /* .vendor_name = "STARR LABS", */ 46 /* .vendor_name = "STARR LABS", */
47 /* .product_name = "Starr Labs MIDI USB device", */ 47 /* .product_name = "Starr Labs MIDI USB device", */
48 .ifnum = 0, 48 .ifnum = 0,
49 .type = QUIRK_MIDI_FTDI 49 .type = QUIRK_MIDI_FTDI
50 } 50 }
51 }, 51 },
52 52
53 { 53 {
54 /* Creative BT-D1 */ 54 /* Creative BT-D1 */
55 USB_DEVICE(0x041e, 0x0005), 55 USB_DEVICE(0x041e, 0x0005),
56 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) { 56 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
57 .ifnum = 1, 57 .ifnum = 1,
58 .type = QUIRK_AUDIO_FIXED_ENDPOINT, 58 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
59 .data = &(const struct audioformat) { 59 .data = &(const struct audioformat) {
60 .formats = SNDRV_PCM_FMTBIT_S16_LE, 60 .formats = SNDRV_PCM_FMTBIT_S16_LE,
61 .channels = 2, 61 .channels = 2,
62 .iface = 1, 62 .iface = 1,
63 .altsetting = 1, 63 .altsetting = 1,
64 .altset_idx = 1, 64 .altset_idx = 1,
65 .endpoint = 0x03, 65 .endpoint = 0x03,
66 .ep_attr = USB_ENDPOINT_XFER_ISOC, 66 .ep_attr = USB_ENDPOINT_XFER_ISOC,
67 .attributes = 0, 67 .attributes = 0,
68 .rates = SNDRV_PCM_RATE_CONTINUOUS, 68 .rates = SNDRV_PCM_RATE_CONTINUOUS,
69 .rate_min = 48000, 69 .rate_min = 48000,
70 .rate_max = 48000, 70 .rate_max = 48000,
71 } 71 }
72 } 72 }
73 }, 73 },
74 74
75 /* Creative/Toshiba Multimedia Center SB-0500 */ 75 /* Creative/Toshiba Multimedia Center SB-0500 */
76 { 76 {
77 USB_DEVICE(0x041e, 0x3048), 77 USB_DEVICE(0x041e, 0x3048),
78 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 78 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
79 .vendor_name = "Toshiba", 79 .vendor_name = "Toshiba",
80 .product_name = "SB-0500", 80 .product_name = "SB-0500",
81 .ifnum = QUIRK_NO_INTERFACE 81 .ifnum = QUIRK_NO_INTERFACE
82 } 82 }
83 }, 83 },
84 84
85 /* Creative/E-Mu devices */ 85 /* Creative/E-Mu devices */
86 { 86 {
87 USB_DEVICE(0x041e, 0x3010), 87 USB_DEVICE(0x041e, 0x3010),
88 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 88 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
89 .vendor_name = "Creative Labs", 89 .vendor_name = "Creative Labs",
90 .product_name = "Sound Blaster MP3+", 90 .product_name = "Sound Blaster MP3+",
91 .ifnum = QUIRK_NO_INTERFACE 91 .ifnum = QUIRK_NO_INTERFACE
92 } 92 }
93 }, 93 },
94 { 94 {
95 /* E-Mu 0202 USB */ 95 /* E-Mu 0202 USB */
96 .match_flags = USB_DEVICE_ID_MATCH_DEVICE, 96 .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
97 .idVendor = 0x041e, 97 .idVendor = 0x041e,
98 .idProduct = 0x3f02, 98 .idProduct = 0x3f02,
99 .bInterfaceClass = USB_CLASS_AUDIO, 99 .bInterfaceClass = USB_CLASS_AUDIO,
100 }, 100 },
101 { 101 {
102 /* E-Mu 0404 USB */ 102 /* E-Mu 0404 USB */
103 .match_flags = USB_DEVICE_ID_MATCH_DEVICE, 103 .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
104 .idVendor = 0x041e, 104 .idVendor = 0x041e,
105 .idProduct = 0x3f04, 105 .idProduct = 0x3f04,
106 .bInterfaceClass = USB_CLASS_AUDIO, 106 .bInterfaceClass = USB_CLASS_AUDIO,
107 }, 107 },
108 { 108 {
109 /* E-Mu Tracker Pre */ 109 /* E-Mu Tracker Pre */
110 .match_flags = USB_DEVICE_ID_MATCH_DEVICE, 110 .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
111 .idVendor = 0x041e, 111 .idVendor = 0x041e,
112 .idProduct = 0x3f0a, 112 .idProduct = 0x3f0a,
113 .bInterfaceClass = USB_CLASS_AUDIO, 113 .bInterfaceClass = USB_CLASS_AUDIO,
114 }, 114 },
115 { 115 {
116 /* E-Mu 0204 USB */ 116 /* E-Mu 0204 USB */
117 .match_flags = USB_DEVICE_ID_MATCH_DEVICE, 117 .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
118 .idVendor = 0x041e, 118 .idVendor = 0x041e,
119 .idProduct = 0x3f19, 119 .idProduct = 0x3f19,
120 .bInterfaceClass = USB_CLASS_AUDIO, 120 .bInterfaceClass = USB_CLASS_AUDIO,
121 }, 121 },
122 122
123 /* 123 /*
124 * HP Wireless Audio 124 * HP Wireless Audio
125 * When not ignored, causes instability issues for some users, forcing them to 125 * When not ignored, causes instability issues for some users, forcing them to
126 * blacklist the entire module. 126 * blacklist the entire module.
127 */ 127 */
128 { 128 {
129 USB_DEVICE(0x0424, 0xb832), 129 USB_DEVICE(0x0424, 0xb832),
130 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) { 130 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
131 .vendor_name = "Standard Microsystems Corp.", 131 .vendor_name = "Standard Microsystems Corp.",
132 .product_name = "HP Wireless Audio", 132 .product_name = "HP Wireless Audio",
133 .ifnum = QUIRK_ANY_INTERFACE, 133 .ifnum = QUIRK_ANY_INTERFACE,
134 .type = QUIRK_COMPOSITE, 134 .type = QUIRK_COMPOSITE,
135 .data = (const struct snd_usb_audio_quirk[]) { 135 .data = (const struct snd_usb_audio_quirk[]) {
136 /* Mixer */ 136 /* Mixer */
137 { 137 {
138 .ifnum = 0, 138 .ifnum = 0,
139 .type = QUIRK_IGNORE_INTERFACE, 139 .type = QUIRK_IGNORE_INTERFACE,
140 }, 140 },
141 /* Playback */ 141 /* Playback */
142 { 142 {
143 .ifnum = 1, 143 .ifnum = 1,
144 .type = QUIRK_IGNORE_INTERFACE, 144 .type = QUIRK_IGNORE_INTERFACE,
145 }, 145 },
146 /* Capture */ 146 /* Capture */
147 { 147 {
148 .ifnum = 2, 148 .ifnum = 2,
149 .type = QUIRK_IGNORE_INTERFACE, 149 .type = QUIRK_IGNORE_INTERFACE,
150 }, 150 },
151 /* HID Device, .ifnum = 3 */ 151 /* HID Device, .ifnum = 3 */
152 { 152 {
153 .ifnum = -1, 153 .ifnum = -1,
154 } 154 }
155 } 155 }
156 } 156 }
157 }, 157 },
158 158
159 /* 159 /*
160 * Logitech QuickCam: bDeviceClass is vendor-specific, so generic interface 160 * Logitech QuickCam: bDeviceClass is vendor-specific, so generic interface
161 * class matches do not take effect without an explicit ID match. 161 * class matches do not take effect without an explicit ID match.
162 */ 162 */
163 { 163 {
164 .match_flags = USB_DEVICE_ID_MATCH_DEVICE | 164 .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
165 USB_DEVICE_ID_MATCH_INT_CLASS | 165 USB_DEVICE_ID_MATCH_INT_CLASS |
166 USB_DEVICE_ID_MATCH_INT_SUBCLASS, 166 USB_DEVICE_ID_MATCH_INT_SUBCLASS,
167 .idVendor = 0x046d, 167 .idVendor = 0x046d,
168 .idProduct = 0x0850, 168 .idProduct = 0x0850,
169 .bInterfaceClass = USB_CLASS_AUDIO, 169 .bInterfaceClass = USB_CLASS_AUDIO,
170 .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL 170 .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL
171 }, 171 },
172 { 172 {
173 .match_flags = USB_DEVICE_ID_MATCH_DEVICE | 173 .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
174 USB_DEVICE_ID_MATCH_INT_CLASS | 174 USB_DEVICE_ID_MATCH_INT_CLASS |
175 USB_DEVICE_ID_MATCH_INT_SUBCLASS, 175 USB_DEVICE_ID_MATCH_INT_SUBCLASS,
176 .idVendor = 0x046d, 176 .idVendor = 0x046d,
177 .idProduct = 0x08ae, 177 .idProduct = 0x08ae,
178 .bInterfaceClass = USB_CLASS_AUDIO, 178 .bInterfaceClass = USB_CLASS_AUDIO,
179 .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL 179 .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL
180 }, 180 },
181 { 181 {
182 .match_flags = USB_DEVICE_ID_MATCH_DEVICE | 182 .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
183 USB_DEVICE_ID_MATCH_INT_CLASS | 183 USB_DEVICE_ID_MATCH_INT_CLASS |
184 USB_DEVICE_ID_MATCH_INT_SUBCLASS, 184 USB_DEVICE_ID_MATCH_INT_SUBCLASS,
185 .idVendor = 0x046d, 185 .idVendor = 0x046d,
186 .idProduct = 0x08c6, 186 .idProduct = 0x08c6,
187 .bInterfaceClass = USB_CLASS_AUDIO, 187 .bInterfaceClass = USB_CLASS_AUDIO,
188 .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL 188 .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL
189 }, 189 },
190 { 190 {
191 .match_flags = USB_DEVICE_ID_MATCH_DEVICE | 191 .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
192 USB_DEVICE_ID_MATCH_INT_CLASS | 192 USB_DEVICE_ID_MATCH_INT_CLASS |
193 USB_DEVICE_ID_MATCH_INT_SUBCLASS, 193 USB_DEVICE_ID_MATCH_INT_SUBCLASS,
194 .idVendor = 0x046d, 194 .idVendor = 0x046d,
195 .idProduct = 0x08f0, 195 .idProduct = 0x08f0,
196 .bInterfaceClass = USB_CLASS_AUDIO, 196 .bInterfaceClass = USB_CLASS_AUDIO,
197 .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL 197 .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL
198 }, 198 },
199 { 199 {
200 .match_flags = USB_DEVICE_ID_MATCH_DEVICE | 200 .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
201 USB_DEVICE_ID_MATCH_INT_CLASS | 201 USB_DEVICE_ID_MATCH_INT_CLASS |
202 USB_DEVICE_ID_MATCH_INT_SUBCLASS, 202 USB_DEVICE_ID_MATCH_INT_SUBCLASS,
203 .idVendor = 0x046d, 203 .idVendor = 0x046d,
204 .idProduct = 0x08f5, 204 .idProduct = 0x08f5,
205 .bInterfaceClass = USB_CLASS_AUDIO, 205 .bInterfaceClass = USB_CLASS_AUDIO,
206 .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL 206 .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL
207 }, 207 },
208 { 208 {
209 .match_flags = USB_DEVICE_ID_MATCH_DEVICE | 209 .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
210 USB_DEVICE_ID_MATCH_INT_CLASS | 210 USB_DEVICE_ID_MATCH_INT_CLASS |
211 USB_DEVICE_ID_MATCH_INT_SUBCLASS, 211 USB_DEVICE_ID_MATCH_INT_SUBCLASS,
212 .idVendor = 0x046d, 212 .idVendor = 0x046d,
213 .idProduct = 0x08f6, 213 .idProduct = 0x08f6,
214 .bInterfaceClass = USB_CLASS_AUDIO, 214 .bInterfaceClass = USB_CLASS_AUDIO,
215 .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL 215 .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL
216 }, 216 },
217 { 217 {
218 .match_flags = USB_DEVICE_ID_MATCH_DEVICE | 218 .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
219 USB_DEVICE_ID_MATCH_INT_CLASS | 219 USB_DEVICE_ID_MATCH_INT_CLASS |
220 USB_DEVICE_ID_MATCH_INT_SUBCLASS, 220 USB_DEVICE_ID_MATCH_INT_SUBCLASS,
221 .idVendor = 0x046d, 221 .idVendor = 0x046d,
222 .idProduct = 0x0990, 222 .idProduct = 0x0990,
223 .bInterfaceClass = USB_CLASS_AUDIO, 223 .bInterfaceClass = USB_CLASS_AUDIO,
224 .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL, 224 .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
225 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 225 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
226 .vendor_name = "Logitech, Inc.", 226 .vendor_name = "Logitech, Inc.",
227 .product_name = "QuickCam Pro 9000", 227 .product_name = "QuickCam Pro 9000",
228 .ifnum = QUIRK_NO_INTERFACE 228 .ifnum = QUIRK_NO_INTERFACE
229 } 229 }
230 }, 230 },
231 231
232 /* 232 /*
233 * Yamaha devices 233 * Yamaha devices
234 */ 234 */
235 235
236 #define YAMAHA_DEVICE(id, name) { \ 236 #define YAMAHA_DEVICE(id, name) { \
237 USB_DEVICE(0x0499, id), \ 237 USB_DEVICE(0x0499, id), \
238 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { \ 238 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { \
239 .vendor_name = "Yamaha", \ 239 .vendor_name = "Yamaha", \
240 .product_name = name, \ 240 .product_name = name, \
241 .ifnum = QUIRK_ANY_INTERFACE, \ 241 .ifnum = QUIRK_ANY_INTERFACE, \
242 .type = QUIRK_MIDI_YAMAHA \ 242 .type = QUIRK_MIDI_YAMAHA \
243 } \ 243 } \
244 } 244 }
245 #define YAMAHA_INTERFACE(id, intf, name) { \ 245 #define YAMAHA_INTERFACE(id, intf, name) { \
246 USB_DEVICE_VENDOR_SPEC(0x0499, id), \ 246 USB_DEVICE_VENDOR_SPEC(0x0499, id), \
247 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { \ 247 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { \
248 .vendor_name = "Yamaha", \ 248 .vendor_name = "Yamaha", \
249 .product_name = name, \ 249 .product_name = name, \
250 .ifnum = intf, \ 250 .ifnum = intf, \
251 .type = QUIRK_MIDI_YAMAHA \ 251 .type = QUIRK_MIDI_YAMAHA \
252 } \ 252 } \
253 } 253 }
254 YAMAHA_DEVICE(0x1000, "UX256"), 254 YAMAHA_DEVICE(0x1000, "UX256"),
255 YAMAHA_DEVICE(0x1001, "MU1000"), 255 YAMAHA_DEVICE(0x1001, "MU1000"),
256 YAMAHA_DEVICE(0x1002, "MU2000"), 256 YAMAHA_DEVICE(0x1002, "MU2000"),
257 YAMAHA_DEVICE(0x1003, "MU500"), 257 YAMAHA_DEVICE(0x1003, "MU500"),
258 YAMAHA_INTERFACE(0x1004, 3, "UW500"), 258 YAMAHA_INTERFACE(0x1004, 3, "UW500"),
259 YAMAHA_DEVICE(0x1005, "MOTIF6"), 259 YAMAHA_DEVICE(0x1005, "MOTIF6"),
260 YAMAHA_DEVICE(0x1006, "MOTIF7"), 260 YAMAHA_DEVICE(0x1006, "MOTIF7"),
261 YAMAHA_DEVICE(0x1007, "MOTIF8"), 261 YAMAHA_DEVICE(0x1007, "MOTIF8"),
262 YAMAHA_DEVICE(0x1008, "UX96"), 262 YAMAHA_DEVICE(0x1008, "UX96"),
263 YAMAHA_DEVICE(0x1009, "UX16"), 263 YAMAHA_DEVICE(0x1009, "UX16"),
264 YAMAHA_INTERFACE(0x100a, 3, "EOS BX"), 264 YAMAHA_INTERFACE(0x100a, 3, "EOS BX"),
265 YAMAHA_DEVICE(0x100c, "UC-MX"), 265 YAMAHA_DEVICE(0x100c, "UC-MX"),
266 YAMAHA_DEVICE(0x100d, "UC-KX"), 266 YAMAHA_DEVICE(0x100d, "UC-KX"),
267 YAMAHA_DEVICE(0x100e, "S08"), 267 YAMAHA_DEVICE(0x100e, "S08"),
268 YAMAHA_DEVICE(0x100f, "CLP-150"), 268 YAMAHA_DEVICE(0x100f, "CLP-150"),
269 YAMAHA_DEVICE(0x1010, "CLP-170"), 269 YAMAHA_DEVICE(0x1010, "CLP-170"),
270 YAMAHA_DEVICE(0x1011, "P-250"), 270 YAMAHA_DEVICE(0x1011, "P-250"),
271 YAMAHA_DEVICE(0x1012, "TYROS"), 271 YAMAHA_DEVICE(0x1012, "TYROS"),
272 YAMAHA_DEVICE(0x1013, "PF-500"), 272 YAMAHA_DEVICE(0x1013, "PF-500"),
273 YAMAHA_DEVICE(0x1014, "S90"), 273 YAMAHA_DEVICE(0x1014, "S90"),
274 YAMAHA_DEVICE(0x1015, "MOTIF-R"), 274 YAMAHA_DEVICE(0x1015, "MOTIF-R"),
275 YAMAHA_DEVICE(0x1016, "MDP-5"), 275 YAMAHA_DEVICE(0x1016, "MDP-5"),
276 YAMAHA_DEVICE(0x1017, "CVP-204"), 276 YAMAHA_DEVICE(0x1017, "CVP-204"),
277 YAMAHA_DEVICE(0x1018, "CVP-206"), 277 YAMAHA_DEVICE(0x1018, "CVP-206"),
278 YAMAHA_DEVICE(0x1019, "CVP-208"), 278 YAMAHA_DEVICE(0x1019, "CVP-208"),
279 YAMAHA_DEVICE(0x101a, "CVP-210"), 279 YAMAHA_DEVICE(0x101a, "CVP-210"),
280 YAMAHA_DEVICE(0x101b, "PSR-1100"), 280 YAMAHA_DEVICE(0x101b, "PSR-1100"),
281 YAMAHA_DEVICE(0x101c, "PSR-2100"), 281 YAMAHA_DEVICE(0x101c, "PSR-2100"),
282 YAMAHA_DEVICE(0x101d, "CLP-175"), 282 YAMAHA_DEVICE(0x101d, "CLP-175"),
283 YAMAHA_DEVICE(0x101e, "PSR-K1"), 283 YAMAHA_DEVICE(0x101e, "PSR-K1"),
284 YAMAHA_DEVICE(0x101f, "EZ-J24"), 284 YAMAHA_DEVICE(0x101f, "EZ-J24"),
285 YAMAHA_DEVICE(0x1020, "EZ-250i"), 285 YAMAHA_DEVICE(0x1020, "EZ-250i"),
286 YAMAHA_DEVICE(0x1021, "MOTIF ES 6"), 286 YAMAHA_DEVICE(0x1021, "MOTIF ES 6"),
287 YAMAHA_DEVICE(0x1022, "MOTIF ES 7"), 287 YAMAHA_DEVICE(0x1022, "MOTIF ES 7"),
288 YAMAHA_DEVICE(0x1023, "MOTIF ES 8"), 288 YAMAHA_DEVICE(0x1023, "MOTIF ES 8"),
289 YAMAHA_DEVICE(0x1024, "CVP-301"), 289 YAMAHA_DEVICE(0x1024, "CVP-301"),
290 YAMAHA_DEVICE(0x1025, "CVP-303"), 290 YAMAHA_DEVICE(0x1025, "CVP-303"),
291 YAMAHA_DEVICE(0x1026, "CVP-305"), 291 YAMAHA_DEVICE(0x1026, "CVP-305"),
292 YAMAHA_DEVICE(0x1027, "CVP-307"), 292 YAMAHA_DEVICE(0x1027, "CVP-307"),
293 YAMAHA_DEVICE(0x1028, "CVP-309"), 293 YAMAHA_DEVICE(0x1028, "CVP-309"),
294 YAMAHA_DEVICE(0x1029, "CVP-309GP"), 294 YAMAHA_DEVICE(0x1029, "CVP-309GP"),
295 YAMAHA_DEVICE(0x102a, "PSR-1500"), 295 YAMAHA_DEVICE(0x102a, "PSR-1500"),
296 YAMAHA_DEVICE(0x102b, "PSR-3000"), 296 YAMAHA_DEVICE(0x102b, "PSR-3000"),
297 YAMAHA_DEVICE(0x102e, "ELS-01/01C"), 297 YAMAHA_DEVICE(0x102e, "ELS-01/01C"),
298 YAMAHA_DEVICE(0x1030, "PSR-295/293"), 298 YAMAHA_DEVICE(0x1030, "PSR-295/293"),
299 YAMAHA_DEVICE(0x1031, "DGX-205/203"), 299 YAMAHA_DEVICE(0x1031, "DGX-205/203"),
300 YAMAHA_DEVICE(0x1032, "DGX-305"), 300 YAMAHA_DEVICE(0x1032, "DGX-305"),
301 YAMAHA_DEVICE(0x1033, "DGX-505"), 301 YAMAHA_DEVICE(0x1033, "DGX-505"),
302 YAMAHA_DEVICE(0x1034, NULL), 302 YAMAHA_DEVICE(0x1034, NULL),
303 YAMAHA_DEVICE(0x1035, NULL), 303 YAMAHA_DEVICE(0x1035, NULL),
304 YAMAHA_DEVICE(0x1036, NULL), 304 YAMAHA_DEVICE(0x1036, NULL),
305 YAMAHA_DEVICE(0x1037, NULL), 305 YAMAHA_DEVICE(0x1037, NULL),
306 YAMAHA_DEVICE(0x1038, NULL), 306 YAMAHA_DEVICE(0x1038, NULL),
307 YAMAHA_DEVICE(0x1039, NULL), 307 YAMAHA_DEVICE(0x1039, NULL),
308 YAMAHA_DEVICE(0x103a, NULL), 308 YAMAHA_DEVICE(0x103a, NULL),
309 YAMAHA_DEVICE(0x103b, NULL), 309 YAMAHA_DEVICE(0x103b, NULL),
310 YAMAHA_DEVICE(0x103c, NULL), 310 YAMAHA_DEVICE(0x103c, NULL),
311 YAMAHA_DEVICE(0x103d, NULL), 311 YAMAHA_DEVICE(0x103d, NULL),
312 YAMAHA_DEVICE(0x103e, NULL), 312 YAMAHA_DEVICE(0x103e, NULL),
313 YAMAHA_DEVICE(0x103f, NULL), 313 YAMAHA_DEVICE(0x103f, NULL),
314 YAMAHA_DEVICE(0x1040, NULL), 314 YAMAHA_DEVICE(0x1040, NULL),
315 YAMAHA_DEVICE(0x1041, NULL), 315 YAMAHA_DEVICE(0x1041, NULL),
316 YAMAHA_DEVICE(0x1042, NULL), 316 YAMAHA_DEVICE(0x1042, NULL),
317 YAMAHA_DEVICE(0x1043, NULL), 317 YAMAHA_DEVICE(0x1043, NULL),
318 YAMAHA_DEVICE(0x1044, NULL), 318 YAMAHA_DEVICE(0x1044, NULL),
319 YAMAHA_DEVICE(0x1045, NULL), 319 YAMAHA_DEVICE(0x1045, NULL),
320 YAMAHA_INTERFACE(0x104e, 0, NULL), 320 YAMAHA_INTERFACE(0x104e, 0, NULL),
321 YAMAHA_DEVICE(0x104f, NULL), 321 YAMAHA_DEVICE(0x104f, NULL),
322 YAMAHA_DEVICE(0x1050, NULL), 322 YAMAHA_DEVICE(0x1050, NULL),
323 YAMAHA_DEVICE(0x1051, NULL), 323 YAMAHA_DEVICE(0x1051, NULL),
324 YAMAHA_DEVICE(0x1052, NULL), 324 YAMAHA_DEVICE(0x1052, NULL),
325 YAMAHA_INTERFACE(0x1053, 0, NULL), 325 YAMAHA_INTERFACE(0x1053, 0, NULL),
326 YAMAHA_INTERFACE(0x1054, 0, NULL), 326 YAMAHA_INTERFACE(0x1054, 0, NULL),
327 YAMAHA_DEVICE(0x1055, NULL), 327 YAMAHA_DEVICE(0x1055, NULL),
328 YAMAHA_DEVICE(0x1056, NULL), 328 YAMAHA_DEVICE(0x1056, NULL),
329 YAMAHA_DEVICE(0x1057, NULL), 329 YAMAHA_DEVICE(0x1057, NULL),
330 YAMAHA_DEVICE(0x1058, NULL), 330 YAMAHA_DEVICE(0x1058, NULL),
331 YAMAHA_DEVICE(0x1059, NULL), 331 YAMAHA_DEVICE(0x1059, NULL),
332 YAMAHA_DEVICE(0x105a, NULL), 332 YAMAHA_DEVICE(0x105a, NULL),
333 YAMAHA_DEVICE(0x105b, NULL), 333 YAMAHA_DEVICE(0x105b, NULL),
334 YAMAHA_DEVICE(0x105c, NULL), 334 YAMAHA_DEVICE(0x105c, NULL),
335 YAMAHA_DEVICE(0x105d, NULL), 335 YAMAHA_DEVICE(0x105d, NULL),
336 { 336 {
337 USB_DEVICE(0x0499, 0x1503), 337 USB_DEVICE(0x0499, 0x1503),
338 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 338 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
339 /* .vendor_name = "Yamaha", */ 339 /* .vendor_name = "Yamaha", */
340 /* .product_name = "MOX6/MOX8", */ 340 /* .product_name = "MOX6/MOX8", */
341 .ifnum = QUIRK_ANY_INTERFACE, 341 .ifnum = QUIRK_ANY_INTERFACE,
342 .type = QUIRK_COMPOSITE, 342 .type = QUIRK_COMPOSITE,
343 .data = (const struct snd_usb_audio_quirk[]) { 343 .data = (const struct snd_usb_audio_quirk[]) {
344 { 344 {
345 .ifnum = 1, 345 .ifnum = 1,
346 .type = QUIRK_AUDIO_STANDARD_INTERFACE 346 .type = QUIRK_AUDIO_STANDARD_INTERFACE
347 }, 347 },
348 { 348 {
349 .ifnum = 2, 349 .ifnum = 2,
350 .type = QUIRK_AUDIO_STANDARD_INTERFACE 350 .type = QUIRK_AUDIO_STANDARD_INTERFACE
351 }, 351 },
352 { 352 {
353 .ifnum = 3, 353 .ifnum = 3,
354 .type = QUIRK_MIDI_YAMAHA 354 .type = QUIRK_MIDI_YAMAHA
355 }, 355 },
356 { 356 {
357 .ifnum = -1 357 .ifnum = -1
358 } 358 }
359 } 359 }
360 } 360 }
361 }, 361 },
362 { 362 {
363 USB_DEVICE(0x0499, 0x1507), 363 USB_DEVICE(0x0499, 0x1507),
364 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 364 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
365 /* .vendor_name = "Yamaha", */ 365 /* .vendor_name = "Yamaha", */
366 /* .product_name = "THR10", */ 366 /* .product_name = "THR10", */
367 .ifnum = QUIRK_ANY_INTERFACE, 367 .ifnum = QUIRK_ANY_INTERFACE,
368 .type = QUIRK_COMPOSITE, 368 .type = QUIRK_COMPOSITE,
369 .data = (const struct snd_usb_audio_quirk[]) { 369 .data = (const struct snd_usb_audio_quirk[]) {
370 { 370 {
371 .ifnum = 1, 371 .ifnum = 1,
372 .type = QUIRK_AUDIO_STANDARD_INTERFACE 372 .type = QUIRK_AUDIO_STANDARD_INTERFACE
373 }, 373 },
374 { 374 {
375 .ifnum = 2, 375 .ifnum = 2,
376 .type = QUIRK_AUDIO_STANDARD_INTERFACE 376 .type = QUIRK_AUDIO_STANDARD_INTERFACE
377 }, 377 },
378 { 378 {
379 .ifnum = 3, 379 .ifnum = 3,
380 .type = QUIRK_MIDI_YAMAHA 380 .type = QUIRK_MIDI_YAMAHA
381 }, 381 },
382 { 382 {
383 .ifnum = -1 383 .ifnum = -1
384 } 384 }
385 } 385 }
386 } 386 }
387 }, 387 },
388 { 388 {
389 USB_DEVICE(0x0499, 0x150a), 389 USB_DEVICE(0x0499, 0x150a),
390 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 390 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
391 /* .vendor_name = "Yamaha", */ 391 /* .vendor_name = "Yamaha", */
392 /* .product_name = "THR5A", */ 392 /* .product_name = "THR5A", */
393 .ifnum = QUIRK_ANY_INTERFACE, 393 .ifnum = QUIRK_ANY_INTERFACE,
394 .type = QUIRK_COMPOSITE, 394 .type = QUIRK_COMPOSITE,
395 .data = (const struct snd_usb_audio_quirk[]) { 395 .data = (const struct snd_usb_audio_quirk[]) {
396 { 396 {
397 .ifnum = 1, 397 .ifnum = 1,
398 .type = QUIRK_AUDIO_STANDARD_INTERFACE 398 .type = QUIRK_AUDIO_STANDARD_INTERFACE
399 }, 399 },
400 { 400 {
401 .ifnum = 2, 401 .ifnum = 2,
402 .type = QUIRK_AUDIO_STANDARD_INTERFACE 402 .type = QUIRK_AUDIO_STANDARD_INTERFACE
403 }, 403 },
404 { 404 {
405 .ifnum = 3, 405 .ifnum = 3,
406 .type = QUIRK_MIDI_YAMAHA 406 .type = QUIRK_MIDI_YAMAHA
407 }, 407 },
408 { 408 {
409 .ifnum = -1 409 .ifnum = -1
410 } 410 }
411 } 411 }
412 } 412 }
413 }, 413 },
414 { 414 {
415 USB_DEVICE(0x0499, 0x150c), 415 USB_DEVICE(0x0499, 0x150c),
416 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 416 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
417 /* .vendor_name = "Yamaha", */ 417 /* .vendor_name = "Yamaha", */
418 /* .product_name = "THR10C", */ 418 /* .product_name = "THR10C", */
419 .ifnum = QUIRK_ANY_INTERFACE, 419 .ifnum = QUIRK_ANY_INTERFACE,
420 .type = QUIRK_COMPOSITE, 420 .type = QUIRK_COMPOSITE,
421 .data = (const struct snd_usb_audio_quirk[]) { 421 .data = (const struct snd_usb_audio_quirk[]) {
422 { 422 {
423 .ifnum = 1, 423 .ifnum = 1,
424 .type = QUIRK_AUDIO_STANDARD_INTERFACE 424 .type = QUIRK_AUDIO_STANDARD_INTERFACE
425 }, 425 },
426 { 426 {
427 .ifnum = 2, 427 .ifnum = 2,
428 .type = QUIRK_AUDIO_STANDARD_INTERFACE 428 .type = QUIRK_AUDIO_STANDARD_INTERFACE
429 }, 429 },
430 { 430 {
431 .ifnum = 3, 431 .ifnum = 3,
432 .type = QUIRK_MIDI_YAMAHA 432 .type = QUIRK_MIDI_YAMAHA
433 }, 433 },
434 { 434 {
435 .ifnum = -1 435 .ifnum = -1
436 } 436 }
437 } 437 }
438 } 438 }
439 }, 439 },
440 YAMAHA_DEVICE(0x2000, "DGP-7"), 440 YAMAHA_DEVICE(0x2000, "DGP-7"),
441 YAMAHA_DEVICE(0x2001, "DGP-5"), 441 YAMAHA_DEVICE(0x2001, "DGP-5"),
442 YAMAHA_DEVICE(0x2002, NULL), 442 YAMAHA_DEVICE(0x2002, NULL),
443 YAMAHA_DEVICE(0x2003, NULL), 443 YAMAHA_DEVICE(0x2003, NULL),
444 YAMAHA_DEVICE(0x5000, "CS1D"), 444 YAMAHA_DEVICE(0x5000, "CS1D"),
445 YAMAHA_DEVICE(0x5001, "DSP1D"), 445 YAMAHA_DEVICE(0x5001, "DSP1D"),
446 YAMAHA_DEVICE(0x5002, "DME32"), 446 YAMAHA_DEVICE(0x5002, "DME32"),
447 YAMAHA_DEVICE(0x5003, "DM2000"), 447 YAMAHA_DEVICE(0x5003, "DM2000"),
448 YAMAHA_DEVICE(0x5004, "02R96"), 448 YAMAHA_DEVICE(0x5004, "02R96"),
449 YAMAHA_DEVICE(0x5005, "ACU16-C"), 449 YAMAHA_DEVICE(0x5005, "ACU16-C"),
450 YAMAHA_DEVICE(0x5006, "NHB32-C"), 450 YAMAHA_DEVICE(0x5006, "NHB32-C"),
451 YAMAHA_DEVICE(0x5007, "DM1000"), 451 YAMAHA_DEVICE(0x5007, "DM1000"),
452 YAMAHA_DEVICE(0x5008, "01V96"), 452 YAMAHA_DEVICE(0x5008, "01V96"),
453 YAMAHA_DEVICE(0x5009, "SPX2000"), 453 YAMAHA_DEVICE(0x5009, "SPX2000"),
454 YAMAHA_DEVICE(0x500a, "PM5D"), 454 YAMAHA_DEVICE(0x500a, "PM5D"),
455 YAMAHA_DEVICE(0x500b, "DME64N"), 455 YAMAHA_DEVICE(0x500b, "DME64N"),
456 YAMAHA_DEVICE(0x500c, "DME24N"), 456 YAMAHA_DEVICE(0x500c, "DME24N"),
457 YAMAHA_DEVICE(0x500d, NULL), 457 YAMAHA_DEVICE(0x500d, NULL),
458 YAMAHA_DEVICE(0x500e, NULL), 458 YAMAHA_DEVICE(0x500e, NULL),
459 YAMAHA_DEVICE(0x500f, NULL), 459 YAMAHA_DEVICE(0x500f, NULL),
460 YAMAHA_DEVICE(0x7000, "DTX"), 460 YAMAHA_DEVICE(0x7000, "DTX"),
461 YAMAHA_DEVICE(0x7010, "UB99"), 461 YAMAHA_DEVICE(0x7010, "UB99"),
462 #undef YAMAHA_DEVICE 462 #undef YAMAHA_DEVICE
463 #undef YAMAHA_INTERFACE 463 #undef YAMAHA_INTERFACE
464 /* this catches most recent vendor-specific Yamaha devices */ 464 /* this catches most recent vendor-specific Yamaha devices */
465 { 465 {
466 .match_flags = USB_DEVICE_ID_MATCH_VENDOR | 466 .match_flags = USB_DEVICE_ID_MATCH_VENDOR |
467 USB_DEVICE_ID_MATCH_INT_CLASS, 467 USB_DEVICE_ID_MATCH_INT_CLASS,
468 .idVendor = 0x0499, 468 .idVendor = 0x0499,
469 .bInterfaceClass = USB_CLASS_VENDOR_SPEC, 469 .bInterfaceClass = USB_CLASS_VENDOR_SPEC,
470 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) { 470 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
471 .ifnum = QUIRK_ANY_INTERFACE, 471 .ifnum = QUIRK_ANY_INTERFACE,
472 .type = QUIRK_AUTODETECT 472 .type = QUIRK_AUTODETECT
473 } 473 }
474 }, 474 },
475 475
476 /* 476 /*
477 * Roland/RolandED/Edirol/BOSS devices 477 * Roland/RolandED/Edirol/BOSS devices
478 */ 478 */
479 { 479 {
480 USB_DEVICE(0x0582, 0x0000), 480 USB_DEVICE(0x0582, 0x0000),
481 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 481 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
482 .vendor_name = "Roland", 482 .vendor_name = "Roland",
483 .product_name = "UA-100", 483 .product_name = "UA-100",
484 .ifnum = QUIRK_ANY_INTERFACE, 484 .ifnum = QUIRK_ANY_INTERFACE,
485 .type = QUIRK_COMPOSITE, 485 .type = QUIRK_COMPOSITE,
486 .data = (const struct snd_usb_audio_quirk[]) { 486 .data = (const struct snd_usb_audio_quirk[]) {
487 { 487 {
488 .ifnum = 0, 488 .ifnum = 0,
489 .type = QUIRK_AUDIO_FIXED_ENDPOINT, 489 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
490 .data = & (const struct audioformat) { 490 .data = & (const struct audioformat) {
491 .formats = SNDRV_PCM_FMTBIT_S16_LE, 491 .formats = SNDRV_PCM_FMTBIT_S16_LE,
492 .channels = 4, 492 .channels = 4,
493 .iface = 0, 493 .iface = 0,
494 .altsetting = 1, 494 .altsetting = 1,
495 .altset_idx = 1, 495 .altset_idx = 1,
496 .attributes = 0, 496 .attributes = 0,
497 .endpoint = 0x01, 497 .endpoint = 0x01,
498 .ep_attr = 0x09, 498 .ep_attr = 0x09,
499 .rates = SNDRV_PCM_RATE_CONTINUOUS, 499 .rates = SNDRV_PCM_RATE_CONTINUOUS,
500 .rate_min = 44100, 500 .rate_min = 44100,
501 .rate_max = 44100, 501 .rate_max = 44100,
502 } 502 }
503 }, 503 },
504 { 504 {
505 .ifnum = 1, 505 .ifnum = 1,
506 .type = QUIRK_AUDIO_FIXED_ENDPOINT, 506 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
507 .data = & (const struct audioformat) { 507 .data = & (const struct audioformat) {
508 .formats = SNDRV_PCM_FMTBIT_S16_LE, 508 .formats = SNDRV_PCM_FMTBIT_S16_LE,
509 .channels = 2, 509 .channels = 2,
510 .iface = 1, 510 .iface = 1,
511 .altsetting = 1, 511 .altsetting = 1,
512 .altset_idx = 1, 512 .altset_idx = 1,
513 .attributes = UAC_EP_CS_ATTR_FILL_MAX, 513 .attributes = UAC_EP_CS_ATTR_FILL_MAX,
514 .endpoint = 0x81, 514 .endpoint = 0x81,
515 .ep_attr = 0x05, 515 .ep_attr = 0x05,
516 .rates = SNDRV_PCM_RATE_CONTINUOUS, 516 .rates = SNDRV_PCM_RATE_CONTINUOUS,
517 .rate_min = 44100, 517 .rate_min = 44100,
518 .rate_max = 44100, 518 .rate_max = 44100,
519 } 519 }
520 }, 520 },
521 { 521 {
522 .ifnum = 2, 522 .ifnum = 2,
523 .type = QUIRK_MIDI_FIXED_ENDPOINT, 523 .type = QUIRK_MIDI_FIXED_ENDPOINT,
524 .data = & (const struct snd_usb_midi_endpoint_info) { 524 .data = & (const struct snd_usb_midi_endpoint_info) {
525 .out_cables = 0x0007, 525 .out_cables = 0x0007,
526 .in_cables = 0x0007 526 .in_cables = 0x0007
527 } 527 }
528 }, 528 },
529 { 529 {
530 .ifnum = -1 530 .ifnum = -1
531 } 531 }
532 } 532 }
533 } 533 }
534 }, 534 },
535 { 535 {
536 USB_DEVICE(0x0582, 0x0002), 536 USB_DEVICE(0x0582, 0x0002),
537 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 537 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
538 .vendor_name = "EDIROL", 538 .vendor_name = "EDIROL",
539 .product_name = "UM-4", 539 .product_name = "UM-4",
540 .ifnum = QUIRK_ANY_INTERFACE, 540 .ifnum = QUIRK_ANY_INTERFACE,
541 .type = QUIRK_COMPOSITE, 541 .type = QUIRK_COMPOSITE,
542 .data = (const struct snd_usb_audio_quirk[]) { 542 .data = (const struct snd_usb_audio_quirk[]) {
543 { 543 {
544 .ifnum = 0, 544 .ifnum = 0,
545 .type = QUIRK_IGNORE_INTERFACE 545 .type = QUIRK_IGNORE_INTERFACE
546 }, 546 },
547 { 547 {
548 .ifnum = 1, 548 .ifnum = 1,
549 .type = QUIRK_IGNORE_INTERFACE 549 .type = QUIRK_IGNORE_INTERFACE
550 }, 550 },
551 { 551 {
552 .ifnum = 2, 552 .ifnum = 2,
553 .type = QUIRK_MIDI_FIXED_ENDPOINT, 553 .type = QUIRK_MIDI_FIXED_ENDPOINT,
554 .data = & (const struct snd_usb_midi_endpoint_info) { 554 .data = & (const struct snd_usb_midi_endpoint_info) {
555 .out_cables = 0x000f, 555 .out_cables = 0x000f,
556 .in_cables = 0x000f 556 .in_cables = 0x000f
557 } 557 }
558 }, 558 },
559 { 559 {
560 .ifnum = -1 560 .ifnum = -1
561 } 561 }
562 } 562 }
563 } 563 }
564 }, 564 },
565 { 565 {
566 USB_DEVICE(0x0582, 0x0003), 566 USB_DEVICE(0x0582, 0x0003),
567 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 567 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
568 .vendor_name = "Roland", 568 .vendor_name = "Roland",
569 .product_name = "SC-8850", 569 .product_name = "SC-8850",
570 .ifnum = QUIRK_ANY_INTERFACE, 570 .ifnum = QUIRK_ANY_INTERFACE,
571 .type = QUIRK_COMPOSITE, 571 .type = QUIRK_COMPOSITE,
572 .data = (const struct snd_usb_audio_quirk[]) { 572 .data = (const struct snd_usb_audio_quirk[]) {
573 { 573 {
574 .ifnum = 0, 574 .ifnum = 0,
575 .type = QUIRK_IGNORE_INTERFACE 575 .type = QUIRK_IGNORE_INTERFACE
576 }, 576 },
577 { 577 {
578 .ifnum = 1, 578 .ifnum = 1,
579 .type = QUIRK_IGNORE_INTERFACE 579 .type = QUIRK_IGNORE_INTERFACE
580 }, 580 },
581 { 581 {
582 .ifnum = 2, 582 .ifnum = 2,
583 .type = QUIRK_MIDI_FIXED_ENDPOINT, 583 .type = QUIRK_MIDI_FIXED_ENDPOINT,
584 .data = & (const struct snd_usb_midi_endpoint_info) { 584 .data = & (const struct snd_usb_midi_endpoint_info) {
585 .out_cables = 0x003f, 585 .out_cables = 0x003f,
586 .in_cables = 0x003f 586 .in_cables = 0x003f
587 } 587 }
588 }, 588 },
589 { 589 {
590 .ifnum = -1 590 .ifnum = -1
591 } 591 }
592 } 592 }
593 } 593 }
594 }, 594 },
595 { 595 {
596 USB_DEVICE(0x0582, 0x0004), 596 USB_DEVICE(0x0582, 0x0004),
597 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 597 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
598 .vendor_name = "Roland", 598 .vendor_name = "Roland",
599 .product_name = "U-8", 599 .product_name = "U-8",
600 .ifnum = QUIRK_ANY_INTERFACE, 600 .ifnum = QUIRK_ANY_INTERFACE,
601 .type = QUIRK_COMPOSITE, 601 .type = QUIRK_COMPOSITE,
602 .data = (const struct snd_usb_audio_quirk[]) { 602 .data = (const struct snd_usb_audio_quirk[]) {
603 { 603 {
604 .ifnum = 0, 604 .ifnum = 0,
605 .type = QUIRK_IGNORE_INTERFACE 605 .type = QUIRK_IGNORE_INTERFACE
606 }, 606 },
607 { 607 {
608 .ifnum = 1, 608 .ifnum = 1,
609 .type = QUIRK_IGNORE_INTERFACE 609 .type = QUIRK_IGNORE_INTERFACE
610 }, 610 },
611 { 611 {
612 .ifnum = 2, 612 .ifnum = 2,
613 .type = QUIRK_MIDI_FIXED_ENDPOINT, 613 .type = QUIRK_MIDI_FIXED_ENDPOINT,
614 .data = & (const struct snd_usb_midi_endpoint_info) { 614 .data = & (const struct snd_usb_midi_endpoint_info) {
615 .out_cables = 0x0005, 615 .out_cables = 0x0005,
616 .in_cables = 0x0005 616 .in_cables = 0x0005
617 } 617 }
618 }, 618 },
619 { 619 {
620 .ifnum = -1 620 .ifnum = -1
621 } 621 }
622 } 622 }
623 } 623 }
624 }, 624 },
625 { 625 {
626 /* Has ID 0x0099 when not in "Advanced Driver" mode. 626 /* Has ID 0x0099 when not in "Advanced Driver" mode.
627 * The UM-2EX has only one input, but we cannot detect this. */ 627 * The UM-2EX has only one input, but we cannot detect this. */
628 USB_DEVICE(0x0582, 0x0005), 628 USB_DEVICE(0x0582, 0x0005),
629 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 629 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
630 .vendor_name = "EDIROL", 630 .vendor_name = "EDIROL",
631 .product_name = "UM-2", 631 .product_name = "UM-2",
632 .ifnum = QUIRK_ANY_INTERFACE, 632 .ifnum = QUIRK_ANY_INTERFACE,
633 .type = QUIRK_COMPOSITE, 633 .type = QUIRK_COMPOSITE,
634 .data = (const struct snd_usb_audio_quirk[]) { 634 .data = (const struct snd_usb_audio_quirk[]) {
635 { 635 {
636 .ifnum = 0, 636 .ifnum = 0,
637 .type = QUIRK_IGNORE_INTERFACE 637 .type = QUIRK_IGNORE_INTERFACE
638 }, 638 },
639 { 639 {
640 .ifnum = 1, 640 .ifnum = 1,
641 .type = QUIRK_IGNORE_INTERFACE 641 .type = QUIRK_IGNORE_INTERFACE
642 }, 642 },
643 { 643 {
644 .ifnum = 2, 644 .ifnum = 2,
645 .type = QUIRK_MIDI_FIXED_ENDPOINT, 645 .type = QUIRK_MIDI_FIXED_ENDPOINT,
646 .data = & (const struct snd_usb_midi_endpoint_info) { 646 .data = & (const struct snd_usb_midi_endpoint_info) {
647 .out_cables = 0x0003, 647 .out_cables = 0x0003,
648 .in_cables = 0x0003 648 .in_cables = 0x0003
649 } 649 }
650 }, 650 },
651 { 651 {
652 .ifnum = -1 652 .ifnum = -1
653 } 653 }
654 } 654 }
655 } 655 }
656 }, 656 },
657 { 657 {
658 USB_DEVICE(0x0582, 0x0007), 658 USB_DEVICE(0x0582, 0x0007),
659 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 659 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
660 .vendor_name = "Roland", 660 .vendor_name = "Roland",
661 .product_name = "SC-8820", 661 .product_name = "SC-8820",
662 .ifnum = QUIRK_ANY_INTERFACE, 662 .ifnum = QUIRK_ANY_INTERFACE,
663 .type = QUIRK_COMPOSITE, 663 .type = QUIRK_COMPOSITE,
664 .data = (const struct snd_usb_audio_quirk[]) { 664 .data = (const struct snd_usb_audio_quirk[]) {
665 { 665 {
666 .ifnum = 0, 666 .ifnum = 0,
667 .type = QUIRK_IGNORE_INTERFACE 667 .type = QUIRK_IGNORE_INTERFACE
668 }, 668 },
669 { 669 {
670 .ifnum = 1, 670 .ifnum = 1,
671 .type = QUIRK_IGNORE_INTERFACE 671 .type = QUIRK_IGNORE_INTERFACE
672 }, 672 },
673 { 673 {
674 .ifnum = 2, 674 .ifnum = 2,
675 .type = QUIRK_MIDI_FIXED_ENDPOINT, 675 .type = QUIRK_MIDI_FIXED_ENDPOINT,
676 .data = & (const struct snd_usb_midi_endpoint_info) { 676 .data = & (const struct snd_usb_midi_endpoint_info) {
677 .out_cables = 0x0013, 677 .out_cables = 0x0013,
678 .in_cables = 0x0013 678 .in_cables = 0x0013
679 } 679 }
680 }, 680 },
681 { 681 {
682 .ifnum = -1 682 .ifnum = -1
683 } 683 }
684 } 684 }
685 } 685 }
686 }, 686 },
687 { 687 {
688 USB_DEVICE(0x0582, 0x0008), 688 USB_DEVICE(0x0582, 0x0008),
689 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 689 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
690 .vendor_name = "Roland", 690 .vendor_name = "Roland",
691 .product_name = "PC-300", 691 .product_name = "PC-300",
692 .ifnum = QUIRK_ANY_INTERFACE, 692 .ifnum = QUIRK_ANY_INTERFACE,
693 .type = QUIRK_COMPOSITE, 693 .type = QUIRK_COMPOSITE,
694 .data = (const struct snd_usb_audio_quirk[]) { 694 .data = (const struct snd_usb_audio_quirk[]) {
695 { 695 {
696 .ifnum = 0, 696 .ifnum = 0,
697 .type = QUIRK_IGNORE_INTERFACE 697 .type = QUIRK_IGNORE_INTERFACE
698 }, 698 },
699 { 699 {
700 .ifnum = 1, 700 .ifnum = 1,
701 .type = QUIRK_IGNORE_INTERFACE 701 .type = QUIRK_IGNORE_INTERFACE
702 }, 702 },
703 { 703 {
704 .ifnum = 2, 704 .ifnum = 2,
705 .type = QUIRK_MIDI_FIXED_ENDPOINT, 705 .type = QUIRK_MIDI_FIXED_ENDPOINT,
706 .data = & (const struct snd_usb_midi_endpoint_info) { 706 .data = & (const struct snd_usb_midi_endpoint_info) {
707 .out_cables = 0x0001, 707 .out_cables = 0x0001,
708 .in_cables = 0x0001 708 .in_cables = 0x0001
709 } 709 }
710 }, 710 },
711 { 711 {
712 .ifnum = -1 712 .ifnum = -1
713 } 713 }
714 } 714 }
715 } 715 }
716 }, 716 },
717 { 717 {
718 /* has ID 0x009d when not in "Advanced Driver" mode */ 718 /* has ID 0x009d when not in "Advanced Driver" mode */
719 USB_DEVICE(0x0582, 0x0009), 719 USB_DEVICE(0x0582, 0x0009),
720 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 720 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
721 .vendor_name = "EDIROL", 721 .vendor_name = "EDIROL",
722 .product_name = "UM-1", 722 .product_name = "UM-1",
723 .ifnum = QUIRK_ANY_INTERFACE, 723 .ifnum = QUIRK_ANY_INTERFACE,
724 .type = QUIRK_COMPOSITE, 724 .type = QUIRK_COMPOSITE,
725 .data = (const struct snd_usb_audio_quirk[]) { 725 .data = (const struct snd_usb_audio_quirk[]) {
726 { 726 {
727 .ifnum = 0, 727 .ifnum = 0,
728 .type = QUIRK_IGNORE_INTERFACE 728 .type = QUIRK_IGNORE_INTERFACE
729 }, 729 },
730 { 730 {
731 .ifnum = 1, 731 .ifnum = 1,
732 .type = QUIRK_IGNORE_INTERFACE 732 .type = QUIRK_IGNORE_INTERFACE
733 }, 733 },
734 { 734 {
735 .ifnum = 2, 735 .ifnum = 2,
736 .type = QUIRK_MIDI_FIXED_ENDPOINT, 736 .type = QUIRK_MIDI_FIXED_ENDPOINT,
737 .data = & (const struct snd_usb_midi_endpoint_info) { 737 .data = & (const struct snd_usb_midi_endpoint_info) {
738 .out_cables = 0x0001, 738 .out_cables = 0x0001,
739 .in_cables = 0x0001 739 .in_cables = 0x0001
740 } 740 }
741 }, 741 },
742 { 742 {
743 .ifnum = -1 743 .ifnum = -1
744 } 744 }
745 } 745 }
746 } 746 }
747 }, 747 },
748 { 748 {
749 USB_DEVICE(0x0582, 0x000b), 749 USB_DEVICE(0x0582, 0x000b),
750 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 750 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
751 .vendor_name = "Roland", 751 .vendor_name = "Roland",
752 .product_name = "SK-500", 752 .product_name = "SK-500",
753 .ifnum = QUIRK_ANY_INTERFACE, 753 .ifnum = QUIRK_ANY_INTERFACE,
754 .type = QUIRK_COMPOSITE, 754 .type = QUIRK_COMPOSITE,
755 .data = (const struct snd_usb_audio_quirk[]) { 755 .data = (const struct snd_usb_audio_quirk[]) {
756 { 756 {
757 .ifnum = 0, 757 .ifnum = 0,
758 .type = QUIRK_IGNORE_INTERFACE 758 .type = QUIRK_IGNORE_INTERFACE
759 }, 759 },
760 { 760 {
761 .ifnum = 1, 761 .ifnum = 1,
762 .type = QUIRK_IGNORE_INTERFACE 762 .type = QUIRK_IGNORE_INTERFACE
763 }, 763 },
764 { 764 {
765 .ifnum = 2, 765 .ifnum = 2,
766 .type = QUIRK_MIDI_FIXED_ENDPOINT, 766 .type = QUIRK_MIDI_FIXED_ENDPOINT,
767 .data = & (const struct snd_usb_midi_endpoint_info) { 767 .data = & (const struct snd_usb_midi_endpoint_info) {
768 .out_cables = 0x0013, 768 .out_cables = 0x0013,
769 .in_cables = 0x0013 769 .in_cables = 0x0013
770 } 770 }
771 }, 771 },
772 { 772 {
773 .ifnum = -1 773 .ifnum = -1
774 } 774 }
775 } 775 }
776 } 776 }
777 }, 777 },
778 { 778 {
779 /* thanks to Emiliano Grilli <emillo@libero.it> 779 /* thanks to Emiliano Grilli <emillo@libero.it>
780 * for helping researching this data */ 780 * for helping researching this data */
781 USB_DEVICE(0x0582, 0x000c), 781 USB_DEVICE(0x0582, 0x000c),
782 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 782 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
783 .vendor_name = "Roland", 783 .vendor_name = "Roland",
784 .product_name = "SC-D70", 784 .product_name = "SC-D70",
785 .ifnum = QUIRK_ANY_INTERFACE, 785 .ifnum = QUIRK_ANY_INTERFACE,
786 .type = QUIRK_COMPOSITE, 786 .type = QUIRK_COMPOSITE,
787 .data = (const struct snd_usb_audio_quirk[]) { 787 .data = (const struct snd_usb_audio_quirk[]) {
788 { 788 {
789 .ifnum = 0, 789 .ifnum = 0,
790 .type = QUIRK_AUDIO_FIXED_ENDPOINT, 790 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
791 .data = & (const struct audioformat) { 791 .data = & (const struct audioformat) {
792 .formats = SNDRV_PCM_FMTBIT_S24_3LE, 792 .formats = SNDRV_PCM_FMTBIT_S24_3LE,
793 .channels = 2, 793 .channels = 2,
794 .iface = 0, 794 .iface = 0,
795 .altsetting = 1, 795 .altsetting = 1,
796 .altset_idx = 1, 796 .altset_idx = 1,
797 .attributes = 0, 797 .attributes = 0,
798 .endpoint = 0x01, 798 .endpoint = 0x01,
799 .ep_attr = 0x01, 799 .ep_attr = 0x01,
800 .rates = SNDRV_PCM_RATE_CONTINUOUS, 800 .rates = SNDRV_PCM_RATE_CONTINUOUS,
801 .rate_min = 44100, 801 .rate_min = 44100,
802 .rate_max = 44100, 802 .rate_max = 44100,
803 } 803 }
804 }, 804 },
805 { 805 {
806 .ifnum = 1, 806 .ifnum = 1,
807 .type = QUIRK_AUDIO_FIXED_ENDPOINT, 807 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
808 .data = & (const struct audioformat) { 808 .data = & (const struct audioformat) {
809 .formats = SNDRV_PCM_FMTBIT_S24_3LE, 809 .formats = SNDRV_PCM_FMTBIT_S24_3LE,
810 .channels = 2, 810 .channels = 2,
811 .iface = 1, 811 .iface = 1,
812 .altsetting = 1, 812 .altsetting = 1,
813 .altset_idx = 1, 813 .altset_idx = 1,
814 .attributes = 0, 814 .attributes = 0,
815 .endpoint = 0x81, 815 .endpoint = 0x81,
816 .ep_attr = 0x01, 816 .ep_attr = 0x01,
817 .rates = SNDRV_PCM_RATE_CONTINUOUS, 817 .rates = SNDRV_PCM_RATE_CONTINUOUS,
818 .rate_min = 44100, 818 .rate_min = 44100,
819 .rate_max = 44100, 819 .rate_max = 44100,
820 } 820 }
821 }, 821 },
822 { 822 {
823 .ifnum = 2, 823 .ifnum = 2,
824 .type = QUIRK_MIDI_FIXED_ENDPOINT, 824 .type = QUIRK_MIDI_FIXED_ENDPOINT,
825 .data = & (const struct snd_usb_midi_endpoint_info) { 825 .data = & (const struct snd_usb_midi_endpoint_info) {
826 .out_cables = 0x0007, 826 .out_cables = 0x0007,
827 .in_cables = 0x0007 827 .in_cables = 0x0007
828 } 828 }
829 }, 829 },
830 { 830 {
831 .ifnum = -1 831 .ifnum = -1
832 } 832 }
833 } 833 }
834 } 834 }
835 }, 835 },
836 { /* 836 { /*
837 * This quirk is for the "Advanced Driver" mode of the Edirol UA-5. 837 * This quirk is for the "Advanced Driver" mode of the Edirol UA-5.
838 * If the advanced mode switch at the back of the unit is off, the 838 * If the advanced mode switch at the back of the unit is off, the
839 * UA-5 has ID 0x0582/0x0011 and is standard compliant (no quirks), 839 * UA-5 has ID 0x0582/0x0011 and is standard compliant (no quirks),
840 * but offers only 16-bit PCM. 840 * but offers only 16-bit PCM.
841 * In advanced mode, the UA-5 will output S24_3LE samples (two 841 * In advanced mode, the UA-5 will output S24_3LE samples (two
842 * channels) at the rate indicated on the front switch, including 842 * channels) at the rate indicated on the front switch, including
843 * the 96kHz sample rate. 843 * the 96kHz sample rate.
844 */ 844 */
845 USB_DEVICE(0x0582, 0x0010), 845 USB_DEVICE(0x0582, 0x0010),
846 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 846 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
847 .vendor_name = "EDIROL", 847 .vendor_name = "EDIROL",
848 .product_name = "UA-5", 848 .product_name = "UA-5",
849 .ifnum = QUIRK_ANY_INTERFACE, 849 .ifnum = QUIRK_ANY_INTERFACE,
850 .type = QUIRK_COMPOSITE, 850 .type = QUIRK_COMPOSITE,
851 .data = (const struct snd_usb_audio_quirk[]) { 851 .data = (const struct snd_usb_audio_quirk[]) {
852 { 852 {
853 .ifnum = 1, 853 .ifnum = 1,
854 .type = QUIRK_AUDIO_STANDARD_INTERFACE 854 .type = QUIRK_AUDIO_STANDARD_INTERFACE
855 }, 855 },
856 { 856 {
857 .ifnum = 2, 857 .ifnum = 2,
858 .type = QUIRK_AUDIO_STANDARD_INTERFACE 858 .type = QUIRK_AUDIO_STANDARD_INTERFACE
859 }, 859 },
860 { 860 {
861 .ifnum = -1 861 .ifnum = -1
862 } 862 }
863 } 863 }
864 } 864 }
865 }, 865 },
866 { 866 {
867 /* has ID 0x0013 when not in "Advanced Driver" mode */ 867 /* has ID 0x0013 when not in "Advanced Driver" mode */
868 USB_DEVICE(0x0582, 0x0012), 868 USB_DEVICE(0x0582, 0x0012),
869 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 869 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
870 .vendor_name = "Roland", 870 .vendor_name = "Roland",
871 .product_name = "XV-5050", 871 .product_name = "XV-5050",
872 .ifnum = 0, 872 .ifnum = 0,
873 .type = QUIRK_MIDI_FIXED_ENDPOINT, 873 .type = QUIRK_MIDI_FIXED_ENDPOINT,
874 .data = & (const struct snd_usb_midi_endpoint_info) { 874 .data = & (const struct snd_usb_midi_endpoint_info) {
875 .out_cables = 0x0001, 875 .out_cables = 0x0001,
876 .in_cables = 0x0001 876 .in_cables = 0x0001
877 } 877 }
878 } 878 }
879 }, 879 },
880 { 880 {
881 /* has ID 0x0015 when not in "Advanced Driver" mode */ 881 /* has ID 0x0015 when not in "Advanced Driver" mode */
882 USB_DEVICE(0x0582, 0x0014), 882 USB_DEVICE(0x0582, 0x0014),
883 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 883 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
884 .vendor_name = "EDIROL", 884 .vendor_name = "EDIROL",
885 .product_name = "UM-880", 885 .product_name = "UM-880",
886 .ifnum = 0, 886 .ifnum = 0,
887 .type = QUIRK_MIDI_FIXED_ENDPOINT, 887 .type = QUIRK_MIDI_FIXED_ENDPOINT,
888 .data = & (const struct snd_usb_midi_endpoint_info) { 888 .data = & (const struct snd_usb_midi_endpoint_info) {
889 .out_cables = 0x01ff, 889 .out_cables = 0x01ff,
890 .in_cables = 0x01ff 890 .in_cables = 0x01ff
891 } 891 }
892 } 892 }
893 }, 893 },
894 { 894 {
895 /* has ID 0x0017 when not in "Advanced Driver" mode */ 895 /* has ID 0x0017 when not in "Advanced Driver" mode */
896 USB_DEVICE(0x0582, 0x0016), 896 USB_DEVICE(0x0582, 0x0016),
897 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 897 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
898 .vendor_name = "EDIROL", 898 .vendor_name = "EDIROL",
899 .product_name = "SD-90", 899 .product_name = "SD-90",
900 .ifnum = QUIRK_ANY_INTERFACE, 900 .ifnum = QUIRK_ANY_INTERFACE,
901 .type = QUIRK_COMPOSITE, 901 .type = QUIRK_COMPOSITE,
902 .data = (const struct snd_usb_audio_quirk[]) { 902 .data = (const struct snd_usb_audio_quirk[]) {
903 { 903 {
904 .ifnum = 0, 904 .ifnum = 0,
905 .type = QUIRK_AUDIO_STANDARD_INTERFACE 905 .type = QUIRK_AUDIO_STANDARD_INTERFACE
906 }, 906 },
907 { 907 {
908 .ifnum = 1, 908 .ifnum = 1,
909 .type = QUIRK_AUDIO_STANDARD_INTERFACE 909 .type = QUIRK_AUDIO_STANDARD_INTERFACE
910 }, 910 },
911 { 911 {
912 .ifnum = 2, 912 .ifnum = 2,
913 .type = QUIRK_MIDI_FIXED_ENDPOINT, 913 .type = QUIRK_MIDI_FIXED_ENDPOINT,
914 .data = & (const struct snd_usb_midi_endpoint_info) { 914 .data = & (const struct snd_usb_midi_endpoint_info) {
915 .out_cables = 0x000f, 915 .out_cables = 0x000f,
916 .in_cables = 0x000f 916 .in_cables = 0x000f
917 } 917 }
918 }, 918 },
919 { 919 {
920 .ifnum = -1 920 .ifnum = -1
921 } 921 }
922 } 922 }
923 } 923 }
924 }, 924 },
925 { 925 {
926 /* has ID 0x001c when not in "Advanced Driver" mode */ 926 /* has ID 0x001c when not in "Advanced Driver" mode */
927 USB_DEVICE(0x0582, 0x001b), 927 USB_DEVICE(0x0582, 0x001b),
928 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 928 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
929 .vendor_name = "Roland", 929 .vendor_name = "Roland",
930 .product_name = "MMP-2", 930 .product_name = "MMP-2",
931 .ifnum = QUIRK_ANY_INTERFACE, 931 .ifnum = QUIRK_ANY_INTERFACE,
932 .type = QUIRK_COMPOSITE, 932 .type = QUIRK_COMPOSITE,
933 .data = (const struct snd_usb_audio_quirk[]) { 933 .data = (const struct snd_usb_audio_quirk[]) {
934 { 934 {
935 .ifnum = 0, 935 .ifnum = 0,
936 .type = QUIRK_IGNORE_INTERFACE 936 .type = QUIRK_IGNORE_INTERFACE
937 }, 937 },
938 { 938 {
939 .ifnum = 1, 939 .ifnum = 1,
940 .type = QUIRK_IGNORE_INTERFACE 940 .type = QUIRK_IGNORE_INTERFACE
941 }, 941 },
942 { 942 {
943 .ifnum = 2, 943 .ifnum = 2,
944 .type = QUIRK_MIDI_FIXED_ENDPOINT, 944 .type = QUIRK_MIDI_FIXED_ENDPOINT,
945 .data = & (const struct snd_usb_midi_endpoint_info) { 945 .data = & (const struct snd_usb_midi_endpoint_info) {
946 .out_cables = 0x0001, 946 .out_cables = 0x0001,
947 .in_cables = 0x0001 947 .in_cables = 0x0001
948 } 948 }
949 }, 949 },
950 { 950 {
951 .ifnum = -1 951 .ifnum = -1
952 } 952 }
953 } 953 }
954 } 954 }
955 }, 955 },
956 { 956 {
957 /* has ID 0x001e when not in "Advanced Driver" mode */ 957 /* has ID 0x001e when not in "Advanced Driver" mode */
958 USB_DEVICE(0x0582, 0x001d), 958 USB_DEVICE(0x0582, 0x001d),
959 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 959 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
960 .vendor_name = "Roland", 960 .vendor_name = "Roland",
961 .product_name = "V-SYNTH", 961 .product_name = "V-SYNTH",
962 .ifnum = 0, 962 .ifnum = 0,
963 .type = QUIRK_MIDI_FIXED_ENDPOINT, 963 .type = QUIRK_MIDI_FIXED_ENDPOINT,
964 .data = & (const struct snd_usb_midi_endpoint_info) { 964 .data = & (const struct snd_usb_midi_endpoint_info) {
965 .out_cables = 0x0001, 965 .out_cables = 0x0001,
966 .in_cables = 0x0001 966 .in_cables = 0x0001
967 } 967 }
968 } 968 }
969 }, 969 },
970 { 970 {
971 /* has ID 0x0024 when not in "Advanced Driver" mode */ 971 /* has ID 0x0024 when not in "Advanced Driver" mode */
972 USB_DEVICE(0x0582, 0x0023), 972 USB_DEVICE(0x0582, 0x0023),
973 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 973 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
974 .vendor_name = "EDIROL", 974 .vendor_name = "EDIROL",
975 .product_name = "UM-550", 975 .product_name = "UM-550",
976 .ifnum = 0, 976 .ifnum = 0,
977 .type = QUIRK_MIDI_FIXED_ENDPOINT, 977 .type = QUIRK_MIDI_FIXED_ENDPOINT,
978 .data = & (const struct snd_usb_midi_endpoint_info) { 978 .data = & (const struct snd_usb_midi_endpoint_info) {
979 .out_cables = 0x003f, 979 .out_cables = 0x003f,
980 .in_cables = 0x003f 980 .in_cables = 0x003f
981 } 981 }
982 } 982 }
983 }, 983 },
984 { 984 {
985 /* 985 /*
986 * This quirk is for the "Advanced Driver" mode. If off, the UA-20 986 * This quirk is for the "Advanced Driver" mode. If off, the UA-20
987 * has ID 0x0026 and is standard compliant, but has only 16-bit PCM 987 * has ID 0x0026 and is standard compliant, but has only 16-bit PCM
988 * and no MIDI. 988 * and no MIDI.
989 */ 989 */
990 USB_DEVICE(0x0582, 0x0025), 990 USB_DEVICE(0x0582, 0x0025),
991 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 991 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
992 .vendor_name = "EDIROL", 992 .vendor_name = "EDIROL",
993 .product_name = "UA-20", 993 .product_name = "UA-20",
994 .ifnum = QUIRK_ANY_INTERFACE, 994 .ifnum = QUIRK_ANY_INTERFACE,
995 .type = QUIRK_COMPOSITE, 995 .type = QUIRK_COMPOSITE,
996 .data = (const struct snd_usb_audio_quirk[]) { 996 .data = (const struct snd_usb_audio_quirk[]) {
997 { 997 {
998 .ifnum = 0, 998 .ifnum = 0,
999 .type = QUIRK_IGNORE_INTERFACE 999 .type = QUIRK_IGNORE_INTERFACE
1000 }, 1000 },
1001 { 1001 {
1002 .ifnum = 1, 1002 .ifnum = 1,
1003 .type = QUIRK_AUDIO_FIXED_ENDPOINT, 1003 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
1004 .data = & (const struct audioformat) { 1004 .data = & (const struct audioformat) {
1005 .formats = SNDRV_PCM_FMTBIT_S24_3LE, 1005 .formats = SNDRV_PCM_FMTBIT_S24_3LE,
1006 .channels = 2, 1006 .channels = 2,
1007 .iface = 1, 1007 .iface = 1,
1008 .altsetting = 1, 1008 .altsetting = 1,
1009 .altset_idx = 1, 1009 .altset_idx = 1,
1010 .attributes = 0, 1010 .attributes = 0,
1011 .endpoint = 0x01, 1011 .endpoint = 0x01,
1012 .ep_attr = 0x01, 1012 .ep_attr = 0x01,
1013 .rates = SNDRV_PCM_RATE_CONTINUOUS, 1013 .rates = SNDRV_PCM_RATE_CONTINUOUS,
1014 .rate_min = 44100, 1014 .rate_min = 44100,
1015 .rate_max = 44100, 1015 .rate_max = 44100,
1016 } 1016 }
1017 }, 1017 },
1018 { 1018 {
1019 .ifnum = 2, 1019 .ifnum = 2,
1020 .type = QUIRK_AUDIO_FIXED_ENDPOINT, 1020 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
1021 .data = & (const struct audioformat) { 1021 .data = & (const struct audioformat) {
1022 .formats = SNDRV_PCM_FMTBIT_S24_3LE, 1022 .formats = SNDRV_PCM_FMTBIT_S24_3LE,
1023 .channels = 2, 1023 .channels = 2,
1024 .iface = 2, 1024 .iface = 2,
1025 .altsetting = 1, 1025 .altsetting = 1,
1026 .altset_idx = 1, 1026 .altset_idx = 1,
1027 .attributes = 0, 1027 .attributes = 0,
1028 .endpoint = 0x82, 1028 .endpoint = 0x82,
1029 .ep_attr = 0x01, 1029 .ep_attr = 0x01,
1030 .rates = SNDRV_PCM_RATE_CONTINUOUS, 1030 .rates = SNDRV_PCM_RATE_CONTINUOUS,
1031 .rate_min = 44100, 1031 .rate_min = 44100,
1032 .rate_max = 44100, 1032 .rate_max = 44100,
1033 } 1033 }
1034 }, 1034 },
1035 { 1035 {
1036 .ifnum = 3, 1036 .ifnum = 3,
1037 .type = QUIRK_MIDI_FIXED_ENDPOINT, 1037 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1038 .data = & (const struct snd_usb_midi_endpoint_info) { 1038 .data = & (const struct snd_usb_midi_endpoint_info) {
1039 .out_cables = 0x0001, 1039 .out_cables = 0x0001,
1040 .in_cables = 0x0001 1040 .in_cables = 0x0001
1041 } 1041 }
1042 }, 1042 },
1043 { 1043 {
1044 .ifnum = -1 1044 .ifnum = -1
1045 } 1045 }
1046 } 1046 }
1047 } 1047 }
1048 }, 1048 },
1049 { 1049 {
1050 /* has ID 0x0028 when not in "Advanced Driver" mode */ 1050 /* has ID 0x0028 when not in "Advanced Driver" mode */
1051 USB_DEVICE(0x0582, 0x0027), 1051 USB_DEVICE(0x0582, 0x0027),
1052 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1052 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1053 .vendor_name = "EDIROL", 1053 .vendor_name = "EDIROL",
1054 .product_name = "SD-20", 1054 .product_name = "SD-20",
1055 .ifnum = 0, 1055 .ifnum = 0,
1056 .type = QUIRK_MIDI_FIXED_ENDPOINT, 1056 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1057 .data = & (const struct snd_usb_midi_endpoint_info) { 1057 .data = & (const struct snd_usb_midi_endpoint_info) {
1058 .out_cables = 0x0003, 1058 .out_cables = 0x0003,
1059 .in_cables = 0x0007 1059 .in_cables = 0x0007
1060 } 1060 }
1061 } 1061 }
1062 }, 1062 },
1063 { 1063 {
1064 /* has ID 0x002a when not in "Advanced Driver" mode */ 1064 /* has ID 0x002a when not in "Advanced Driver" mode */
1065 USB_DEVICE(0x0582, 0x0029), 1065 USB_DEVICE(0x0582, 0x0029),
1066 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1066 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1067 .vendor_name = "EDIROL", 1067 .vendor_name = "EDIROL",
1068 .product_name = "SD-80", 1068 .product_name = "SD-80",
1069 .ifnum = 0, 1069 .ifnum = 0,
1070 .type = QUIRK_MIDI_FIXED_ENDPOINT, 1070 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1071 .data = & (const struct snd_usb_midi_endpoint_info) { 1071 .data = & (const struct snd_usb_midi_endpoint_info) {
1072 .out_cables = 0x000f, 1072 .out_cables = 0x000f,
1073 .in_cables = 0x000f 1073 .in_cables = 0x000f
1074 } 1074 }
1075 } 1075 }
1076 }, 1076 },
1077 { /* 1077 { /*
1078 * This quirk is for the "Advanced" modes of the Edirol UA-700. 1078 * This quirk is for the "Advanced" modes of the Edirol UA-700.
1079 * If the sample format switch is not in an advanced setting, the 1079 * If the sample format switch is not in an advanced setting, the
1080 * UA-700 has ID 0x0582/0x002c and is standard compliant (no quirks), 1080 * UA-700 has ID 0x0582/0x002c and is standard compliant (no quirks),
1081 * but offers only 16-bit PCM and no MIDI. 1081 * but offers only 16-bit PCM and no MIDI.
1082 */ 1082 */
1083 USB_DEVICE_VENDOR_SPEC(0x0582, 0x002b), 1083 USB_DEVICE_VENDOR_SPEC(0x0582, 0x002b),
1084 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1084 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1085 .vendor_name = "EDIROL", 1085 .vendor_name = "EDIROL",
1086 .product_name = "UA-700", 1086 .product_name = "UA-700",
1087 .ifnum = QUIRK_ANY_INTERFACE, 1087 .ifnum = QUIRK_ANY_INTERFACE,
1088 .type = QUIRK_COMPOSITE, 1088 .type = QUIRK_COMPOSITE,
1089 .data = (const struct snd_usb_audio_quirk[]) { 1089 .data = (const struct snd_usb_audio_quirk[]) {
1090 { 1090 {
1091 .ifnum = 1, 1091 .ifnum = 1,
1092 .type = QUIRK_AUDIO_EDIROL_UAXX 1092 .type = QUIRK_AUDIO_EDIROL_UAXX
1093 }, 1093 },
1094 { 1094 {
1095 .ifnum = 2, 1095 .ifnum = 2,
1096 .type = QUIRK_AUDIO_EDIROL_UAXX 1096 .type = QUIRK_AUDIO_EDIROL_UAXX
1097 }, 1097 },
1098 { 1098 {
1099 .ifnum = 3, 1099 .ifnum = 3,
1100 .type = QUIRK_AUDIO_EDIROL_UAXX 1100 .type = QUIRK_AUDIO_EDIROL_UAXX
1101 }, 1101 },
1102 { 1102 {
1103 .ifnum = -1 1103 .ifnum = -1
1104 } 1104 }
1105 } 1105 }
1106 } 1106 }
1107 }, 1107 },
1108 { 1108 {
1109 /* has ID 0x002e when not in "Advanced Driver" mode */ 1109 /* has ID 0x002e when not in "Advanced Driver" mode */
1110 USB_DEVICE(0x0582, 0x002d), 1110 USB_DEVICE(0x0582, 0x002d),
1111 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1111 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1112 .vendor_name = "Roland", 1112 .vendor_name = "Roland",
1113 .product_name = "XV-2020", 1113 .product_name = "XV-2020",
1114 .ifnum = 0, 1114 .ifnum = 0,
1115 .type = QUIRK_MIDI_FIXED_ENDPOINT, 1115 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1116 .data = & (const struct snd_usb_midi_endpoint_info) { 1116 .data = & (const struct snd_usb_midi_endpoint_info) {
1117 .out_cables = 0x0001, 1117 .out_cables = 0x0001,
1118 .in_cables = 0x0001 1118 .in_cables = 0x0001
1119 } 1119 }
1120 } 1120 }
1121 }, 1121 },
1122 { 1122 {
1123 /* has ID 0x0030 when not in "Advanced Driver" mode */ 1123 /* has ID 0x0030 when not in "Advanced Driver" mode */
1124 USB_DEVICE(0x0582, 0x002f), 1124 USB_DEVICE(0x0582, 0x002f),
1125 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1125 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1126 .vendor_name = "Roland", 1126 .vendor_name = "Roland",
1127 .product_name = "VariOS", 1127 .product_name = "VariOS",
1128 .ifnum = 0, 1128 .ifnum = 0,
1129 .type = QUIRK_MIDI_FIXED_ENDPOINT, 1129 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1130 .data = & (const struct snd_usb_midi_endpoint_info) { 1130 .data = & (const struct snd_usb_midi_endpoint_info) {
1131 .out_cables = 0x0007, 1131 .out_cables = 0x0007,
1132 .in_cables = 0x0007 1132 .in_cables = 0x0007
1133 } 1133 }
1134 } 1134 }
1135 }, 1135 },
1136 { 1136 {
1137 /* has ID 0x0034 when not in "Advanced Driver" mode */ 1137 /* has ID 0x0034 when not in "Advanced Driver" mode */
1138 USB_DEVICE(0x0582, 0x0033), 1138 USB_DEVICE(0x0582, 0x0033),
1139 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1139 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1140 .vendor_name = "EDIROL", 1140 .vendor_name = "EDIROL",
1141 .product_name = "PCR", 1141 .product_name = "PCR",
1142 .ifnum = 0, 1142 .ifnum = 0,
1143 .type = QUIRK_MIDI_FIXED_ENDPOINT, 1143 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1144 .data = & (const struct snd_usb_midi_endpoint_info) { 1144 .data = & (const struct snd_usb_midi_endpoint_info) {
1145 .out_cables = 0x0003, 1145 .out_cables = 0x0003,
1146 .in_cables = 0x0007 1146 .in_cables = 0x0007
1147 } 1147 }
1148 } 1148 }
1149 }, 1149 },
1150 { 1150 {
1151 /* 1151 /*
1152 * Has ID 0x0038 when not in "Advanced Driver" mode; 1152 * Has ID 0x0038 when not in "Advanced Driver" mode;
1153 * later revisions use IDs 0x0054 and 0x00a2. 1153 * later revisions use IDs 0x0054 and 0x00a2.
1154 */ 1154 */
1155 USB_DEVICE(0x0582, 0x0037), 1155 USB_DEVICE(0x0582, 0x0037),
1156 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1156 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1157 .vendor_name = "Roland", 1157 .vendor_name = "Roland",
1158 .product_name = "Digital Piano", 1158 .product_name = "Digital Piano",
1159 .ifnum = 0, 1159 .ifnum = 0,
1160 .type = QUIRK_MIDI_FIXED_ENDPOINT, 1160 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1161 .data = & (const struct snd_usb_midi_endpoint_info) { 1161 .data = & (const struct snd_usb_midi_endpoint_info) {
1162 .out_cables = 0x0001, 1162 .out_cables = 0x0001,
1163 .in_cables = 0x0001 1163 .in_cables = 0x0001
1164 } 1164 }
1165 } 1165 }
1166 }, 1166 },
1167 { 1167 {
1168 /* 1168 /*
1169 * This quirk is for the "Advanced Driver" mode. If off, the GS-10 1169 * This quirk is for the "Advanced Driver" mode. If off, the GS-10
1170 * has ID 0x003c and is standard compliant, but has only 16-bit PCM 1170 * has ID 0x003c and is standard compliant, but has only 16-bit PCM
1171 * and no MIDI. 1171 * and no MIDI.
1172 */ 1172 */
1173 USB_DEVICE_VENDOR_SPEC(0x0582, 0x003b), 1173 USB_DEVICE_VENDOR_SPEC(0x0582, 0x003b),
1174 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1174 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1175 .vendor_name = "BOSS", 1175 .vendor_name = "BOSS",
1176 .product_name = "GS-10", 1176 .product_name = "GS-10",
1177 .ifnum = QUIRK_ANY_INTERFACE, 1177 .ifnum = QUIRK_ANY_INTERFACE,
1178 .type = QUIRK_COMPOSITE, 1178 .type = QUIRK_COMPOSITE,
1179 .data = & (const struct snd_usb_audio_quirk[]) { 1179 .data = & (const struct snd_usb_audio_quirk[]) {
1180 { 1180 {
1181 .ifnum = 1, 1181 .ifnum = 1,
1182 .type = QUIRK_AUDIO_STANDARD_INTERFACE 1182 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1183 }, 1183 },
1184 { 1184 {
1185 .ifnum = 2, 1185 .ifnum = 2,
1186 .type = QUIRK_AUDIO_STANDARD_INTERFACE 1186 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1187 }, 1187 },
1188 { 1188 {
1189 .ifnum = 3, 1189 .ifnum = 3,
1190 .type = QUIRK_MIDI_STANDARD_INTERFACE 1190 .type = QUIRK_MIDI_STANDARD_INTERFACE
1191 }, 1191 },
1192 { 1192 {
1193 .ifnum = -1 1193 .ifnum = -1
1194 } 1194 }
1195 } 1195 }
1196 } 1196 }
1197 }, 1197 },
1198 { 1198 {
1199 /* has ID 0x0041 when not in "Advanced Driver" mode */ 1199 /* has ID 0x0041 when not in "Advanced Driver" mode */
1200 USB_DEVICE(0x0582, 0x0040), 1200 USB_DEVICE(0x0582, 0x0040),
1201 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1201 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1202 .vendor_name = "Roland", 1202 .vendor_name = "Roland",
1203 .product_name = "GI-20", 1203 .product_name = "GI-20",
1204 .ifnum = 0, 1204 .ifnum = 0,
1205 .type = QUIRK_MIDI_FIXED_ENDPOINT, 1205 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1206 .data = & (const struct snd_usb_midi_endpoint_info) { 1206 .data = & (const struct snd_usb_midi_endpoint_info) {
1207 .out_cables = 0x0001, 1207 .out_cables = 0x0001,
1208 .in_cables = 0x0001 1208 .in_cables = 0x0001
1209 } 1209 }
1210 } 1210 }
1211 }, 1211 },
1212 { 1212 {
1213 /* has ID 0x0043 when not in "Advanced Driver" mode */ 1213 /* has ID 0x0043 when not in "Advanced Driver" mode */
1214 USB_DEVICE(0x0582, 0x0042), 1214 USB_DEVICE(0x0582, 0x0042),
1215 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1215 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1216 .vendor_name = "Roland", 1216 .vendor_name = "Roland",
1217 .product_name = "RS-70", 1217 .product_name = "RS-70",
1218 .ifnum = 0, 1218 .ifnum = 0,
1219 .type = QUIRK_MIDI_FIXED_ENDPOINT, 1219 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1220 .data = & (const struct snd_usb_midi_endpoint_info) { 1220 .data = & (const struct snd_usb_midi_endpoint_info) {
1221 .out_cables = 0x0001, 1221 .out_cables = 0x0001,
1222 .in_cables = 0x0001 1222 .in_cables = 0x0001
1223 } 1223 }
1224 } 1224 }
1225 }, 1225 },
1226 { 1226 {
1227 /* has ID 0x0049 when not in "Advanced Driver" mode */ 1227 /* has ID 0x0049 when not in "Advanced Driver" mode */
1228 USB_DEVICE(0x0582, 0x0047), 1228 USB_DEVICE(0x0582, 0x0047),
1229 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1229 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1230 /* .vendor_name = "EDIROL", */ 1230 /* .vendor_name = "EDIROL", */
1231 /* .product_name = "UR-80", */ 1231 /* .product_name = "UR-80", */
1232 .ifnum = QUIRK_ANY_INTERFACE, 1232 .ifnum = QUIRK_ANY_INTERFACE,
1233 .type = QUIRK_COMPOSITE, 1233 .type = QUIRK_COMPOSITE,
1234 .data = (const struct snd_usb_audio_quirk[]) { 1234 .data = (const struct snd_usb_audio_quirk[]) {
1235 /* in the 96 kHz modes, only interface 1 is there */ 1235 /* in the 96 kHz modes, only interface 1 is there */
1236 { 1236 {
1237 .ifnum = 1, 1237 .ifnum = 1,
1238 .type = QUIRK_AUDIO_STANDARD_INTERFACE 1238 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1239 }, 1239 },
1240 { 1240 {
1241 .ifnum = 2, 1241 .ifnum = 2,
1242 .type = QUIRK_AUDIO_STANDARD_INTERFACE 1242 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1243 }, 1243 },
1244 { 1244 {
1245 .ifnum = -1 1245 .ifnum = -1
1246 } 1246 }
1247 } 1247 }
1248 } 1248 }
1249 }, 1249 },
1250 { 1250 {
1251 /* has ID 0x004a when not in "Advanced Driver" mode */ 1251 /* has ID 0x004a when not in "Advanced Driver" mode */
1252 USB_DEVICE(0x0582, 0x0048), 1252 USB_DEVICE(0x0582, 0x0048),
1253 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1253 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1254 /* .vendor_name = "EDIROL", */ 1254 /* .vendor_name = "EDIROL", */
1255 /* .product_name = "UR-80", */ 1255 /* .product_name = "UR-80", */
1256 .ifnum = 0, 1256 .ifnum = 0,
1257 .type = QUIRK_MIDI_FIXED_ENDPOINT, 1257 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1258 .data = & (const struct snd_usb_midi_endpoint_info) { 1258 .data = & (const struct snd_usb_midi_endpoint_info) {
1259 .out_cables = 0x0003, 1259 .out_cables = 0x0003,
1260 .in_cables = 0x0007 1260 .in_cables = 0x0007
1261 } 1261 }
1262 } 1262 }
1263 }, 1263 },
1264 { 1264 {
1265 /* has ID 0x004e when not in "Advanced Driver" mode */ 1265 /* has ID 0x004e when not in "Advanced Driver" mode */
1266 USB_DEVICE(0x0582, 0x004c), 1266 USB_DEVICE(0x0582, 0x004c),
1267 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1267 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1268 .vendor_name = "EDIROL", 1268 .vendor_name = "EDIROL",
1269 .product_name = "PCR-A", 1269 .product_name = "PCR-A",
1270 .ifnum = QUIRK_ANY_INTERFACE, 1270 .ifnum = QUIRK_ANY_INTERFACE,
1271 .type = QUIRK_COMPOSITE, 1271 .type = QUIRK_COMPOSITE,
1272 .data = (const struct snd_usb_audio_quirk[]) { 1272 .data = (const struct snd_usb_audio_quirk[]) {
1273 { 1273 {
1274 .ifnum = 1, 1274 .ifnum = 1,
1275 .type = QUIRK_AUDIO_STANDARD_INTERFACE 1275 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1276 }, 1276 },
1277 { 1277 {
1278 .ifnum = 2, 1278 .ifnum = 2,
1279 .type = QUIRK_AUDIO_STANDARD_INTERFACE 1279 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1280 }, 1280 },
1281 { 1281 {
1282 .ifnum = -1 1282 .ifnum = -1
1283 } 1283 }
1284 } 1284 }
1285 } 1285 }
1286 }, 1286 },
1287 { 1287 {
1288 /* has ID 0x004f when not in "Advanced Driver" mode */ 1288 /* has ID 0x004f when not in "Advanced Driver" mode */
1289 USB_DEVICE(0x0582, 0x004d), 1289 USB_DEVICE(0x0582, 0x004d),
1290 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1290 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1291 .vendor_name = "EDIROL", 1291 .vendor_name = "EDIROL",
1292 .product_name = "PCR-A", 1292 .product_name = "PCR-A",
1293 .ifnum = 0, 1293 .ifnum = 0,
1294 .type = QUIRK_MIDI_FIXED_ENDPOINT, 1294 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1295 .data = & (const struct snd_usb_midi_endpoint_info) { 1295 .data = & (const struct snd_usb_midi_endpoint_info) {
1296 .out_cables = 0x0003, 1296 .out_cables = 0x0003,
1297 .in_cables = 0x0007 1297 .in_cables = 0x0007
1298 } 1298 }
1299 } 1299 }
1300 }, 1300 },
1301 { 1301 {
1302 /* 1302 /*
1303 * This quirk is for the "Advanced Driver" mode. If off, the UA-3FX 1303 * This quirk is for the "Advanced Driver" mode. If off, the UA-3FX
1304 * is standard compliant, but has only 16-bit PCM. 1304 * is standard compliant, but has only 16-bit PCM.
1305 */ 1305 */
1306 USB_DEVICE(0x0582, 0x0050), 1306 USB_DEVICE(0x0582, 0x0050),
1307 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1307 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1308 .vendor_name = "EDIROL", 1308 .vendor_name = "EDIROL",
1309 .product_name = "UA-3FX", 1309 .product_name = "UA-3FX",
1310 .ifnum = QUIRK_ANY_INTERFACE, 1310 .ifnum = QUIRK_ANY_INTERFACE,
1311 .type = QUIRK_COMPOSITE, 1311 .type = QUIRK_COMPOSITE,
1312 .data = (const struct snd_usb_audio_quirk[]) { 1312 .data = (const struct snd_usb_audio_quirk[]) {
1313 { 1313 {
1314 .ifnum = 1, 1314 .ifnum = 1,
1315 .type = QUIRK_AUDIO_STANDARD_INTERFACE 1315 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1316 }, 1316 },
1317 { 1317 {
1318 .ifnum = 2, 1318 .ifnum = 2,
1319 .type = QUIRK_AUDIO_STANDARD_INTERFACE 1319 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1320 }, 1320 },
1321 { 1321 {
1322 .ifnum = -1 1322 .ifnum = -1
1323 } 1323 }
1324 } 1324 }
1325 } 1325 }
1326 }, 1326 },
1327 { 1327 {
1328 USB_DEVICE(0x0582, 0x0052), 1328 USB_DEVICE(0x0582, 0x0052),
1329 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1329 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1330 .vendor_name = "EDIROL", 1330 .vendor_name = "EDIROL",
1331 .product_name = "UM-1SX", 1331 .product_name = "UM-1SX",
1332 .ifnum = 0, 1332 .ifnum = 0,
1333 .type = QUIRK_MIDI_STANDARD_INTERFACE 1333 .type = QUIRK_MIDI_STANDARD_INTERFACE
1334 } 1334 }
1335 }, 1335 },
1336 { 1336 {
1337 USB_DEVICE(0x0582, 0x0060), 1337 USB_DEVICE(0x0582, 0x0060),
1338 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1338 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1339 .vendor_name = "Roland", 1339 .vendor_name = "Roland",
1340 .product_name = "EXR Series", 1340 .product_name = "EXR Series",
1341 .ifnum = 0, 1341 .ifnum = 0,
1342 .type = QUIRK_MIDI_STANDARD_INTERFACE 1342 .type = QUIRK_MIDI_STANDARD_INTERFACE
1343 } 1343 }
1344 }, 1344 },
1345 { 1345 {
1346 /* has ID 0x0066 when not in "Advanced Driver" mode */ 1346 /* has ID 0x0066 when not in "Advanced Driver" mode */
1347 USB_DEVICE(0x0582, 0x0064), 1347 USB_DEVICE(0x0582, 0x0064),
1348 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1348 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1349 /* .vendor_name = "EDIROL", */ 1349 /* .vendor_name = "EDIROL", */
1350 /* .product_name = "PCR-1", */ 1350 /* .product_name = "PCR-1", */
1351 .ifnum = QUIRK_ANY_INTERFACE, 1351 .ifnum = QUIRK_ANY_INTERFACE,
1352 .type = QUIRK_COMPOSITE, 1352 .type = QUIRK_COMPOSITE,
1353 .data = (const struct snd_usb_audio_quirk[]) { 1353 .data = (const struct snd_usb_audio_quirk[]) {
1354 { 1354 {
1355 .ifnum = 1, 1355 .ifnum = 1,
1356 .type = QUIRK_AUDIO_STANDARD_INTERFACE 1356 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1357 }, 1357 },
1358 { 1358 {
1359 .ifnum = 2, 1359 .ifnum = 2,
1360 .type = QUIRK_AUDIO_STANDARD_INTERFACE 1360 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1361 }, 1361 },
1362 { 1362 {
1363 .ifnum = -1 1363 .ifnum = -1
1364 } 1364 }
1365 } 1365 }
1366 } 1366 }
1367 }, 1367 },
1368 { 1368 {
1369 /* has ID 0x0067 when not in "Advanced Driver" mode */ 1369 /* has ID 0x0067 when not in "Advanced Driver" mode */
1370 USB_DEVICE(0x0582, 0x0065), 1370 USB_DEVICE(0x0582, 0x0065),
1371 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1371 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1372 /* .vendor_name = "EDIROL", */ 1372 /* .vendor_name = "EDIROL", */
1373 /* .product_name = "PCR-1", */ 1373 /* .product_name = "PCR-1", */
1374 .ifnum = 0, 1374 .ifnum = 0,
1375 .type = QUIRK_MIDI_FIXED_ENDPOINT, 1375 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1376 .data = & (const struct snd_usb_midi_endpoint_info) { 1376 .data = & (const struct snd_usb_midi_endpoint_info) {
1377 .out_cables = 0x0001, 1377 .out_cables = 0x0001,
1378 .in_cables = 0x0003 1378 .in_cables = 0x0003
1379 } 1379 }
1380 } 1380 }
1381 }, 1381 },
1382 { 1382 {
1383 /* has ID 0x006e when not in "Advanced Driver" mode */ 1383 /* has ID 0x006e when not in "Advanced Driver" mode */
1384 USB_DEVICE(0x0582, 0x006d), 1384 USB_DEVICE(0x0582, 0x006d),
1385 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1385 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1386 .vendor_name = "Roland", 1386 .vendor_name = "Roland",
1387 .product_name = "FANTOM-X", 1387 .product_name = "FANTOM-X",
1388 .ifnum = 0, 1388 .ifnum = 0,
1389 .type = QUIRK_MIDI_FIXED_ENDPOINT, 1389 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1390 .data = & (const struct snd_usb_midi_endpoint_info) { 1390 .data = & (const struct snd_usb_midi_endpoint_info) {
1391 .out_cables = 0x0001, 1391 .out_cables = 0x0001,
1392 .in_cables = 0x0001 1392 .in_cables = 0x0001
1393 } 1393 }
1394 } 1394 }
1395 }, 1395 },
1396 { /* 1396 { /*
1397 * This quirk is for the "Advanced" modes of the Edirol UA-25. 1397 * This quirk is for the "Advanced" modes of the Edirol UA-25.
1398 * If the switch is not in an advanced setting, the UA-25 has 1398 * If the switch is not in an advanced setting, the UA-25 has
1399 * ID 0x0582/0x0073 and is standard compliant (no quirks), but 1399 * ID 0x0582/0x0073 and is standard compliant (no quirks), but
1400 * offers only 16-bit PCM at 44.1 kHz and no MIDI. 1400 * offers only 16-bit PCM at 44.1 kHz and no MIDI.
1401 */ 1401 */
1402 USB_DEVICE_VENDOR_SPEC(0x0582, 0x0074), 1402 USB_DEVICE_VENDOR_SPEC(0x0582, 0x0074),
1403 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1403 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1404 .vendor_name = "EDIROL", 1404 .vendor_name = "EDIROL",
1405 .product_name = "UA-25", 1405 .product_name = "UA-25",
1406 .ifnum = QUIRK_ANY_INTERFACE, 1406 .ifnum = QUIRK_ANY_INTERFACE,
1407 .type = QUIRK_COMPOSITE, 1407 .type = QUIRK_COMPOSITE,
1408 .data = (const struct snd_usb_audio_quirk[]) { 1408 .data = (const struct snd_usb_audio_quirk[]) {
1409 { 1409 {
1410 .ifnum = 0, 1410 .ifnum = 0,
1411 .type = QUIRK_AUDIO_EDIROL_UAXX 1411 .type = QUIRK_AUDIO_EDIROL_UAXX
1412 }, 1412 },
1413 { 1413 {
1414 .ifnum = 1, 1414 .ifnum = 1,
1415 .type = QUIRK_AUDIO_EDIROL_UAXX 1415 .type = QUIRK_AUDIO_EDIROL_UAXX
1416 }, 1416 },
1417 { 1417 {
1418 .ifnum = 2, 1418 .ifnum = 2,
1419 .type = QUIRK_AUDIO_EDIROL_UAXX 1419 .type = QUIRK_AUDIO_EDIROL_UAXX
1420 }, 1420 },
1421 { 1421 {
1422 .ifnum = -1 1422 .ifnum = -1
1423 } 1423 }
1424 } 1424 }
1425 } 1425 }
1426 }, 1426 },
1427 { 1427 {
1428 /* has ID 0x0076 when not in "Advanced Driver" mode */ 1428 /* has ID 0x0076 when not in "Advanced Driver" mode */
1429 USB_DEVICE(0x0582, 0x0075), 1429 USB_DEVICE(0x0582, 0x0075),
1430 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1430 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1431 .vendor_name = "BOSS", 1431 .vendor_name = "BOSS",
1432 .product_name = "DR-880", 1432 .product_name = "DR-880",
1433 .ifnum = 0, 1433 .ifnum = 0,
1434 .type = QUIRK_MIDI_FIXED_ENDPOINT, 1434 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1435 .data = & (const struct snd_usb_midi_endpoint_info) { 1435 .data = & (const struct snd_usb_midi_endpoint_info) {
1436 .out_cables = 0x0001, 1436 .out_cables = 0x0001,
1437 .in_cables = 0x0001 1437 .in_cables = 0x0001
1438 } 1438 }
1439 } 1439 }
1440 }, 1440 },
1441 { 1441 {
1442 /* has ID 0x007b when not in "Advanced Driver" mode */ 1442 /* has ID 0x007b when not in "Advanced Driver" mode */
1443 USB_DEVICE_VENDOR_SPEC(0x0582, 0x007a), 1443 USB_DEVICE_VENDOR_SPEC(0x0582, 0x007a),
1444 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1444 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1445 .vendor_name = "Roland", 1445 .vendor_name = "Roland",
1446 /* "RD" or "RD-700SX"? */ 1446 /* "RD" or "RD-700SX"? */
1447 .ifnum = 0, 1447 .ifnum = 0,
1448 .type = QUIRK_MIDI_FIXED_ENDPOINT, 1448 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1449 .data = & (const struct snd_usb_midi_endpoint_info) { 1449 .data = & (const struct snd_usb_midi_endpoint_info) {
1450 .out_cables = 0x0003, 1450 .out_cables = 0x0003,
1451 .in_cables = 0x0003 1451 .in_cables = 0x0003
1452 } 1452 }
1453 } 1453 }
1454 }, 1454 },
1455 { 1455 {
1456 /* has ID 0x0081 when not in "Advanced Driver" mode */ 1456 /* has ID 0x0081 when not in "Advanced Driver" mode */
1457 USB_DEVICE(0x0582, 0x0080), 1457 USB_DEVICE(0x0582, 0x0080),
1458 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1458 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1459 .vendor_name = "Roland", 1459 .vendor_name = "Roland",
1460 .product_name = "G-70", 1460 .product_name = "G-70",
1461 .ifnum = 0, 1461 .ifnum = 0,
1462 .type = QUIRK_MIDI_FIXED_ENDPOINT, 1462 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1463 .data = & (const struct snd_usb_midi_endpoint_info) { 1463 .data = & (const struct snd_usb_midi_endpoint_info) {
1464 .out_cables = 0x0001, 1464 .out_cables = 0x0001,
1465 .in_cables = 0x0001 1465 .in_cables = 0x0001
1466 } 1466 }
1467 } 1467 }
1468 }, 1468 },
1469 { 1469 {
1470 /* has ID 0x008c when not in "Advanced Driver" mode */ 1470 /* has ID 0x008c when not in "Advanced Driver" mode */
1471 USB_DEVICE(0x0582, 0x008b), 1471 USB_DEVICE(0x0582, 0x008b),
1472 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1472 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1473 .vendor_name = "EDIROL", 1473 .vendor_name = "EDIROL",
1474 .product_name = "PC-50", 1474 .product_name = "PC-50",
1475 .ifnum = 0, 1475 .ifnum = 0,
1476 .type = QUIRK_MIDI_FIXED_ENDPOINT, 1476 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1477 .data = & (const struct snd_usb_midi_endpoint_info) { 1477 .data = & (const struct snd_usb_midi_endpoint_info) {
1478 .out_cables = 0x0001, 1478 .out_cables = 0x0001,
1479 .in_cables = 0x0001 1479 .in_cables = 0x0001
1480 } 1480 }
1481 } 1481 }
1482 }, 1482 },
1483 { 1483 {
1484 /* 1484 /*
1485 * This quirk is for the "Advanced Driver" mode. If off, the UA-4FX 1485 * This quirk is for the "Advanced Driver" mode. If off, the UA-4FX
1486 * is standard compliant, but has only 16-bit PCM and no MIDI. 1486 * is standard compliant, but has only 16-bit PCM and no MIDI.
1487 */ 1487 */
1488 USB_DEVICE(0x0582, 0x00a3), 1488 USB_DEVICE(0x0582, 0x00a3),
1489 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1489 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1490 .vendor_name = "EDIROL", 1490 .vendor_name = "EDIROL",
1491 .product_name = "UA-4FX", 1491 .product_name = "UA-4FX",
1492 .ifnum = QUIRK_ANY_INTERFACE, 1492 .ifnum = QUIRK_ANY_INTERFACE,
1493 .type = QUIRK_COMPOSITE, 1493 .type = QUIRK_COMPOSITE,
1494 .data = (const struct snd_usb_audio_quirk[]) { 1494 .data = (const struct snd_usb_audio_quirk[]) {
1495 { 1495 {
1496 .ifnum = 0, 1496 .ifnum = 0,
1497 .type = QUIRK_AUDIO_EDIROL_UAXX 1497 .type = QUIRK_AUDIO_EDIROL_UAXX
1498 }, 1498 },
1499 { 1499 {
1500 .ifnum = 1, 1500 .ifnum = 1,
1501 .type = QUIRK_AUDIO_EDIROL_UAXX 1501 .type = QUIRK_AUDIO_EDIROL_UAXX
1502 }, 1502 },
1503 { 1503 {
1504 .ifnum = 2, 1504 .ifnum = 2,
1505 .type = QUIRK_AUDIO_EDIROL_UAXX 1505 .type = QUIRK_AUDIO_EDIROL_UAXX
1506 }, 1506 },
1507 { 1507 {
1508 .ifnum = -1 1508 .ifnum = -1
1509 } 1509 }
1510 } 1510 }
1511 } 1511 }
1512 }, 1512 },
1513 { 1513 {
1514 /* Edirol M-16DX */ 1514 /* Edirol M-16DX */
1515 USB_DEVICE(0x0582, 0x00c4), 1515 USB_DEVICE(0x0582, 0x00c4),
1516 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1516 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1517 .ifnum = QUIRK_ANY_INTERFACE, 1517 .ifnum = QUIRK_ANY_INTERFACE,
1518 .type = QUIRK_COMPOSITE, 1518 .type = QUIRK_COMPOSITE,
1519 .data = (const struct snd_usb_audio_quirk[]) { 1519 .data = (const struct snd_usb_audio_quirk[]) {
1520 { 1520 {
1521 .ifnum = 0, 1521 .ifnum = 0,
1522 .type = QUIRK_AUDIO_STANDARD_INTERFACE 1522 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1523 }, 1523 },
1524 { 1524 {
1525 .ifnum = 1, 1525 .ifnum = 1,
1526 .type = QUIRK_AUDIO_STANDARD_INTERFACE 1526 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1527 }, 1527 },
1528 { 1528 {
1529 .ifnum = 2, 1529 .ifnum = 2,
1530 .type = QUIRK_MIDI_FIXED_ENDPOINT, 1530 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1531 .data = & (const struct snd_usb_midi_endpoint_info) { 1531 .data = & (const struct snd_usb_midi_endpoint_info) {
1532 .out_cables = 0x0001, 1532 .out_cables = 0x0001,
1533 .in_cables = 0x0001 1533 .in_cables = 0x0001
1534 } 1534 }
1535 }, 1535 },
1536 { 1536 {
1537 .ifnum = -1 1537 .ifnum = -1
1538 } 1538 }
1539 } 1539 }
1540 } 1540 }
1541 }, 1541 },
1542 { 1542 {
1543 /* Advanced modes of the Edirol UA-25EX. 1543 /* Advanced modes of the Edirol UA-25EX.
1544 * For the standard mode, UA-25EX has ID 0582:00e7, which 1544 * For the standard mode, UA-25EX has ID 0582:00e7, which
1545 * offers only 16-bit PCM at 44.1 kHz and no MIDI. 1545 * offers only 16-bit PCM at 44.1 kHz and no MIDI.
1546 */ 1546 */
1547 USB_DEVICE_VENDOR_SPEC(0x0582, 0x00e6), 1547 USB_DEVICE_VENDOR_SPEC(0x0582, 0x00e6),
1548 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1548 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1549 .vendor_name = "EDIROL", 1549 .vendor_name = "EDIROL",
1550 .product_name = "UA-25EX", 1550 .product_name = "UA-25EX",
1551 .ifnum = QUIRK_ANY_INTERFACE, 1551 .ifnum = QUIRK_ANY_INTERFACE,
1552 .type = QUIRK_COMPOSITE, 1552 .type = QUIRK_COMPOSITE,
1553 .data = (const struct snd_usb_audio_quirk[]) { 1553 .data = (const struct snd_usb_audio_quirk[]) {
1554 { 1554 {
1555 .ifnum = 0, 1555 .ifnum = 0,
1556 .type = QUIRK_AUDIO_EDIROL_UAXX 1556 .type = QUIRK_AUDIO_EDIROL_UAXX
1557 }, 1557 },
1558 { 1558 {
1559 .ifnum = 1, 1559 .ifnum = 1,
1560 .type = QUIRK_AUDIO_EDIROL_UAXX 1560 .type = QUIRK_AUDIO_EDIROL_UAXX
1561 }, 1561 },
1562 { 1562 {
1563 .ifnum = 2, 1563 .ifnum = 2,
1564 .type = QUIRK_AUDIO_EDIROL_UAXX 1564 .type = QUIRK_AUDIO_EDIROL_UAXX
1565 }, 1565 },
1566 { 1566 {
1567 .ifnum = -1 1567 .ifnum = -1
1568 } 1568 }
1569 } 1569 }
1570 } 1570 }
1571 }, 1571 },
1572 { 1572 {
1573 /* Edirol UM-3G */ 1573 /* Edirol UM-3G */
1574 USB_DEVICE_VENDOR_SPEC(0x0582, 0x0108), 1574 USB_DEVICE_VENDOR_SPEC(0x0582, 0x0108),
1575 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1575 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1576 .ifnum = 0, 1576 .ifnum = 0,
1577 .type = QUIRK_MIDI_FIXED_ENDPOINT, 1577 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1578 .data = & (const struct snd_usb_midi_endpoint_info) { 1578 .data = & (const struct snd_usb_midi_endpoint_info) {
1579 .out_cables = 0x0007, 1579 .out_cables = 0x0007,
1580 .in_cables = 0x0007 1580 .in_cables = 0x0007
1581 } 1581 }
1582 } 1582 }
1583 }, 1583 },
1584 { 1584 {
1585 /* only 44.1 kHz works at the moment */ 1585 /* only 44.1 kHz works at the moment */
1586 USB_DEVICE(0x0582, 0x0120), 1586 USB_DEVICE(0x0582, 0x0120),
1587 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1587 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1588 /* .vendor_name = "Roland", */ 1588 /* .vendor_name = "Roland", */
1589 /* .product_name = "OCTO-CAPTURE", */ 1589 /* .product_name = "OCTO-CAPTURE", */
1590 .ifnum = QUIRK_ANY_INTERFACE, 1590 .ifnum = QUIRK_ANY_INTERFACE,
1591 .type = QUIRK_COMPOSITE, 1591 .type = QUIRK_COMPOSITE,
1592 .data = (const struct snd_usb_audio_quirk[]) { 1592 .data = (const struct snd_usb_audio_quirk[]) {
1593 { 1593 {
1594 .ifnum = 0, 1594 .ifnum = 0,
1595 .type = QUIRK_AUDIO_FIXED_ENDPOINT, 1595 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
1596 .data = & (const struct audioformat) { 1596 .data = & (const struct audioformat) {
1597 .formats = SNDRV_PCM_FMTBIT_S32_LE, 1597 .formats = SNDRV_PCM_FMTBIT_S32_LE,
1598 .channels = 10, 1598 .channels = 10,
1599 .iface = 0, 1599 .iface = 0,
1600 .altsetting = 1, 1600 .altsetting = 1,
1601 .altset_idx = 1, 1601 .altset_idx = 1,
1602 .endpoint = 0x05, 1602 .endpoint = 0x05,
1603 .ep_attr = 0x05, 1603 .ep_attr = 0x05,
1604 .rates = SNDRV_PCM_RATE_44100, 1604 .rates = SNDRV_PCM_RATE_44100,
1605 .rate_min = 44100, 1605 .rate_min = 44100,
1606 .rate_max = 44100, 1606 .rate_max = 44100,
1607 .nr_rates = 1, 1607 .nr_rates = 1,
1608 .rate_table = (unsigned int[]) { 44100 } 1608 .rate_table = (unsigned int[]) { 44100 }
1609 } 1609 }
1610 }, 1610 },
1611 { 1611 {
1612 .ifnum = 1, 1612 .ifnum = 1,
1613 .type = QUIRK_AUDIO_FIXED_ENDPOINT, 1613 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
1614 .data = & (const struct audioformat) { 1614 .data = & (const struct audioformat) {
1615 .formats = SNDRV_PCM_FMTBIT_S32_LE, 1615 .formats = SNDRV_PCM_FMTBIT_S32_LE,
1616 .channels = 12, 1616 .channels = 12,
1617 .iface = 1, 1617 .iface = 1,
1618 .altsetting = 1, 1618 .altsetting = 1,
1619 .altset_idx = 1, 1619 .altset_idx = 1,
1620 .endpoint = 0x85, 1620 .endpoint = 0x85,
1621 .ep_attr = 0x25, 1621 .ep_attr = 0x25,
1622 .rates = SNDRV_PCM_RATE_44100, 1622 .rates = SNDRV_PCM_RATE_44100,
1623 .rate_min = 44100, 1623 .rate_min = 44100,
1624 .rate_max = 44100, 1624 .rate_max = 44100,
1625 .nr_rates = 1, 1625 .nr_rates = 1,
1626 .rate_table = (unsigned int[]) { 44100 } 1626 .rate_table = (unsigned int[]) { 44100 }
1627 } 1627 }
1628 }, 1628 },
1629 { 1629 {
1630 .ifnum = 2, 1630 .ifnum = 2,
1631 .type = QUIRK_MIDI_FIXED_ENDPOINT, 1631 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1632 .data = & (const struct snd_usb_midi_endpoint_info) { 1632 .data = & (const struct snd_usb_midi_endpoint_info) {
1633 .out_cables = 0x0001, 1633 .out_cables = 0x0001,
1634 .in_cables = 0x0001 1634 .in_cables = 0x0001
1635 } 1635 }
1636 }, 1636 },
1637 { 1637 {
1638 .ifnum = 3, 1638 .ifnum = 3,
1639 .type = QUIRK_IGNORE_INTERFACE 1639 .type = QUIRK_IGNORE_INTERFACE
1640 }, 1640 },
1641 { 1641 {
1642 .ifnum = 4, 1642 .ifnum = 4,
1643 .type = QUIRK_IGNORE_INTERFACE 1643 .type = QUIRK_IGNORE_INTERFACE
1644 }, 1644 },
1645 { 1645 {
1646 .ifnum = -1 1646 .ifnum = -1
1647 } 1647 }
1648 } 1648 }
1649 } 1649 }
1650 }, 1650 },
1651 { 1651 {
1652 /* only 44.1 kHz works at the moment */ 1652 /* only 44.1 kHz works at the moment */
1653 USB_DEVICE(0x0582, 0x012f), 1653 USB_DEVICE(0x0582, 0x012f),
1654 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1654 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1655 /* .vendor_name = "Roland", */ 1655 /* .vendor_name = "Roland", */
1656 /* .product_name = "QUAD-CAPTURE", */ 1656 /* .product_name = "QUAD-CAPTURE", */
1657 .ifnum = QUIRK_ANY_INTERFACE, 1657 .ifnum = QUIRK_ANY_INTERFACE,
1658 .type = QUIRK_COMPOSITE, 1658 .type = QUIRK_COMPOSITE,
1659 .data = (const struct snd_usb_audio_quirk[]) { 1659 .data = (const struct snd_usb_audio_quirk[]) {
1660 { 1660 {
1661 .ifnum = 0, 1661 .ifnum = 0,
1662 .type = QUIRK_AUDIO_FIXED_ENDPOINT, 1662 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
1663 .data = & (const struct audioformat) { 1663 .data = & (const struct audioformat) {
1664 .formats = SNDRV_PCM_FMTBIT_S32_LE, 1664 .formats = SNDRV_PCM_FMTBIT_S32_LE,
1665 .channels = 4, 1665 .channels = 4,
1666 .iface = 0, 1666 .iface = 0,
1667 .altsetting = 1, 1667 .altsetting = 1,
1668 .altset_idx = 1, 1668 .altset_idx = 1,
1669 .endpoint = 0x05, 1669 .endpoint = 0x05,
1670 .ep_attr = 0x05, 1670 .ep_attr = 0x05,
1671 .rates = SNDRV_PCM_RATE_44100, 1671 .rates = SNDRV_PCM_RATE_44100,
1672 .rate_min = 44100, 1672 .rate_min = 44100,
1673 .rate_max = 44100, 1673 .rate_max = 44100,
1674 .nr_rates = 1, 1674 .nr_rates = 1,
1675 .rate_table = (unsigned int[]) { 44100 } 1675 .rate_table = (unsigned int[]) { 44100 }
1676 } 1676 }
1677 }, 1677 },
1678 { 1678 {
1679 .ifnum = 1, 1679 .ifnum = 1,
1680 .type = QUIRK_AUDIO_FIXED_ENDPOINT, 1680 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
1681 .data = & (const struct audioformat) { 1681 .data = & (const struct audioformat) {
1682 .formats = SNDRV_PCM_FMTBIT_S32_LE, 1682 .formats = SNDRV_PCM_FMTBIT_S32_LE,
1683 .channels = 6, 1683 .channels = 6,
1684 .iface = 1, 1684 .iface = 1,
1685 .altsetting = 1, 1685 .altsetting = 1,
1686 .altset_idx = 1, 1686 .altset_idx = 1,
1687 .endpoint = 0x85, 1687 .endpoint = 0x85,
1688 .ep_attr = 0x25, 1688 .ep_attr = 0x25,
1689 .rates = SNDRV_PCM_RATE_44100, 1689 .rates = SNDRV_PCM_RATE_44100,
1690 .rate_min = 44100, 1690 .rate_min = 44100,
1691 .rate_max = 44100, 1691 .rate_max = 44100,
1692 .nr_rates = 1, 1692 .nr_rates = 1,
1693 .rate_table = (unsigned int[]) { 44100 } 1693 .rate_table = (unsigned int[]) { 44100 }
1694 } 1694 }
1695 }, 1695 },
1696 { 1696 {
1697 .ifnum = 2, 1697 .ifnum = 2,
1698 .type = QUIRK_MIDI_FIXED_ENDPOINT, 1698 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1699 .data = & (const struct snd_usb_midi_endpoint_info) { 1699 .data = & (const struct snd_usb_midi_endpoint_info) {
1700 .out_cables = 0x0001, 1700 .out_cables = 0x0001,
1701 .in_cables = 0x0001 1701 .in_cables = 0x0001
1702 } 1702 }
1703 }, 1703 },
1704 { 1704 {
1705 .ifnum = 3, 1705 .ifnum = 3,
1706 .type = QUIRK_IGNORE_INTERFACE 1706 .type = QUIRK_IGNORE_INTERFACE
1707 }, 1707 },
1708 { 1708 {
1709 .ifnum = 4, 1709 .ifnum = 4,
1710 .type = QUIRK_IGNORE_INTERFACE 1710 .type = QUIRK_IGNORE_INTERFACE
1711 }, 1711 },
1712 { 1712 {
1713 .ifnum = -1 1713 .ifnum = -1
1714 } 1714 }
1715 } 1715 }
1716 } 1716 }
1717 }, 1717 },
1718 /* this catches most recent vendor-specific Roland devices */ 1718 /* this catches most recent vendor-specific Roland devices */
1719 { 1719 {
1720 .match_flags = USB_DEVICE_ID_MATCH_VENDOR | 1720 .match_flags = USB_DEVICE_ID_MATCH_VENDOR |
1721 USB_DEVICE_ID_MATCH_INT_CLASS, 1721 USB_DEVICE_ID_MATCH_INT_CLASS,
1722 .idVendor = 0x0582, 1722 .idVendor = 0x0582,
1723 .bInterfaceClass = USB_CLASS_VENDOR_SPEC, 1723 .bInterfaceClass = USB_CLASS_VENDOR_SPEC,
1724 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) { 1724 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
1725 .ifnum = QUIRK_ANY_INTERFACE, 1725 .ifnum = QUIRK_ANY_INTERFACE,
1726 .type = QUIRK_AUTODETECT 1726 .type = QUIRK_AUTODETECT
1727 } 1727 }
1728 }, 1728 },
1729 1729
1730 /* Guillemot devices */ 1730 /* Guillemot devices */
1731 { 1731 {
1732 /* 1732 /*
1733 * This is for the "Windows Edition" where the external MIDI ports are 1733 * This is for the "Windows Edition" where the external MIDI ports are
1734 * the only MIDI ports; the control data is reported through HID 1734 * the only MIDI ports; the control data is reported through HID
1735 * interfaces. The "Macintosh Edition" has ID 0xd002 and uses standard 1735 * interfaces. The "Macintosh Edition" has ID 0xd002 and uses standard
1736 * compliant USB MIDI ports for external MIDI and controls. 1736 * compliant USB MIDI ports for external MIDI and controls.
1737 */ 1737 */
1738 USB_DEVICE_VENDOR_SPEC(0x06f8, 0xb000), 1738 USB_DEVICE_VENDOR_SPEC(0x06f8, 0xb000),
1739 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1739 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1740 .vendor_name = "Hercules", 1740 .vendor_name = "Hercules",
1741 .product_name = "DJ Console (WE)", 1741 .product_name = "DJ Console (WE)",
1742 .ifnum = 4, 1742 .ifnum = 4,
1743 .type = QUIRK_MIDI_FIXED_ENDPOINT, 1743 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1744 .data = & (const struct snd_usb_midi_endpoint_info) { 1744 .data = & (const struct snd_usb_midi_endpoint_info) {
1745 .out_cables = 0x0001, 1745 .out_cables = 0x0001,
1746 .in_cables = 0x0001 1746 .in_cables = 0x0001
1747 } 1747 }
1748 } 1748 }
1749 }, 1749 },
1750 1750
1751 /* Midiman/M-Audio devices */ 1751 /* Midiman/M-Audio devices */
1752 { 1752 {
1753 USB_DEVICE_VENDOR_SPEC(0x0763, 0x1002), 1753 USB_DEVICE_VENDOR_SPEC(0x0763, 0x1002),
1754 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1754 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1755 .vendor_name = "M-Audio", 1755 .vendor_name = "M-Audio",
1756 .product_name = "MidiSport 2x2", 1756 .product_name = "MidiSport 2x2",
1757 .ifnum = QUIRK_ANY_INTERFACE, 1757 .ifnum = QUIRK_ANY_INTERFACE,
1758 .type = QUIRK_MIDI_MIDIMAN, 1758 .type = QUIRK_MIDI_MIDIMAN,
1759 .data = & (const struct snd_usb_midi_endpoint_info) { 1759 .data = & (const struct snd_usb_midi_endpoint_info) {
1760 .out_cables = 0x0003, 1760 .out_cables = 0x0003,
1761 .in_cables = 0x0003 1761 .in_cables = 0x0003
1762 } 1762 }
1763 } 1763 }
1764 }, 1764 },
1765 { 1765 {
1766 USB_DEVICE_VENDOR_SPEC(0x0763, 0x1011), 1766 USB_DEVICE_VENDOR_SPEC(0x0763, 0x1011),
1767 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1767 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1768 .vendor_name = "M-Audio", 1768 .vendor_name = "M-Audio",
1769 .product_name = "MidiSport 1x1", 1769 .product_name = "MidiSport 1x1",
1770 .ifnum = QUIRK_ANY_INTERFACE, 1770 .ifnum = QUIRK_ANY_INTERFACE,
1771 .type = QUIRK_MIDI_MIDIMAN, 1771 .type = QUIRK_MIDI_MIDIMAN,
1772 .data = & (const struct snd_usb_midi_endpoint_info) { 1772 .data = & (const struct snd_usb_midi_endpoint_info) {
1773 .out_cables = 0x0001, 1773 .out_cables = 0x0001,
1774 .in_cables = 0x0001 1774 .in_cables = 0x0001
1775 } 1775 }
1776 } 1776 }
1777 }, 1777 },
1778 { 1778 {
1779 USB_DEVICE_VENDOR_SPEC(0x0763, 0x1015), 1779 USB_DEVICE_VENDOR_SPEC(0x0763, 0x1015),
1780 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1780 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1781 .vendor_name = "M-Audio", 1781 .vendor_name = "M-Audio",
1782 .product_name = "Keystation", 1782 .product_name = "Keystation",
1783 .ifnum = QUIRK_ANY_INTERFACE, 1783 .ifnum = QUIRK_ANY_INTERFACE,
1784 .type = QUIRK_MIDI_MIDIMAN, 1784 .type = QUIRK_MIDI_MIDIMAN,
1785 .data = & (const struct snd_usb_midi_endpoint_info) { 1785 .data = & (const struct snd_usb_midi_endpoint_info) {
1786 .out_cables = 0x0001, 1786 .out_cables = 0x0001,
1787 .in_cables = 0x0001 1787 .in_cables = 0x0001
1788 } 1788 }
1789 } 1789 }
1790 }, 1790 },
1791 { 1791 {
1792 USB_DEVICE_VENDOR_SPEC(0x0763, 0x1021), 1792 USB_DEVICE_VENDOR_SPEC(0x0763, 0x1021),
1793 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1793 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1794 .vendor_name = "M-Audio", 1794 .vendor_name = "M-Audio",
1795 .product_name = "MidiSport 4x4", 1795 .product_name = "MidiSport 4x4",
1796 .ifnum = QUIRK_ANY_INTERFACE, 1796 .ifnum = QUIRK_ANY_INTERFACE,
1797 .type = QUIRK_MIDI_MIDIMAN, 1797 .type = QUIRK_MIDI_MIDIMAN,
1798 .data = & (const struct snd_usb_midi_endpoint_info) { 1798 .data = & (const struct snd_usb_midi_endpoint_info) {
1799 .out_cables = 0x000f, 1799 .out_cables = 0x000f,
1800 .in_cables = 0x000f 1800 .in_cables = 0x000f
1801 } 1801 }
1802 } 1802 }
1803 }, 1803 },
1804 { 1804 {
1805 /* 1805 /*
1806 * For hardware revision 1.05; in the later revisions (1.10 and 1806 * For hardware revision 1.05; in the later revisions (1.10 and
1807 * 1.21), 0x1031 is the ID for the device without firmware. 1807 * 1.21), 0x1031 is the ID for the device without firmware.
1808 * Thanks to Olaf Giesbrecht <Olaf_Giesbrecht@yahoo.de> 1808 * Thanks to Olaf Giesbrecht <Olaf_Giesbrecht@yahoo.de>
1809 */ 1809 */
1810 USB_DEVICE_VER(0x0763, 0x1031, 0x0100, 0x0109), 1810 USB_DEVICE_VER(0x0763, 0x1031, 0x0100, 0x0109),
1811 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1811 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1812 .vendor_name = "M-Audio", 1812 .vendor_name = "M-Audio",
1813 .product_name = "MidiSport 8x8", 1813 .product_name = "MidiSport 8x8",
1814 .ifnum = QUIRK_ANY_INTERFACE, 1814 .ifnum = QUIRK_ANY_INTERFACE,
1815 .type = QUIRK_MIDI_MIDIMAN, 1815 .type = QUIRK_MIDI_MIDIMAN,
1816 .data = & (const struct snd_usb_midi_endpoint_info) { 1816 .data = & (const struct snd_usb_midi_endpoint_info) {
1817 .out_cables = 0x01ff, 1817 .out_cables = 0x01ff,
1818 .in_cables = 0x01ff 1818 .in_cables = 0x01ff
1819 } 1819 }
1820 } 1820 }
1821 }, 1821 },
1822 { 1822 {
1823 USB_DEVICE_VENDOR_SPEC(0x0763, 0x1033), 1823 USB_DEVICE_VENDOR_SPEC(0x0763, 0x1033),
1824 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1824 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1825 .vendor_name = "M-Audio", 1825 .vendor_name = "M-Audio",
1826 .product_name = "MidiSport 8x8", 1826 .product_name = "MidiSport 8x8",
1827 .ifnum = QUIRK_ANY_INTERFACE, 1827 .ifnum = QUIRK_ANY_INTERFACE,
1828 .type = QUIRK_MIDI_MIDIMAN, 1828 .type = QUIRK_MIDI_MIDIMAN,
1829 .data = & (const struct snd_usb_midi_endpoint_info) { 1829 .data = & (const struct snd_usb_midi_endpoint_info) {
1830 .out_cables = 0x01ff, 1830 .out_cables = 0x01ff,
1831 .in_cables = 0x01ff 1831 .in_cables = 0x01ff
1832 } 1832 }
1833 } 1833 }
1834 }, 1834 },
1835 { 1835 {
1836 USB_DEVICE_VENDOR_SPEC(0x0763, 0x1041), 1836 USB_DEVICE_VENDOR_SPEC(0x0763, 0x1041),
1837 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1837 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1838 .vendor_name = "M-Audio", 1838 .vendor_name = "M-Audio",
1839 .product_name = "MidiSport 2x4", 1839 .product_name = "MidiSport 2x4",
1840 .ifnum = QUIRK_ANY_INTERFACE, 1840 .ifnum = QUIRK_ANY_INTERFACE,
1841 .type = QUIRK_MIDI_MIDIMAN, 1841 .type = QUIRK_MIDI_MIDIMAN,
1842 .data = & (const struct snd_usb_midi_endpoint_info) { 1842 .data = & (const struct snd_usb_midi_endpoint_info) {
1843 .out_cables = 0x000f, 1843 .out_cables = 0x000f,
1844 .in_cables = 0x0003 1844 .in_cables = 0x0003
1845 } 1845 }
1846 } 1846 }
1847 }, 1847 },
1848 { 1848 {
1849 USB_DEVICE_VENDOR_SPEC(0x0763, 0x2001), 1849 USB_DEVICE_VENDOR_SPEC(0x0763, 0x2001),
1850 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1850 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1851 .vendor_name = "M-Audio", 1851 .vendor_name = "M-Audio",
1852 .product_name = "Quattro", 1852 .product_name = "Quattro",
1853 .ifnum = QUIRK_ANY_INTERFACE, 1853 .ifnum = QUIRK_ANY_INTERFACE,
1854 .type = QUIRK_COMPOSITE, 1854 .type = QUIRK_COMPOSITE,
1855 .data = & (const struct snd_usb_audio_quirk[]) { 1855 .data = & (const struct snd_usb_audio_quirk[]) {
1856 /* 1856 /*
1857 * Interfaces 0-2 are "Windows-compatible", 16-bit only, 1857 * Interfaces 0-2 are "Windows-compatible", 16-bit only,
1858 * and share endpoints with the other interfaces. 1858 * and share endpoints with the other interfaces.
1859 * Ignore them. The other interfaces can do 24 bits, 1859 * Ignore them. The other interfaces can do 24 bits,
1860 * but captured samples are big-endian (see usbaudio.c). 1860 * but captured samples are big-endian (see usbaudio.c).
1861 */ 1861 */
1862 { 1862 {
1863 .ifnum = 0, 1863 .ifnum = 0,
1864 .type = QUIRK_IGNORE_INTERFACE 1864 .type = QUIRK_IGNORE_INTERFACE
1865 }, 1865 },
1866 { 1866 {
1867 .ifnum = 1, 1867 .ifnum = 1,
1868 .type = QUIRK_IGNORE_INTERFACE 1868 .type = QUIRK_IGNORE_INTERFACE
1869 }, 1869 },
1870 { 1870 {
1871 .ifnum = 2, 1871 .ifnum = 2,
1872 .type = QUIRK_IGNORE_INTERFACE 1872 .type = QUIRK_IGNORE_INTERFACE
1873 }, 1873 },
1874 { 1874 {
1875 .ifnum = 3, 1875 .ifnum = 3,
1876 .type = QUIRK_IGNORE_INTERFACE 1876 .type = QUIRK_IGNORE_INTERFACE
1877 }, 1877 },
1878 { 1878 {
1879 .ifnum = 4, 1879 .ifnum = 4,
1880 .type = QUIRK_AUDIO_STANDARD_INTERFACE 1880 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1881 }, 1881 },
1882 { 1882 {
1883 .ifnum = 5, 1883 .ifnum = 5,
1884 .type = QUIRK_AUDIO_STANDARD_INTERFACE 1884 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1885 }, 1885 },
1886 { 1886 {
1887 .ifnum = 6, 1887 .ifnum = 6,
1888 .type = QUIRK_IGNORE_INTERFACE 1888 .type = QUIRK_IGNORE_INTERFACE
1889 }, 1889 },
1890 { 1890 {
1891 .ifnum = 7, 1891 .ifnum = 7,
1892 .type = QUIRK_AUDIO_STANDARD_INTERFACE 1892 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1893 }, 1893 },
1894 { 1894 {
1895 .ifnum = 8, 1895 .ifnum = 8,
1896 .type = QUIRK_AUDIO_STANDARD_INTERFACE 1896 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1897 }, 1897 },
1898 { 1898 {
1899 .ifnum = 9, 1899 .ifnum = 9,
1900 .type = QUIRK_MIDI_MIDIMAN, 1900 .type = QUIRK_MIDI_MIDIMAN,
1901 .data = & (const struct snd_usb_midi_endpoint_info) { 1901 .data = & (const struct snd_usb_midi_endpoint_info) {
1902 .out_cables = 0x0001, 1902 .out_cables = 0x0001,
1903 .in_cables = 0x0001 1903 .in_cables = 0x0001
1904 } 1904 }
1905 }, 1905 },
1906 { 1906 {
1907 .ifnum = -1 1907 .ifnum = -1
1908 } 1908 }
1909 } 1909 }
1910 } 1910 }
1911 }, 1911 },
1912 { 1912 {
1913 USB_DEVICE_VENDOR_SPEC(0x0763, 0x2003), 1913 USB_DEVICE_VENDOR_SPEC(0x0763, 0x2003),
1914 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1914 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1915 .vendor_name = "M-Audio", 1915 .vendor_name = "M-Audio",
1916 .product_name = "AudioPhile", 1916 .product_name = "AudioPhile",
1917 .ifnum = 6, 1917 .ifnum = 6,
1918 .type = QUIRK_MIDI_MIDIMAN, 1918 .type = QUIRK_MIDI_MIDIMAN,
1919 .data = & (const struct snd_usb_midi_endpoint_info) { 1919 .data = & (const struct snd_usb_midi_endpoint_info) {
1920 .out_cables = 0x0001, 1920 .out_cables = 0x0001,
1921 .in_cables = 0x0001 1921 .in_cables = 0x0001
1922 } 1922 }
1923 } 1923 }
1924 }, 1924 },
1925 { 1925 {
1926 USB_DEVICE_VENDOR_SPEC(0x0763, 0x2008), 1926 USB_DEVICE_VENDOR_SPEC(0x0763, 0x2008),
1927 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1927 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1928 .vendor_name = "M-Audio", 1928 .vendor_name = "M-Audio",
1929 .product_name = "Ozone", 1929 .product_name = "Ozone",
1930 .ifnum = 3, 1930 .ifnum = 3,
1931 .type = QUIRK_MIDI_MIDIMAN, 1931 .type = QUIRK_MIDI_MIDIMAN,
1932 .data = & (const struct snd_usb_midi_endpoint_info) { 1932 .data = & (const struct snd_usb_midi_endpoint_info) {
1933 .out_cables = 0x0001, 1933 .out_cables = 0x0001,
1934 .in_cables = 0x0001 1934 .in_cables = 0x0001
1935 } 1935 }
1936 } 1936 }
1937 }, 1937 },
1938 { 1938 {
1939 USB_DEVICE_VENDOR_SPEC(0x0763, 0x200d), 1939 USB_DEVICE_VENDOR_SPEC(0x0763, 0x200d),
1940 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1940 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1941 .vendor_name = "M-Audio", 1941 .vendor_name = "M-Audio",
1942 .product_name = "OmniStudio", 1942 .product_name = "OmniStudio",
1943 .ifnum = QUIRK_ANY_INTERFACE, 1943 .ifnum = QUIRK_ANY_INTERFACE,
1944 .type = QUIRK_COMPOSITE, 1944 .type = QUIRK_COMPOSITE,
1945 .data = & (const struct snd_usb_audio_quirk[]) { 1945 .data = & (const struct snd_usb_audio_quirk[]) {
1946 { 1946 {
1947 .ifnum = 0, 1947 .ifnum = 0,
1948 .type = QUIRK_IGNORE_INTERFACE 1948 .type = QUIRK_IGNORE_INTERFACE
1949 }, 1949 },
1950 { 1950 {
1951 .ifnum = 1, 1951 .ifnum = 1,
1952 .type = QUIRK_IGNORE_INTERFACE 1952 .type = QUIRK_IGNORE_INTERFACE
1953 }, 1953 },
1954 { 1954 {
1955 .ifnum = 2, 1955 .ifnum = 2,
1956 .type = QUIRK_IGNORE_INTERFACE 1956 .type = QUIRK_IGNORE_INTERFACE
1957 }, 1957 },
1958 { 1958 {
1959 .ifnum = 3, 1959 .ifnum = 3,
1960 .type = QUIRK_IGNORE_INTERFACE 1960 .type = QUIRK_IGNORE_INTERFACE
1961 }, 1961 },
1962 { 1962 {
1963 .ifnum = 4, 1963 .ifnum = 4,
1964 .type = QUIRK_AUDIO_STANDARD_INTERFACE 1964 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1965 }, 1965 },
1966 { 1966 {
1967 .ifnum = 5, 1967 .ifnum = 5,
1968 .type = QUIRK_AUDIO_STANDARD_INTERFACE 1968 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1969 }, 1969 },
1970 { 1970 {
1971 .ifnum = 6, 1971 .ifnum = 6,
1972 .type = QUIRK_IGNORE_INTERFACE 1972 .type = QUIRK_IGNORE_INTERFACE
1973 }, 1973 },
1974 { 1974 {
1975 .ifnum = 7, 1975 .ifnum = 7,
1976 .type = QUIRK_AUDIO_STANDARD_INTERFACE 1976 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1977 }, 1977 },
1978 { 1978 {
1979 .ifnum = 8, 1979 .ifnum = 8,
1980 .type = QUIRK_AUDIO_STANDARD_INTERFACE 1980 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1981 }, 1981 },
1982 { 1982 {
1983 .ifnum = 9, 1983 .ifnum = 9,
1984 .type = QUIRK_MIDI_MIDIMAN, 1984 .type = QUIRK_MIDI_MIDIMAN,
1985 .data = & (const struct snd_usb_midi_endpoint_info) { 1985 .data = & (const struct snd_usb_midi_endpoint_info) {
1986 .out_cables = 0x0001, 1986 .out_cables = 0x0001,
1987 .in_cables = 0x0001 1987 .in_cables = 0x0001
1988 } 1988 }
1989 }, 1989 },
1990 { 1990 {
1991 .ifnum = -1 1991 .ifnum = -1
1992 } 1992 }
1993 } 1993 }
1994 } 1994 }
1995 }, 1995 },
1996 { 1996 {
1997 USB_DEVICE(0x0763, 0x2019), 1997 USB_DEVICE(0x0763, 0x2019),
1998 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1998 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1999 /* .vendor_name = "M-Audio", */ 1999 /* .vendor_name = "M-Audio", */
2000 /* .product_name = "Ozone Academic", */ 2000 /* .product_name = "Ozone Academic", */
2001 .ifnum = QUIRK_ANY_INTERFACE, 2001 .ifnum = QUIRK_ANY_INTERFACE,
2002 .type = QUIRK_COMPOSITE, 2002 .type = QUIRK_COMPOSITE,
2003 .data = & (const struct snd_usb_audio_quirk[]) { 2003 .data = & (const struct snd_usb_audio_quirk[]) {
2004 { 2004 {
2005 .ifnum = 0, 2005 .ifnum = 0,
2006 .type = QUIRK_AUDIO_STANDARD_INTERFACE 2006 .type = QUIRK_AUDIO_STANDARD_INTERFACE
2007 }, 2007 },
2008 { 2008 {
2009 .ifnum = 1, 2009 .ifnum = 1,
2010 .type = QUIRK_AUDIO_STANDARD_INTERFACE 2010 .type = QUIRK_AUDIO_STANDARD_INTERFACE
2011 }, 2011 },
2012 { 2012 {
2013 .ifnum = 2, 2013 .ifnum = 2,
2014 .type = QUIRK_AUDIO_STANDARD_INTERFACE 2014 .type = QUIRK_AUDIO_STANDARD_INTERFACE
2015 }, 2015 },
2016 { 2016 {
2017 .ifnum = 3, 2017 .ifnum = 3,
2018 .type = QUIRK_MIDI_MIDIMAN, 2018 .type = QUIRK_MIDI_MIDIMAN,
2019 .data = & (const struct snd_usb_midi_endpoint_info) { 2019 .data = & (const struct snd_usb_midi_endpoint_info) {
2020 .out_cables = 0x0001, 2020 .out_cables = 0x0001,
2021 .in_cables = 0x0001 2021 .in_cables = 0x0001
2022 } 2022 }
2023 }, 2023 },
2024 { 2024 {
2025 .ifnum = -1 2025 .ifnum = -1
2026 } 2026 }
2027 } 2027 }
2028 } 2028 }
2029 }, 2029 },
2030 { 2030 {
2031 USB_DEVICE_VENDOR_SPEC(0x0763, 0x2030), 2031 USB_DEVICE_VENDOR_SPEC(0x0763, 0x2030),
2032 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) { 2032 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2033 /* .vendor_name = "M-Audio", */ 2033 /* .vendor_name = "M-Audio", */
2034 /* .product_name = "Fast Track C400", */ 2034 /* .product_name = "Fast Track C400", */
2035 .ifnum = QUIRK_ANY_INTERFACE, 2035 .ifnum = QUIRK_ANY_INTERFACE,
2036 .type = QUIRK_COMPOSITE, 2036 .type = QUIRK_COMPOSITE,
2037 .data = &(const struct snd_usb_audio_quirk[]) { 2037 .data = &(const struct snd_usb_audio_quirk[]) {
2038 { 2038 {
2039 .ifnum = 1, 2039 .ifnum = 1,
2040 .type = QUIRK_AUDIO_STANDARD_MIXER, 2040 .type = QUIRK_AUDIO_STANDARD_MIXER,
2041 }, 2041 },
2042 /* Playback */ 2042 /* Playback */
2043 { 2043 {
2044 .ifnum = 2, 2044 .ifnum = 2,
2045 .type = QUIRK_AUDIO_FIXED_ENDPOINT, 2045 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2046 .data = &(const struct audioformat) { 2046 .data = &(const struct audioformat) {
2047 .formats = SNDRV_PCM_FMTBIT_S24_3LE, 2047 .formats = SNDRV_PCM_FMTBIT_S24_3LE,
2048 .channels = 6, 2048 .channels = 6,
2049 .iface = 2, 2049 .iface = 2,
2050 .altsetting = 1, 2050 .altsetting = 1,
2051 .altset_idx = 1, 2051 .altset_idx = 1,
2052 .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE, 2052 .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2053 .endpoint = 0x01, 2053 .endpoint = 0x01,
2054 .ep_attr = 0x09, 2054 .ep_attr = 0x09,
2055 .rates = SNDRV_PCM_RATE_44100 | 2055 .rates = SNDRV_PCM_RATE_44100 |
2056 SNDRV_PCM_RATE_48000 | 2056 SNDRV_PCM_RATE_48000 |
2057 SNDRV_PCM_RATE_88200 | 2057 SNDRV_PCM_RATE_88200 |
2058 SNDRV_PCM_RATE_96000, 2058 SNDRV_PCM_RATE_96000,
2059 .rate_min = 44100, 2059 .rate_min = 44100,
2060 .rate_max = 96000, 2060 .rate_max = 96000,
2061 .nr_rates = 4, 2061 .nr_rates = 4,
2062 .rate_table = (unsigned int[]) { 2062 .rate_table = (unsigned int[]) {
2063 44100, 48000, 88200, 96000 2063 44100, 48000, 88200, 96000
2064 }, 2064 },
2065 .clock = 0x80, 2065 .clock = 0x80,
2066 } 2066 }
2067 }, 2067 },
2068 /* Capture */ 2068 /* Capture */
2069 { 2069 {
2070 .ifnum = 3, 2070 .ifnum = 3,
2071 .type = QUIRK_AUDIO_FIXED_ENDPOINT, 2071 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2072 .data = &(const struct audioformat) { 2072 .data = &(const struct audioformat) {
2073 .formats = SNDRV_PCM_FMTBIT_S24_3LE, 2073 .formats = SNDRV_PCM_FMTBIT_S24_3LE,
2074 .channels = 4, 2074 .channels = 4,
2075 .iface = 3, 2075 .iface = 3,
2076 .altsetting = 1, 2076 .altsetting = 1,
2077 .altset_idx = 1, 2077 .altset_idx = 1,
2078 .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE, 2078 .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2079 .endpoint = 0x81, 2079 .endpoint = 0x81,
2080 .ep_attr = 0x05, 2080 .ep_attr = 0x05,
2081 .rates = SNDRV_PCM_RATE_44100 | 2081 .rates = SNDRV_PCM_RATE_44100 |
2082 SNDRV_PCM_RATE_48000 | 2082 SNDRV_PCM_RATE_48000 |
2083 SNDRV_PCM_RATE_88200 | 2083 SNDRV_PCM_RATE_88200 |
2084 SNDRV_PCM_RATE_96000, 2084 SNDRV_PCM_RATE_96000,
2085 .rate_min = 44100, 2085 .rate_min = 44100,
2086 .rate_max = 96000, 2086 .rate_max = 96000,
2087 .nr_rates = 4, 2087 .nr_rates = 4,
2088 .rate_table = (unsigned int[]) { 2088 .rate_table = (unsigned int[]) {
2089 44100, 48000, 88200, 96000 2089 44100, 48000, 88200, 96000
2090 }, 2090 },
2091 .clock = 0x80, 2091 .clock = 0x80,
2092 } 2092 }
2093 }, 2093 },
2094 /* MIDI */ 2094 /* MIDI */
2095 { 2095 {
2096 .ifnum = -1 /* Interface = 4 */ 2096 .ifnum = -1 /* Interface = 4 */
2097 } 2097 }
2098 } 2098 }
2099 } 2099 }
2100 }, 2100 },
2101 { 2101 {
2102 USB_DEVICE_VENDOR_SPEC(0x0763, 0x2031), 2102 USB_DEVICE_VENDOR_SPEC(0x0763, 0x2031),
2103 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) { 2103 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2104 /* .vendor_name = "M-Audio", */ 2104 /* .vendor_name = "M-Audio", */
2105 /* .product_name = "Fast Track C600", */ 2105 /* .product_name = "Fast Track C600", */
2106 .ifnum = QUIRK_ANY_INTERFACE, 2106 .ifnum = QUIRK_ANY_INTERFACE,
2107 .type = QUIRK_COMPOSITE, 2107 .type = QUIRK_COMPOSITE,
2108 .data = &(const struct snd_usb_audio_quirk[]) { 2108 .data = &(const struct snd_usb_audio_quirk[]) {
2109 { 2109 {
2110 .ifnum = 1, 2110 .ifnum = 1,
2111 .type = QUIRK_AUDIO_STANDARD_MIXER, 2111 .type = QUIRK_AUDIO_STANDARD_MIXER,
2112 }, 2112 },
2113 /* Playback */ 2113 /* Playback */
2114 { 2114 {
2115 .ifnum = 2, 2115 .ifnum = 2,
2116 .type = QUIRK_AUDIO_FIXED_ENDPOINT, 2116 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2117 .data = &(const struct audioformat) { 2117 .data = &(const struct audioformat) {
2118 .formats = SNDRV_PCM_FMTBIT_S24_3LE, 2118 .formats = SNDRV_PCM_FMTBIT_S24_3LE,
2119 .channels = 8, 2119 .channels = 8,
2120 .iface = 2, 2120 .iface = 2,
2121 .altsetting = 1, 2121 .altsetting = 1,
2122 .altset_idx = 1, 2122 .altset_idx = 1,
2123 .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE, 2123 .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2124 .endpoint = 0x01, 2124 .endpoint = 0x01,
2125 .ep_attr = 0x09, 2125 .ep_attr = 0x09,
2126 .rates = SNDRV_PCM_RATE_44100 | 2126 .rates = SNDRV_PCM_RATE_44100 |
2127 SNDRV_PCM_RATE_48000 | 2127 SNDRV_PCM_RATE_48000 |
2128 SNDRV_PCM_RATE_88200 | 2128 SNDRV_PCM_RATE_88200 |
2129 SNDRV_PCM_RATE_96000, 2129 SNDRV_PCM_RATE_96000,
2130 .rate_min = 44100, 2130 .rate_min = 44100,
2131 .rate_max = 96000, 2131 .rate_max = 96000,
2132 .nr_rates = 4, 2132 .nr_rates = 4,
2133 .rate_table = (unsigned int[]) { 2133 .rate_table = (unsigned int[]) {
2134 44100, 48000, 88200, 96000 2134 44100, 48000, 88200, 96000
2135 }, 2135 },
2136 .clock = 0x80, 2136 .clock = 0x80,
2137 } 2137 }
2138 }, 2138 },
2139 /* Capture */ 2139 /* Capture */
2140 { 2140 {
2141 .ifnum = 3, 2141 .ifnum = 3,
2142 .type = QUIRK_AUDIO_FIXED_ENDPOINT, 2142 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2143 .data = &(const struct audioformat) { 2143 .data = &(const struct audioformat) {
2144 .formats = SNDRV_PCM_FMTBIT_S24_3LE, 2144 .formats = SNDRV_PCM_FMTBIT_S24_3LE,
2145 .channels = 6, 2145 .channels = 6,
2146 .iface = 3, 2146 .iface = 3,
2147 .altsetting = 1, 2147 .altsetting = 1,
2148 .altset_idx = 1, 2148 .altset_idx = 1,
2149 .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE, 2149 .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2150 .endpoint = 0x81, 2150 .endpoint = 0x81,
2151 .ep_attr = 0x05, 2151 .ep_attr = 0x05,
2152 .rates = SNDRV_PCM_RATE_44100 | 2152 .rates = SNDRV_PCM_RATE_44100 |
2153 SNDRV_PCM_RATE_48000 | 2153 SNDRV_PCM_RATE_48000 |
2154 SNDRV_PCM_RATE_88200 | 2154 SNDRV_PCM_RATE_88200 |
2155 SNDRV_PCM_RATE_96000, 2155 SNDRV_PCM_RATE_96000,
2156 .rate_min = 44100, 2156 .rate_min = 44100,
2157 .rate_max = 96000, 2157 .rate_max = 96000,
2158 .nr_rates = 4, 2158 .nr_rates = 4,
2159 .rate_table = (unsigned int[]) { 2159 .rate_table = (unsigned int[]) {
2160 44100, 48000, 88200, 96000 2160 44100, 48000, 88200, 96000
2161 }, 2161 },
2162 .clock = 0x80, 2162 .clock = 0x80,
2163 } 2163 }
2164 }, 2164 },
2165 /* MIDI */ 2165 /* MIDI */
2166 { 2166 {
2167 .ifnum = -1 /* Interface = 4 */ 2167 .ifnum = -1 /* Interface = 4 */
2168 } 2168 }
2169 } 2169 }
2170 } 2170 }
2171 }, 2171 },
2172 { 2172 {
2173 USB_DEVICE_VENDOR_SPEC(0x0763, 0x2080), 2173 USB_DEVICE_VENDOR_SPEC(0x0763, 0x2080),
2174 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 2174 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2175 /* .vendor_name = "M-Audio", */ 2175 /* .vendor_name = "M-Audio", */
2176 /* .product_name = "Fast Track Ultra", */ 2176 /* .product_name = "Fast Track Ultra", */
2177 .ifnum = QUIRK_ANY_INTERFACE, 2177 .ifnum = QUIRK_ANY_INTERFACE,
2178 .type = QUIRK_COMPOSITE, 2178 .type = QUIRK_COMPOSITE,
2179 .data = & (const struct snd_usb_audio_quirk[]) { 2179 .data = & (const struct snd_usb_audio_quirk[]) {
2180 { 2180 {
2181 .ifnum = 0, 2181 .ifnum = 0,
2182 .type = QUIRK_AUDIO_STANDARD_MIXER, 2182 .type = QUIRK_AUDIO_STANDARD_MIXER,
2183 }, 2183 },
2184 { 2184 {
2185 .ifnum = 1, 2185 .ifnum = 1,
2186 .type = QUIRK_AUDIO_FIXED_ENDPOINT, 2186 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2187 .data = & (const struct audioformat) { 2187 .data = & (const struct audioformat) {
2188 .formats = SNDRV_PCM_FMTBIT_S24_3LE, 2188 .formats = SNDRV_PCM_FMTBIT_S24_3LE,
2189 .channels = 8, 2189 .channels = 8,
2190 .iface = 1, 2190 .iface = 1,
2191 .altsetting = 1, 2191 .altsetting = 1,
2192 .altset_idx = 1, 2192 .altset_idx = 1,
2193 .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE, 2193 .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2194 .endpoint = 0x01, 2194 .endpoint = 0x01,
2195 .ep_attr = 0x09, 2195 .ep_attr = 0x09,
2196 .rates = SNDRV_PCM_RATE_44100 | 2196 .rates = SNDRV_PCM_RATE_44100 |
2197 SNDRV_PCM_RATE_48000 | 2197 SNDRV_PCM_RATE_48000 |
2198 SNDRV_PCM_RATE_88200 | 2198 SNDRV_PCM_RATE_88200 |
2199 SNDRV_PCM_RATE_96000, 2199 SNDRV_PCM_RATE_96000,
2200 .rate_min = 44100, 2200 .rate_min = 44100,
2201 .rate_max = 96000, 2201 .rate_max = 96000,
2202 .nr_rates = 4, 2202 .nr_rates = 4,
2203 .rate_table = (unsigned int[]) { 2203 .rate_table = (unsigned int[]) {
2204 44100, 48000, 88200, 96000 2204 44100, 48000, 88200, 96000
2205 } 2205 }
2206 } 2206 }
2207 }, 2207 },
2208 { 2208 {
2209 .ifnum = 2, 2209 .ifnum = 2,
2210 .type = QUIRK_AUDIO_FIXED_ENDPOINT, 2210 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2211 .data = & (const struct audioformat) { 2211 .data = & (const struct audioformat) {
2212 .formats = SNDRV_PCM_FMTBIT_S24_3LE, 2212 .formats = SNDRV_PCM_FMTBIT_S24_3LE,
2213 .channels = 8, 2213 .channels = 8,
2214 .iface = 2, 2214 .iface = 2,
2215 .altsetting = 1, 2215 .altsetting = 1,
2216 .altset_idx = 1, 2216 .altset_idx = 1,
2217 .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE, 2217 .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2218 .endpoint = 0x81, 2218 .endpoint = 0x81,
2219 .ep_attr = 0x05, 2219 .ep_attr = 0x05,
2220 .rates = SNDRV_PCM_RATE_44100 | 2220 .rates = SNDRV_PCM_RATE_44100 |
2221 SNDRV_PCM_RATE_48000 | 2221 SNDRV_PCM_RATE_48000 |
2222 SNDRV_PCM_RATE_88200 | 2222 SNDRV_PCM_RATE_88200 |
2223 SNDRV_PCM_RATE_96000, 2223 SNDRV_PCM_RATE_96000,
2224 .rate_min = 44100, 2224 .rate_min = 44100,
2225 .rate_max = 96000, 2225 .rate_max = 96000,
2226 .nr_rates = 4, 2226 .nr_rates = 4,
2227 .rate_table = (unsigned int[]) { 2227 .rate_table = (unsigned int[]) {
2228 44100, 48000, 88200, 96000 2228 44100, 48000, 88200, 96000
2229 } 2229 }
2230 } 2230 }
2231 }, 2231 },
2232 /* interface 3 (MIDI) is standard compliant */ 2232 /* interface 3 (MIDI) is standard compliant */
2233 { 2233 {
2234 .ifnum = -1 2234 .ifnum = -1
2235 } 2235 }
2236 } 2236 }
2237 } 2237 }
2238 }, 2238 },
2239 { 2239 {
2240 USB_DEVICE_VENDOR_SPEC(0x0763, 0x2081), 2240 USB_DEVICE_VENDOR_SPEC(0x0763, 0x2081),
2241 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 2241 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2242 /* .vendor_name = "M-Audio", */ 2242 /* .vendor_name = "M-Audio", */
2243 /* .product_name = "Fast Track Ultra 8R", */ 2243 /* .product_name = "Fast Track Ultra 8R", */
2244 .ifnum = QUIRK_ANY_INTERFACE, 2244 .ifnum = QUIRK_ANY_INTERFACE,
2245 .type = QUIRK_COMPOSITE, 2245 .type = QUIRK_COMPOSITE,
2246 .data = & (const struct snd_usb_audio_quirk[]) { 2246 .data = & (const struct snd_usb_audio_quirk[]) {
2247 { 2247 {
2248 .ifnum = 0, 2248 .ifnum = 0,
2249 .type = QUIRK_AUDIO_STANDARD_MIXER, 2249 .type = QUIRK_AUDIO_STANDARD_MIXER,
2250 }, 2250 },
2251 { 2251 {
2252 .ifnum = 1, 2252 .ifnum = 1,
2253 .type = QUIRK_AUDIO_FIXED_ENDPOINT, 2253 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2254 .data = & (const struct audioformat) { 2254 .data = & (const struct audioformat) {
2255 .formats = SNDRV_PCM_FMTBIT_S24_3LE, 2255 .formats = SNDRV_PCM_FMTBIT_S24_3LE,
2256 .channels = 8, 2256 .channels = 8,
2257 .iface = 1, 2257 .iface = 1,
2258 .altsetting = 1, 2258 .altsetting = 1,
2259 .altset_idx = 1, 2259 .altset_idx = 1,
2260 .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE, 2260 .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2261 .endpoint = 0x01, 2261 .endpoint = 0x01,
2262 .ep_attr = 0x09, 2262 .ep_attr = 0x09,
2263 .rates = SNDRV_PCM_RATE_44100 | 2263 .rates = SNDRV_PCM_RATE_44100 |
2264 SNDRV_PCM_RATE_48000 | 2264 SNDRV_PCM_RATE_48000 |
2265 SNDRV_PCM_RATE_88200 | 2265 SNDRV_PCM_RATE_88200 |
2266 SNDRV_PCM_RATE_96000, 2266 SNDRV_PCM_RATE_96000,
2267 .rate_min = 44100, 2267 .rate_min = 44100,
2268 .rate_max = 96000, 2268 .rate_max = 96000,
2269 .nr_rates = 4, 2269 .nr_rates = 4,
2270 .rate_table = (unsigned int[]) { 2270 .rate_table = (unsigned int[]) {
2271 44100, 48000, 88200, 96000 2271 44100, 48000, 88200, 96000
2272 } 2272 }
2273 } 2273 }
2274 }, 2274 },
2275 { 2275 {
2276 .ifnum = 2, 2276 .ifnum = 2,
2277 .type = QUIRK_AUDIO_FIXED_ENDPOINT, 2277 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2278 .data = & (const struct audioformat) { 2278 .data = & (const struct audioformat) {
2279 .formats = SNDRV_PCM_FMTBIT_S24_3LE, 2279 .formats = SNDRV_PCM_FMTBIT_S24_3LE,
2280 .channels = 8, 2280 .channels = 8,
2281 .iface = 2, 2281 .iface = 2,
2282 .altsetting = 1, 2282 .altsetting = 1,
2283 .altset_idx = 1, 2283 .altset_idx = 1,
2284 .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE, 2284 .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2285 .endpoint = 0x81, 2285 .endpoint = 0x81,
2286 .ep_attr = 0x05, 2286 .ep_attr = 0x05,
2287 .rates = SNDRV_PCM_RATE_44100 | 2287 .rates = SNDRV_PCM_RATE_44100 |
2288 SNDRV_PCM_RATE_48000 | 2288 SNDRV_PCM_RATE_48000 |
2289 SNDRV_PCM_RATE_88200 | 2289 SNDRV_PCM_RATE_88200 |
2290 SNDRV_PCM_RATE_96000, 2290 SNDRV_PCM_RATE_96000,
2291 .rate_min = 44100, 2291 .rate_min = 44100,
2292 .rate_max = 96000, 2292 .rate_max = 96000,
2293 .nr_rates = 4, 2293 .nr_rates = 4,
2294 .rate_table = (unsigned int[]) { 2294 .rate_table = (unsigned int[]) {
2295 44100, 48000, 88200, 96000 2295 44100, 48000, 88200, 96000
2296 } 2296 }
2297 } 2297 }
2298 }, 2298 },
2299 /* interface 3 (MIDI) is standard compliant */ 2299 /* interface 3 (MIDI) is standard compliant */
2300 { 2300 {
2301 .ifnum = -1 2301 .ifnum = -1
2302 } 2302 }
2303 } 2303 }
2304 } 2304 }
2305 }, 2305 },
2306 2306
2307 /* Casio devices */ 2307 /* Casio devices */
2308 { 2308 {
2309 USB_DEVICE(0x07cf, 0x6801), 2309 USB_DEVICE(0x07cf, 0x6801),
2310 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 2310 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2311 .vendor_name = "Casio", 2311 .vendor_name = "Casio",
2312 .product_name = "PL-40R", 2312 .product_name = "PL-40R",
2313 .ifnum = 0, 2313 .ifnum = 0,
2314 .type = QUIRK_MIDI_YAMAHA 2314 .type = QUIRK_MIDI_YAMAHA
2315 } 2315 }
2316 }, 2316 },
2317 { 2317 {
2318 /* this ID is used by several devices without a product ID */ 2318 /* this ID is used by several devices without a product ID */
2319 USB_DEVICE(0x07cf, 0x6802), 2319 USB_DEVICE(0x07cf, 0x6802),
2320 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 2320 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2321 .vendor_name = "Casio", 2321 .vendor_name = "Casio",
2322 .product_name = "Keyboard", 2322 .product_name = "Keyboard",
2323 .ifnum = 0, 2323 .ifnum = 0,
2324 .type = QUIRK_MIDI_YAMAHA 2324 .type = QUIRK_MIDI_YAMAHA
2325 } 2325 }
2326 }, 2326 },
2327 2327
2328 /* Mark of the Unicorn devices */ 2328 /* Mark of the Unicorn devices */
2329 { 2329 {
2330 /* thanks to Robert A. Lerche <ral 'at' msbit.com> */ 2330 /* thanks to Robert A. Lerche <ral 'at' msbit.com> */
2331 .match_flags = USB_DEVICE_ID_MATCH_VENDOR | 2331 .match_flags = USB_DEVICE_ID_MATCH_VENDOR |
2332 USB_DEVICE_ID_MATCH_PRODUCT | 2332 USB_DEVICE_ID_MATCH_PRODUCT |
2333 USB_DEVICE_ID_MATCH_DEV_SUBCLASS, 2333 USB_DEVICE_ID_MATCH_DEV_SUBCLASS,
2334 .idVendor = 0x07fd, 2334 .idVendor = 0x07fd,
2335 .idProduct = 0x0001, 2335 .idProduct = 0x0001,
2336 .bDeviceSubClass = 2, 2336 .bDeviceSubClass = 2,
2337 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 2337 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2338 .vendor_name = "MOTU", 2338 .vendor_name = "MOTU",
2339 .product_name = "Fastlane", 2339 .product_name = "Fastlane",
2340 .ifnum = QUIRK_ANY_INTERFACE, 2340 .ifnum = QUIRK_ANY_INTERFACE,
2341 .type = QUIRK_COMPOSITE, 2341 .type = QUIRK_COMPOSITE,
2342 .data = & (const struct snd_usb_audio_quirk[]) { 2342 .data = & (const struct snd_usb_audio_quirk[]) {
2343 { 2343 {
2344 .ifnum = 0, 2344 .ifnum = 0,
2345 .type = QUIRK_MIDI_RAW_BYTES 2345 .type = QUIRK_MIDI_RAW_BYTES
2346 }, 2346 },
2347 { 2347 {
2348 .ifnum = 1, 2348 .ifnum = 1,
2349 .type = QUIRK_IGNORE_INTERFACE 2349 .type = QUIRK_IGNORE_INTERFACE
2350 }, 2350 },
2351 { 2351 {
2352 .ifnum = -1 2352 .ifnum = -1
2353 } 2353 }
2354 } 2354 }
2355 } 2355 }
2356 }, 2356 },
2357 2357
2358 /* Emagic devices */ 2358 /* Emagic devices */
2359 { 2359 {
2360 USB_DEVICE(0x086a, 0x0001), 2360 USB_DEVICE(0x086a, 0x0001),
2361 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 2361 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2362 .vendor_name = "Emagic", 2362 .vendor_name = "Emagic",
2363 /* .product_name = "Unitor8", */ 2363 /* .product_name = "Unitor8", */
2364 .ifnum = 2, 2364 .ifnum = 2,
2365 .type = QUIRK_MIDI_EMAGIC, 2365 .type = QUIRK_MIDI_EMAGIC,
2366 .data = & (const struct snd_usb_midi_endpoint_info) { 2366 .data = & (const struct snd_usb_midi_endpoint_info) {
2367 .out_cables = 0x80ff, 2367 .out_cables = 0x80ff,
2368 .in_cables = 0x80ff 2368 .in_cables = 0x80ff
2369 } 2369 }
2370 } 2370 }
2371 }, 2371 },
2372 { 2372 {
2373 USB_DEVICE(0x086a, 0x0002), 2373 USB_DEVICE(0x086a, 0x0002),
2374 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 2374 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2375 .vendor_name = "Emagic", 2375 .vendor_name = "Emagic",
2376 /* .product_name = "AMT8", */ 2376 /* .product_name = "AMT8", */
2377 .ifnum = 2, 2377 .ifnum = 2,
2378 .type = QUIRK_MIDI_EMAGIC, 2378 .type = QUIRK_MIDI_EMAGIC,
2379 .data = & (const struct snd_usb_midi_endpoint_info) { 2379 .data = & (const struct snd_usb_midi_endpoint_info) {
2380 .out_cables = 0x80ff, 2380 .out_cables = 0x80ff,
2381 .in_cables = 0x80ff 2381 .in_cables = 0x80ff
2382 } 2382 }
2383 } 2383 }
2384 }, 2384 },
2385 { 2385 {
2386 USB_DEVICE(0x086a, 0x0003), 2386 USB_DEVICE(0x086a, 0x0003),
2387 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 2387 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2388 .vendor_name = "Emagic", 2388 .vendor_name = "Emagic",
2389 /* .product_name = "MT4", */ 2389 /* .product_name = "MT4", */
2390 .ifnum = 2, 2390 .ifnum = 2,
2391 .type = QUIRK_MIDI_EMAGIC, 2391 .type = QUIRK_MIDI_EMAGIC,
2392 .data = & (const struct snd_usb_midi_endpoint_info) { 2392 .data = & (const struct snd_usb_midi_endpoint_info) {
2393 .out_cables = 0x800f, 2393 .out_cables = 0x800f,
2394 .in_cables = 0x8003 2394 .in_cables = 0x8003
2395 } 2395 }
2396 } 2396 }
2397 }, 2397 },
2398 2398
2399 /* KORG devices */ 2399 /* KORG devices */
2400 { 2400 {
2401 USB_DEVICE_VENDOR_SPEC(0x0944, 0x0200), 2401 USB_DEVICE_VENDOR_SPEC(0x0944, 0x0200),
2402 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 2402 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2403 .vendor_name = "KORG, Inc.", 2403 .vendor_name = "KORG, Inc.",
2404 /* .product_name = "PANDORA PX5D", */ 2404 /* .product_name = "PANDORA PX5D", */
2405 .ifnum = 3, 2405 .ifnum = 3,
2406 .type = QUIRK_MIDI_STANDARD_INTERFACE, 2406 .type = QUIRK_MIDI_STANDARD_INTERFACE,
2407 } 2407 }
2408 }, 2408 },
2409 2409
2410 { 2410 {
2411 USB_DEVICE_VENDOR_SPEC(0x0944, 0x0201), 2411 USB_DEVICE_VENDOR_SPEC(0x0944, 0x0201),
2412 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 2412 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2413 .vendor_name = "KORG, Inc.", 2413 .vendor_name = "KORG, Inc.",
2414 /* .product_name = "ToneLab ST", */ 2414 /* .product_name = "ToneLab ST", */
2415 .ifnum = 3, 2415 .ifnum = 3,
2416 .type = QUIRK_MIDI_STANDARD_INTERFACE, 2416 .type = QUIRK_MIDI_STANDARD_INTERFACE,
2417 } 2417 }
2418 }, 2418 },
2419 2419
2420 /* AKAI devices */ 2420 /* AKAI devices */
2421 { 2421 {
2422 USB_DEVICE(0x09e8, 0x0062), 2422 USB_DEVICE(0x09e8, 0x0062),
2423 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 2423 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2424 .vendor_name = "AKAI", 2424 .vendor_name = "AKAI",
2425 .product_name = "MPD16", 2425 .product_name = "MPD16",
2426 .ifnum = 0, 2426 .ifnum = 0,
2427 .type = QUIRK_MIDI_AKAI, 2427 .type = QUIRK_MIDI_AKAI,
2428 } 2428 }
2429 }, 2429 },
2430 2430
2431 /* TerraTec devices */ 2431 /* TerraTec devices */
2432 { 2432 {
2433 USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0012), 2433 USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0012),
2434 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 2434 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2435 .vendor_name = "TerraTec", 2435 .vendor_name = "TerraTec",
2436 .product_name = "PHASE 26", 2436 .product_name = "PHASE 26",
2437 .ifnum = 3, 2437 .ifnum = 3,
2438 .type = QUIRK_MIDI_STANDARD_INTERFACE 2438 .type = QUIRK_MIDI_STANDARD_INTERFACE
2439 } 2439 }
2440 }, 2440 },
2441 { 2441 {
2442 USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0013), 2442 USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0013),
2443 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 2443 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2444 .vendor_name = "TerraTec", 2444 .vendor_name = "TerraTec",
2445 .product_name = "PHASE 26", 2445 .product_name = "PHASE 26",
2446 .ifnum = 3, 2446 .ifnum = 3,
2447 .type = QUIRK_MIDI_STANDARD_INTERFACE 2447 .type = QUIRK_MIDI_STANDARD_INTERFACE
2448 } 2448 }
2449 }, 2449 },
2450 { 2450 {
2451 USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0014), 2451 USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0014),
2452 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 2452 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2453 .vendor_name = "TerraTec", 2453 .vendor_name = "TerraTec",
2454 .product_name = "PHASE 26", 2454 .product_name = "PHASE 26",
2455 .ifnum = 3, 2455 .ifnum = 3,
2456 .type = QUIRK_MIDI_STANDARD_INTERFACE 2456 .type = QUIRK_MIDI_STANDARD_INTERFACE
2457 } 2457 }
2458 }, 2458 },
2459 { 2459 {
2460 USB_DEVICE(0x0ccd, 0x0028), 2460 USB_DEVICE(0x0ccd, 0x0028),
2461 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 2461 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2462 .vendor_name = "TerraTec", 2462 .vendor_name = "TerraTec",
2463 .product_name = "Aureon5.1MkII", 2463 .product_name = "Aureon5.1MkII",
2464 .ifnum = QUIRK_NO_INTERFACE 2464 .ifnum = QUIRK_NO_INTERFACE
2465 } 2465 }
2466 }, 2466 },
2467 { 2467 {
2468 USB_DEVICE(0x0ccd, 0x0035), 2468 USB_DEVICE(0x0ccd, 0x0035),
2469 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 2469 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2470 .vendor_name = "Miditech", 2470 .vendor_name = "Miditech",
2471 .product_name = "Play'n Roll", 2471 .product_name = "Play'n Roll",
2472 .ifnum = 0, 2472 .ifnum = 0,
2473 .type = QUIRK_MIDI_CME 2473 .type = QUIRK_MIDI_CME
2474 } 2474 }
2475 }, 2475 },
2476 2476
2477 /* Stanton/N2IT Final Scratch v1 device ('Scratchamp') */ 2477 /* Stanton/N2IT Final Scratch v1 device ('Scratchamp') */
2478 { 2478 {
2479 USB_DEVICE(0x103d, 0x0100), 2479 USB_DEVICE(0x103d, 0x0100),
2480 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 2480 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2481 .vendor_name = "Stanton", 2481 .vendor_name = "Stanton",
2482 .product_name = "ScratchAmp", 2482 .product_name = "ScratchAmp",
2483 .ifnum = QUIRK_NO_INTERFACE 2483 .ifnum = QUIRK_NO_INTERFACE
2484 } 2484 }
2485 }, 2485 },
2486 { 2486 {
2487 USB_DEVICE(0x103d, 0x0101), 2487 USB_DEVICE(0x103d, 0x0101),
2488 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 2488 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2489 .vendor_name = "Stanton", 2489 .vendor_name = "Stanton",
2490 .product_name = "ScratchAmp", 2490 .product_name = "ScratchAmp",
2491 .ifnum = QUIRK_NO_INTERFACE 2491 .ifnum = QUIRK_NO_INTERFACE
2492 } 2492 }
2493 }, 2493 },
2494 2494
2495 /* Novation EMS devices */ 2495 /* Novation EMS devices */
2496 { 2496 {
2497 USB_DEVICE_VENDOR_SPEC(0x1235, 0x0001), 2497 USB_DEVICE_VENDOR_SPEC(0x1235, 0x0001),
2498 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 2498 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2499 .vendor_name = "Novation", 2499 .vendor_name = "Novation",
2500 .product_name = "ReMOTE Audio/XStation", 2500 .product_name = "ReMOTE Audio/XStation",
2501 .ifnum = 4, 2501 .ifnum = 4,
2502 .type = QUIRK_MIDI_NOVATION 2502 .type = QUIRK_MIDI_NOVATION
2503 } 2503 }
2504 }, 2504 },
2505 { 2505 {
2506 USB_DEVICE_VENDOR_SPEC(0x1235, 0x0002), 2506 USB_DEVICE_VENDOR_SPEC(0x1235, 0x0002),
2507 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 2507 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2508 .vendor_name = "Novation", 2508 .vendor_name = "Novation",
2509 .product_name = "Speedio", 2509 .product_name = "Speedio",
2510 .ifnum = 3, 2510 .ifnum = 3,
2511 .type = QUIRK_MIDI_NOVATION 2511 .type = QUIRK_MIDI_NOVATION
2512 } 2512 }
2513 }, 2513 },
2514 { 2514 {
2515 USB_DEVICE(0x1235, 0x000e), 2515 USB_DEVICE(0x1235, 0x000e),
2516 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 2516 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2517 /* .vendor_name = "Novation", */ 2517 /* .vendor_name = "Novation", */
2518 /* .product_name = "Launchpad", */ 2518 /* .product_name = "Launchpad", */
2519 .ifnum = 0, 2519 .ifnum = 0,
2520 .type = QUIRK_MIDI_RAW_BYTES 2520 .type = QUIRK_MIDI_RAW_BYTES
2521 } 2521 }
2522 }, 2522 },
2523 { 2523 {
2524 USB_DEVICE(0x1235, 0x0018), 2524 USB_DEVICE(0x1235, 0x0018),
2525 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 2525 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2526 .vendor_name = "Novation", 2526 .vendor_name = "Novation",
2527 .product_name = "Twitch", 2527 .product_name = "Twitch",
2528 .ifnum = QUIRK_ANY_INTERFACE, 2528 .ifnum = QUIRK_ANY_INTERFACE,
2529 .type = QUIRK_COMPOSITE, 2529 .type = QUIRK_COMPOSITE,
2530 .data = (const struct snd_usb_audio_quirk[]) { 2530 .data = (const struct snd_usb_audio_quirk[]) {
2531 { 2531 {
2532 .ifnum = 0, 2532 .ifnum = 0,
2533 .type = QUIRK_AUDIO_FIXED_ENDPOINT, 2533 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2534 .data = & (const struct audioformat) { 2534 .data = & (const struct audioformat) {
2535 .formats = SNDRV_PCM_FMTBIT_S24_3LE, 2535 .formats = SNDRV_PCM_FMTBIT_S24_3LE,
2536 .channels = 4, 2536 .channels = 4,
2537 .iface = 0, 2537 .iface = 0,
2538 .altsetting = 1, 2538 .altsetting = 1,
2539 .altset_idx = 1, 2539 .altset_idx = 1,
2540 .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE, 2540 .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2541 .endpoint = 0x01, 2541 .endpoint = 0x01,
2542 .ep_attr = USB_ENDPOINT_XFER_ISOC, 2542 .ep_attr = USB_ENDPOINT_XFER_ISOC,
2543 .rates = SNDRV_PCM_RATE_44100 | 2543 .rates = SNDRV_PCM_RATE_44100 |
2544 SNDRV_PCM_RATE_48000, 2544 SNDRV_PCM_RATE_48000,
2545 .rate_min = 44100, 2545 .rate_min = 44100,
2546 .rate_max = 48000, 2546 .rate_max = 48000,
2547 .nr_rates = 2, 2547 .nr_rates = 2,
2548 .rate_table = (unsigned int[]) { 2548 .rate_table = (unsigned int[]) {
2549 44100, 48000 2549 44100, 48000
2550 } 2550 }
2551 } 2551 }
2552 }, 2552 },
2553 { 2553 {
2554 .ifnum = 1, 2554 .ifnum = 1,
2555 .type = QUIRK_MIDI_RAW_BYTES 2555 .type = QUIRK_MIDI_RAW_BYTES
2556 }, 2556 },
2557 { 2557 {
2558 .ifnum = -1 2558 .ifnum = -1
2559 } 2559 }
2560 } 2560 }
2561 } 2561 }
2562 }, 2562 },
2563 { 2563 {
2564 USB_DEVICE_VENDOR_SPEC(0x1235, 0x4661), 2564 USB_DEVICE_VENDOR_SPEC(0x1235, 0x4661),
2565 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 2565 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2566 .vendor_name = "Novation", 2566 .vendor_name = "Novation",
2567 .product_name = "ReMOTE25", 2567 .product_name = "ReMOTE25",
2568 .ifnum = 0, 2568 .ifnum = 0,
2569 .type = QUIRK_MIDI_NOVATION 2569 .type = QUIRK_MIDI_NOVATION
2570 } 2570 }
2571 }, 2571 },
2572 2572
2573 /* Access Music devices */ 2573 /* Access Music devices */
2574 { 2574 {
2575 /* VirusTI Desktop */ 2575 /* VirusTI Desktop */
2576 USB_DEVICE_VENDOR_SPEC(0x133e, 0x0815), 2576 USB_DEVICE_VENDOR_SPEC(0x133e, 0x0815),
2577 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) { 2577 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2578 .ifnum = QUIRK_ANY_INTERFACE, 2578 .ifnum = QUIRK_ANY_INTERFACE,
2579 .type = QUIRK_COMPOSITE, 2579 .type = QUIRK_COMPOSITE,
2580 .data = &(const struct snd_usb_audio_quirk[]) { 2580 .data = &(const struct snd_usb_audio_quirk[]) {
2581 { 2581 {
2582 .ifnum = 3, 2582 .ifnum = 3,
2583 .type = QUIRK_MIDI_FIXED_ENDPOINT, 2583 .type = QUIRK_MIDI_FIXED_ENDPOINT,
2584 .data = &(const struct snd_usb_midi_endpoint_info) { 2584 .data = &(const struct snd_usb_midi_endpoint_info) {
2585 .out_cables = 0x0003, 2585 .out_cables = 0x0003,
2586 .in_cables = 0x0003 2586 .in_cables = 0x0003
2587 } 2587 }
2588 }, 2588 },
2589 { 2589 {
2590 .ifnum = 4, 2590 .ifnum = 4,
2591 .type = QUIRK_IGNORE_INTERFACE 2591 .type = QUIRK_IGNORE_INTERFACE
2592 }, 2592 },
2593 { 2593 {
2594 .ifnum = -1 2594 .ifnum = -1
2595 } 2595 }
2596 } 2596 }
2597 } 2597 }
2598 }, 2598 },
2599 2599
2600 /* */ 2600 /* */
2601 { 2601 {
2602 /* aka. Serato Scratch Live DJ Box */ 2602 /* aka. Serato Scratch Live DJ Box */
2603 USB_DEVICE(0x13e5, 0x0001), 2603 USB_DEVICE(0x13e5, 0x0001),
2604 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 2604 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2605 .vendor_name = "Rane", 2605 .vendor_name = "Rane",
2606 .product_name = "SL-1", 2606 .product_name = "SL-1",
2607 .ifnum = QUIRK_NO_INTERFACE 2607 .ifnum = QUIRK_NO_INTERFACE
2608 } 2608 }
2609 }, 2609 },
2610 2610
2611 /* Native Instruments MK2 series */ 2611 /* Native Instruments MK2 series */
2612 { 2612 {
2613 /* Komplete Audio 6 */ 2613 /* Komplete Audio 6 */
2614 .match_flags = USB_DEVICE_ID_MATCH_DEVICE, 2614 .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
2615 .idVendor = 0x17cc, 2615 .idVendor = 0x17cc,
2616 .idProduct = 0x1000, 2616 .idProduct = 0x1000,
2617 }, 2617 },
2618 { 2618 {
2619 /* Traktor Audio 6 */ 2619 /* Traktor Audio 6 */
2620 .match_flags = USB_DEVICE_ID_MATCH_DEVICE, 2620 .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
2621 .idVendor = 0x17cc, 2621 .idVendor = 0x17cc,
2622 .idProduct = 0x1010, 2622 .idProduct = 0x1010,
2623 }, 2623 },
2624 { 2624 {
2625 /* Traktor Audio 10 */ 2625 /* Traktor Audio 10 */
2626 .match_flags = USB_DEVICE_ID_MATCH_DEVICE, 2626 .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
2627 .idVendor = 0x17cc, 2627 .idVendor = 0x17cc,
2628 .idProduct = 0x1020, 2628 .idProduct = 0x1020,
2629 }, 2629 },
2630 2630
2631 /* KeithMcMillen Stringport */ 2631 /* KeithMcMillen Stringport */
2632 { 2632 {
2633 USB_DEVICE(0x1f38, 0x0001), 2633 USB_DEVICE(0x1f38, 0x0001),
2634 .bInterfaceClass = USB_CLASS_AUDIO, 2634 .bInterfaceClass = USB_CLASS_AUDIO,
2635 }, 2635 },
2636 2636
2637 /* Miditech devices */ 2637 /* Miditech devices */
2638 { 2638 {
2639 USB_DEVICE(0x4752, 0x0011), 2639 USB_DEVICE(0x4752, 0x0011),
2640 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 2640 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2641 .vendor_name = "Miditech", 2641 .vendor_name = "Miditech",
2642 .product_name = "Midistart-2", 2642 .product_name = "Midistart-2",
2643 .ifnum = 0, 2643 .ifnum = 0,
2644 .type = QUIRK_MIDI_CME 2644 .type = QUIRK_MIDI_CME
2645 } 2645 }
2646 }, 2646 },
2647 2647
2648 /* Central Music devices */ 2648 /* Central Music devices */
2649 { 2649 {
2650 /* this ID used by both Miditech MidiStudio-2 and CME UF-x */ 2650 /* this ID used by both Miditech MidiStudio-2 and CME UF-x */
2651 USB_DEVICE(0x7104, 0x2202), 2651 USB_DEVICE(0x7104, 0x2202),
2652 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 2652 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2653 .ifnum = 0, 2653 .ifnum = 0,
2654 .type = QUIRK_MIDI_CME 2654 .type = QUIRK_MIDI_CME
2655 } 2655 }
2656 }, 2656 },
2657 2657
2658 /* Hauppauge HVR-950Q and HVR-850 */ 2658 /* Hauppauge HVR-950Q and HVR-850 */
2659 { 2659 {
2660 USB_DEVICE_VENDOR_SPEC(0x2040, 0x7200), 2660 USB_DEVICE_VENDOR_SPEC(0x2040, 0x7200),
2661 .match_flags = USB_DEVICE_ID_MATCH_DEVICE | 2661 .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
2662 USB_DEVICE_ID_MATCH_INT_CLASS | 2662 USB_DEVICE_ID_MATCH_INT_CLASS |
2663 USB_DEVICE_ID_MATCH_INT_SUBCLASS, 2663 USB_DEVICE_ID_MATCH_INT_SUBCLASS,
2664 .bInterfaceClass = USB_CLASS_AUDIO, 2664 .bInterfaceClass = USB_CLASS_AUDIO,
2665 .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL, 2665 .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
2666 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) { 2666 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2667 .vendor_name = "Hauppauge", 2667 .vendor_name = "Hauppauge",
2668 .product_name = "HVR-950Q", 2668 .product_name = "HVR-950Q",
2669 .ifnum = QUIRK_ANY_INTERFACE, 2669 .ifnum = QUIRK_ANY_INTERFACE,
2670 .type = QUIRK_AUDIO_ALIGN_TRANSFER, 2670 .type = QUIRK_AUDIO_ALIGN_TRANSFER,
2671 } 2671 }
2672 }, 2672 },
2673 { 2673 {
2674 USB_DEVICE_VENDOR_SPEC(0x2040, 0x7240), 2674 USB_DEVICE_VENDOR_SPEC(0x2040, 0x7240),
2675 .match_flags = USB_DEVICE_ID_MATCH_DEVICE | 2675 .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
2676 USB_DEVICE_ID_MATCH_INT_CLASS | 2676 USB_DEVICE_ID_MATCH_INT_CLASS |
2677 USB_DEVICE_ID_MATCH_INT_SUBCLASS, 2677 USB_DEVICE_ID_MATCH_INT_SUBCLASS,
2678 .bInterfaceClass = USB_CLASS_AUDIO, 2678 .bInterfaceClass = USB_CLASS_AUDIO,
2679 .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL, 2679 .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
2680 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) { 2680 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2681 .vendor_name = "Hauppauge", 2681 .vendor_name = "Hauppauge",
2682 .product_name = "HVR-850", 2682 .product_name = "HVR-850",
2683 .ifnum = QUIRK_ANY_INTERFACE, 2683 .ifnum = QUIRK_ANY_INTERFACE,
2684 .type = QUIRK_AUDIO_ALIGN_TRANSFER, 2684 .type = QUIRK_AUDIO_ALIGN_TRANSFER,
2685 } 2685 }
2686 }, 2686 },
2687 { 2687 {
2688 USB_DEVICE_VENDOR_SPEC(0x2040, 0x7210), 2688 USB_DEVICE_VENDOR_SPEC(0x2040, 0x7210),
2689 .match_flags = USB_DEVICE_ID_MATCH_DEVICE | 2689 .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
2690 USB_DEVICE_ID_MATCH_INT_CLASS | 2690 USB_DEVICE_ID_MATCH_INT_CLASS |
2691 USB_DEVICE_ID_MATCH_INT_SUBCLASS, 2691 USB_DEVICE_ID_MATCH_INT_SUBCLASS,
2692 .bInterfaceClass = USB_CLASS_AUDIO, 2692 .bInterfaceClass = USB_CLASS_AUDIO,
2693 .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL, 2693 .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
2694 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) { 2694 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2695 .vendor_name = "Hauppauge", 2695 .vendor_name = "Hauppauge",
2696 .product_name = "HVR-950Q", 2696 .product_name = "HVR-950Q",
2697 .ifnum = QUIRK_ANY_INTERFACE, 2697 .ifnum = QUIRK_ANY_INTERFACE,
2698 .type = QUIRK_AUDIO_ALIGN_TRANSFER, 2698 .type = QUIRK_AUDIO_ALIGN_TRANSFER,
2699 } 2699 }
2700 }, 2700 },
2701 { 2701 {
2702 USB_DEVICE_VENDOR_SPEC(0x2040, 0x7217), 2702 USB_DEVICE_VENDOR_SPEC(0x2040, 0x7217),
2703 .match_flags = USB_DEVICE_ID_MATCH_DEVICE | 2703 .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
2704 USB_DEVICE_ID_MATCH_INT_CLASS | 2704 USB_DEVICE_ID_MATCH_INT_CLASS |
2705 USB_DEVICE_ID_MATCH_INT_SUBCLASS, 2705 USB_DEVICE_ID_MATCH_INT_SUBCLASS,
2706 .bInterfaceClass = USB_CLASS_AUDIO, 2706 .bInterfaceClass = USB_CLASS_AUDIO,
2707 .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL, 2707 .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
2708 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) { 2708 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2709 .vendor_name = "Hauppauge", 2709 .vendor_name = "Hauppauge",
2710 .product_name = "HVR-950Q", 2710 .product_name = "HVR-950Q",
2711 .ifnum = QUIRK_ANY_INTERFACE, 2711 .ifnum = QUIRK_ANY_INTERFACE,
2712 .type = QUIRK_AUDIO_ALIGN_TRANSFER, 2712 .type = QUIRK_AUDIO_ALIGN_TRANSFER,
2713 } 2713 }
2714 }, 2714 },
2715 { 2715 {
2716 USB_DEVICE_VENDOR_SPEC(0x2040, 0x721b), 2716 USB_DEVICE_VENDOR_SPEC(0x2040, 0x721b),
2717 .match_flags = USB_DEVICE_ID_MATCH_DEVICE | 2717 .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
2718 USB_DEVICE_ID_MATCH_INT_CLASS | 2718 USB_DEVICE_ID_MATCH_INT_CLASS |
2719 USB_DEVICE_ID_MATCH_INT_SUBCLASS, 2719 USB_DEVICE_ID_MATCH_INT_SUBCLASS,
2720 .bInterfaceClass = USB_CLASS_AUDIO, 2720 .bInterfaceClass = USB_CLASS_AUDIO,
2721 .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL, 2721 .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
2722 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) { 2722 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2723 .vendor_name = "Hauppauge", 2723 .vendor_name = "Hauppauge",
2724 .product_name = "HVR-950Q", 2724 .product_name = "HVR-950Q",
2725 .ifnum = QUIRK_ANY_INTERFACE, 2725 .ifnum = QUIRK_ANY_INTERFACE,
2726 .type = QUIRK_AUDIO_ALIGN_TRANSFER, 2726 .type = QUIRK_AUDIO_ALIGN_TRANSFER,
2727 } 2727 }
2728 }, 2728 },
2729 { 2729 {
2730 USB_DEVICE_VENDOR_SPEC(0x2040, 0x721e), 2730 USB_DEVICE_VENDOR_SPEC(0x2040, 0x721e),
2731 .match_flags = USB_DEVICE_ID_MATCH_DEVICE | 2731 .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
2732 USB_DEVICE_ID_MATCH_INT_CLASS | 2732 USB_DEVICE_ID_MATCH_INT_CLASS |
2733 USB_DEVICE_ID_MATCH_INT_SUBCLASS, 2733 USB_DEVICE_ID_MATCH_INT_SUBCLASS,
2734 .bInterfaceClass = USB_CLASS_AUDIO, 2734 .bInterfaceClass = USB_CLASS_AUDIO,
2735 .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL, 2735 .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
2736 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) { 2736 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2737 .vendor_name = "Hauppauge", 2737 .vendor_name = "Hauppauge",
2738 .product_name = "HVR-950Q", 2738 .product_name = "HVR-950Q",
2739 .ifnum = QUIRK_ANY_INTERFACE, 2739 .ifnum = QUIRK_ANY_INTERFACE,
2740 .type = QUIRK_AUDIO_ALIGN_TRANSFER, 2740 .type = QUIRK_AUDIO_ALIGN_TRANSFER,
2741 } 2741 }
2742 }, 2742 },
2743 { 2743 {
2744 USB_DEVICE_VENDOR_SPEC(0x2040, 0x721f), 2744 USB_DEVICE_VENDOR_SPEC(0x2040, 0x721f),
2745 .match_flags = USB_DEVICE_ID_MATCH_DEVICE | 2745 .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
2746 USB_DEVICE_ID_MATCH_INT_CLASS | 2746 USB_DEVICE_ID_MATCH_INT_CLASS |
2747 USB_DEVICE_ID_MATCH_INT_SUBCLASS, 2747 USB_DEVICE_ID_MATCH_INT_SUBCLASS,
2748 .bInterfaceClass = USB_CLASS_AUDIO, 2748 .bInterfaceClass = USB_CLASS_AUDIO,
2749 .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL, 2749 .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
2750 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) { 2750 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2751 .vendor_name = "Hauppauge", 2751 .vendor_name = "Hauppauge",
2752 .product_name = "HVR-950Q", 2752 .product_name = "HVR-950Q",
2753 .ifnum = QUIRK_ANY_INTERFACE, 2753 .ifnum = QUIRK_ANY_INTERFACE,
2754 .type = QUIRK_AUDIO_ALIGN_TRANSFER, 2754 .type = QUIRK_AUDIO_ALIGN_TRANSFER,
2755 } 2755 }
2756 }, 2756 },
2757 { 2757 {
2758 USB_DEVICE_VENDOR_SPEC(0x2040, 0x7280), 2758 USB_DEVICE_VENDOR_SPEC(0x2040, 0x7280),
2759 .match_flags = USB_DEVICE_ID_MATCH_DEVICE | 2759 .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
2760 USB_DEVICE_ID_MATCH_INT_CLASS | 2760 USB_DEVICE_ID_MATCH_INT_CLASS |
2761 USB_DEVICE_ID_MATCH_INT_SUBCLASS, 2761 USB_DEVICE_ID_MATCH_INT_SUBCLASS,
2762 .bInterfaceClass = USB_CLASS_AUDIO, 2762 .bInterfaceClass = USB_CLASS_AUDIO,
2763 .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL, 2763 .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
2764 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) { 2764 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2765 .vendor_name = "Hauppauge", 2765 .vendor_name = "Hauppauge",
2766 .product_name = "HVR-950Q", 2766 .product_name = "HVR-950Q",
2767 .ifnum = QUIRK_ANY_INTERFACE, 2767 .ifnum = QUIRK_ANY_INTERFACE,
2768 .type = QUIRK_AUDIO_ALIGN_TRANSFER, 2768 .type = QUIRK_AUDIO_ALIGN_TRANSFER,
2769 } 2769 }
2770 }, 2770 },
2771 { 2771 {
2772 USB_DEVICE_VENDOR_SPEC(0x0fd9, 0x0008), 2772 USB_DEVICE_VENDOR_SPEC(0x0fd9, 0x0008),
2773 .match_flags = USB_DEVICE_ID_MATCH_DEVICE | 2773 .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
2774 USB_DEVICE_ID_MATCH_INT_CLASS | 2774 USB_DEVICE_ID_MATCH_INT_CLASS |
2775 USB_DEVICE_ID_MATCH_INT_SUBCLASS, 2775 USB_DEVICE_ID_MATCH_INT_SUBCLASS,
2776 .bInterfaceClass = USB_CLASS_AUDIO, 2776 .bInterfaceClass = USB_CLASS_AUDIO,
2777 .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL, 2777 .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
2778 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) { 2778 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2779 .vendor_name = "Hauppauge", 2779 .vendor_name = "Hauppauge",
2780 .product_name = "HVR-950Q", 2780 .product_name = "HVR-950Q",
2781 .ifnum = QUIRK_ANY_INTERFACE, 2781 .ifnum = QUIRK_ANY_INTERFACE,
2782 .type = QUIRK_AUDIO_ALIGN_TRANSFER, 2782 .type = QUIRK_AUDIO_ALIGN_TRANSFER,
2783 } 2783 }
2784 }, 2784 },
2785 2785
2786 /* Digidesign Mbox */ 2786 /* Digidesign Mbox */
2787 { 2787 {
2788 /* Thanks to Clemens Ladisch <clemens@ladisch.de> */ 2788 /* Thanks to Clemens Ladisch <clemens@ladisch.de> */
2789 USB_DEVICE(0x0dba, 0x1000), 2789 USB_DEVICE(0x0dba, 0x1000),
2790 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) { 2790 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2791 .vendor_name = "Digidesign", 2791 .vendor_name = "Digidesign",
2792 .product_name = "MBox", 2792 .product_name = "MBox",
2793 .ifnum = QUIRK_ANY_INTERFACE, 2793 .ifnum = QUIRK_ANY_INTERFACE,
2794 .type = QUIRK_COMPOSITE, 2794 .type = QUIRK_COMPOSITE,
2795 .data = (const struct snd_usb_audio_quirk[]){ 2795 .data = (const struct snd_usb_audio_quirk[]){
2796 { 2796 {
2797 .ifnum = 0, 2797 .ifnum = 0,
2798 .type = QUIRK_IGNORE_INTERFACE, 2798 .type = QUIRK_IGNORE_INTERFACE,
2799 }, 2799 },
2800 { 2800 {
2801 .ifnum = 1, 2801 .ifnum = 1,
2802 .type = QUIRK_AUDIO_FIXED_ENDPOINT, 2802 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2803 .data = &(const struct audioformat) { 2803 .data = &(const struct audioformat) {
2804 .formats = SNDRV_PCM_FMTBIT_S24_3BE, 2804 .formats = SNDRV_PCM_FMTBIT_S24_3BE,
2805 .channels = 2, 2805 .channels = 2,
2806 .iface = 1, 2806 .iface = 1,
2807 .altsetting = 1, 2807 .altsetting = 1,
2808 .altset_idx = 1, 2808 .altset_idx = 1,
2809 .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE, 2809 .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2810 .endpoint = 0x02, 2810 .endpoint = 0x02,
2811 .ep_attr = 0x01, 2811 .ep_attr = 0x01,
2812 .rates = SNDRV_PCM_RATE_44100 | 2812 .rates = SNDRV_PCM_RATE_44100 |
2813 SNDRV_PCM_RATE_48000, 2813 SNDRV_PCM_RATE_48000,
2814 .rate_min = 44100, 2814 .rate_min = 44100,
2815 .rate_max = 48000, 2815 .rate_max = 48000,
2816 .nr_rates = 2, 2816 .nr_rates = 2,
2817 .rate_table = (unsigned int[]) { 2817 .rate_table = (unsigned int[]) {
2818 44100, 48000 2818 44100, 48000
2819 } 2819 }
2820 } 2820 }
2821 }, 2821 },
2822 { 2822 {
2823 .ifnum = -1 2823 .ifnum = -1
2824 } 2824 }
2825 } 2825 }
2826 2826
2827 } 2827 }
2828 }, 2828 },
2829 2829
2830 /* DIGIDESIGN MBOX 2 */ 2830 /* DIGIDESIGN MBOX 2 */
2831 { 2831 {
2832 USB_DEVICE(0x0dba, 0x3000), 2832 USB_DEVICE(0x0dba, 0x3000),
2833 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) { 2833 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2834 .vendor_name = "Digidesign", 2834 .vendor_name = "Digidesign",
2835 .product_name = "Mbox 2", 2835 .product_name = "Mbox 2",
2836 .ifnum = QUIRK_ANY_INTERFACE, 2836 .ifnum = QUIRK_ANY_INTERFACE,
2837 .type = QUIRK_COMPOSITE, 2837 .type = QUIRK_COMPOSITE,
2838 .data = (const struct snd_usb_audio_quirk[]) { 2838 .data = (const struct snd_usb_audio_quirk[]) {
2839 { 2839 {
2840 .ifnum = 0, 2840 .ifnum = 0,
2841 .type = QUIRK_IGNORE_INTERFACE 2841 .type = QUIRK_IGNORE_INTERFACE
2842 }, 2842 },
2843 { 2843 {
2844 .ifnum = 1, 2844 .ifnum = 1,
2845 .type = QUIRK_IGNORE_INTERFACE 2845 .type = QUIRK_IGNORE_INTERFACE
2846 }, 2846 },
2847 { 2847 {
2848 .ifnum = 2, 2848 .ifnum = 2,
2849 .type = QUIRK_AUDIO_FIXED_ENDPOINT, 2849 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2850 .data = &(const struct audioformat) { 2850 .data = &(const struct audioformat) {
2851 .formats = SNDRV_PCM_FMTBIT_S24_3BE, 2851 .formats = SNDRV_PCM_FMTBIT_S24_3BE,
2852 .channels = 2, 2852 .channels = 2,
2853 .iface = 2, 2853 .iface = 2,
2854 .altsetting = 2, 2854 .altsetting = 2,
2855 .altset_idx = 1, 2855 .altset_idx = 1,
2856 .attributes = 0x00, 2856 .attributes = 0x00,
2857 .endpoint = 0x03, 2857 .endpoint = 0x03,
2858 .ep_attr = USB_ENDPOINT_SYNC_ASYNC, 2858 .ep_attr = USB_ENDPOINT_SYNC_ASYNC,
2859 .rates = SNDRV_PCM_RATE_48000, 2859 .rates = SNDRV_PCM_RATE_48000,
2860 .rate_min = 48000, 2860 .rate_min = 48000,
2861 .rate_max = 48000, 2861 .rate_max = 48000,
2862 .nr_rates = 1, 2862 .nr_rates = 1,
2863 .rate_table = (unsigned int[]) { 2863 .rate_table = (unsigned int[]) {
2864 48000 2864 48000
2865 } 2865 }
2866 } 2866 }
2867 }, 2867 },
2868 { 2868 {
2869 .ifnum = 3, 2869 .ifnum = 3,
2870 .type = QUIRK_IGNORE_INTERFACE 2870 .type = QUIRK_IGNORE_INTERFACE
2871 }, 2871 },
2872 { 2872 {
2873 .ifnum = 4, 2873 .ifnum = 4,
2874 .type = QUIRK_AUDIO_FIXED_ENDPOINT, 2874 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2875 .data = &(const struct audioformat) { 2875 .data = &(const struct audioformat) {
2876 .formats = SNDRV_PCM_FMTBIT_S24_3BE, 2876 .formats = SNDRV_PCM_FMTBIT_S24_3BE,
2877 .channels = 2, 2877 .channels = 2,
2878 .iface = 4, 2878 .iface = 4,
2879 .altsetting = 2, 2879 .altsetting = 2,
2880 .altset_idx = 1, 2880 .altset_idx = 1,
2881 .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE, 2881 .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2882 .endpoint = 0x85, 2882 .endpoint = 0x85,
2883 .ep_attr = USB_ENDPOINT_SYNC_SYNC, 2883 .ep_attr = USB_ENDPOINT_SYNC_SYNC,
2884 .rates = SNDRV_PCM_RATE_48000, 2884 .rates = SNDRV_PCM_RATE_48000,
2885 .rate_min = 48000, 2885 .rate_min = 48000,
2886 .rate_max = 48000, 2886 .rate_max = 48000,
2887 .nr_rates = 1, 2887 .nr_rates = 1,
2888 .rate_table = (unsigned int[]) { 2888 .rate_table = (unsigned int[]) {
2889 48000 2889 48000
2890 } 2890 }
2891 } 2891 }
2892 }, 2892 },
2893 { 2893 {
2894 .ifnum = 5, 2894 .ifnum = 5,
2895 .type = QUIRK_IGNORE_INTERFACE 2895 .type = QUIRK_IGNORE_INTERFACE
2896 }, 2896 },
2897 { 2897 {
2898 .ifnum = 6, 2898 .ifnum = 6,
2899 .type = QUIRK_MIDI_MIDIMAN, 2899 .type = QUIRK_MIDI_MIDIMAN,
2900 .data = &(const struct snd_usb_midi_endpoint_info) { 2900 .data = &(const struct snd_usb_midi_endpoint_info) {
2901 .out_ep = 0x02, 2901 .out_ep = 0x02,
2902 .out_cables = 0x0001, 2902 .out_cables = 0x0001,
2903 .in_ep = 0x81, 2903 .in_ep = 0x81,
2904 .in_interval = 0x01, 2904 .in_interval = 0x01,
2905 .in_cables = 0x0001 2905 .in_cables = 0x0001
2906 } 2906 }
2907 }, 2907 },
2908 { 2908 {
2909 .ifnum = -1 2909 .ifnum = -1
2910 } 2910 }
2911 } 2911 }
2912 } 2912 }
2913 }, 2913 },
2914 { 2914 {
2915 /* Tascam US122 MKII - playback-only support */ 2915 /* Tascam US122 MKII - playback-only support */
2916 .match_flags = USB_DEVICE_ID_MATCH_DEVICE, 2916 .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
2917 .idVendor = 0x0644, 2917 .idVendor = 0x0644,
2918 .idProduct = 0x8021, 2918 .idProduct = 0x8021,
2919 .bInterfaceClass = USB_CLASS_AUDIO, 2919 .bInterfaceClass = USB_CLASS_AUDIO,
2920 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) { 2920 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2921 .vendor_name = "TASCAM", 2921 .vendor_name = "TASCAM",
2922 .product_name = "US122 MKII", 2922 .product_name = "US122 MKII",
2923 .ifnum = QUIRK_ANY_INTERFACE, 2923 .ifnum = QUIRK_ANY_INTERFACE,
2924 .type = QUIRK_COMPOSITE, 2924 .type = QUIRK_COMPOSITE,
2925 .data = (const struct snd_usb_audio_quirk[]) { 2925 .data = (const struct snd_usb_audio_quirk[]) {
2926 { 2926 {
2927 .ifnum = 0, 2927 .ifnum = 0,
2928 .type = QUIRK_IGNORE_INTERFACE 2928 .type = QUIRK_IGNORE_INTERFACE
2929 }, 2929 },
2930 { 2930 {
2931 .ifnum = 1, 2931 .ifnum = 1,
2932 .type = QUIRK_AUDIO_FIXED_ENDPOINT, 2932 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2933 .data = &(const struct audioformat) { 2933 .data = &(const struct audioformat) {
2934 .formats = SNDRV_PCM_FMTBIT_S24_3LE, 2934 .formats = SNDRV_PCM_FMTBIT_S24_3LE,
2935 .channels = 2, 2935 .channels = 2,
2936 .iface = 1, 2936 .iface = 1,
2937 .altsetting = 1, 2937 .altsetting = 1,
2938 .altset_idx = 1, 2938 .altset_idx = 1,
2939 .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE, 2939 .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2940 .endpoint = 0x02, 2940 .endpoint = 0x02,
2941 .ep_attr = USB_ENDPOINT_XFER_ISOC, 2941 .ep_attr = USB_ENDPOINT_XFER_ISOC,
2942 .rates = SNDRV_PCM_RATE_44100 | 2942 .rates = SNDRV_PCM_RATE_44100 |
2943 SNDRV_PCM_RATE_48000 | 2943 SNDRV_PCM_RATE_48000 |
2944 SNDRV_PCM_RATE_88200 | 2944 SNDRV_PCM_RATE_88200 |
2945 SNDRV_PCM_RATE_96000, 2945 SNDRV_PCM_RATE_96000,
2946 .rate_min = 44100, 2946 .rate_min = 44100,
2947 .rate_max = 96000, 2947 .rate_max = 96000,
2948 .nr_rates = 4, 2948 .nr_rates = 4,
2949 .rate_table = (unsigned int[]) { 2949 .rate_table = (unsigned int[]) {
2950 44100, 48000, 88200, 96000 2950 44100, 48000, 88200, 96000
2951 } 2951 }
2952 } 2952 }
2953 }, 2953 },
2954 { 2954 {
2955 .ifnum = -1 2955 .ifnum = -1
2956 } 2956 }
2957 } 2957 }
2958 } 2958 }
2959 }, 2959 },
2960 2960
2961 /* Microsoft XboxLive Headset/Xbox Communicator */ 2961 /* Microsoft XboxLive Headset/Xbox Communicator */
2962 { 2962 {
2963 USB_DEVICE(0x045e, 0x0283), 2963 USB_DEVICE(0x045e, 0x0283),
2964 .bInterfaceClass = USB_CLASS_PER_INTERFACE, 2964 .bInterfaceClass = USB_CLASS_PER_INTERFACE,
2965 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) { 2965 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2966 .vendor_name = "Microsoft", 2966 .vendor_name = "Microsoft",
2967 .product_name = "XboxLive Headset/Xbox Communicator", 2967 .product_name = "XboxLive Headset/Xbox Communicator",
2968 .ifnum = QUIRK_ANY_INTERFACE, 2968 .ifnum = QUIRK_ANY_INTERFACE,
2969 .type = QUIRK_COMPOSITE, 2969 .type = QUIRK_COMPOSITE,
2970 .data = &(const struct snd_usb_audio_quirk[]) { 2970 .data = &(const struct snd_usb_audio_quirk[]) {
2971 { 2971 {
2972 /* playback */ 2972 /* playback */
2973 .ifnum = 0, 2973 .ifnum = 0,
2974 .type = QUIRK_AUDIO_FIXED_ENDPOINT, 2974 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2975 .data = &(const struct audioformat) { 2975 .data = &(const struct audioformat) {
2976 .formats = SNDRV_PCM_FMTBIT_S16_LE, 2976 .formats = SNDRV_PCM_FMTBIT_S16_LE,
2977 .channels = 1, 2977 .channels = 1,
2978 .iface = 0, 2978 .iface = 0,
2979 .altsetting = 0, 2979 .altsetting = 0,
2980 .altset_idx = 0, 2980 .altset_idx = 0,
2981 .attributes = 0, 2981 .attributes = 0,
2982 .endpoint = 0x04, 2982 .endpoint = 0x04,
2983 .ep_attr = 0x05, 2983 .ep_attr = 0x05,
2984 .rates = SNDRV_PCM_RATE_CONTINUOUS, 2984 .rates = SNDRV_PCM_RATE_CONTINUOUS,
2985 .rate_min = 22050, 2985 .rate_min = 22050,
2986 .rate_max = 22050 2986 .rate_max = 22050
2987 } 2987 }
2988 }, 2988 },
2989 { 2989 {
2990 /* capture */ 2990 /* capture */
2991 .ifnum = 1, 2991 .ifnum = 1,
2992 .type = QUIRK_AUDIO_FIXED_ENDPOINT, 2992 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2993 .data = &(const struct audioformat) { 2993 .data = &(const struct audioformat) {
2994 .formats = SNDRV_PCM_FMTBIT_S16_LE, 2994 .formats = SNDRV_PCM_FMTBIT_S16_LE,
2995 .channels = 1, 2995 .channels = 1,
2996 .iface = 1, 2996 .iface = 1,
2997 .altsetting = 0, 2997 .altsetting = 0,
2998 .altset_idx = 0, 2998 .altset_idx = 0,
2999 .attributes = 0, 2999 .attributes = 0,
3000 .endpoint = 0x85, 3000 .endpoint = 0x85,
3001 .ep_attr = 0x05, 3001 .ep_attr = 0x05,
3002 .rates = SNDRV_PCM_RATE_CONTINUOUS, 3002 .rates = SNDRV_PCM_RATE_CONTINUOUS,
3003 .rate_min = 16000, 3003 .rate_min = 16000,
3004 .rate_max = 16000 3004 .rate_max = 16000
3005 } 3005 }
3006 }, 3006 },
3007 { 3007 {
3008 .ifnum = -1 3008 .ifnum = -1
3009 } 3009 }
3010 } 3010 }
3011 } 3011 }
3012 }, 3012 },
3013 3013
3014 /* Reloop Play */ 3014 /* Reloop Play */
3015 { 3015 {
3016 USB_DEVICE(0x200c, 0x100b), 3016 USB_DEVICE(0x200c, 0x100b),
3017 .bInterfaceClass = USB_CLASS_PER_INTERFACE, 3017 .bInterfaceClass = USB_CLASS_PER_INTERFACE,
3018 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) { 3018 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3019 .ifnum = QUIRK_ANY_INTERFACE, 3019 .ifnum = QUIRK_ANY_INTERFACE,
3020 .type = QUIRK_COMPOSITE, 3020 .type = QUIRK_COMPOSITE,
3021 .data = &(const struct snd_usb_audio_quirk[]) { 3021 .data = &(const struct snd_usb_audio_quirk[]) {
3022 { 3022 {
3023 .ifnum = 0, 3023 .ifnum = 0,
3024 .type = QUIRK_AUDIO_STANDARD_MIXER, 3024 .type = QUIRK_AUDIO_STANDARD_MIXER,
3025 }, 3025 },
3026 { 3026 {
3027 .ifnum = 1, 3027 .ifnum = 1,
3028 .type = QUIRK_AUDIO_FIXED_ENDPOINT, 3028 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3029 .data = &(const struct audioformat) { 3029 .data = &(const struct audioformat) {
3030 .formats = SNDRV_PCM_FMTBIT_S24_3LE, 3030 .formats = SNDRV_PCM_FMTBIT_S24_3LE,
3031 .channels = 4, 3031 .channels = 4,
3032 .iface = 1, 3032 .iface = 1,
3033 .altsetting = 1, 3033 .altsetting = 1,
3034 .altset_idx = 1, 3034 .altset_idx = 1,
3035 .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE, 3035 .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
3036 .endpoint = 0x01, 3036 .endpoint = 0x01,
3037 .ep_attr = USB_ENDPOINT_SYNC_ADAPTIVE, 3037 .ep_attr = USB_ENDPOINT_SYNC_ADAPTIVE,
3038 .rates = SNDRV_PCM_RATE_44100 | 3038 .rates = SNDRV_PCM_RATE_44100 |
3039 SNDRV_PCM_RATE_48000, 3039 SNDRV_PCM_RATE_48000,
3040 .rate_min = 44100, 3040 .rate_min = 44100,
3041 .rate_max = 48000, 3041 .rate_max = 48000,
3042 .nr_rates = 2, 3042 .nr_rates = 2,
3043 .rate_table = (unsigned int[]) { 3043 .rate_table = (unsigned int[]) {
3044 44100, 48000 3044 44100, 48000
3045 } 3045 }
3046 } 3046 }
3047 }, 3047 },
3048 { 3048 {
3049 .ifnum = -1 3049 .ifnum = -1
3050 } 3050 }
3051 } 3051 }
3052 } 3052 }
3053 }, 3053 },
3054 3054
3055 { 3055 {
3056 /* 3056 /*
3057 * Focusrite Scarlett 18i6 3057 * Focusrite Scarlett 18i6
3058 * 3058 *
3059 * Avoid mixer creation, which otherwise fails because some of 3059 * Avoid mixer creation, which otherwise fails because some of
3060 * the interface descriptor subtypes for interface 0 are 3060 * the interface descriptor subtypes for interface 0 are
3061 * unknown. That should be fixed or worked-around but this at 3061 * unknown. That should be fixed or worked-around but this at
3062 * least allows the device to be used successfully with a DAW 3062 * least allows the device to be used successfully with a DAW
3063 * and an external mixer. See comments below about other 3063 * and an external mixer. See comments below about other
3064 * ignored interfaces. 3064 * ignored interfaces.
3065 */ 3065 */
3066 USB_DEVICE(0x1235, 0x8004), 3066 USB_DEVICE(0x1235, 0x8004),
3067 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 3067 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
3068 .vendor_name = "Focusrite", 3068 .vendor_name = "Focusrite",
3069 .product_name = "Scarlett 18i6", 3069 .product_name = "Scarlett 18i6",
3070 .ifnum = QUIRK_ANY_INTERFACE, 3070 .ifnum = QUIRK_ANY_INTERFACE,
3071 .type = QUIRK_COMPOSITE, 3071 .type = QUIRK_COMPOSITE,
3072 .data = & (const struct snd_usb_audio_quirk[]) { 3072 .data = & (const struct snd_usb_audio_quirk[]) {
3073 { 3073 {
3074 /* InterfaceSubClass 1 (Control Device) */ 3074 /* InterfaceSubClass 1 (Control Device) */
3075 .ifnum = 0, 3075 .ifnum = 0,
3076 .type = QUIRK_IGNORE_INTERFACE 3076 .type = QUIRK_IGNORE_INTERFACE
3077 }, 3077 },
3078 { 3078 {
3079 .ifnum = 1, 3079 .ifnum = 1,
3080 .type = QUIRK_AUDIO_STANDARD_INTERFACE 3080 .type = QUIRK_AUDIO_STANDARD_INTERFACE
3081 }, 3081 },
3082 { 3082 {
3083 .ifnum = 2, 3083 .ifnum = 2,
3084 .type = QUIRK_AUDIO_STANDARD_INTERFACE 3084 .type = QUIRK_AUDIO_STANDARD_INTERFACE
3085 }, 3085 },
3086 { 3086 {
3087 /* InterfaceSubClass 1 (Control Device) */ 3087 /* InterfaceSubClass 1 (Control Device) */
3088 .ifnum = 3, 3088 .ifnum = 3,
3089 .type = QUIRK_IGNORE_INTERFACE 3089 .type = QUIRK_IGNORE_INTERFACE
3090 }, 3090 },
3091 { 3091 {
3092 .ifnum = 4, 3092 .ifnum = 4,
3093 .type = QUIRK_MIDI_STANDARD_INTERFACE 3093 .type = QUIRK_MIDI_STANDARD_INTERFACE
3094 }, 3094 },
3095 { 3095 {
3096 /* InterfaceSubClass 1 (Device Firmware Update) */ 3096 /* InterfaceSubClass 1 (Device Firmware Update) */
3097 .ifnum = 5, 3097 .ifnum = 5,
3098 .type = QUIRK_IGNORE_INTERFACE 3098 .type = QUIRK_IGNORE_INTERFACE
3099 }, 3099 },
3100 { 3100 {
3101 .ifnum = -1 3101 .ifnum = -1
3102 } 3102 }
3103 } 3103 }
3104 } 3104 }
3105 }, 3105 },
3106 3106
3107 { 3107 {
3108 /* 3108 /*
3109 * Some USB MIDI devices don't have an audio control interface, 3109 * Some USB MIDI devices don't have an audio control interface,
3110 * so we have to grab MIDI streaming interfaces here. 3110 * so we have to grab MIDI streaming interfaces here.
3111 */ 3111 */
3112 .match_flags = USB_DEVICE_ID_MATCH_INT_CLASS | 3112 .match_flags = USB_DEVICE_ID_MATCH_INT_CLASS |
3113 USB_DEVICE_ID_MATCH_INT_SUBCLASS, 3113 USB_DEVICE_ID_MATCH_INT_SUBCLASS,
3114 .bInterfaceClass = USB_CLASS_AUDIO, 3114 .bInterfaceClass = USB_CLASS_AUDIO,
3115 .bInterfaceSubClass = USB_SUBCLASS_MIDISTREAMING, 3115 .bInterfaceSubClass = USB_SUBCLASS_MIDISTREAMING,
3116 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 3116 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
3117 .ifnum = QUIRK_ANY_INTERFACE, 3117 .ifnum = QUIRK_ANY_INTERFACE,
3118 .type = QUIRK_MIDI_STANDARD_INTERFACE 3118 .type = QUIRK_MIDI_STANDARD_INTERFACE
3119 } 3119 }
3120 }, 3120 },
3121 3121
3122 {
3123 /*
3124 * The original product_name is "USB Sound Device", however this name
3125 * is also used by the CM106 based cards, so make it unique.
3126 */
3127 USB_DEVICE(0x0d8c, 0x0103),
3128 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3129 .product_name = "Audio Advantage MicroII",
3130 .ifnum = QUIRK_NO_INTERFACE
3131 }
3132 },
3133
3122 #undef USB_DEVICE_VENDOR_SPEC 3134 #undef USB_DEVICE_VENDOR_SPEC
3123 3135