Linux Audio

Check our new training course

Loading...
v5.9
   1/* SPDX-License-Identifier: GPL-2.0-or-later */
   2/*
   3 * ALSA USB Audio Driver
   4 *
   5 * Copyright (c) 2002 by Takashi Iwai <tiwai@suse.de>,
   6 *                       Clemens Ladisch <clemens@ladisch.de>
   7 */
   8
   9/*
  10 * The contents of this file are part of the driver's id_table.
  11 *
  12 * In a perfect world, this file would be empty.
  13 */
  14
  15/*
  16 * Use this for devices where other interfaces are standard compliant,
  17 * to prevent the quirk being applied to those interfaces. (To work with
  18 * hotplugging, bDeviceClass must be set to USB_CLASS_PER_INTERFACE.)
  19 */
  20#define USB_DEVICE_VENDOR_SPEC(vend, prod) \
  21	.match_flags = USB_DEVICE_ID_MATCH_VENDOR | \
  22		       USB_DEVICE_ID_MATCH_PRODUCT | \
  23		       USB_DEVICE_ID_MATCH_INT_CLASS, \
  24	.idVendor = vend, \
  25	.idProduct = prod, \
  26	.bInterfaceClass = USB_CLASS_VENDOR_SPEC
  27
  28#define QUIRK_RENAME_DEVICE(_vendor, _device)				\
  29	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { \
  30		.vendor_name = _vendor,					\
  31		.product_name = _device,				\
  32		.ifnum = QUIRK_NO_INTERFACE				\
  33	}
  34
  35#define QUIRK_DEVICE_PROFILE(_vendor, _device, _profile)		\
  36	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { \
  37		.vendor_name = _vendor,					\
  38		.product_name = _device,				\
  39		.profile_name = _profile,				\
  40		.ifnum = QUIRK_NO_INTERFACE				\
  41	}
  42
  43/* HP Thunderbolt Dock Audio Headset */
  44{
  45	USB_DEVICE(0x03f0, 0x0269),
  46	QUIRK_DEVICE_PROFILE("HP", "Thunderbolt Dock Audio Headset",
  47			     "HP-Thunderbolt-Dock-Audio-Headset"),
  48},
  49/* HP Thunderbolt Dock Audio Module */
  50{
  51	USB_DEVICE(0x03f0, 0x0567),
  52	QUIRK_DEVICE_PROFILE("HP", "Thunderbolt Dock Audio Module",
  53			     "HP-Thunderbolt-Dock-Audio-Module"),
  54},
  55/* FTDI devices */
  56{
  57	USB_DEVICE(0x0403, 0xb8d8),
  58	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
  59		/* .vendor_name = "STARR LABS", */
  60		/* .product_name = "Starr Labs MIDI USB device", */
  61		.ifnum = 0,
  62		.type = QUIRK_MIDI_FTDI
  63	}
  64},
  65
  66{
  67	/* Creative BT-D1 */
  68	USB_DEVICE(0x041e, 0x0005),
  69	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
  70		.ifnum = 1,
  71		.type = QUIRK_AUDIO_FIXED_ENDPOINT,
  72		.data = &(const struct audioformat) {
  73			.formats = SNDRV_PCM_FMTBIT_S16_LE,
  74			.channels = 2,
  75			.iface = 1,
  76			.altsetting = 1,
  77			.altset_idx = 1,
  78			.endpoint = 0x03,
  79			.ep_attr = USB_ENDPOINT_XFER_ISOC,
  80			.attributes = 0,
  81			.rates = SNDRV_PCM_RATE_CONTINUOUS,
  82			.rate_min = 48000,
  83			.rate_max = 48000,
  84		}
  85	}
  86},
  87
  88/* Creative/E-Mu devices */
  89{
  90	USB_DEVICE(0x041e, 0x3010),
  91	QUIRK_RENAME_DEVICE("Creative Labs", "Sound Blaster MP3+")
  92},
  93/* Creative/Toshiba Multimedia Center SB-0500 */
  94{
  95	USB_DEVICE(0x041e, 0x3048),
  96	QUIRK_RENAME_DEVICE("Toshiba", "SB-0500")
  97},
  98{
  99	/* E-Mu 0202 USB */
 100	.match_flags = USB_DEVICE_ID_MATCH_DEVICE,
 101	.idVendor = 0x041e,
 102	.idProduct = 0x3f02,
 103	.bInterfaceClass = USB_CLASS_AUDIO,
 104},
 105{
 106	/* E-Mu 0404 USB */
 107	.match_flags = USB_DEVICE_ID_MATCH_DEVICE,
 108	.idVendor = 0x041e,
 109	.idProduct = 0x3f04,
 110	.bInterfaceClass = USB_CLASS_AUDIO,
 111},
 112{
 113	/* E-Mu Tracker Pre */
 114	.match_flags = USB_DEVICE_ID_MATCH_DEVICE,
 115	.idVendor = 0x041e,
 116	.idProduct = 0x3f0a,
 117	.bInterfaceClass = USB_CLASS_AUDIO,
 118},
 119{
 120	/* E-Mu 0204 USB */
 121	.match_flags = USB_DEVICE_ID_MATCH_DEVICE,
 122	.idVendor = 0x041e,
 123	.idProduct = 0x3f19,
 124	.bInterfaceClass = USB_CLASS_AUDIO,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 125},
 126
 127/*
 128 * HP Wireless Audio
 129 * When not ignored, causes instability issues for some users, forcing them to
 130 * skip the entire module.
 131 */
 132{
 133	USB_DEVICE(0x0424, 0xb832),
 134	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
 135		.vendor_name = "Standard Microsystems Corp.",
 136		.product_name = "HP Wireless Audio",
 137		.ifnum = QUIRK_ANY_INTERFACE,
 138		.type = QUIRK_COMPOSITE,
 139		.data = (const struct snd_usb_audio_quirk[]) {
 140			/* Mixer */
 141			{
 142				.ifnum = 0,
 143				.type = QUIRK_IGNORE_INTERFACE,
 144			},
 145			/* Playback */
 146			{
 147				.ifnum = 1,
 148				.type = QUIRK_IGNORE_INTERFACE,
 149			},
 150			/* Capture */
 151			{
 152				.ifnum = 2,
 153				.type = QUIRK_IGNORE_INTERFACE,
 154			},
 155			/* HID Device, .ifnum = 3 */
 156			{
 157				.ifnum = -1,
 158			}
 159		}
 160	}
 161},
 162
 163/*
 164 * Logitech QuickCam: bDeviceClass is vendor-specific, so generic interface
 165 * class matches do not take effect without an explicit ID match.
 166 */
 167{
 168	.match_flags = USB_DEVICE_ID_MATCH_DEVICE |
 169		       USB_DEVICE_ID_MATCH_INT_CLASS |
 170		       USB_DEVICE_ID_MATCH_INT_SUBCLASS,
 171	.idVendor = 0x046d,
 172	.idProduct = 0x0850,
 173	.bInterfaceClass = USB_CLASS_AUDIO,
 174	.bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL
 175},
 176{
 177	.match_flags = USB_DEVICE_ID_MATCH_DEVICE |
 178		       USB_DEVICE_ID_MATCH_INT_CLASS |
 179		       USB_DEVICE_ID_MATCH_INT_SUBCLASS,
 180	.idVendor = 0x046d,
 181	.idProduct = 0x08ae,
 182	.bInterfaceClass = USB_CLASS_AUDIO,
 183	.bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL
 184},
 185{
 186	.match_flags = USB_DEVICE_ID_MATCH_DEVICE |
 187		       USB_DEVICE_ID_MATCH_INT_CLASS |
 188		       USB_DEVICE_ID_MATCH_INT_SUBCLASS,
 189	.idVendor = 0x046d,
 190	.idProduct = 0x08c6,
 191	.bInterfaceClass = USB_CLASS_AUDIO,
 192	.bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL
 193},
 194{
 195	.match_flags = USB_DEVICE_ID_MATCH_DEVICE |
 196		       USB_DEVICE_ID_MATCH_INT_CLASS |
 197		       USB_DEVICE_ID_MATCH_INT_SUBCLASS,
 198	.idVendor = 0x046d,
 199	.idProduct = 0x08f0,
 200	.bInterfaceClass = USB_CLASS_AUDIO,
 201	.bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL
 202},
 203{
 204	.match_flags = USB_DEVICE_ID_MATCH_DEVICE |
 205		       USB_DEVICE_ID_MATCH_INT_CLASS |
 206		       USB_DEVICE_ID_MATCH_INT_SUBCLASS,
 207	.idVendor = 0x046d,
 208	.idProduct = 0x08f5,
 209	.bInterfaceClass = USB_CLASS_AUDIO,
 210	.bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL
 211},
 212{
 213	.match_flags = USB_DEVICE_ID_MATCH_DEVICE |
 214		       USB_DEVICE_ID_MATCH_INT_CLASS |
 215		       USB_DEVICE_ID_MATCH_INT_SUBCLASS,
 216	.idVendor = 0x046d,
 217	.idProduct = 0x08f6,
 218	.bInterfaceClass = USB_CLASS_AUDIO,
 219	.bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL
 220},
 221{
 222	.match_flags = USB_DEVICE_ID_MATCH_DEVICE |
 223		       USB_DEVICE_ID_MATCH_INT_CLASS |
 224		       USB_DEVICE_ID_MATCH_INT_SUBCLASS,
 225	.idVendor = 0x046d,
 226	.idProduct = 0x0990,
 227	.bInterfaceClass = USB_CLASS_AUDIO,
 228	.bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
 229	QUIRK_RENAME_DEVICE("Logitech, Inc.", "QuickCam Pro 9000")
 230},
 231
 232/*
 233 * Yamaha devices
 234 */
 235
 236#define YAMAHA_DEVICE(id, name) { \
 237	USB_DEVICE(0x0499, id), \
 238	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { \
 239		.vendor_name = "Yamaha", \
 240		.product_name = name, \
 241		.ifnum = QUIRK_ANY_INTERFACE, \
 242		.type = QUIRK_MIDI_YAMAHA \
 243	} \
 244}
 245#define YAMAHA_INTERFACE(id, intf, name) { \
 246	USB_DEVICE_VENDOR_SPEC(0x0499, id), \
 247	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { \
 248		.vendor_name = "Yamaha", \
 249		.product_name = name, \
 250		.ifnum = intf, \
 251		.type = QUIRK_MIDI_YAMAHA \
 252	} \
 253}
 254YAMAHA_DEVICE(0x1000, "UX256"),
 255YAMAHA_DEVICE(0x1001, "MU1000"),
 256YAMAHA_DEVICE(0x1002, "MU2000"),
 257YAMAHA_DEVICE(0x1003, "MU500"),
 258YAMAHA_INTERFACE(0x1004, 3, "UW500"),
 259YAMAHA_DEVICE(0x1005, "MOTIF6"),
 260YAMAHA_DEVICE(0x1006, "MOTIF7"),
 261YAMAHA_DEVICE(0x1007, "MOTIF8"),
 262YAMAHA_DEVICE(0x1008, "UX96"),
 263YAMAHA_DEVICE(0x1009, "UX16"),
 264YAMAHA_INTERFACE(0x100a, 3, "EOS BX"),
 265YAMAHA_DEVICE(0x100c, "UC-MX"),
 266YAMAHA_DEVICE(0x100d, "UC-KX"),
 267YAMAHA_DEVICE(0x100e, "S08"),
 268YAMAHA_DEVICE(0x100f, "CLP-150"),
 269YAMAHA_DEVICE(0x1010, "CLP-170"),
 270YAMAHA_DEVICE(0x1011, "P-250"),
 271YAMAHA_DEVICE(0x1012, "TYROS"),
 272YAMAHA_DEVICE(0x1013, "PF-500"),
 273YAMAHA_DEVICE(0x1014, "S90"),
 274YAMAHA_DEVICE(0x1015, "MOTIF-R"),
 275YAMAHA_DEVICE(0x1016, "MDP-5"),
 276YAMAHA_DEVICE(0x1017, "CVP-204"),
 277YAMAHA_DEVICE(0x1018, "CVP-206"),
 278YAMAHA_DEVICE(0x1019, "CVP-208"),
 279YAMAHA_DEVICE(0x101a, "CVP-210"),
 280YAMAHA_DEVICE(0x101b, "PSR-1100"),
 281YAMAHA_DEVICE(0x101c, "PSR-2100"),
 282YAMAHA_DEVICE(0x101d, "CLP-175"),
 283YAMAHA_DEVICE(0x101e, "PSR-K1"),
 284YAMAHA_DEVICE(0x101f, "EZ-J24"),
 285YAMAHA_DEVICE(0x1020, "EZ-250i"),
 286YAMAHA_DEVICE(0x1021, "MOTIF ES 6"),
 287YAMAHA_DEVICE(0x1022, "MOTIF ES 7"),
 288YAMAHA_DEVICE(0x1023, "MOTIF ES 8"),
 289YAMAHA_DEVICE(0x1024, "CVP-301"),
 290YAMAHA_DEVICE(0x1025, "CVP-303"),
 291YAMAHA_DEVICE(0x1026, "CVP-305"),
 292YAMAHA_DEVICE(0x1027, "CVP-307"),
 293YAMAHA_DEVICE(0x1028, "CVP-309"),
 294YAMAHA_DEVICE(0x1029, "CVP-309GP"),
 295YAMAHA_DEVICE(0x102a, "PSR-1500"),
 296YAMAHA_DEVICE(0x102b, "PSR-3000"),
 297YAMAHA_DEVICE(0x102e, "ELS-01/01C"),
 298YAMAHA_DEVICE(0x1030, "PSR-295/293"),
 299YAMAHA_DEVICE(0x1031, "DGX-205/203"),
 300YAMAHA_DEVICE(0x1032, "DGX-305"),
 301YAMAHA_DEVICE(0x1033, "DGX-505"),
 302YAMAHA_DEVICE(0x1034, NULL),
 303YAMAHA_DEVICE(0x1035, NULL),
 304YAMAHA_DEVICE(0x1036, NULL),
 305YAMAHA_DEVICE(0x1037, NULL),
 306YAMAHA_DEVICE(0x1038, NULL),
 307YAMAHA_DEVICE(0x1039, NULL),
 308YAMAHA_DEVICE(0x103a, NULL),
 309YAMAHA_DEVICE(0x103b, NULL),
 310YAMAHA_DEVICE(0x103c, NULL),
 311YAMAHA_DEVICE(0x103d, NULL),
 312YAMAHA_DEVICE(0x103e, NULL),
 313YAMAHA_DEVICE(0x103f, NULL),
 314YAMAHA_DEVICE(0x1040, NULL),
 315YAMAHA_DEVICE(0x1041, NULL),
 316YAMAHA_DEVICE(0x1042, NULL),
 317YAMAHA_DEVICE(0x1043, NULL),
 318YAMAHA_DEVICE(0x1044, NULL),
 319YAMAHA_DEVICE(0x1045, NULL),
 320YAMAHA_INTERFACE(0x104e, 0, NULL),
 321YAMAHA_DEVICE(0x104f, NULL),
 322YAMAHA_DEVICE(0x1050, NULL),
 323YAMAHA_DEVICE(0x1051, NULL),
 324YAMAHA_DEVICE(0x1052, NULL),
 325YAMAHA_INTERFACE(0x1053, 0, NULL),
 326YAMAHA_INTERFACE(0x1054, 0, NULL),
 327YAMAHA_DEVICE(0x1055, NULL),
 328YAMAHA_DEVICE(0x1056, NULL),
 329YAMAHA_DEVICE(0x1057, NULL),
 330YAMAHA_DEVICE(0x1058, NULL),
 331YAMAHA_DEVICE(0x1059, NULL),
 332YAMAHA_DEVICE(0x105a, NULL),
 333YAMAHA_DEVICE(0x105b, NULL),
 334YAMAHA_DEVICE(0x105c, NULL),
 335YAMAHA_DEVICE(0x105d, NULL),
 336{
 337	USB_DEVICE(0x0499, 0x1503),
 338	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 339		/* .vendor_name = "Yamaha", */
 340		/* .product_name = "MOX6/MOX8", */
 341		.ifnum = QUIRK_ANY_INTERFACE,
 342		.type = QUIRK_COMPOSITE,
 343		.data = (const struct snd_usb_audio_quirk[]) {
 344			{
 345				.ifnum = 1,
 346				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 347			},
 348			{
 349				.ifnum = 2,
 350				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 351			},
 352			{
 353				.ifnum = 3,
 354				.type = QUIRK_MIDI_YAMAHA
 355			},
 356			{
 357				.ifnum = -1
 358			}
 359		}
 360	}
 361},
 362{
 363	USB_DEVICE(0x0499, 0x1507),
 364	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 365		/* .vendor_name = "Yamaha", */
 366		/* .product_name = "THR10", */
 367		.ifnum = QUIRK_ANY_INTERFACE,
 368		.type = QUIRK_COMPOSITE,
 369		.data = (const struct snd_usb_audio_quirk[]) {
 370			{
 371				.ifnum = 1,
 372				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 373			},
 374			{
 375				.ifnum = 2,
 376				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 377			},
 378			{
 379				.ifnum = 3,
 380				.type = QUIRK_MIDI_YAMAHA
 381			},
 382			{
 383				.ifnum = -1
 384			}
 385		}
 386	}
 387},
 388{
 389	USB_DEVICE(0x0499, 0x1509),
 390	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 391		/* .vendor_name = "Yamaha", */
 392		/* .product_name = "Steinberg UR22", */
 393		.ifnum = QUIRK_ANY_INTERFACE,
 394		.type = QUIRK_COMPOSITE,
 395		.data = (const struct snd_usb_audio_quirk[]) {
 396			{
 397				.ifnum = 1,
 398				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 399			},
 400			{
 401				.ifnum = 2,
 402				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 403			},
 404			{
 405				.ifnum = 3,
 406				.type = QUIRK_MIDI_YAMAHA
 407			},
 408			{
 409				.ifnum = 4,
 410				.type = QUIRK_IGNORE_INTERFACE
 411			},
 412			{
 413				.ifnum = -1
 414			}
 415		}
 416	}
 417},
 418{
 419	USB_DEVICE(0x0499, 0x150a),
 420	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 421		/* .vendor_name = "Yamaha", */
 422		/* .product_name = "THR5A", */
 423		.ifnum = QUIRK_ANY_INTERFACE,
 424		.type = QUIRK_COMPOSITE,
 425		.data = (const struct snd_usb_audio_quirk[]) {
 426			{
 427				.ifnum = 1,
 428				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 429			},
 430			{
 431				.ifnum = 2,
 432				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 433			},
 434			{
 435				.ifnum = 3,
 436				.type = QUIRK_MIDI_YAMAHA
 437			},
 438			{
 439				.ifnum = -1
 440			}
 441		}
 442	}
 443},
 444{
 445	USB_DEVICE(0x0499, 0x150c),
 446	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 447		/* .vendor_name = "Yamaha", */
 448		/* .product_name = "THR10C", */
 449		.ifnum = QUIRK_ANY_INTERFACE,
 450		.type = QUIRK_COMPOSITE,
 451		.data = (const struct snd_usb_audio_quirk[]) {
 452			{
 453				.ifnum = 1,
 454				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 455			},
 456			{
 457				.ifnum = 2,
 458				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 459			},
 460			{
 461				.ifnum = 3,
 462				.type = QUIRK_MIDI_YAMAHA
 463			},
 464			{
 465				.ifnum = -1
 466			}
 467		}
 468	}
 469},
 470YAMAHA_DEVICE(0x2000, "DGP-7"),
 471YAMAHA_DEVICE(0x2001, "DGP-5"),
 472YAMAHA_DEVICE(0x2002, NULL),
 473YAMAHA_DEVICE(0x2003, NULL),
 474YAMAHA_DEVICE(0x5000, "CS1D"),
 475YAMAHA_DEVICE(0x5001, "DSP1D"),
 476YAMAHA_DEVICE(0x5002, "DME32"),
 477YAMAHA_DEVICE(0x5003, "DM2000"),
 478YAMAHA_DEVICE(0x5004, "02R96"),
 479YAMAHA_DEVICE(0x5005, "ACU16-C"),
 480YAMAHA_DEVICE(0x5006, "NHB32-C"),
 481YAMAHA_DEVICE(0x5007, "DM1000"),
 482YAMAHA_DEVICE(0x5008, "01V96"),
 483YAMAHA_DEVICE(0x5009, "SPX2000"),
 484YAMAHA_DEVICE(0x500a, "PM5D"),
 485YAMAHA_DEVICE(0x500b, "DME64N"),
 486YAMAHA_DEVICE(0x500c, "DME24N"),
 487YAMAHA_DEVICE(0x500d, NULL),
 488YAMAHA_DEVICE(0x500e, NULL),
 489YAMAHA_DEVICE(0x500f, NULL),
 490YAMAHA_DEVICE(0x7000, "DTX"),
 491YAMAHA_DEVICE(0x7010, "UB99"),
 492#undef YAMAHA_DEVICE
 493#undef YAMAHA_INTERFACE
 494/* this catches most recent vendor-specific Yamaha devices */
 495{
 496	.match_flags = USB_DEVICE_ID_MATCH_VENDOR |
 497	               USB_DEVICE_ID_MATCH_INT_CLASS,
 498	.idVendor = 0x0499,
 499	.bInterfaceClass = USB_CLASS_VENDOR_SPEC,
 500	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
 501		.ifnum = QUIRK_ANY_INTERFACE,
 502		.type = QUIRK_AUTODETECT
 503	}
 504},
 505
 506/*
 507 * Roland/RolandED/Edirol/BOSS devices
 508 */
 509{
 510	USB_DEVICE(0x0582, 0x0000),
 511	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 512		.vendor_name = "Roland",
 513		.product_name = "UA-100",
 514		.ifnum = QUIRK_ANY_INTERFACE,
 515		.type = QUIRK_COMPOSITE,
 516		.data = (const struct snd_usb_audio_quirk[]) {
 517			{
 518				.ifnum = 0,
 519				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
 520				.data = & (const struct audioformat) {
 521					.formats = SNDRV_PCM_FMTBIT_S16_LE,
 522					.channels = 4,
 523					.iface = 0,
 524					.altsetting = 1,
 525					.altset_idx = 1,
 526					.attributes = 0,
 527					.endpoint = 0x01,
 528					.ep_attr = 0x09,
 529					.rates = SNDRV_PCM_RATE_CONTINUOUS,
 530					.rate_min = 44100,
 531					.rate_max = 44100,
 532				}
 533			},
 534			{
 535				.ifnum = 1,
 536				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
 537				.data = & (const struct audioformat) {
 538					.formats = SNDRV_PCM_FMTBIT_S16_LE,
 539					.channels = 2,
 540					.iface = 1,
 541					.altsetting = 1,
 542					.altset_idx = 1,
 543					.attributes = UAC_EP_CS_ATTR_FILL_MAX,
 544					.endpoint = 0x81,
 545					.ep_attr = 0x05,
 546					.rates = SNDRV_PCM_RATE_CONTINUOUS,
 547					.rate_min = 44100,
 548					.rate_max = 44100,
 549				}
 550			},
 551			{
 552				.ifnum = 2,
 553				.type = QUIRK_MIDI_FIXED_ENDPOINT,
 554				.data = & (const struct snd_usb_midi_endpoint_info) {
 555					.out_cables = 0x0007,
 556					.in_cables  = 0x0007
 557				}
 558			},
 559			{
 560				.ifnum = -1
 561			}
 562		}
 563	}
 564},
 565{
 566	USB_DEVICE(0x0582, 0x0002),
 567	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 568		.vendor_name = "EDIROL",
 569		.product_name = "UM-4",
 570		.ifnum = QUIRK_ANY_INTERFACE,
 571		.type = QUIRK_COMPOSITE,
 572		.data = (const struct snd_usb_audio_quirk[]) {
 573			{
 574				.ifnum = 0,
 575				.type = QUIRK_IGNORE_INTERFACE
 576			},
 577			{
 578				.ifnum = 1,
 579				.type = QUIRK_IGNORE_INTERFACE
 580			},
 581			{
 582				.ifnum = 2,
 583				.type = QUIRK_MIDI_FIXED_ENDPOINT,
 584				.data = & (const struct snd_usb_midi_endpoint_info) {
 585					.out_cables = 0x000f,
 586					.in_cables  = 0x000f
 587				}
 588			},
 589			{
 590				.ifnum = -1
 591			}
 592		}
 593	}
 594},
 595{
 596	USB_DEVICE(0x0582, 0x0003),
 597	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 598		.vendor_name = "Roland",
 599		.product_name = "SC-8850",
 600		.ifnum = QUIRK_ANY_INTERFACE,
 601		.type = QUIRK_COMPOSITE,
 602		.data = (const struct snd_usb_audio_quirk[]) {
 603			{
 604				.ifnum = 0,
 605				.type = QUIRK_IGNORE_INTERFACE
 606			},
 607			{
 608				.ifnum = 1,
 609				.type = QUIRK_IGNORE_INTERFACE
 610			},
 611			{
 612				.ifnum = 2,
 613				.type = QUIRK_MIDI_FIXED_ENDPOINT,
 614				.data = & (const struct snd_usb_midi_endpoint_info) {
 615					.out_cables = 0x003f,
 616					.in_cables  = 0x003f
 617				}
 618			},
 619			{
 620				.ifnum = -1
 621			}
 622		}
 623	}
 624},
 625{
 626	USB_DEVICE(0x0582, 0x0004),
 627	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 628		.vendor_name = "Roland",
 629		.product_name = "U-8",
 630		.ifnum = QUIRK_ANY_INTERFACE,
 631		.type = QUIRK_COMPOSITE,
 632		.data = (const struct snd_usb_audio_quirk[]) {
 633			{
 634				.ifnum = 0,
 635				.type = QUIRK_IGNORE_INTERFACE
 636			},
 637			{
 638				.ifnum = 1,
 639				.type = QUIRK_IGNORE_INTERFACE
 640			},
 641			{
 642				.ifnum = 2,
 643				.type = QUIRK_MIDI_FIXED_ENDPOINT,
 644				.data = & (const struct snd_usb_midi_endpoint_info) {
 645					.out_cables = 0x0005,
 646					.in_cables  = 0x0005
 647				}
 648			},
 649			{
 650				.ifnum = -1
 651			}
 652		}
 653	}
 654},
 655{
 656	/* Has ID 0x0099 when not in "Advanced Driver" mode.
 657	 * The UM-2EX has only one input, but we cannot detect this. */
 658	USB_DEVICE(0x0582, 0x0005),
 659	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 660		.vendor_name = "EDIROL",
 661		.product_name = "UM-2",
 662		.ifnum = QUIRK_ANY_INTERFACE,
 663		.type = QUIRK_COMPOSITE,
 664		.data = (const struct snd_usb_audio_quirk[]) {
 665			{
 666				.ifnum = 0,
 667				.type = QUIRK_IGNORE_INTERFACE
 668			},
 669			{
 670				.ifnum = 1,
 671				.type = QUIRK_IGNORE_INTERFACE
 672			},
 673			{
 674				.ifnum = 2,
 675				.type = QUIRK_MIDI_FIXED_ENDPOINT,
 676				.data = & (const struct snd_usb_midi_endpoint_info) {
 677					.out_cables = 0x0003,
 678					.in_cables  = 0x0003
 679				}
 680			},
 681			{
 682				.ifnum = -1
 683			}
 684		}
 685	}
 686},
 687{
 688	USB_DEVICE(0x0582, 0x0007),
 689	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 690		.vendor_name = "Roland",
 691		.product_name = "SC-8820",
 692		.ifnum = QUIRK_ANY_INTERFACE,
 693		.type = QUIRK_COMPOSITE,
 694		.data = (const struct snd_usb_audio_quirk[]) {
 695			{
 696				.ifnum = 0,
 697				.type = QUIRK_IGNORE_INTERFACE
 698			},
 699			{
 700				.ifnum = 1,
 701				.type = QUIRK_IGNORE_INTERFACE
 702			},
 703			{
 704				.ifnum = 2,
 705				.type = QUIRK_MIDI_FIXED_ENDPOINT,
 706				.data = & (const struct snd_usb_midi_endpoint_info) {
 707					.out_cables = 0x0013,
 708					.in_cables  = 0x0013
 709				}
 710			},
 711			{
 712				.ifnum = -1
 713			}
 714		}
 715	}
 716},
 717{
 718	USB_DEVICE(0x0582, 0x0008),
 719	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 720		.vendor_name = "Roland",
 721		.product_name = "PC-300",
 722		.ifnum = QUIRK_ANY_INTERFACE,
 723		.type = QUIRK_COMPOSITE,
 724		.data = (const struct snd_usb_audio_quirk[]) {
 725			{
 726				.ifnum = 0,
 727				.type = QUIRK_IGNORE_INTERFACE
 728			},
 729			{
 730				.ifnum = 1,
 731				.type = QUIRK_IGNORE_INTERFACE
 732			},
 733			{
 734				.ifnum = 2,
 735				.type = QUIRK_MIDI_FIXED_ENDPOINT,
 736				.data = & (const struct snd_usb_midi_endpoint_info) {
 737					.out_cables = 0x0001,
 738					.in_cables  = 0x0001
 739				}
 740			},
 741			{
 742				.ifnum = -1
 743			}
 744		}
 745	}
 746},
 747{
 748	/* has ID 0x009d when not in "Advanced Driver" mode */
 749	USB_DEVICE(0x0582, 0x0009),
 750	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 751		.vendor_name = "EDIROL",
 752		.product_name = "UM-1",
 753		.ifnum = QUIRK_ANY_INTERFACE,
 754		.type = QUIRK_COMPOSITE,
 755		.data = (const struct snd_usb_audio_quirk[]) {
 756			{
 757				.ifnum = 0,
 758				.type = QUIRK_IGNORE_INTERFACE
 759			},
 760			{
 761				.ifnum = 1,
 762				.type = QUIRK_IGNORE_INTERFACE
 763			},
 764			{
 765				.ifnum = 2,
 766				.type = QUIRK_MIDI_FIXED_ENDPOINT,
 767				.data = & (const struct snd_usb_midi_endpoint_info) {
 768					.out_cables = 0x0001,
 769					.in_cables  = 0x0001
 770				}
 771			},
 772			{
 773				.ifnum = -1
 774			}
 775		}
 776	}
 777},
 778{
 779	USB_DEVICE(0x0582, 0x000b),
 780	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 781		.vendor_name = "Roland",
 782		.product_name = "SK-500",
 783		.ifnum = QUIRK_ANY_INTERFACE,
 784		.type = QUIRK_COMPOSITE,
 785		.data = (const struct snd_usb_audio_quirk[]) {
 786			{
 787				.ifnum = 0,
 788				.type = QUIRK_IGNORE_INTERFACE
 789			},
 790			{
 791				.ifnum = 1,
 792				.type = QUIRK_IGNORE_INTERFACE
 793			},
 794			{
 795				.ifnum = 2,
 796				.type = QUIRK_MIDI_FIXED_ENDPOINT,
 797				.data = & (const struct snd_usb_midi_endpoint_info) {
 798					.out_cables = 0x0013,
 799					.in_cables  = 0x0013
 800				}
 801			},
 802			{
 803				.ifnum = -1
 804			}
 805		}
 806	}
 807},
 808{
 809	/* thanks to Emiliano Grilli <emillo@libero.it>
 810	 * for helping researching this data */
 811	USB_DEVICE(0x0582, 0x000c),
 812	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 813		.vendor_name = "Roland",
 814		.product_name = "SC-D70",
 815		.ifnum = QUIRK_ANY_INTERFACE,
 816		.type = QUIRK_COMPOSITE,
 817		.data = (const struct snd_usb_audio_quirk[]) {
 818			{
 819				.ifnum = 0,
 820				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 821			},
 822			{
 823				.ifnum = 1,
 824				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 825			},
 826			{
 827				.ifnum = 2,
 828				.type = QUIRK_MIDI_FIXED_ENDPOINT,
 829				.data = & (const struct snd_usb_midi_endpoint_info) {
 830					.out_cables = 0x0007,
 831					.in_cables  = 0x0007
 832				}
 833			},
 834			{
 835				.ifnum = -1
 836			}
 837		}
 838	}
 839},
 840{	/*
 841	 * This quirk is for the "Advanced Driver" mode of the Edirol UA-5.
 842	 * If the advanced mode switch at the back of the unit is off, the
 843	 * UA-5 has ID 0x0582/0x0011 and is standard compliant (no quirks),
 844	 * but offers only 16-bit PCM.
 845	 * In advanced mode, the UA-5 will output S24_3LE samples (two
 846	 * channels) at the rate indicated on the front switch, including
 847	 * the 96kHz sample rate.
 848	 */
 849	USB_DEVICE(0x0582, 0x0010),
 850	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 851		.vendor_name = "EDIROL",
 852		.product_name = "UA-5",
 853		.ifnum = QUIRK_ANY_INTERFACE,
 854		.type = QUIRK_COMPOSITE,
 855		.data = (const struct snd_usb_audio_quirk[]) {
 856			{
 857				.ifnum = 1,
 858				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 859			},
 860			{
 861				.ifnum = 2,
 862				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 863			},
 864			{
 865				.ifnum = -1
 866			}
 867		}
 868	}
 869},
 870{
 871	/* has ID 0x0013 when not in "Advanced Driver" mode */
 872	USB_DEVICE(0x0582, 0x0012),
 873	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 874		.vendor_name = "Roland",
 875		.product_name = "XV-5050",
 876		.ifnum = 0,
 877		.type = QUIRK_MIDI_FIXED_ENDPOINT,
 878		.data = & (const struct snd_usb_midi_endpoint_info) {
 879			.out_cables = 0x0001,
 880			.in_cables  = 0x0001
 881		}
 882	}
 883},
 884{
 885	/* has ID 0x0015 when not in "Advanced Driver" mode */
 886	USB_DEVICE(0x0582, 0x0014),
 887	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 888		.vendor_name = "EDIROL",
 889		.product_name = "UM-880",
 890		.ifnum = 0,
 891		.type = QUIRK_MIDI_FIXED_ENDPOINT,
 892		.data = & (const struct snd_usb_midi_endpoint_info) {
 893			.out_cables = 0x01ff,
 894			.in_cables  = 0x01ff
 895		}
 896	}
 897},
 898{
 899	/* has ID 0x0017 when not in "Advanced Driver" mode */
 900	USB_DEVICE(0x0582, 0x0016),
 901	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 902		.vendor_name = "EDIROL",
 903		.product_name = "SD-90",
 904		.ifnum = QUIRK_ANY_INTERFACE,
 905		.type = QUIRK_COMPOSITE,
 906		.data = (const struct snd_usb_audio_quirk[]) {
 907			{
 908				.ifnum = 0,
 909				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 910			},
 911			{
 912				.ifnum = 1,
 913				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 914			},
 915			{
 916				.ifnum = 2,
 917				.type = QUIRK_MIDI_FIXED_ENDPOINT,
 918				.data = & (const struct snd_usb_midi_endpoint_info) {
 919					.out_cables = 0x000f,
 920					.in_cables  = 0x000f
 921				}
 922			},
 923			{
 924				.ifnum = -1
 925			}
 926		}
 927	}
 928},
 929{
 930	/* has ID 0x001c when not in "Advanced Driver" mode */
 931	USB_DEVICE(0x0582, 0x001b),
 932	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 933		.vendor_name = "Roland",
 934		.product_name = "MMP-2",
 935		.ifnum = QUIRK_ANY_INTERFACE,
 936		.type = QUIRK_COMPOSITE,
 937		.data = (const struct snd_usb_audio_quirk[]) {
 938			{
 939				.ifnum = 0,
 940				.type = QUIRK_IGNORE_INTERFACE
 941			},
 942			{
 943				.ifnum = 1,
 944				.type = QUIRK_IGNORE_INTERFACE
 945			},
 946			{
 947				.ifnum = 2,
 948				.type = QUIRK_MIDI_FIXED_ENDPOINT,
 949				.data = & (const struct snd_usb_midi_endpoint_info) {
 950					.out_cables = 0x0001,
 951					.in_cables  = 0x0001
 952				}
 953			},
 954			{
 955				.ifnum = -1
 956			}
 957		}
 958	}
 959},
 960{
 961	/* has ID 0x001e when not in "Advanced Driver" mode */
 962	USB_DEVICE(0x0582, 0x001d),
 963	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 964		.vendor_name = "Roland",
 965		.product_name = "V-SYNTH",
 966		.ifnum = 0,
 967		.type = QUIRK_MIDI_FIXED_ENDPOINT,
 968		.data = & (const struct snd_usb_midi_endpoint_info) {
 969			.out_cables = 0x0001,
 970			.in_cables  = 0x0001
 971		}
 972	}
 973},
 974{
 975	/* has ID 0x0024 when not in "Advanced Driver" mode */
 976	USB_DEVICE(0x0582, 0x0023),
 977	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 978		.vendor_name = "EDIROL",
 979		.product_name = "UM-550",
 980		.ifnum = 0,
 981		.type = QUIRK_MIDI_FIXED_ENDPOINT,
 982		.data = & (const struct snd_usb_midi_endpoint_info) {
 983			.out_cables = 0x003f,
 984			.in_cables  = 0x003f
 985		}
 986	}
 987},
 988{
 989	/*
 990	 * This quirk is for the "Advanced Driver" mode. If off, the UA-20
 991	 * has ID 0x0026 and is standard compliant, but has only 16-bit PCM
 992	 * and no MIDI.
 993	 */
 994	USB_DEVICE(0x0582, 0x0025),
 995	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 996		.vendor_name = "EDIROL",
 997		.product_name = "UA-20",
 998		.ifnum = QUIRK_ANY_INTERFACE,
 999		.type = QUIRK_COMPOSITE,
1000		.data = (const struct snd_usb_audio_quirk[]) {
1001			{
1002				.ifnum = 0,
1003				.type = QUIRK_IGNORE_INTERFACE
1004			},
1005			{
1006				.ifnum = 1,
1007				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
1008				.data = & (const struct audioformat) {
1009					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
1010					.channels = 2,
1011					.iface = 1,
1012					.altsetting = 1,
1013					.altset_idx = 1,
1014					.attributes = 0,
1015					.endpoint = 0x01,
1016					.ep_attr = 0x01,
1017					.rates = SNDRV_PCM_RATE_CONTINUOUS,
1018					.rate_min = 44100,
1019					.rate_max = 44100,
1020				}
1021			},
1022			{
1023				.ifnum = 2,
1024				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
1025				.data = & (const struct audioformat) {
1026					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
1027					.channels = 2,
1028					.iface = 2,
1029					.altsetting = 1,
1030					.altset_idx = 1,
1031					.attributes = 0,
1032					.endpoint = 0x82,
1033					.ep_attr = 0x01,
1034					.rates = SNDRV_PCM_RATE_CONTINUOUS,
1035					.rate_min = 44100,
1036					.rate_max = 44100,
1037				}
1038			},
1039			{
1040				.ifnum = 3,
1041				.type = QUIRK_MIDI_FIXED_ENDPOINT,
1042				.data = & (const struct snd_usb_midi_endpoint_info) {
1043					.out_cables = 0x0001,
1044					.in_cables  = 0x0001
1045				}
1046			},
1047			{
1048				.ifnum = -1
1049			}
1050		}
1051	}
1052},
1053{
1054	/* has ID 0x0028 when not in "Advanced Driver" mode */
1055	USB_DEVICE(0x0582, 0x0027),
1056	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1057		.vendor_name = "EDIROL",
1058		.product_name = "SD-20",
1059		.ifnum = 0,
1060		.type = QUIRK_MIDI_FIXED_ENDPOINT,
1061		.data = & (const struct snd_usb_midi_endpoint_info) {
1062			.out_cables = 0x0003,
1063			.in_cables  = 0x0007
1064		}
1065	}
1066},
1067{
1068	/* has ID 0x002a when not in "Advanced Driver" mode */
1069	USB_DEVICE(0x0582, 0x0029),
1070	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1071		.vendor_name = "EDIROL",
1072		.product_name = "SD-80",
1073		.ifnum = 0,
1074		.type = QUIRK_MIDI_FIXED_ENDPOINT,
1075		.data = & (const struct snd_usb_midi_endpoint_info) {
1076			.out_cables = 0x000f,
1077			.in_cables  = 0x000f
1078		}
1079	}
1080},
1081{	/*
1082	 * This quirk is for the "Advanced" modes of the Edirol UA-700.
1083	 * If the sample format switch is not in an advanced setting, the
1084	 * UA-700 has ID 0x0582/0x002c and is standard compliant (no quirks),
1085	 * but offers only 16-bit PCM and no MIDI.
1086	 */
1087	USB_DEVICE_VENDOR_SPEC(0x0582, 0x002b),
1088	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1089		.vendor_name = "EDIROL",
1090		.product_name = "UA-700",
1091		.ifnum = QUIRK_ANY_INTERFACE,
1092		.type = QUIRK_COMPOSITE,
1093		.data = (const struct snd_usb_audio_quirk[]) {
1094			{
1095				.ifnum = 1,
1096				.type = QUIRK_AUDIO_EDIROL_UAXX
1097			},
1098			{
1099				.ifnum = 2,
1100				.type = QUIRK_AUDIO_EDIROL_UAXX
1101			},
1102			{
1103				.ifnum = 3,
1104				.type = QUIRK_AUDIO_EDIROL_UAXX
1105			},
1106			{
1107				.ifnum = -1
1108			}
1109		}
1110	}
1111},
1112{
1113	/* has ID 0x002e when not in "Advanced Driver" mode */
1114	USB_DEVICE(0x0582, 0x002d),
1115	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1116		.vendor_name = "Roland",
1117		.product_name = "XV-2020",
1118		.ifnum = 0,
1119		.type = QUIRK_MIDI_FIXED_ENDPOINT,
1120		.data = & (const struct snd_usb_midi_endpoint_info) {
1121			.out_cables = 0x0001,
1122			.in_cables  = 0x0001
1123		}
1124	}
1125},
1126{
1127	/* has ID 0x0030 when not in "Advanced Driver" mode */
1128	USB_DEVICE(0x0582, 0x002f),
1129	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1130		.vendor_name = "Roland",
1131		.product_name = "VariOS",
1132		.ifnum = 0,
1133		.type = QUIRK_MIDI_FIXED_ENDPOINT,
1134		.data = & (const struct snd_usb_midi_endpoint_info) {
1135			.out_cables = 0x0007,
1136			.in_cables  = 0x0007
1137		}
1138	}
1139},
1140{
1141	/* has ID 0x0034 when not in "Advanced Driver" mode */
1142	USB_DEVICE(0x0582, 0x0033),
1143	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1144		.vendor_name = "EDIROL",
1145		.product_name = "PCR",
1146		.ifnum = 0,
1147		.type = QUIRK_MIDI_FIXED_ENDPOINT,
1148		.data = & (const struct snd_usb_midi_endpoint_info) {
1149			.out_cables = 0x0003,
1150			.in_cables  = 0x0007
1151		}
1152	}
1153},
1154{
1155	/*
1156	 * Has ID 0x0038 when not in "Advanced Driver" mode;
1157	 * later revisions use IDs 0x0054 and 0x00a2.
1158	 */
1159	USB_DEVICE(0x0582, 0x0037),
1160	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1161		.vendor_name = "Roland",
1162		.product_name = "Digital Piano",
1163		.ifnum = 0,
1164		.type = QUIRK_MIDI_FIXED_ENDPOINT,
1165		.data = & (const struct snd_usb_midi_endpoint_info) {
1166			.out_cables = 0x0001,
1167			.in_cables  = 0x0001
1168		}
1169	}
1170},
1171{
1172	/*
1173	 * This quirk is for the "Advanced Driver" mode.  If off, the GS-10
1174	 * has ID 0x003c and is standard compliant, but has only 16-bit PCM
1175	 * and no MIDI.
1176	 */
1177	USB_DEVICE_VENDOR_SPEC(0x0582, 0x003b),
1178	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1179		.vendor_name = "BOSS",
1180		.product_name = "GS-10",
1181		.ifnum = QUIRK_ANY_INTERFACE,
1182		.type = QUIRK_COMPOSITE,
1183		.data = & (const struct snd_usb_audio_quirk[]) {
1184			{
1185				.ifnum = 1,
1186				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1187			},
1188			{
1189				.ifnum = 2,
1190				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1191			},
1192			{
1193				.ifnum = 3,
1194				.type = QUIRK_MIDI_STANDARD_INTERFACE
1195			},
1196			{
1197				.ifnum = -1
1198			}
1199		}
1200	}
1201},
1202{
1203	/* has ID 0x0041 when not in "Advanced Driver" mode */
1204	USB_DEVICE(0x0582, 0x0040),
1205	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1206		.vendor_name = "Roland",
1207		.product_name = "GI-20",
1208		.ifnum = 0,
1209		.type = QUIRK_MIDI_FIXED_ENDPOINT,
1210		.data = & (const struct snd_usb_midi_endpoint_info) {
1211			.out_cables = 0x0001,
1212			.in_cables  = 0x0001
1213		}
1214	}
1215},
1216{
1217	/* has ID 0x0043 when not in "Advanced Driver" mode */
1218	USB_DEVICE(0x0582, 0x0042),
1219	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1220		.vendor_name = "Roland",
1221		.product_name = "RS-70",
1222		.ifnum = 0,
1223		.type = QUIRK_MIDI_FIXED_ENDPOINT,
1224		.data = & (const struct snd_usb_midi_endpoint_info) {
1225			.out_cables = 0x0001,
1226			.in_cables  = 0x0001
1227		}
1228	}
1229},
1230{
1231	/* has ID 0x0049 when not in "Advanced Driver" mode */
1232	USB_DEVICE(0x0582, 0x0047),
1233	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1234		/* .vendor_name = "EDIROL", */
1235		/* .product_name = "UR-80", */
1236		.ifnum = QUIRK_ANY_INTERFACE,
1237		.type = QUIRK_COMPOSITE,
1238		.data = (const struct snd_usb_audio_quirk[]) {
1239			/* in the 96 kHz modes, only interface 1 is there */
1240			{
1241				.ifnum = 1,
1242				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1243			},
1244			{
1245				.ifnum = 2,
1246				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1247			},
1248			{
1249				.ifnum = -1
1250			}
1251		}
1252	}
1253},
1254{
1255	/* has ID 0x004a when not in "Advanced Driver" mode */
1256	USB_DEVICE(0x0582, 0x0048),
1257	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1258		/* .vendor_name = "EDIROL", */
1259		/* .product_name = "UR-80", */
1260		.ifnum = 0,
1261		.type = QUIRK_MIDI_FIXED_ENDPOINT,
1262		.data = & (const struct snd_usb_midi_endpoint_info) {
1263			.out_cables = 0x0003,
1264			.in_cables  = 0x0007
1265		}
1266	}
1267},
1268{
1269	/* has ID 0x004e when not in "Advanced Driver" mode */
1270	USB_DEVICE(0x0582, 0x004c),
1271	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1272		.vendor_name = "EDIROL",
1273		.product_name = "PCR-A",
1274		.ifnum = QUIRK_ANY_INTERFACE,
1275		.type = QUIRK_COMPOSITE,
1276		.data = (const struct snd_usb_audio_quirk[]) {
1277			{
1278				.ifnum = 1,
1279				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1280			},
1281			{
1282				.ifnum = 2,
1283				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1284			},
1285			{
1286				.ifnum = -1
1287			}
1288		}
1289	}
1290},
1291{
1292	/* has ID 0x004f when not in "Advanced Driver" mode */
1293	USB_DEVICE(0x0582, 0x004d),
1294	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1295		.vendor_name = "EDIROL",
1296		.product_name = "PCR-A",
1297		.ifnum = 0,
1298		.type = QUIRK_MIDI_FIXED_ENDPOINT,
1299		.data = & (const struct snd_usb_midi_endpoint_info) {
1300			.out_cables = 0x0003,
1301			.in_cables  = 0x0007
1302		}
1303	}
1304},
1305{
1306	/*
1307	 * This quirk is for the "Advanced Driver" mode. If off, the UA-3FX
1308	 * is standard compliant, but has only 16-bit PCM.
1309	 */
1310	USB_DEVICE(0x0582, 0x0050),
1311	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1312		.vendor_name = "EDIROL",
1313		.product_name = "UA-3FX",
1314		.ifnum = QUIRK_ANY_INTERFACE,
1315		.type = QUIRK_COMPOSITE,
1316		.data = (const struct snd_usb_audio_quirk[]) {
1317			{
1318				.ifnum = 1,
1319				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1320			},
1321			{
1322				.ifnum = 2,
1323				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1324			},
1325			{
1326				.ifnum = -1
1327			}
1328		}
1329	}
1330},
1331{
1332	USB_DEVICE(0x0582, 0x0052),
1333	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1334		.vendor_name = "EDIROL",
1335		.product_name = "UM-1SX",
1336		.ifnum = 0,
1337		.type = QUIRK_MIDI_STANDARD_INTERFACE
1338	}
1339},
1340{
1341	USB_DEVICE(0x0582, 0x0060),
1342	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1343		.vendor_name = "Roland",
1344		.product_name = "EXR Series",
1345		.ifnum = 0,
1346		.type = QUIRK_MIDI_STANDARD_INTERFACE
1347	}
1348},
1349{
1350	/* has ID 0x0066 when not in "Advanced Driver" mode */
1351	USB_DEVICE(0x0582, 0x0064),
1352	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1353		/* .vendor_name = "EDIROL", */
1354		/* .product_name = "PCR-1", */
1355		.ifnum = QUIRK_ANY_INTERFACE,
1356		.type = QUIRK_COMPOSITE,
1357		.data = (const struct snd_usb_audio_quirk[]) {
1358			{
1359				.ifnum = 1,
1360				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1361			},
1362			{
1363				.ifnum = 2,
1364				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1365			},
1366			{
1367				.ifnum = -1
1368			}
1369		}
1370	}
1371},
1372{
1373	/* has ID 0x0067 when not in "Advanced Driver" mode */
1374	USB_DEVICE(0x0582, 0x0065),
1375	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1376		/* .vendor_name = "EDIROL", */
1377		/* .product_name = "PCR-1", */
1378		.ifnum = 0,
1379		.type = QUIRK_MIDI_FIXED_ENDPOINT,
1380		.data = & (const struct snd_usb_midi_endpoint_info) {
1381			.out_cables = 0x0001,
1382			.in_cables  = 0x0003
1383		}
1384	}
1385},
1386{
1387	/* has ID 0x006e when not in "Advanced Driver" mode */
1388	USB_DEVICE(0x0582, 0x006d),
1389	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1390		.vendor_name = "Roland",
1391		.product_name = "FANTOM-X",
1392		.ifnum = 0,
1393		.type = QUIRK_MIDI_FIXED_ENDPOINT,
1394		.data = & (const struct snd_usb_midi_endpoint_info) {
1395			.out_cables = 0x0001,
1396			.in_cables  = 0x0001
1397		}
1398	}
1399},
1400{	/*
1401	 * This quirk is for the "Advanced" modes of the Edirol UA-25.
1402	 * If the switch is not in an advanced setting, the UA-25 has
1403	 * ID 0x0582/0x0073 and is standard compliant (no quirks), but
1404	 * offers only 16-bit PCM at 44.1 kHz and no MIDI.
1405	 */
1406	USB_DEVICE_VENDOR_SPEC(0x0582, 0x0074),
1407	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1408		.vendor_name = "EDIROL",
1409		.product_name = "UA-25",
1410		.ifnum = QUIRK_ANY_INTERFACE,
1411		.type = QUIRK_COMPOSITE,
1412		.data = (const struct snd_usb_audio_quirk[]) {
1413			{
1414				.ifnum = 0,
1415				.type = QUIRK_AUDIO_EDIROL_UAXX
1416			},
1417			{
1418				.ifnum = 1,
1419				.type = QUIRK_AUDIO_EDIROL_UAXX
1420			},
1421			{
1422				.ifnum = 2,
1423				.type = QUIRK_AUDIO_EDIROL_UAXX
1424			},
1425			{
1426				.ifnum = -1
1427			}
1428		}
1429	}
1430},
1431{
1432	/* has ID 0x0076 when not in "Advanced Driver" mode */
1433	USB_DEVICE(0x0582, 0x0075),
1434	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1435		.vendor_name = "BOSS",
1436		.product_name = "DR-880",
1437		.ifnum = 0,
1438		.type = QUIRK_MIDI_FIXED_ENDPOINT,
1439		.data = & (const struct snd_usb_midi_endpoint_info) {
1440			.out_cables = 0x0001,
1441			.in_cables  = 0x0001
1442		}
1443	}
1444},
1445{
1446	/* has ID 0x007b when not in "Advanced Driver" mode */
1447	USB_DEVICE_VENDOR_SPEC(0x0582, 0x007a),
1448	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1449		.vendor_name = "Roland",
1450		/* "RD" or "RD-700SX"? */
1451		.ifnum = 0,
1452		.type = QUIRK_MIDI_FIXED_ENDPOINT,
1453		.data = & (const struct snd_usb_midi_endpoint_info) {
1454			.out_cables = 0x0003,
1455			.in_cables  = 0x0003
1456		}
1457	}
1458},
1459{
1460	/* has ID 0x0081 when not in "Advanced Driver" mode */
1461	USB_DEVICE(0x0582, 0x0080),
1462	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1463		.vendor_name = "Roland",
1464		.product_name = "G-70",
1465		.ifnum = 0,
1466		.type = QUIRK_MIDI_FIXED_ENDPOINT,
1467		.data = & (const struct snd_usb_midi_endpoint_info) {
1468			.out_cables = 0x0001,
1469			.in_cables  = 0x0001
1470		}
1471	}
1472},
1473{
1474	/* has ID 0x008c when not in "Advanced Driver" mode */
1475	USB_DEVICE(0x0582, 0x008b),
1476	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1477		.vendor_name = "EDIROL",
1478		.product_name = "PC-50",
1479		.ifnum = 0,
1480		.type = QUIRK_MIDI_FIXED_ENDPOINT,
1481		.data = & (const struct snd_usb_midi_endpoint_info) {
1482			.out_cables = 0x0001,
1483			.in_cables  = 0x0001
1484		}
1485	}
1486},
1487{
1488	/*
1489	 * This quirk is for the "Advanced Driver" mode. If off, the UA-4FX
1490	 * is standard compliant, but has only 16-bit PCM and no MIDI.
1491	 */
1492	USB_DEVICE(0x0582, 0x00a3),
1493	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1494		.vendor_name = "EDIROL",
1495		.product_name = "UA-4FX",
1496		.ifnum = QUIRK_ANY_INTERFACE,
1497		.type = QUIRK_COMPOSITE,
1498		.data = (const struct snd_usb_audio_quirk[]) {
1499			{
1500				.ifnum = 0,
1501				.type = QUIRK_AUDIO_EDIROL_UAXX
1502			},
1503			{
1504				.ifnum = 1,
1505				.type = QUIRK_AUDIO_EDIROL_UAXX
1506			},
1507			{
1508				.ifnum = 2,
1509				.type = QUIRK_AUDIO_EDIROL_UAXX
1510			},
1511			{
1512				.ifnum = -1
1513			}
1514		}
1515	}
1516},
1517{
1518	/* Edirol M-16DX */
1519	USB_DEVICE(0x0582, 0x00c4),
1520	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1521		.ifnum = QUIRK_ANY_INTERFACE,
1522		.type = QUIRK_COMPOSITE,
1523		.data = (const struct snd_usb_audio_quirk[]) {
1524			{
1525				.ifnum = 0,
1526				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1527			},
1528			{
1529				.ifnum = 1,
1530				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1531			},
1532			{
1533				.ifnum = 2,
1534				.type = QUIRK_MIDI_FIXED_ENDPOINT,
1535				.data = & (const struct snd_usb_midi_endpoint_info) {
1536					.out_cables = 0x0001,
1537					.in_cables  = 0x0001
1538				}
1539			},
1540			{
1541				.ifnum = -1
1542			}
1543		}
1544	}
1545},
1546{
1547	/* Advanced modes of the Edirol UA-25EX.
1548	 * For the standard mode, UA-25EX has ID 0582:00e7, which
1549	 * offers only 16-bit PCM at 44.1 kHz and no MIDI.
1550	 */
1551	USB_DEVICE_VENDOR_SPEC(0x0582, 0x00e6),
1552	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1553		.vendor_name = "EDIROL",
1554		.product_name = "UA-25EX",
1555		.ifnum = QUIRK_ANY_INTERFACE,
1556		.type = QUIRK_COMPOSITE,
1557		.data = (const struct snd_usb_audio_quirk[]) {
1558			{
1559				.ifnum = 0,
1560				.type = QUIRK_AUDIO_EDIROL_UAXX
1561			},
1562			{
1563				.ifnum = 1,
1564				.type = QUIRK_AUDIO_EDIROL_UAXX
1565			},
1566			{
1567				.ifnum = 2,
1568				.type = QUIRK_AUDIO_EDIROL_UAXX
1569			},
1570			{
1571				.ifnum = -1
1572			}
1573		}
1574	}
1575},
1576{
1577	/* Edirol UM-3G */
1578	USB_DEVICE_VENDOR_SPEC(0x0582, 0x0108),
1579	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1580		.ifnum = 0,
1581		.type = QUIRK_MIDI_FIXED_ENDPOINT,
1582		.data = & (const struct snd_usb_midi_endpoint_info) {
1583			.out_cables = 0x0007,
1584			.in_cables  = 0x0007
1585		}
1586	}
1587},
1588{
1589	/* BOSS ME-25 */
1590	USB_DEVICE(0x0582, 0x0113),
1591	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1592		.ifnum = QUIRK_ANY_INTERFACE,
1593		.type = QUIRK_COMPOSITE,
1594		.data = (const struct snd_usb_audio_quirk[]) {
1595			{
1596				.ifnum = 0,
1597				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1598			},
1599			{
1600				.ifnum = 1,
1601				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1602			},
1603			{
1604				.ifnum = 2,
1605				.type = QUIRK_MIDI_FIXED_ENDPOINT,
1606				.data = & (const struct snd_usb_midi_endpoint_info) {
1607					.out_cables = 0x0001,
1608					.in_cables  = 0x0001
1609				}
1610			},
1611			{
1612				.ifnum = -1
1613			}
1614		}
1615	}
1616},
1617{
1618	/* only 44.1 kHz works at the moment */
1619	USB_DEVICE(0x0582, 0x0120),
1620	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1621		/* .vendor_name = "Roland", */
1622		/* .product_name = "OCTO-CAPTURE", */
1623		.ifnum = QUIRK_ANY_INTERFACE,
1624		.type = QUIRK_COMPOSITE,
1625		.data = (const struct snd_usb_audio_quirk[]) {
1626			{
1627				.ifnum = 0,
1628				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
1629				.data = & (const struct audioformat) {
1630					.formats = SNDRV_PCM_FMTBIT_S32_LE,
1631					.channels = 10,
1632					.iface = 0,
1633					.altsetting = 1,
1634					.altset_idx = 1,
1635					.endpoint = 0x05,
1636					.ep_attr = 0x05,
1637					.rates = SNDRV_PCM_RATE_44100,
1638					.rate_min = 44100,
1639					.rate_max = 44100,
1640					.nr_rates = 1,
1641					.rate_table = (unsigned int[]) { 44100 }
1642				}
1643			},
1644			{
1645				.ifnum = 1,
1646				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
1647				.data = & (const struct audioformat) {
1648					.formats = SNDRV_PCM_FMTBIT_S32_LE,
1649					.channels = 12,
1650					.iface = 1,
1651					.altsetting = 1,
1652					.altset_idx = 1,
1653					.endpoint = 0x85,
1654					.ep_attr = 0x25,
1655					.rates = SNDRV_PCM_RATE_44100,
1656					.rate_min = 44100,
1657					.rate_max = 44100,
1658					.nr_rates = 1,
1659					.rate_table = (unsigned int[]) { 44100 }
1660				}
1661			},
1662			{
1663				.ifnum = 2,
1664				.type = QUIRK_MIDI_FIXED_ENDPOINT,
1665				.data = & (const struct snd_usb_midi_endpoint_info) {
1666					.out_cables = 0x0001,
1667					.in_cables  = 0x0001
1668				}
1669			},
1670			{
1671				.ifnum = 3,
1672				.type = QUIRK_IGNORE_INTERFACE
1673			},
1674			{
1675				.ifnum = 4,
1676				.type = QUIRK_IGNORE_INTERFACE
1677			},
1678			{
1679				.ifnum = -1
1680			}
1681		}
1682	}
1683},
1684{
1685	/* only 44.1 kHz works at the moment */
1686	USB_DEVICE(0x0582, 0x012f),
1687	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1688		/* .vendor_name = "Roland", */
1689		/* .product_name = "QUAD-CAPTURE", */
1690		.ifnum = QUIRK_ANY_INTERFACE,
1691		.type = QUIRK_COMPOSITE,
1692		.data = (const struct snd_usb_audio_quirk[]) {
1693			{
1694				.ifnum = 0,
1695				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
1696				.data = & (const struct audioformat) {
1697					.formats = SNDRV_PCM_FMTBIT_S32_LE,
1698					.channels = 4,
1699					.iface = 0,
1700					.altsetting = 1,
1701					.altset_idx = 1,
1702					.endpoint = 0x05,
1703					.ep_attr = 0x05,
1704					.rates = SNDRV_PCM_RATE_44100,
1705					.rate_min = 44100,
1706					.rate_max = 44100,
1707					.nr_rates = 1,
1708					.rate_table = (unsigned int[]) { 44100 }
1709				}
1710			},
1711			{
1712				.ifnum = 1,
1713				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
1714				.data = & (const struct audioformat) {
1715					.formats = SNDRV_PCM_FMTBIT_S32_LE,
1716					.channels = 6,
1717					.iface = 1,
1718					.altsetting = 1,
1719					.altset_idx = 1,
1720					.endpoint = 0x85,
1721					.ep_attr = 0x25,
1722					.rates = SNDRV_PCM_RATE_44100,
1723					.rate_min = 44100,
1724					.rate_max = 44100,
1725					.nr_rates = 1,
1726					.rate_table = (unsigned int[]) { 44100 }
1727				}
1728			},
1729			{
1730				.ifnum = 2,
1731				.type = QUIRK_MIDI_FIXED_ENDPOINT,
1732				.data = & (const struct snd_usb_midi_endpoint_info) {
1733					.out_cables = 0x0001,
1734					.in_cables  = 0x0001
1735				}
1736			},
1737			{
1738				.ifnum = 3,
1739				.type = QUIRK_IGNORE_INTERFACE
1740			},
1741			{
1742				.ifnum = 4,
1743				.type = QUIRK_IGNORE_INTERFACE
1744			},
1745			{
1746				.ifnum = -1
1747			}
1748		}
1749	}
1750},
1751{
1752	USB_DEVICE(0x0582, 0x0159),
1753	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1754		/* .vendor_name = "Roland", */
1755		/* .product_name = "UA-22", */
1756		.ifnum = QUIRK_ANY_INTERFACE,
1757		.type = QUIRK_COMPOSITE,
1758		.data = (const struct snd_usb_audio_quirk[]) {
1759			{
1760				.ifnum = 0,
1761				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1762			},
1763			{
1764				.ifnum = 1,
1765				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1766			},
1767			{
1768				.ifnum = 2,
1769				.type = QUIRK_MIDI_FIXED_ENDPOINT,
1770				.data = & (const struct snd_usb_midi_endpoint_info) {
1771					.out_cables = 0x0001,
1772					.in_cables = 0x0001
1773				}
1774			},
1775			{
1776				.ifnum = -1
1777			}
1778		}
1779	}
1780},
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1781/* this catches most recent vendor-specific Roland devices */
1782{
1783	.match_flags = USB_DEVICE_ID_MATCH_VENDOR |
1784	               USB_DEVICE_ID_MATCH_INT_CLASS,
1785	.idVendor = 0x0582,
1786	.bInterfaceClass = USB_CLASS_VENDOR_SPEC,
1787	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
1788		.ifnum = QUIRK_ANY_INTERFACE,
1789		.type = QUIRK_AUTODETECT
1790	}
1791},
1792
1793/* Guillemot devices */
1794{
1795	/*
1796	 * This is for the "Windows Edition" where the external MIDI ports are
1797	 * the only MIDI ports; the control data is reported through HID
1798	 * interfaces.  The "Macintosh Edition" has ID 0xd002 and uses standard
1799	 * compliant USB MIDI ports for external MIDI and controls.
1800	 */
1801	USB_DEVICE_VENDOR_SPEC(0x06f8, 0xb000),
1802	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1803		.vendor_name = "Hercules",
1804		.product_name = "DJ Console (WE)",
1805		.ifnum = 4,
1806		.type = QUIRK_MIDI_FIXED_ENDPOINT,
1807		.data = & (const struct snd_usb_midi_endpoint_info) {
1808			.out_cables = 0x0001,
1809			.in_cables = 0x0001
1810		}
1811	}
1812},
1813
1814/* Midiman/M-Audio devices */
1815{
1816	USB_DEVICE_VENDOR_SPEC(0x0763, 0x1002),
1817	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1818		.vendor_name = "M-Audio",
1819		.product_name = "MidiSport 2x2",
1820		.ifnum = QUIRK_ANY_INTERFACE,
1821		.type = QUIRK_MIDI_MIDIMAN,
1822		.data = & (const struct snd_usb_midi_endpoint_info) {
1823			.out_cables = 0x0003,
1824			.in_cables  = 0x0003
1825		}
1826	}
1827},
1828{
1829	USB_DEVICE_VENDOR_SPEC(0x0763, 0x1011),
1830	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1831		.vendor_name = "M-Audio",
1832		.product_name = "MidiSport 1x1",
1833		.ifnum = QUIRK_ANY_INTERFACE,
1834		.type = QUIRK_MIDI_MIDIMAN,
1835		.data = & (const struct snd_usb_midi_endpoint_info) {
1836			.out_cables = 0x0001,
1837			.in_cables  = 0x0001
1838		}
1839	}
1840},
1841{
1842	USB_DEVICE_VENDOR_SPEC(0x0763, 0x1015),
1843	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1844		.vendor_name = "M-Audio",
1845		.product_name = "Keystation",
1846		.ifnum = QUIRK_ANY_INTERFACE,
1847		.type = QUIRK_MIDI_MIDIMAN,
1848		.data = & (const struct snd_usb_midi_endpoint_info) {
1849			.out_cables = 0x0001,
1850			.in_cables  = 0x0001
1851		}
1852	}
1853},
1854{
1855	USB_DEVICE_VENDOR_SPEC(0x0763, 0x1021),
1856	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1857		.vendor_name = "M-Audio",
1858		.product_name = "MidiSport 4x4",
1859		.ifnum = QUIRK_ANY_INTERFACE,
1860		.type = QUIRK_MIDI_MIDIMAN,
1861		.data = & (const struct snd_usb_midi_endpoint_info) {
1862			.out_cables = 0x000f,
1863			.in_cables  = 0x000f
1864		}
1865	}
1866},
1867{
1868	/*
1869	 * For hardware revision 1.05; in the later revisions (1.10 and
1870	 * 1.21), 0x1031 is the ID for the device without firmware.
1871	 * Thanks to Olaf Giesbrecht <Olaf_Giesbrecht@yahoo.de>
1872	 */
1873	USB_DEVICE_VER(0x0763, 0x1031, 0x0100, 0x0109),
1874	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1875		.vendor_name = "M-Audio",
1876		.product_name = "MidiSport 8x8",
1877		.ifnum = QUIRK_ANY_INTERFACE,
1878		.type = QUIRK_MIDI_MIDIMAN,
1879		.data = & (const struct snd_usb_midi_endpoint_info) {
1880			.out_cables = 0x01ff,
1881			.in_cables  = 0x01ff
1882		}
1883	}
1884},
1885{
1886	USB_DEVICE_VENDOR_SPEC(0x0763, 0x1033),
1887	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1888		.vendor_name = "M-Audio",
1889		.product_name = "MidiSport 8x8",
1890		.ifnum = QUIRK_ANY_INTERFACE,
1891		.type = QUIRK_MIDI_MIDIMAN,
1892		.data = & (const struct snd_usb_midi_endpoint_info) {
1893			.out_cables = 0x01ff,
1894			.in_cables  = 0x01ff
1895		}
1896	}
1897},
1898{
1899	USB_DEVICE_VENDOR_SPEC(0x0763, 0x1041),
1900	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1901		.vendor_name = "M-Audio",
1902		.product_name = "MidiSport 2x4",
1903		.ifnum = QUIRK_ANY_INTERFACE,
1904		.type = QUIRK_MIDI_MIDIMAN,
1905		.data = & (const struct snd_usb_midi_endpoint_info) {
1906			.out_cables = 0x000f,
1907			.in_cables  = 0x0003
1908		}
1909	}
1910},
1911{
1912	USB_DEVICE_VENDOR_SPEC(0x0763, 0x2001),
1913	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1914		.vendor_name = "M-Audio",
1915		.product_name = "Quattro",
1916		.ifnum = QUIRK_ANY_INTERFACE,
1917		.type = QUIRK_COMPOSITE,
1918		.data = & (const struct snd_usb_audio_quirk[]) {
1919			/*
1920			 * Interfaces 0-2 are "Windows-compatible", 16-bit only,
1921			 * and share endpoints with the other interfaces.
1922			 * Ignore them.  The other interfaces can do 24 bits,
1923			 * but captured samples are big-endian (see usbaudio.c).
1924			 */
1925			{
1926				.ifnum = 0,
1927				.type = QUIRK_IGNORE_INTERFACE
1928			},
1929			{
1930				.ifnum = 1,
1931				.type = QUIRK_IGNORE_INTERFACE
1932			},
1933			{
1934				.ifnum = 2,
1935				.type = QUIRK_IGNORE_INTERFACE
1936			},
1937			{
1938				.ifnum = 3,
1939				.type = QUIRK_IGNORE_INTERFACE
1940			},
1941			{
1942				.ifnum = 4,
1943				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1944			},
1945			{
1946				.ifnum = 5,
1947				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1948			},
1949			{
1950				.ifnum = 6,
1951				.type = QUIRK_IGNORE_INTERFACE
1952			},
1953			{
1954				.ifnum = 7,
1955				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1956			},
1957			{
1958				.ifnum = 8,
1959				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1960			},
1961			{
1962				.ifnum = 9,
1963				.type = QUIRK_MIDI_MIDIMAN,
1964				.data = & (const struct snd_usb_midi_endpoint_info) {
1965					.out_cables = 0x0001,
1966					.in_cables  = 0x0001
1967				}
1968			},
1969			{
1970				.ifnum = -1
1971			}
1972		}
1973	}
1974},
1975{
1976	USB_DEVICE_VENDOR_SPEC(0x0763, 0x2003),
1977	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1978		.vendor_name = "M-Audio",
1979		.product_name = "AudioPhile",
1980		.ifnum = 6,
1981		.type = QUIRK_MIDI_MIDIMAN,
1982		.data = & (const struct snd_usb_midi_endpoint_info) {
1983			.out_cables = 0x0001,
1984			.in_cables  = 0x0001
1985		}
1986	}
1987},
1988{
1989	USB_DEVICE_VENDOR_SPEC(0x0763, 0x2008),
1990	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1991		.vendor_name = "M-Audio",
1992		.product_name = "Ozone",
1993		.ifnum = 3,
1994		.type = QUIRK_MIDI_MIDIMAN,
1995		.data = & (const struct snd_usb_midi_endpoint_info) {
1996			.out_cables = 0x0001,
1997			.in_cables  = 0x0001
1998		}
1999	}
2000},
2001{
2002	USB_DEVICE_VENDOR_SPEC(0x0763, 0x200d),
2003	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2004		.vendor_name = "M-Audio",
2005		.product_name = "OmniStudio",
2006		.ifnum = QUIRK_ANY_INTERFACE,
2007		.type = QUIRK_COMPOSITE,
2008		.data = & (const struct snd_usb_audio_quirk[]) {
2009			{
2010				.ifnum = 0,
2011				.type = QUIRK_IGNORE_INTERFACE
2012			},
2013			{
2014				.ifnum = 1,
2015				.type = QUIRK_IGNORE_INTERFACE
2016			},
2017			{
2018				.ifnum = 2,
2019				.type = QUIRK_IGNORE_INTERFACE
2020			},
2021			{
2022				.ifnum = 3,
2023				.type = QUIRK_IGNORE_INTERFACE
2024			},
2025			{
2026				.ifnum = 4,
2027				.type = QUIRK_AUDIO_STANDARD_INTERFACE
2028			},
2029			{
2030				.ifnum = 5,
2031				.type = QUIRK_AUDIO_STANDARD_INTERFACE
2032			},
2033			{
2034				.ifnum = 6,
2035				.type = QUIRK_IGNORE_INTERFACE
2036			},
2037			{
2038				.ifnum = 7,
2039				.type = QUIRK_AUDIO_STANDARD_INTERFACE
2040			},
2041			{
2042				.ifnum = 8,
2043				.type = QUIRK_AUDIO_STANDARD_INTERFACE
2044			},
2045			{
2046				.ifnum = 9,
2047				.type = QUIRK_MIDI_MIDIMAN,
2048				.data = & (const struct snd_usb_midi_endpoint_info) {
2049					.out_cables = 0x0001,
2050					.in_cables  = 0x0001
2051				}
2052			},
2053			{
2054				.ifnum = -1
2055			}
2056		}
2057	}
2058},
2059{
2060	USB_DEVICE(0x0763, 0x2019),
2061	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2062		/* .vendor_name = "M-Audio", */
2063		/* .product_name = "Ozone Academic", */
2064		.ifnum = QUIRK_ANY_INTERFACE,
2065		.type = QUIRK_COMPOSITE,
2066		.data = & (const struct snd_usb_audio_quirk[]) {
2067			{
2068				.ifnum = 0,
2069				.type = QUIRK_AUDIO_STANDARD_INTERFACE
2070			},
2071			{
2072				.ifnum = 1,
2073				.type = QUIRK_AUDIO_STANDARD_INTERFACE
2074			},
2075			{
2076				.ifnum = 2,
2077				.type = QUIRK_AUDIO_STANDARD_INTERFACE
2078			},
2079			{
2080				.ifnum = 3,
2081				.type = QUIRK_MIDI_MIDIMAN,
2082				.data = & (const struct snd_usb_midi_endpoint_info) {
2083					.out_cables = 0x0001,
2084					.in_cables  = 0x0001
2085				}
2086			},
2087			{
2088				.ifnum = -1
2089			}
2090		}
2091	}
2092},
2093{
2094	USB_DEVICE_VENDOR_SPEC(0x0763, 0x2030),
2095	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2096		/* .vendor_name = "M-Audio", */
2097		/* .product_name = "Fast Track C400", */
2098		.ifnum = QUIRK_ANY_INTERFACE,
2099		.type = QUIRK_COMPOSITE,
2100		.data = &(const struct snd_usb_audio_quirk[]) {
2101			{
2102				.ifnum = 1,
2103				.type = QUIRK_AUDIO_STANDARD_MIXER,
2104			},
2105			/* Playback */
2106			{
2107				.ifnum = 2,
2108				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
2109				.data = &(const struct audioformat) {
2110					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
2111					.channels = 6,
2112					.iface = 2,
2113					.altsetting = 1,
2114					.altset_idx = 1,
2115					.attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2116					.endpoint = 0x01,
2117					.ep_attr = 0x09,
2118					.rates = SNDRV_PCM_RATE_44100 |
2119						 SNDRV_PCM_RATE_48000 |
2120						 SNDRV_PCM_RATE_88200 |
2121						 SNDRV_PCM_RATE_96000,
2122					.rate_min = 44100,
2123					.rate_max = 96000,
2124					.nr_rates = 4,
2125					.rate_table = (unsigned int[]) {
2126							44100, 48000, 88200, 96000
2127					},
2128					.clock = 0x80,
2129				}
2130			},
2131			/* Capture */
2132			{
2133				.ifnum = 3,
2134				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
2135				.data = &(const struct audioformat) {
2136					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
2137					.channels = 4,
2138					.iface = 3,
2139					.altsetting = 1,
2140					.altset_idx = 1,
2141					.attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2142					.endpoint = 0x81,
2143					.ep_attr = 0x05,
2144					.rates = SNDRV_PCM_RATE_44100 |
2145						 SNDRV_PCM_RATE_48000 |
2146						 SNDRV_PCM_RATE_88200 |
2147						 SNDRV_PCM_RATE_96000,
2148					.rate_min = 44100,
2149					.rate_max = 96000,
2150					.nr_rates = 4,
2151					.rate_table = (unsigned int[]) {
2152						44100, 48000, 88200, 96000
2153					},
2154					.clock = 0x80,
2155				}
2156			},
2157			/* MIDI */
2158			{
2159				.ifnum = -1 /* Interface = 4 */
2160			}
2161		}
2162	}
2163},
2164{
2165	USB_DEVICE_VENDOR_SPEC(0x0763, 0x2031),
2166	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2167		/* .vendor_name = "M-Audio", */
2168		/* .product_name = "Fast Track C600", */
2169		.ifnum = QUIRK_ANY_INTERFACE,
2170		.type = QUIRK_COMPOSITE,
2171		.data = &(const struct snd_usb_audio_quirk[]) {
2172			{
2173				.ifnum = 1,
2174				.type = QUIRK_AUDIO_STANDARD_MIXER,
2175			},
2176			/* Playback */
2177			{
2178				.ifnum = 2,
2179				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
2180				.data = &(const struct audioformat) {
2181					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
2182					.channels = 8,
2183					.iface = 2,
2184					.altsetting = 1,
2185					.altset_idx = 1,
2186					.attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2187					.endpoint = 0x01,
2188					.ep_attr = 0x09,
2189					.rates = SNDRV_PCM_RATE_44100 |
2190						 SNDRV_PCM_RATE_48000 |
2191						 SNDRV_PCM_RATE_88200 |
2192						 SNDRV_PCM_RATE_96000,
2193					.rate_min = 44100,
2194					.rate_max = 96000,
2195					.nr_rates = 4,
2196					.rate_table = (unsigned int[]) {
2197							44100, 48000, 88200, 96000
2198					},
2199					.clock = 0x80,
2200				}
2201			},
2202			/* Capture */
2203			{
2204				.ifnum = 3,
2205				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
2206				.data = &(const struct audioformat) {
2207					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
2208					.channels = 6,
2209					.iface = 3,
2210					.altsetting = 1,
2211					.altset_idx = 1,
2212					.attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2213					.endpoint = 0x81,
2214					.ep_attr = 0x05,
2215					.rates = SNDRV_PCM_RATE_44100 |
2216						 SNDRV_PCM_RATE_48000 |
2217						 SNDRV_PCM_RATE_88200 |
2218						 SNDRV_PCM_RATE_96000,
2219					.rate_min = 44100,
2220					.rate_max = 96000,
2221					.nr_rates = 4,
2222					.rate_table = (unsigned int[]) {
2223						44100, 48000, 88200, 96000
2224					},
2225					.clock = 0x80,
2226				}
2227			},
2228			/* MIDI */
2229			{
2230				.ifnum = -1 /* Interface = 4 */
2231			}
2232		}
2233	}
2234},
2235{
2236	USB_DEVICE_VENDOR_SPEC(0x0763, 0x2080),
2237	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2238		/* .vendor_name = "M-Audio", */
2239		/* .product_name = "Fast Track Ultra", */
2240		.ifnum = QUIRK_ANY_INTERFACE,
2241		.type = QUIRK_COMPOSITE,
2242		.data = & (const struct snd_usb_audio_quirk[]) {
2243			{
2244				.ifnum = 0,
2245				.type = QUIRK_AUDIO_STANDARD_MIXER,
2246			},
2247			{
2248				.ifnum = 1,
2249				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
2250				.data = & (const struct audioformat) {
2251					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
2252					.channels = 8,
2253					.iface = 1,
2254					.altsetting = 1,
2255					.altset_idx = 1,
2256					.attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2257					.endpoint = 0x01,
2258					.ep_attr = 0x09,
2259					.rates = SNDRV_PCM_RATE_44100 |
2260						 SNDRV_PCM_RATE_48000 |
2261						 SNDRV_PCM_RATE_88200 |
2262						 SNDRV_PCM_RATE_96000,
2263					.rate_min = 44100,
2264					.rate_max = 96000,
2265					.nr_rates = 4,
2266					.rate_table = (unsigned int[]) {
2267						44100, 48000, 88200, 96000
2268					}
2269				}
2270			},
2271			{
2272				.ifnum = 2,
2273				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
2274				.data = & (const struct audioformat) {
2275					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
2276					.channels = 8,
2277					.iface = 2,
2278					.altsetting = 1,
2279					.altset_idx = 1,
2280					.attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2281					.endpoint = 0x81,
2282					.ep_attr = 0x05,
2283					.rates = SNDRV_PCM_RATE_44100 |
2284						 SNDRV_PCM_RATE_48000 |
2285						 SNDRV_PCM_RATE_88200 |
2286						 SNDRV_PCM_RATE_96000,
2287					.rate_min = 44100,
2288					.rate_max = 96000,
2289					.nr_rates = 4,
2290					.rate_table = (unsigned int[]) {
2291						44100, 48000, 88200, 96000
2292					}
2293				}
2294			},
2295			/* interface 3 (MIDI) is standard compliant */
2296			{
2297				.ifnum = -1
2298			}
2299		}
2300	}
2301},
2302{
2303	USB_DEVICE_VENDOR_SPEC(0x0763, 0x2081),
2304	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2305		/* .vendor_name = "M-Audio", */
2306		/* .product_name = "Fast Track Ultra 8R", */
2307		.ifnum = QUIRK_ANY_INTERFACE,
2308		.type = QUIRK_COMPOSITE,
2309		.data = & (const struct snd_usb_audio_quirk[]) {
2310			{
2311				.ifnum = 0,
2312				.type = QUIRK_AUDIO_STANDARD_MIXER,
2313			},
2314			{
2315				.ifnum = 1,
2316				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
2317				.data = & (const struct audioformat) {
2318					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
2319					.channels = 8,
2320					.iface = 1,
2321					.altsetting = 1,
2322					.altset_idx = 1,
2323					.attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2324					.endpoint = 0x01,
2325					.ep_attr = 0x09,
2326					.rates = SNDRV_PCM_RATE_44100 |
2327						 SNDRV_PCM_RATE_48000 |
2328						 SNDRV_PCM_RATE_88200 |
2329						 SNDRV_PCM_RATE_96000,
2330					.rate_min = 44100,
2331					.rate_max = 96000,
2332					.nr_rates = 4,
2333					.rate_table = (unsigned int[]) {
2334							44100, 48000, 88200, 96000
2335					}
2336				}
2337			},
2338			{
2339				.ifnum = 2,
2340				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
2341				.data = & (const struct audioformat) {
2342					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
2343					.channels = 8,
2344					.iface = 2,
2345					.altsetting = 1,
2346					.altset_idx = 1,
2347					.attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2348					.endpoint = 0x81,
2349					.ep_attr = 0x05,
2350					.rates = SNDRV_PCM_RATE_44100 |
2351						 SNDRV_PCM_RATE_48000 |
2352						 SNDRV_PCM_RATE_88200 |
2353						 SNDRV_PCM_RATE_96000,
2354					.rate_min = 44100,
2355					.rate_max = 96000,
2356					.nr_rates = 4,
2357					.rate_table = (unsigned int[]) {
2358						44100, 48000, 88200, 96000
2359					}
2360				}
2361			},
2362			/* interface 3 (MIDI) is standard compliant */
2363			{
2364				.ifnum = -1
2365			}
2366		}
2367	}
2368},
2369
2370/* Casio devices */
2371{
2372	USB_DEVICE(0x07cf, 0x6801),
2373	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2374		.vendor_name = "Casio",
2375		.product_name = "PL-40R",
2376		.ifnum = 0,
2377		.type = QUIRK_MIDI_YAMAHA
2378	}
2379},
2380{
2381	/* this ID is used by several devices without a product ID */
2382	USB_DEVICE(0x07cf, 0x6802),
2383	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2384		.vendor_name = "Casio",
2385		.product_name = "Keyboard",
2386		.ifnum = 0,
2387		.type = QUIRK_MIDI_YAMAHA
2388	}
2389},
2390
2391/* Mark of the Unicorn devices */
2392{
2393	/* thanks to Robert A. Lerche <ral 'at' msbit.com> */
2394	.match_flags = USB_DEVICE_ID_MATCH_VENDOR |
2395		       USB_DEVICE_ID_MATCH_PRODUCT |
2396		       USB_DEVICE_ID_MATCH_DEV_SUBCLASS,
2397	.idVendor = 0x07fd,
2398	.idProduct = 0x0001,
2399	.bDeviceSubClass = 2,
2400	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2401		.vendor_name = "MOTU",
2402		.product_name = "Fastlane",
2403		.ifnum = QUIRK_ANY_INTERFACE,
2404		.type = QUIRK_COMPOSITE,
2405		.data = & (const struct snd_usb_audio_quirk[]) {
2406			{
2407				.ifnum = 0,
2408				.type = QUIRK_MIDI_RAW_BYTES
2409			},
2410			{
2411				.ifnum = 1,
2412				.type = QUIRK_IGNORE_INTERFACE
2413			},
2414			{
2415				.ifnum = -1
2416			}
2417		}
2418	}
2419},
2420
2421/* Emagic devices */
2422{
2423	USB_DEVICE(0x086a, 0x0001),
2424	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2425		.vendor_name = "Emagic",
2426		.product_name = "Unitor8",
2427		.ifnum = 2,
2428		.type = QUIRK_MIDI_EMAGIC,
2429		.data = & (const struct snd_usb_midi_endpoint_info) {
2430			.out_cables = 0x80ff,
2431			.in_cables  = 0x80ff
2432		}
2433	}
2434},
2435{
2436	USB_DEVICE(0x086a, 0x0002),
2437	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2438		.vendor_name = "Emagic",
2439		/* .product_name = "AMT8", */
2440		.ifnum = 2,
2441		.type = QUIRK_MIDI_EMAGIC,
2442		.data = & (const struct snd_usb_midi_endpoint_info) {
2443			.out_cables = 0x80ff,
2444			.in_cables  = 0x80ff
2445		}
2446	}
2447},
2448{
2449	USB_DEVICE(0x086a, 0x0003),
2450	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2451		.vendor_name = "Emagic",
2452		/* .product_name = "MT4", */
2453		.ifnum = 2,
2454		.type = QUIRK_MIDI_EMAGIC,
2455		.data = & (const struct snd_usb_midi_endpoint_info) {
2456			.out_cables = 0x800f,
2457			.in_cables  = 0x8003
2458		}
2459	}
2460},
2461
2462/* KORG devices */
2463{
2464	USB_DEVICE_VENDOR_SPEC(0x0944, 0x0200),
2465	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2466		.vendor_name = "KORG, Inc.",
2467		/* .product_name = "PANDORA PX5D", */
2468		.ifnum = 3,
2469		.type = QUIRK_MIDI_STANDARD_INTERFACE,
2470	}
2471},
2472
2473{
2474	USB_DEVICE_VENDOR_SPEC(0x0944, 0x0201),
2475	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2476		.vendor_name = "KORG, Inc.",
2477		/* .product_name = "ToneLab ST", */
2478		.ifnum = 3,
2479		.type = QUIRK_MIDI_STANDARD_INTERFACE,
2480	}
2481},
2482
 
 
 
 
 
 
 
 
 
 
2483/* AKAI devices */
2484{
2485	USB_DEVICE(0x09e8, 0x0062),
2486	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2487		.vendor_name = "AKAI",
2488		.product_name = "MPD16",
2489		.ifnum = 0,
2490		.type = QUIRK_MIDI_AKAI,
2491	}
2492},
2493
2494{
2495	/* Akai MPC Element */
2496	USB_DEVICE(0x09e8, 0x0021),
2497	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2498		.ifnum = QUIRK_ANY_INTERFACE,
2499		.type = QUIRK_COMPOSITE,
2500		.data = & (const struct snd_usb_audio_quirk[]) {
2501			{
2502				.ifnum = 0,
2503				.type = QUIRK_IGNORE_INTERFACE
2504			},
2505			{
2506				.ifnum = 1,
2507				.type = QUIRK_MIDI_STANDARD_INTERFACE
2508			},
2509			{
2510				.ifnum = -1
2511			}
2512		}
2513	}
2514},
2515
2516/* Steinberg devices */
2517{
2518	/* Steinberg MI2 */
2519	USB_DEVICE_VENDOR_SPEC(0x0a4e, 0x2040),
2520	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2521		.ifnum = QUIRK_ANY_INTERFACE,
2522		.type = QUIRK_COMPOSITE,
2523		.data = & (const struct snd_usb_audio_quirk[]) {
2524			{
2525				.ifnum = 0,
2526				.type = QUIRK_AUDIO_STANDARD_INTERFACE
2527			},
2528			{
2529				.ifnum = 1,
2530				.type = QUIRK_AUDIO_STANDARD_INTERFACE
2531			},
2532			{
2533				.ifnum = 2,
2534				.type = QUIRK_AUDIO_STANDARD_INTERFACE
2535			},
2536			{
2537				.ifnum = 3,
2538				.type = QUIRK_MIDI_FIXED_ENDPOINT,
2539				.data = &(const struct snd_usb_midi_endpoint_info) {
2540					.out_cables = 0x0001,
2541					.in_cables  = 0x0001
2542				}
2543			},
2544			{
2545				.ifnum = -1
2546			}
2547		}
2548	}
2549},
2550{
2551	/* Steinberg MI4 */
2552	USB_DEVICE_VENDOR_SPEC(0x0a4e, 0x4040),
2553	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2554		.ifnum = QUIRK_ANY_INTERFACE,
2555		.type = QUIRK_COMPOSITE,
2556		.data = & (const struct snd_usb_audio_quirk[]) {
2557			{
2558				.ifnum = 0,
2559				.type = QUIRK_AUDIO_STANDARD_INTERFACE
2560			},
2561			{
2562				.ifnum = 1,
2563				.type = QUIRK_AUDIO_STANDARD_INTERFACE
2564			},
2565			{
2566				.ifnum = 2,
2567				.type = QUIRK_AUDIO_STANDARD_INTERFACE
2568			},
2569			{
2570				.ifnum = 3,
2571				.type = QUIRK_MIDI_FIXED_ENDPOINT,
2572				.data = &(const struct snd_usb_midi_endpoint_info) {
2573					.out_cables = 0x0001,
2574					.in_cables  = 0x0001
2575				}
2576			},
2577			{
2578				.ifnum = -1
2579			}
2580		}
2581	}
2582},
2583
2584/* TerraTec devices */
2585{
2586	USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0012),
2587	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2588		.vendor_name = "TerraTec",
2589		.product_name = "PHASE 26",
2590		.ifnum = 3,
2591		.type = QUIRK_MIDI_STANDARD_INTERFACE
2592	}
2593},
2594{
2595	USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0013),
2596	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2597		.vendor_name = "TerraTec",
2598		.product_name = "PHASE 26",
2599		.ifnum = 3,
2600		.type = QUIRK_MIDI_STANDARD_INTERFACE
2601	}
2602},
2603{
2604	USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0014),
2605	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2606		.vendor_name = "TerraTec",
2607		.product_name = "PHASE 26",
2608		.ifnum = 3,
2609		.type = QUIRK_MIDI_STANDARD_INTERFACE
2610	}
2611},
2612{
2613	USB_DEVICE(0x0ccd, 0x0028),
2614	QUIRK_RENAME_DEVICE("TerraTec", "Aureon5.1MkII")
2615},
2616{
2617	USB_DEVICE(0x0ccd, 0x0035),
2618	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2619		.vendor_name = "Miditech",
2620		.product_name = "Play'n Roll",
2621		.ifnum = 0,
2622		.type = QUIRK_MIDI_CME
2623	}
2624},
2625
2626/* Stanton/N2IT Final Scratch v1 device ('Scratchamp') */
2627{
2628	USB_DEVICE(0x103d, 0x0100),
2629	QUIRK_RENAME_DEVICE("Stanton", "ScratchAmp")
2630},
2631{
2632	USB_DEVICE(0x103d, 0x0101),
2633	QUIRK_RENAME_DEVICE("Stanton", "ScratchAmp")
2634},
2635
2636/* Novation EMS devices */
2637{
2638	USB_DEVICE_VENDOR_SPEC(0x1235, 0x0001),
2639	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2640		.vendor_name = "Novation",
2641		.product_name = "ReMOTE Audio/XStation",
2642		.ifnum = 4,
2643		.type = QUIRK_MIDI_NOVATION
2644	}
2645},
2646{
2647	USB_DEVICE_VENDOR_SPEC(0x1235, 0x0002),
2648	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2649		.vendor_name = "Novation",
2650		.product_name = "Speedio",
2651		.ifnum = 3,
2652		.type = QUIRK_MIDI_NOVATION
2653	}
2654},
2655{
2656	USB_DEVICE(0x1235, 0x000a),
2657	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2658		/* .vendor_name = "Novation", */
2659		/* .product_name = "Nocturn", */
2660		.ifnum = 0,
2661		.type = QUIRK_MIDI_RAW_BYTES
2662	}
2663},
2664{
2665	USB_DEVICE(0x1235, 0x000e),
2666	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2667		/* .vendor_name = "Novation", */
2668		/* .product_name = "Launchpad", */
2669		.ifnum = 0,
2670		.type = QUIRK_MIDI_RAW_BYTES
2671	}
2672},
2673{
2674	USB_DEVICE(0x1235, 0x0010),
2675	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2676		.vendor_name = "Focusrite",
2677		.product_name = "Saffire 6 USB",
2678		.ifnum = QUIRK_ANY_INTERFACE,
2679		.type = QUIRK_COMPOSITE,
2680		.data = (const struct snd_usb_audio_quirk[]) {
2681			{
2682				.ifnum = 0,
2683				.type = QUIRK_AUDIO_STANDARD_MIXER,
2684			},
2685			{
2686				.ifnum = 0,
2687				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
2688				.data = &(const struct audioformat) {
2689					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
2690					.channels = 4,
2691					.iface = 0,
2692					.altsetting = 1,
2693					.altset_idx = 1,
2694					.attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2695					.endpoint = 0x01,
2696					.ep_attr = USB_ENDPOINT_XFER_ISOC,
2697					.datainterval = 1,
2698					.maxpacksize = 0x024c,
2699					.rates = SNDRV_PCM_RATE_44100 |
2700						 SNDRV_PCM_RATE_48000,
2701					.rate_min = 44100,
2702					.rate_max = 48000,
2703					.nr_rates = 2,
2704					.rate_table = (unsigned int[]) {
2705						44100, 48000
2706					}
2707				}
2708			},
2709			{
2710				.ifnum = 0,
2711				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
2712				.data = &(const struct audioformat) {
2713					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
2714					.channels = 2,
2715					.iface = 0,
2716					.altsetting = 1,
2717					.altset_idx = 1,
2718					.attributes = 0,
2719					.endpoint = 0x82,
2720					.ep_attr = USB_ENDPOINT_XFER_ISOC,
2721					.datainterval = 1,
2722					.maxpacksize = 0x0126,
2723					.rates = SNDRV_PCM_RATE_44100 |
2724						 SNDRV_PCM_RATE_48000,
2725					.rate_min = 44100,
2726					.rate_max = 48000,
2727					.nr_rates = 2,
2728					.rate_table = (unsigned int[]) {
2729						44100, 48000
2730					}
2731				}
2732			},
2733			{
2734				.ifnum = 1,
2735				.type = QUIRK_MIDI_RAW_BYTES
2736			},
2737			{
2738				.ifnum = -1
2739			}
2740		}
2741	}
2742},
2743{
2744	USB_DEVICE(0x1235, 0x0018),
2745	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2746		.vendor_name = "Novation",
2747		.product_name = "Twitch",
2748		.ifnum = QUIRK_ANY_INTERFACE,
2749		.type = QUIRK_COMPOSITE,
2750		.data = (const struct snd_usb_audio_quirk[]) {
2751			{
2752				.ifnum = 0,
2753				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
2754				.data = & (const struct audioformat) {
2755					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
2756					.channels = 4,
2757					.iface = 0,
2758					.altsetting = 1,
2759					.altset_idx = 1,
2760					.attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2761					.endpoint = 0x01,
2762					.ep_attr = USB_ENDPOINT_XFER_ISOC,
2763					.rates = SNDRV_PCM_RATE_44100 |
2764						 SNDRV_PCM_RATE_48000,
2765					.rate_min = 44100,
2766					.rate_max = 48000,
2767					.nr_rates = 2,
2768					.rate_table = (unsigned int[]) {
2769						44100, 48000
2770					}
2771				}
2772			},
2773			{
2774				.ifnum = 1,
2775				.type = QUIRK_MIDI_RAW_BYTES
2776			},
2777			{
2778				.ifnum = -1
2779			}
2780		}
2781	}
2782},
2783{
2784	USB_DEVICE_VENDOR_SPEC(0x1235, 0x4661),
2785	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2786		.vendor_name = "Novation",
2787		.product_name = "ReMOTE25",
2788		.ifnum = 0,
2789		.type = QUIRK_MIDI_NOVATION
2790	}
2791},
2792
2793/* Access Music devices */
2794{
2795	/* VirusTI Desktop */
2796	USB_DEVICE_VENDOR_SPEC(0x133e, 0x0815),
2797	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2798		.ifnum = QUIRK_ANY_INTERFACE,
2799		.type = QUIRK_COMPOSITE,
2800		.data = &(const struct snd_usb_audio_quirk[]) {
2801			{
2802				.ifnum = 3,
2803				.type = QUIRK_MIDI_FIXED_ENDPOINT,
2804				.data = &(const struct snd_usb_midi_endpoint_info) {
2805					.out_cables = 0x0003,
2806					.in_cables  = 0x0003
2807				}
2808			},
2809			{
2810				.ifnum = 4,
2811				.type = QUIRK_IGNORE_INTERFACE
2812			},
2813			{
2814				.ifnum = -1
2815			}
2816		}
2817	}
2818},
2819
2820/* */
2821{
2822	/* aka. Serato Scratch Live DJ Box */
2823	USB_DEVICE(0x13e5, 0x0001),
2824	QUIRK_RENAME_DEVICE("Rane", "SL-1")
2825},
2826
2827/* Lenovo ThinkStation P620 Rear Line-in, Line-out and Microphone */
2828{
2829	USB_DEVICE(0x17aa, 0x1046),
2830	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2831		.vendor_name = "Lenovo",
2832		.product_name = "ThinkStation P620 Rear",
2833		.profile_name = "Lenovo-ThinkStation-P620-Rear",
2834		.ifnum = QUIRK_ANY_INTERFACE,
2835		.type = QUIRK_SETUP_DISABLE_AUTOSUSPEND
2836	}
2837},
2838/* Lenovo ThinkStation P620 Internal Speaker + Front Headset */
2839{
2840	USB_DEVICE(0x17aa, 0x104d),
2841	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2842		.vendor_name = "Lenovo",
2843		.product_name = "ThinkStation P620 Main",
2844		.profile_name = "Lenovo-ThinkStation-P620-Main",
2845		.ifnum = QUIRK_ANY_INTERFACE,
2846		.type = QUIRK_SETUP_DISABLE_AUTOSUSPEND
2847	}
2848},
2849
2850/* Native Instruments MK2 series */
2851{
2852	/* Komplete Audio 6 */
2853	.match_flags = USB_DEVICE_ID_MATCH_DEVICE,
2854	.idVendor = 0x17cc,
2855	.idProduct = 0x1000,
2856},
2857{
2858	/* Traktor Audio 6 */
2859	.match_flags = USB_DEVICE_ID_MATCH_DEVICE,
2860	.idVendor = 0x17cc,
2861	.idProduct = 0x1010,
2862},
2863{
2864	/* Traktor Audio 10 */
2865	.match_flags = USB_DEVICE_ID_MATCH_DEVICE,
2866	.idVendor = 0x17cc,
2867	.idProduct = 0x1020,
2868},
2869
2870/* QinHeng devices */
2871{
2872	USB_DEVICE(0x1a86, 0x752d),
2873	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2874		.vendor_name = "QinHeng",
2875		.product_name = "CH345",
2876		.ifnum = 1,
2877		.type = QUIRK_MIDI_CH345
2878	}
2879},
2880
2881/* KeithMcMillen Stringport */
2882{
2883	USB_DEVICE(0x1f38, 0x0001),
2884	.bInterfaceClass = USB_CLASS_AUDIO,
2885},
2886
2887/* Miditech devices */
2888{
2889	USB_DEVICE(0x4752, 0x0011),
2890	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2891		.vendor_name = "Miditech",
2892		.product_name = "Midistart-2",
2893		.ifnum = 0,
2894		.type = QUIRK_MIDI_CME
2895	}
2896},
2897
2898/* Central Music devices */
2899{
2900	/* this ID used by both Miditech MidiStudio-2 and CME UF-x */
2901	USB_DEVICE(0x7104, 0x2202),
2902	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2903		.ifnum = 0,
2904		.type = QUIRK_MIDI_CME
2905	}
2906},
2907
2908/*
2909 * Auvitek au0828 devices with audio interface.
2910 * This should be kept in sync with drivers/media/usb/au0828/au0828-cards.c
2911 * Please notice that some drivers are DVB only, and don't need to be
2912 * here. That's the case, for example, of DVICO_FUSIONHDTV7.
2913 */
2914
2915#define AU0828_DEVICE(vid, pid, vname, pname) { \
2916	.idVendor = vid, \
2917	.idProduct = pid, \
2918	.match_flags = USB_DEVICE_ID_MATCH_DEVICE | \
2919		       USB_DEVICE_ID_MATCH_INT_CLASS | \
2920		       USB_DEVICE_ID_MATCH_INT_SUBCLASS, \
2921	.bInterfaceClass = USB_CLASS_AUDIO, \
2922	.bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL, \
2923	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) { \
2924		.vendor_name = vname, \
2925		.product_name = pname, \
2926		.ifnum = QUIRK_ANY_INTERFACE, \
2927		.type = QUIRK_AUDIO_ALIGN_TRANSFER, \
2928		.shares_media_device = 1, \
2929	} \
2930}
2931
2932AU0828_DEVICE(0x2040, 0x7200, "Hauppauge", "HVR-950Q"),
2933AU0828_DEVICE(0x2040, 0x7240, "Hauppauge", "HVR-850"),
2934AU0828_DEVICE(0x2040, 0x7210, "Hauppauge", "HVR-950Q"),
2935AU0828_DEVICE(0x2040, 0x7217, "Hauppauge", "HVR-950Q"),
2936AU0828_DEVICE(0x2040, 0x721b, "Hauppauge", "HVR-950Q"),
2937AU0828_DEVICE(0x2040, 0x721e, "Hauppauge", "HVR-950Q"),
2938AU0828_DEVICE(0x2040, 0x721f, "Hauppauge", "HVR-950Q"),
2939AU0828_DEVICE(0x2040, 0x7280, "Hauppauge", "HVR-950Q"),
2940AU0828_DEVICE(0x0fd9, 0x0008, "Hauppauge", "HVR-950Q"),
2941AU0828_DEVICE(0x2040, 0x7201, "Hauppauge", "HVR-950Q-MXL"),
2942AU0828_DEVICE(0x2040, 0x7211, "Hauppauge", "HVR-950Q-MXL"),
2943AU0828_DEVICE(0x2040, 0x7281, "Hauppauge", "HVR-950Q-MXL"),
2944AU0828_DEVICE(0x05e1, 0x0480, "Hauppauge", "Woodbury"),
2945AU0828_DEVICE(0x2040, 0x8200, "Hauppauge", "Woodbury"),
2946AU0828_DEVICE(0x2040, 0x7260, "Hauppauge", "HVR-950Q"),
2947AU0828_DEVICE(0x2040, 0x7213, "Hauppauge", "HVR-950Q"),
2948AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"),
2949
2950/* Syntek STK1160 */
2951{
2952	.match_flags = USB_DEVICE_ID_MATCH_DEVICE |
2953		       USB_DEVICE_ID_MATCH_INT_CLASS |
2954		       USB_DEVICE_ID_MATCH_INT_SUBCLASS,
2955	.idVendor = 0x05e1,
2956	.idProduct = 0x0408,
2957	.bInterfaceClass = USB_CLASS_AUDIO,
2958	.bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
2959	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2960		.vendor_name = "Syntek",
2961		.product_name = "STK1160",
2962		.ifnum = QUIRK_ANY_INTERFACE,
2963		.type = QUIRK_AUDIO_ALIGN_TRANSFER
2964	}
2965},
2966
2967/* Digidesign Mbox */
2968{
2969	/* Thanks to Clemens Ladisch <clemens@ladisch.de> */
2970	USB_DEVICE(0x0dba, 0x1000),
2971	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2972		.vendor_name = "Digidesign",
2973		.product_name = "MBox",
2974		.ifnum = QUIRK_ANY_INTERFACE,
2975		.type = QUIRK_COMPOSITE,
2976		.data = (const struct snd_usb_audio_quirk[]){
2977			{
2978				.ifnum = 0,
2979				.type = QUIRK_AUDIO_STANDARD_MIXER,
2980			},
2981			{
2982				.ifnum = 1,
2983				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
2984				.data = &(const struct audioformat) {
2985					.formats = SNDRV_PCM_FMTBIT_S24_3BE,
2986					.channels = 2,
2987					.iface = 1,
2988					.altsetting = 1,
2989					.altset_idx = 1,
2990					.attributes = 0x4,
2991					.endpoint = 0x02,
2992					.ep_attr = USB_ENDPOINT_XFER_ISOC |
2993						USB_ENDPOINT_SYNC_SYNC,
2994					.maxpacksize = 0x130,
2995					.rates = SNDRV_PCM_RATE_48000,
2996					.rate_min = 48000,
2997					.rate_max = 48000,
2998					.nr_rates = 1,
2999					.rate_table = (unsigned int[]) {
3000						48000
3001					}
3002				}
3003			},
3004			{
3005				.ifnum = 1,
3006				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3007				.data = &(const struct audioformat) {
3008					.formats = SNDRV_PCM_FMTBIT_S24_3BE,
3009					.channels = 2,
3010					.iface = 1,
3011					.altsetting = 1,
3012					.altset_idx = 1,
3013					.attributes = 0x4,
3014					.endpoint = 0x81,
3015					.ep_attr = USB_ENDPOINT_XFER_ISOC |
3016						USB_ENDPOINT_SYNC_ASYNC,
3017					.maxpacksize = 0x130,
3018					.rates = SNDRV_PCM_RATE_48000,
3019					.rate_min = 48000,
3020					.rate_max = 48000,
3021					.nr_rates = 1,
3022					.rate_table = (unsigned int[]) {
3023						48000
3024					}
3025				}
3026			},
3027			{
3028				.ifnum = -1
3029			}
3030		}
3031	}
3032},
3033
3034/* DIGIDESIGN MBOX 2 */
3035{
3036	USB_DEVICE(0x0dba, 0x3000),
3037	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3038		.vendor_name = "Digidesign",
3039		.product_name = "Mbox 2",
3040		.ifnum = QUIRK_ANY_INTERFACE,
3041		.type = QUIRK_COMPOSITE,
3042		.data = (const struct snd_usb_audio_quirk[]) {
3043			{
3044				.ifnum = 0,
3045				.type = QUIRK_IGNORE_INTERFACE
3046			},
3047			{
3048				.ifnum = 1,
3049				.type = QUIRK_IGNORE_INTERFACE
3050			},
3051			{
3052				.ifnum = 2,
3053				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3054				.data = &(const struct audioformat) {
3055					.formats = SNDRV_PCM_FMTBIT_S24_3BE,
3056					.channels = 2,
3057					.iface = 2,
3058					.altsetting = 2,
3059					.altset_idx = 1,
3060					.attributes = 0x00,
3061					.endpoint = 0x03,
3062					.ep_attr = USB_ENDPOINT_SYNC_ASYNC,
3063					.rates = SNDRV_PCM_RATE_48000,
3064					.rate_min = 48000,
3065					.rate_max = 48000,
3066					.nr_rates = 1,
3067					.rate_table = (unsigned int[]) {
3068						48000
3069					}
3070				}
3071			},
3072			{
3073				.ifnum = 3,
3074				.type = QUIRK_IGNORE_INTERFACE
3075			},
3076			{
3077				.ifnum = 4,
3078				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3079				.data = &(const struct audioformat) {
3080				.formats = SNDRV_PCM_FMTBIT_S24_3BE,
3081					.channels = 2,
3082					.iface = 4,
3083					.altsetting = 2,
3084					.altset_idx = 1,
3085					.attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
3086					.endpoint = 0x85,
3087					.ep_attr = USB_ENDPOINT_SYNC_SYNC,
3088					.rates = SNDRV_PCM_RATE_48000,
3089					.rate_min = 48000,
3090					.rate_max = 48000,
3091					.nr_rates = 1,
3092					.rate_table = (unsigned int[]) {
3093						48000
3094					}
3095				}
3096			},
3097			{
3098				.ifnum = 5,
3099				.type = QUIRK_IGNORE_INTERFACE
3100			},
3101			{
3102				.ifnum = 6,
3103				.type = QUIRK_MIDI_MIDIMAN,
3104				.data = &(const struct snd_usb_midi_endpoint_info) {
3105					.out_ep =  0x02,
3106					.out_cables = 0x0001,
3107					.in_ep = 0x81,
3108					.in_interval = 0x01,
3109					.in_cables = 0x0001
3110				}
3111			},
3112			{
3113				.ifnum = -1
3114			}
3115		}
3116	}
3117},
3118{
3119	/* Tascam US122 MKII - playback-only support */
3120	.match_flags = USB_DEVICE_ID_MATCH_DEVICE,
3121	.idVendor = 0x0644,
3122	.idProduct = 0x8021,
3123	.bInterfaceClass = USB_CLASS_AUDIO,
3124	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3125		.vendor_name = "TASCAM",
3126		.product_name = "US122 MKII",
3127		.ifnum = QUIRK_ANY_INTERFACE,
3128		.type = QUIRK_COMPOSITE,
3129		.data = (const struct snd_usb_audio_quirk[]) {
3130			{
3131				.ifnum = 0,
3132				.type = QUIRK_IGNORE_INTERFACE
3133			},
3134			{
3135				.ifnum = 1,
3136				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3137				.data = &(const struct audioformat) {
3138					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
3139					.channels = 2,
3140					.iface = 1,
3141					.altsetting = 1,
3142					.altset_idx = 1,
3143					.attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
3144					.endpoint = 0x02,
3145					.ep_attr = USB_ENDPOINT_XFER_ISOC,
3146					.rates = SNDRV_PCM_RATE_44100 |
3147						 SNDRV_PCM_RATE_48000 |
3148						 SNDRV_PCM_RATE_88200 |
3149						 SNDRV_PCM_RATE_96000,
3150					.rate_min = 44100,
3151					.rate_max = 96000,
3152					.nr_rates = 4,
3153					.rate_table = (unsigned int[]) {
3154						44100, 48000, 88200, 96000
3155					}
3156				}
3157			},
3158			{
3159				.ifnum = -1
3160			}
3161		}
3162	}
3163},
3164
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3165/* Microsoft XboxLive Headset/Xbox Communicator */
3166{
3167	USB_DEVICE(0x045e, 0x0283),
3168	.bInterfaceClass = USB_CLASS_PER_INTERFACE,
3169	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3170		.vendor_name = "Microsoft",
3171		.product_name = "XboxLive Headset/Xbox Communicator",
3172		.ifnum = QUIRK_ANY_INTERFACE,
3173		.type = QUIRK_COMPOSITE,
3174		.data = &(const struct snd_usb_audio_quirk[]) {
3175			{
3176				/* playback */
3177				.ifnum = 0,
3178				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3179				.data = &(const struct audioformat) {
3180					.formats = SNDRV_PCM_FMTBIT_S16_LE,
3181					.channels = 1,
3182					.iface = 0,
3183					.altsetting = 0,
3184					.altset_idx = 0,
3185					.attributes = 0,
3186					.endpoint = 0x04,
3187					.ep_attr = 0x05,
3188					.rates = SNDRV_PCM_RATE_CONTINUOUS,
3189					.rate_min = 22050,
3190					.rate_max = 22050
3191				}
3192			},
3193			{
3194				/* capture */
3195				.ifnum = 1,
3196				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3197				.data = &(const struct audioformat) {
3198					.formats = SNDRV_PCM_FMTBIT_S16_LE,
3199					.channels = 1,
3200					.iface = 1,
3201					.altsetting = 0,
3202					.altset_idx = 0,
3203					.attributes = 0,
3204					.endpoint = 0x85,
3205					.ep_attr = 0x05,
3206					.rates = SNDRV_PCM_RATE_CONTINUOUS,
3207					.rate_min = 16000,
3208					.rate_max = 16000
3209				}
3210			},
3211			{
3212				.ifnum = -1
3213			}
3214		}
3215	}
3216},
3217
3218/* Reloop Play */
3219{
3220	USB_DEVICE(0x200c, 0x100b),
3221	.bInterfaceClass = USB_CLASS_PER_INTERFACE,
3222	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3223		.ifnum = QUIRK_ANY_INTERFACE,
3224		.type = QUIRK_COMPOSITE,
3225		.data = &(const struct snd_usb_audio_quirk[]) {
3226			{
3227				.ifnum = 0,
3228				.type = QUIRK_AUDIO_STANDARD_MIXER,
3229			},
3230			{
3231				.ifnum = 1,
3232				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3233				.data = &(const struct audioformat) {
3234					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
3235					.channels = 4,
3236					.iface = 1,
3237					.altsetting = 1,
3238					.altset_idx = 1,
3239					.attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
3240					.endpoint = 0x01,
3241					.ep_attr = USB_ENDPOINT_SYNC_ADAPTIVE,
3242					.rates = SNDRV_PCM_RATE_44100 |
3243						 SNDRV_PCM_RATE_48000,
3244					.rate_min = 44100,
3245					.rate_max = 48000,
3246					.nr_rates = 2,
3247					.rate_table = (unsigned int[]) {
3248						44100, 48000
3249					}
3250				}
3251			},
3252			{
3253				.ifnum = -1
3254			}
3255		}
3256	}
3257},
3258
3259{
3260	/*
3261	 * ZOOM R16/24 in audio interface mode.
3262	 * Playback requires an extra four byte LE length indicator
3263	 * at the start of each isochronous packet. This quirk is
3264	 * enabled in create_standard_audio_quirk().
3265	 */
3266	USB_DEVICE(0x1686, 0x00dd),
3267	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
3268		.ifnum = QUIRK_ANY_INTERFACE,
3269		.type = QUIRK_COMPOSITE,
3270		.data = (const struct snd_usb_audio_quirk[]) {
3271			{
3272				/* Playback  */
3273				.ifnum = 1,
3274				.type = QUIRK_AUDIO_STANDARD_INTERFACE,
3275			},
3276			{
3277				/* Capture */
3278				.ifnum = 2,
3279				.type = QUIRK_AUDIO_STANDARD_INTERFACE,
3280			},
3281			{
3282				/* Midi */
3283				.ifnum = 3,
3284				.type = QUIRK_MIDI_STANDARD_INTERFACE
3285			},
3286			{
3287				.ifnum = -1
3288			},
3289		}
3290	}
3291},
3292
3293{
3294	/*
3295	 * Some USB MIDI devices don't have an audio control interface,
3296	 * so we have to grab MIDI streaming interfaces here.
3297	 */
3298	.match_flags = USB_DEVICE_ID_MATCH_INT_CLASS |
3299		       USB_DEVICE_ID_MATCH_INT_SUBCLASS,
3300	.bInterfaceClass = USB_CLASS_AUDIO,
3301	.bInterfaceSubClass = USB_SUBCLASS_MIDISTREAMING,
3302	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
3303		.ifnum = QUIRK_ANY_INTERFACE,
3304		.type = QUIRK_MIDI_STANDARD_INTERFACE
3305	}
3306},
3307
3308/*
3309 * The original product_name is "USB Sound Device", however this name
3310 * is also used by the CM106 based cards, so make it unique.
3311 */
3312{
3313	USB_DEVICE(0x0d8c, 0x0102),
3314	QUIRK_RENAME_DEVICE(NULL, "ICUSBAUDIO7D")
3315},
3316{
3317	USB_DEVICE(0x0d8c, 0x0103),
3318	QUIRK_RENAME_DEVICE(NULL, "Audio Advantage MicroII")
3319},
3320
3321/* disabled due to regression for other devices;
3322 * see https://bugzilla.kernel.org/show_bug.cgi?id=199905
3323 */
3324#if 0
3325{
3326	/*
3327	 * Nura's first gen headphones use Cambridge Silicon Radio's vendor
3328	 * ID, but it looks like the product ID actually is only for Nura.
3329	 * The capture interface does not work at all (even on Windows),
3330	 * and only the 48 kHz sample rate works for the playback interface.
3331	 */
3332	USB_DEVICE(0x0a12, 0x1243),
3333	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3334		.ifnum = QUIRK_ANY_INTERFACE,
3335		.type = QUIRK_COMPOSITE,
3336		.data = (const struct snd_usb_audio_quirk[]) {
3337			{
3338				.ifnum = 0,
3339				.type = QUIRK_AUDIO_STANDARD_MIXER,
3340			},
3341			/* Capture */
3342			{
3343				.ifnum = 1,
3344				.type = QUIRK_IGNORE_INTERFACE,
3345			},
3346			/* Playback */
3347			{
3348				.ifnum = 2,
3349				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3350				.data = &(const struct audioformat) {
3351					.formats = SNDRV_PCM_FMTBIT_S16_LE,
3352					.channels = 2,
3353					.iface = 2,
3354					.altsetting = 1,
3355					.altset_idx = 1,
3356					.attributes = UAC_EP_CS_ATTR_FILL_MAX |
3357						UAC_EP_CS_ATTR_SAMPLE_RATE,
3358					.endpoint = 0x03,
3359					.ep_attr = USB_ENDPOINT_XFER_ISOC,
3360					.rates = SNDRV_PCM_RATE_48000,
3361					.rate_min = 48000,
3362					.rate_max = 48000,
3363					.nr_rates = 1,
3364					.rate_table = (unsigned int[]) {
3365						48000
3366					}
3367				}
3368			},
3369			{
3370				.ifnum = -1
3371			},
3372		}
3373	}
3374},
3375#endif /* disabled */
3376
3377{
3378	/*
3379	 * Bower's & Wilkins PX headphones only support the 48 kHz sample rate
3380	 * even though it advertises more. The capture interface doesn't work
3381	 * even on windows.
3382	 */
3383	USB_DEVICE(0x19b5, 0x0021),
3384	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3385		.ifnum = QUIRK_ANY_INTERFACE,
3386		.type = QUIRK_COMPOSITE,
3387		.data = (const struct snd_usb_audio_quirk[]) {
3388			{
3389				.ifnum = 0,
3390				.type = QUIRK_AUDIO_STANDARD_MIXER,
3391			},
3392			/* Playback */
3393			{
3394				.ifnum = 1,
3395				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3396				.data = &(const struct audioformat) {
3397					.formats = SNDRV_PCM_FMTBIT_S16_LE,
3398					.channels = 2,
3399					.iface = 1,
3400					.altsetting = 1,
3401					.altset_idx = 1,
3402					.attributes = UAC_EP_CS_ATTR_FILL_MAX |
3403						UAC_EP_CS_ATTR_SAMPLE_RATE,
3404					.endpoint = 0x03,
3405					.ep_attr = USB_ENDPOINT_XFER_ISOC,
3406					.rates = SNDRV_PCM_RATE_48000,
3407					.rate_min = 48000,
3408					.rate_max = 48000,
3409					.nr_rates = 1,
3410					.rate_table = (unsigned int[]) {
3411						48000
3412					}
3413				}
3414			},
3415			{
3416				.ifnum = -1
3417			},
3418		}
3419	}
3420},
3421/* Dell WD15 Dock */
3422{
3423	USB_DEVICE(0x0bda, 0x4014),
3424	QUIRK_DEVICE_PROFILE("Dell", "WD15 Dock", "Dell-WD15-Dock")
3425},
3426/* Dell WD19 Dock */
3427{
3428	USB_DEVICE(0x0bda, 0x402e),
3429	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
3430		.vendor_name = "Dell",
3431		.product_name = "WD19 Dock",
3432		.profile_name = "Dell-WD15-Dock",
3433		.ifnum = QUIRK_ANY_INTERFACE,
3434		.type = QUIRK_SETUP_FMT_AFTER_RESUME
3435	}
3436},
3437/* MOTU Microbook II */
3438{
3439	USB_DEVICE_VENDOR_SPEC(0x07fd, 0x0004),
3440	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3441		.vendor_name = "MOTU",
3442		.product_name = "MicroBookII",
3443		.ifnum = QUIRK_ANY_INTERFACE,
3444		.type = QUIRK_COMPOSITE,
3445		.data = (const struct snd_usb_audio_quirk[]) {
3446			{
3447				.ifnum = 0,
3448				.type = QUIRK_AUDIO_STANDARD_MIXER,
3449			},
3450			{
3451				.ifnum = 0,
3452				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3453				.data = &(const struct audioformat) {
3454					.formats = SNDRV_PCM_FMTBIT_S24_3BE,
3455					.channels = 6,
3456					.iface = 0,
3457					.altsetting = 1,
3458					.altset_idx = 1,
3459					.attributes = 0,
3460					.endpoint = 0x84,
3461					.rates = SNDRV_PCM_RATE_96000,
3462					.ep_attr = USB_ENDPOINT_XFER_ISOC |
3463						   USB_ENDPOINT_SYNC_ASYNC,
3464					.rate_min = 96000,
3465					.rate_max = 96000,
3466					.nr_rates = 1,
3467					.maxpacksize = 0x00d8,
3468					.rate_table = (unsigned int[]) {
3469						96000
3470					}
3471				}
3472			},
3473			{
3474				.ifnum = 0,
3475				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3476				.data = &(const struct audioformat) {
3477					.formats = SNDRV_PCM_FMTBIT_S24_3BE,
3478					.channels = 8,
3479					.iface = 0,
3480					.altsetting = 1,
3481					.altset_idx = 1,
3482					.attributes = 0,
3483					.endpoint = 0x03,
3484					.rates = SNDRV_PCM_RATE_96000,
3485					.ep_attr = USB_ENDPOINT_XFER_ISOC |
3486						   USB_ENDPOINT_SYNC_ASYNC,
3487					.rate_min = 96000,
3488					.rate_max = 96000,
3489					.nr_rates = 1,
3490					.maxpacksize = 0x0120,
3491					.rate_table = (unsigned int[]) {
3492						96000
3493					}
3494				}
3495			},
3496			{
3497				.ifnum = -1
3498			}
3499		}
3500	}
3501},
3502{
3503	/*
3504	 * PIONEER DJ DDJ-SX3
3505	 * PCM is 12 channels out, 10 channels in @ 44.1 fixed
3506	 * interface 0, vendor class alt setting 1 for endpoints 5 and 0x86
3507	 * The feedback for the output is the input.
3508	 */
3509	USB_DEVICE_VENDOR_SPEC(0x2b73, 0x0023),
3510	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3511		.ifnum = QUIRK_ANY_INTERFACE,
3512		.type = QUIRK_COMPOSITE,
3513		.data = (const struct snd_usb_audio_quirk[]) {
3514			{
3515				.ifnum = 0,
3516				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3517				.data = &(const struct audioformat) {
3518					.formats = SNDRV_PCM_FMTBIT_S32_LE,
3519					.channels = 12,
3520					.iface = 0,
3521					.altsetting = 1,
3522					.altset_idx = 1,
3523					.endpoint = 0x05,
3524					.ep_attr = USB_ENDPOINT_XFER_ISOC|
3525						   USB_ENDPOINT_SYNC_ASYNC,
3526					.rates = SNDRV_PCM_RATE_44100,
3527					.rate_min = 44100,
3528					.rate_max = 44100,
3529					.nr_rates = 1,
3530					.rate_table = (unsigned int[]) { 44100 }
3531				}
3532			},
3533			{
3534				.ifnum = 0,
3535				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3536				.data = &(const struct audioformat) {
3537					.formats = SNDRV_PCM_FMTBIT_S32_LE,
3538					.channels = 10,
3539					.iface = 0,
3540					.altsetting = 1,
3541					.altset_idx = 1,
3542					.endpoint = 0x86,
 
3543					.ep_attr = USB_ENDPOINT_XFER_ISOC|
3544						 USB_ENDPOINT_SYNC_ASYNC|
3545						 USB_ENDPOINT_USAGE_IMPLICIT_FB,
3546					.rates = SNDRV_PCM_RATE_44100,
3547					.rate_min = 44100,
3548					.rate_max = 44100,
3549					.nr_rates = 1,
3550					.rate_table = (unsigned int[]) { 44100 }
3551				}
3552			},
3553			{
3554				.ifnum = -1
3555			}
3556		}
3557	}
3558},
3559{
3560	/*
3561	 * Pioneer DJ DJM-250MK2
3562	 * PCM is 8 channels out @ 48 fixed (endpoint 0x01)
3563	 * and 8 channels in @ 48 fixed (endpoint 0x82).
3564	 *
3565	 * Both playback and recording is working, even simultaneously.
3566	 *
3567	 * Playback channels could be mapped to:
3568	 *  - CH1
3569	 *  - CH2
3570	 *  - AUX
3571	 *
3572	 * Recording channels could be mapped to:
3573	 *  - Post CH1 Fader
3574	 *  - Post CH2 Fader
3575	 *  - Cross Fader A
3576	 *  - Cross Fader B
3577	 *  - MIC
3578	 *  - AUX
3579	 *  - REC OUT
3580	 *
3581	 * There is remaining problem with recording directly from PHONO/LINE.
3582	 * If we map a channel to:
3583	 *  - CH1 Control Tone PHONO
3584	 *  - CH1 Control Tone LINE
3585	 *  - CH2 Control Tone PHONO
3586	 *  - CH2 Control Tone LINE
3587	 * it is silent.
3588	 * There is no signal even on other operating systems with official drivers.
3589	 * The signal appears only when a supported application is started.
3590	 * This needs to be investigated yet...
3591	 * (there is quite a lot communication on the USB in both directions)
3592	 *
3593	 * In current version this mixer could be used for playback
3594	 * and for recording from vinyls (through Post CH* Fader)
3595	 * but not for DVS (Digital Vinyl Systems) like in Mixxx.
3596	 */
3597	USB_DEVICE_VENDOR_SPEC(0x2b73, 0x0017),
3598	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3599		.ifnum = QUIRK_ANY_INTERFACE,
3600		.type = QUIRK_COMPOSITE,
3601		.data = (const struct snd_usb_audio_quirk[]) {
3602			{
3603				.ifnum = 0,
3604				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3605				.data = &(const struct audioformat) {
3606					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
3607					.channels = 8, // outputs
3608					.iface = 0,
3609					.altsetting = 1,
3610					.altset_idx = 1,
3611					.endpoint = 0x01,
3612					.ep_attr = USB_ENDPOINT_XFER_ISOC|
3613						USB_ENDPOINT_SYNC_ASYNC,
3614					.rates = SNDRV_PCM_RATE_48000,
3615					.rate_min = 48000,
3616					.rate_max = 48000,
3617					.nr_rates = 1,
3618					.rate_table = (unsigned int[]) { 48000 }
3619					}
3620			},
3621			{
3622				.ifnum = 0,
3623				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3624				.data = &(const struct audioformat) {
3625					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
3626					.channels = 8, // inputs
3627					.iface = 0,
3628					.altsetting = 1,
3629					.altset_idx = 1,
3630					.endpoint = 0x82,
 
3631					.ep_attr = USB_ENDPOINT_XFER_ISOC|
3632						USB_ENDPOINT_SYNC_ASYNC|
3633						USB_ENDPOINT_USAGE_IMPLICIT_FB,
3634					.rates = SNDRV_PCM_RATE_48000,
3635					.rate_min = 48000,
3636					.rate_max = 48000,
3637					.nr_rates = 1,
3638					.rate_table = (unsigned int[]) { 48000 }
3639				}
3640			},
3641			{
3642				.ifnum = -1
3643			}
3644		}
3645	}
3646},
3647{
3648	/*
3649	 * PIONEER DJ DDJ-RB
3650	 * PCM is 4 channels out, 2 dummy channels in @ 44.1 fixed
3651	 * The feedback for the output is the dummy input.
3652	 */
3653	USB_DEVICE_VENDOR_SPEC(0x2b73, 0x000e),
3654	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3655		.ifnum = QUIRK_ANY_INTERFACE,
3656		.type = QUIRK_COMPOSITE,
3657		.data = (const struct snd_usb_audio_quirk[]) {
3658			{
3659				.ifnum = 0,
3660				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3661				.data = &(const struct audioformat) {
3662					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
3663					.channels = 4,
3664					.iface = 0,
3665					.altsetting = 1,
3666					.altset_idx = 1,
3667					.endpoint = 0x01,
3668					.ep_attr = USB_ENDPOINT_XFER_ISOC|
3669						   USB_ENDPOINT_SYNC_ASYNC,
3670					.rates = SNDRV_PCM_RATE_44100,
3671					.rate_min = 44100,
3672					.rate_max = 44100,
3673					.nr_rates = 1,
3674					.rate_table = (unsigned int[]) { 44100 }
3675				}
3676			},
3677			{
3678				.ifnum = 0,
3679				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3680				.data = &(const struct audioformat) {
3681					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
3682					.channels = 2,
3683					.iface = 0,
3684					.altsetting = 1,
3685					.altset_idx = 1,
3686					.endpoint = 0x82,
 
3687					.ep_attr = USB_ENDPOINT_XFER_ISOC|
3688						 USB_ENDPOINT_SYNC_ASYNC|
3689						 USB_ENDPOINT_USAGE_IMPLICIT_FB,
3690					.rates = SNDRV_PCM_RATE_44100,
3691					.rate_min = 44100,
3692					.rate_max = 44100,
3693					.nr_rates = 1,
3694					.rate_table = (unsigned int[]) { 44100 }
3695				}
3696			},
3697			{
3698				.ifnum = -1
3699			}
3700		}
3701	}
3702},
3703
3704#define ALC1220_VB_DESKTOP(vend, prod) { \
3705	USB_DEVICE(vend, prod),	\
3706	QUIRK_DEVICE_PROFILE("Realtek", "ALC1220-VB-DT", \
3707			     "Realtek-ALC1220-VB-Desktop") \
3708}
3709ALC1220_VB_DESKTOP(0x0414, 0xa002), /* Gigabyte TRX40 Aorus Pro WiFi */
3710ALC1220_VB_DESKTOP(0x0db0, 0x0d64), /* MSI TRX40 Creator */
3711ALC1220_VB_DESKTOP(0x0db0, 0x543d), /* MSI TRX40 */
3712ALC1220_VB_DESKTOP(0x26ce, 0x0a01), /* Asrock TRX40 Creator */
3713#undef ALC1220_VB_DESKTOP
3714
3715/* Two entries for Gigabyte TRX40 Aorus Master:
3716 * TRX40 Aorus Master has two USB-audio devices, one for the front headphone
3717 * with ESS SABRE9218 DAC chip, while another for the rest I/O (the rear
3718 * panel and the front mic) with Realtek ALC1220-VB.
3719 * Here we provide two distinct names for making UCM profiles easier.
3720 */
3721{
3722	USB_DEVICE(0x0414, 0xa000),
3723	QUIRK_DEVICE_PROFILE("Gigabyte", "Aorus Master Front Headphone",
3724			     "Gigabyte-Aorus-Master-Front-Headphone")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3725},
 
3726{
3727	USB_DEVICE(0x0414, 0xa001),
3728	QUIRK_DEVICE_PROFILE("Gigabyte", "Aorus Master Main Audio",
3729			     "Gigabyte-Aorus-Master-Main-Audio")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3730},
 
3731{
3732	/*
3733	 * Pioneer DJ DJM-900NXS2
3734	 * 10 channels playback & 12 channels capture @ 44.1/48/96kHz S24LE
3735	 */
3736	USB_DEVICE_VENDOR_SPEC(0x2b73, 0x000a),
3737	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3738		.ifnum = QUIRK_ANY_INTERFACE,
3739		.type = QUIRK_COMPOSITE,
3740		.data = (const struct snd_usb_audio_quirk[]) {
3741			{
3742				.ifnum = 0,
3743				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3744				.data = &(const struct audioformat) {
3745					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
3746					.channels = 10,
3747					.iface = 0,
3748					.altsetting = 1,
3749					.altset_idx = 1,
3750					.endpoint = 0x01,
3751					.ep_attr = USB_ENDPOINT_XFER_ISOC|
3752					    USB_ENDPOINT_SYNC_ASYNC,
3753					.rates = SNDRV_PCM_RATE_44100|
3754					    SNDRV_PCM_RATE_48000|
3755					    SNDRV_PCM_RATE_96000,
3756					.rate_min = 44100,
3757					.rate_max = 96000,
3758					.nr_rates = 3,
3759					.rate_table = (unsigned int[]) {
3760						44100, 48000, 96000
3761					}
3762				}
3763			},
3764			{
3765				.ifnum = 0,
3766				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3767				.data = &(const struct audioformat) {
3768					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
3769					.channels = 12,
3770					.iface = 0,
3771					.altsetting = 1,
3772					.altset_idx = 1,
3773					.endpoint = 0x82,
 
3774					.ep_attr = USB_ENDPOINT_XFER_ISOC|
3775					    USB_ENDPOINT_SYNC_ASYNC|
3776					    USB_ENDPOINT_USAGE_IMPLICIT_FB,
3777					.rates = SNDRV_PCM_RATE_44100|
3778					    SNDRV_PCM_RATE_48000|
3779					    SNDRV_PCM_RATE_96000,
3780					.rate_min = 44100,
3781					.rate_max = 96000,
3782					.nr_rates = 3,
3783					.rate_table = (unsigned int[]) {
3784						44100, 48000, 96000
3785					}
3786				}
3787			},
3788			{
3789				.ifnum = -1
3790			}
3791		}
3792	}
3793},
3794
3795/*
3796 * MacroSilicon MS2109 based HDMI capture cards
3797 *
3798 * These claim 96kHz 1ch in the descriptors, but are actually 48kHz 2ch.
3799 * They also need QUIRK_AUDIO_ALIGN_TRANSFER, which makes one wonder if
3800 * they pretend to be 96kHz mono as a workaround for stereo being broken
3801 * by that...
3802 *
3803 * They also have an issue with initial stream alignment that causes the
3804 * channels to be swapped and out of phase, which is dealt with in quirks.c.
3805 */
3806{
3807	.match_flags = USB_DEVICE_ID_MATCH_DEVICE |
3808		       USB_DEVICE_ID_MATCH_INT_CLASS |
3809		       USB_DEVICE_ID_MATCH_INT_SUBCLASS,
3810	.idVendor = 0x534d,
3811	.idProduct = 0x2109,
3812	.bInterfaceClass = USB_CLASS_AUDIO,
3813	.bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
3814	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3815		.vendor_name = "MacroSilicon",
3816		.product_name = "MS2109",
3817		.ifnum = QUIRK_ANY_INTERFACE,
3818		.type = QUIRK_COMPOSITE,
3819		.data = &(const struct snd_usb_audio_quirk[]) {
3820			{
3821				.ifnum = 2,
3822				.type = QUIRK_AUDIO_ALIGN_TRANSFER,
3823			},
3824			{
3825				.ifnum = 2,
3826				.type = QUIRK_AUDIO_STANDARD_MIXER,
3827			},
3828			{
3829				.ifnum = 3,
3830				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3831				.data = &(const struct audioformat) {
3832					.formats = SNDRV_PCM_FMTBIT_S16_LE,
3833					.channels = 2,
3834					.iface = 3,
3835					.altsetting = 1,
3836					.altset_idx = 1,
3837					.attributes = 0,
3838					.endpoint = 0x82,
3839					.ep_attr = USB_ENDPOINT_XFER_ISOC |
3840						USB_ENDPOINT_SYNC_ASYNC,
3841					.rates = SNDRV_PCM_RATE_CONTINUOUS,
3842					.rate_min = 48000,
3843					.rate_max = 48000,
3844				}
3845			},
3846			{
3847				.ifnum = -1
3848			}
3849		}
3850	}
3851},
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3852
3853#undef USB_DEVICE_VENDOR_SPEC
v5.14.15
   1/* SPDX-License-Identifier: GPL-2.0-or-later */
   2/*
   3 * ALSA USB Audio Driver
   4 *
   5 * Copyright (c) 2002 by Takashi Iwai <tiwai@suse.de>,
   6 *                       Clemens Ladisch <clemens@ladisch.de>
   7 */
   8
   9/*
  10 * The contents of this file are part of the driver's id_table.
  11 *
  12 * In a perfect world, this file would be empty.
  13 */
  14
  15/*
  16 * Use this for devices where other interfaces are standard compliant,
  17 * to prevent the quirk being applied to those interfaces. (To work with
  18 * hotplugging, bDeviceClass must be set to USB_CLASS_PER_INTERFACE.)
  19 */
  20#define USB_DEVICE_VENDOR_SPEC(vend, prod) \
  21	.match_flags = USB_DEVICE_ID_MATCH_VENDOR | \
  22		       USB_DEVICE_ID_MATCH_PRODUCT | \
  23		       USB_DEVICE_ID_MATCH_INT_CLASS, \
  24	.idVendor = vend, \
  25	.idProduct = prod, \
  26	.bInterfaceClass = USB_CLASS_VENDOR_SPEC
  27
  28/* A standard entry matching with vid/pid and the audio class/subclass */
  29#define USB_AUDIO_DEVICE(vend, prod) \
  30	.match_flags = USB_DEVICE_ID_MATCH_DEVICE | \
  31		       USB_DEVICE_ID_MATCH_INT_CLASS | \
  32		       USB_DEVICE_ID_MATCH_INT_SUBCLASS, \
  33	.idVendor = vend, \
  34	.idProduct = prod, \
  35	.bInterfaceClass = USB_CLASS_AUDIO, \
  36	.bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL
 
 
 
 
 
  37
 
 
 
 
 
 
 
 
 
 
 
 
  38/* FTDI devices */
  39{
  40	USB_DEVICE(0x0403, 0xb8d8),
  41	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
  42		/* .vendor_name = "STARR LABS", */
  43		/* .product_name = "Starr Labs MIDI USB device", */
  44		.ifnum = 0,
  45		.type = QUIRK_MIDI_FTDI
  46	}
  47},
  48
  49{
  50	/* Creative BT-D1 */
  51	USB_DEVICE(0x041e, 0x0005),
  52	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
  53		.ifnum = 1,
  54		.type = QUIRK_AUDIO_FIXED_ENDPOINT,
  55		.data = &(const struct audioformat) {
  56			.formats = SNDRV_PCM_FMTBIT_S16_LE,
  57			.channels = 2,
  58			.iface = 1,
  59			.altsetting = 1,
  60			.altset_idx = 1,
  61			.endpoint = 0x03,
  62			.ep_attr = USB_ENDPOINT_XFER_ISOC,
  63			.attributes = 0,
  64			.rates = SNDRV_PCM_RATE_CONTINUOUS,
  65			.rate_min = 48000,
  66			.rate_max = 48000,
  67		}
  68	}
  69},
  70
  71/* E-Mu 0202 USB */
  72{ USB_DEVICE_VENDOR_SPEC(0x041e, 0x3f02) },
  73/* E-Mu 0404 USB */
  74{ USB_DEVICE_VENDOR_SPEC(0x041e, 0x3f04) },
  75/* E-Mu Tracker Pre */
  76{ USB_DEVICE_VENDOR_SPEC(0x041e, 0x3f0a) },
  77/* E-Mu 0204 USB */
  78{ USB_DEVICE_VENDOR_SPEC(0x041e, 0x3f19) },
  79
  80/*
  81 * Creative Technology, Ltd Live! Cam Sync HD [VF0770]
  82 * The device advertises 8 formats, but only a rate of 48kHz is honored by the
  83 * hardware and 24 bits give chopped audio, so only report the one working
  84 * combination.
  85 */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  86{
  87	USB_DEVICE(0x041e, 0x4095),
  88	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
  89		.ifnum = QUIRK_ANY_INTERFACE,
  90		.type = QUIRK_COMPOSITE,
  91		.data = &(const struct snd_usb_audio_quirk[]) {
  92			{
  93				.ifnum = 2,
  94				.type = QUIRK_AUDIO_STANDARD_MIXER,
  95			},
  96			{
  97				.ifnum = 3,
  98				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
  99				.data = &(const struct audioformat) {
 100					.formats = SNDRV_PCM_FMTBIT_S16_LE,
 101					.channels = 2,
 102					.fmt_bits = 16,
 103					.iface = 3,
 104					.altsetting = 4,
 105					.altset_idx = 4,
 106					.endpoint = 0x82,
 107					.ep_attr = 0x05,
 108					.rates = SNDRV_PCM_RATE_48000,
 109					.rate_min = 48000,
 110					.rate_max = 48000,
 111					.nr_rates = 1,
 112					.rate_table = (unsigned int[]) { 48000 },
 113				},
 114			},
 115			{
 116				.ifnum = -1
 117			},
 118		},
 119	},
 120},
 121
 122/*
 123 * HP Wireless Audio
 124 * When not ignored, causes instability issues for some users, forcing them to
 125 * skip the entire module.
 126 */
 127{
 128	USB_DEVICE(0x0424, 0xb832),
 129	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
 130		.vendor_name = "Standard Microsystems Corp.",
 131		.product_name = "HP Wireless Audio",
 132		.ifnum = QUIRK_ANY_INTERFACE,
 133		.type = QUIRK_COMPOSITE,
 134		.data = (const struct snd_usb_audio_quirk[]) {
 135			/* Mixer */
 136			{
 137				.ifnum = 0,
 138				.type = QUIRK_IGNORE_INTERFACE,
 139			},
 140			/* Playback */
 141			{
 142				.ifnum = 1,
 143				.type = QUIRK_IGNORE_INTERFACE,
 144			},
 145			/* Capture */
 146			{
 147				.ifnum = 2,
 148				.type = QUIRK_IGNORE_INTERFACE,
 149			},
 150			/* HID Device, .ifnum = 3 */
 151			{
 152				.ifnum = -1,
 153			}
 154		}
 155	}
 156},
 157
 158/*
 159 * Logitech QuickCam: bDeviceClass is vendor-specific, so generic interface
 160 * class matches do not take effect without an explicit ID match.
 161 */
 162{ USB_AUDIO_DEVICE(0x046d, 0x0850) },
 163{ USB_AUDIO_DEVICE(0x046d, 0x08ae) },
 164{ USB_AUDIO_DEVICE(0x046d, 0x08c6) },
 165{ USB_AUDIO_DEVICE(0x046d, 0x08f0) },
 166{ USB_AUDIO_DEVICE(0x046d, 0x08f5) },
 167{ USB_AUDIO_DEVICE(0x046d, 0x08f6) },
 168{ USB_AUDIO_DEVICE(0x046d, 0x0990) },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 169
 170/*
 171 * Yamaha devices
 172 */
 173
 174#define YAMAHA_DEVICE(id, name) { \
 175	USB_DEVICE(0x0499, id), \
 176	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { \
 177		.vendor_name = "Yamaha", \
 178		.product_name = name, \
 179		.ifnum = QUIRK_ANY_INTERFACE, \
 180		.type = QUIRK_MIDI_YAMAHA \
 181	} \
 182}
 183#define YAMAHA_INTERFACE(id, intf, name) { \
 184	USB_DEVICE_VENDOR_SPEC(0x0499, id), \
 185	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { \
 186		.vendor_name = "Yamaha", \
 187		.product_name = name, \
 188		.ifnum = intf, \
 189		.type = QUIRK_MIDI_YAMAHA \
 190	} \
 191}
 192YAMAHA_DEVICE(0x1000, "UX256"),
 193YAMAHA_DEVICE(0x1001, "MU1000"),
 194YAMAHA_DEVICE(0x1002, "MU2000"),
 195YAMAHA_DEVICE(0x1003, "MU500"),
 196YAMAHA_INTERFACE(0x1004, 3, "UW500"),
 197YAMAHA_DEVICE(0x1005, "MOTIF6"),
 198YAMAHA_DEVICE(0x1006, "MOTIF7"),
 199YAMAHA_DEVICE(0x1007, "MOTIF8"),
 200YAMAHA_DEVICE(0x1008, "UX96"),
 201YAMAHA_DEVICE(0x1009, "UX16"),
 202YAMAHA_INTERFACE(0x100a, 3, "EOS BX"),
 203YAMAHA_DEVICE(0x100c, "UC-MX"),
 204YAMAHA_DEVICE(0x100d, "UC-KX"),
 205YAMAHA_DEVICE(0x100e, "S08"),
 206YAMAHA_DEVICE(0x100f, "CLP-150"),
 207YAMAHA_DEVICE(0x1010, "CLP-170"),
 208YAMAHA_DEVICE(0x1011, "P-250"),
 209YAMAHA_DEVICE(0x1012, "TYROS"),
 210YAMAHA_DEVICE(0x1013, "PF-500"),
 211YAMAHA_DEVICE(0x1014, "S90"),
 212YAMAHA_DEVICE(0x1015, "MOTIF-R"),
 213YAMAHA_DEVICE(0x1016, "MDP-5"),
 214YAMAHA_DEVICE(0x1017, "CVP-204"),
 215YAMAHA_DEVICE(0x1018, "CVP-206"),
 216YAMAHA_DEVICE(0x1019, "CVP-208"),
 217YAMAHA_DEVICE(0x101a, "CVP-210"),
 218YAMAHA_DEVICE(0x101b, "PSR-1100"),
 219YAMAHA_DEVICE(0x101c, "PSR-2100"),
 220YAMAHA_DEVICE(0x101d, "CLP-175"),
 221YAMAHA_DEVICE(0x101e, "PSR-K1"),
 222YAMAHA_DEVICE(0x101f, "EZ-J24"),
 223YAMAHA_DEVICE(0x1020, "EZ-250i"),
 224YAMAHA_DEVICE(0x1021, "MOTIF ES 6"),
 225YAMAHA_DEVICE(0x1022, "MOTIF ES 7"),
 226YAMAHA_DEVICE(0x1023, "MOTIF ES 8"),
 227YAMAHA_DEVICE(0x1024, "CVP-301"),
 228YAMAHA_DEVICE(0x1025, "CVP-303"),
 229YAMAHA_DEVICE(0x1026, "CVP-305"),
 230YAMAHA_DEVICE(0x1027, "CVP-307"),
 231YAMAHA_DEVICE(0x1028, "CVP-309"),
 232YAMAHA_DEVICE(0x1029, "CVP-309GP"),
 233YAMAHA_DEVICE(0x102a, "PSR-1500"),
 234YAMAHA_DEVICE(0x102b, "PSR-3000"),
 235YAMAHA_DEVICE(0x102e, "ELS-01/01C"),
 236YAMAHA_DEVICE(0x1030, "PSR-295/293"),
 237YAMAHA_DEVICE(0x1031, "DGX-205/203"),
 238YAMAHA_DEVICE(0x1032, "DGX-305"),
 239YAMAHA_DEVICE(0x1033, "DGX-505"),
 240YAMAHA_DEVICE(0x1034, NULL),
 241YAMAHA_DEVICE(0x1035, NULL),
 242YAMAHA_DEVICE(0x1036, NULL),
 243YAMAHA_DEVICE(0x1037, NULL),
 244YAMAHA_DEVICE(0x1038, NULL),
 245YAMAHA_DEVICE(0x1039, NULL),
 246YAMAHA_DEVICE(0x103a, NULL),
 247YAMAHA_DEVICE(0x103b, NULL),
 248YAMAHA_DEVICE(0x103c, NULL),
 249YAMAHA_DEVICE(0x103d, NULL),
 250YAMAHA_DEVICE(0x103e, NULL),
 251YAMAHA_DEVICE(0x103f, NULL),
 252YAMAHA_DEVICE(0x1040, NULL),
 253YAMAHA_DEVICE(0x1041, NULL),
 254YAMAHA_DEVICE(0x1042, NULL),
 255YAMAHA_DEVICE(0x1043, NULL),
 256YAMAHA_DEVICE(0x1044, NULL),
 257YAMAHA_DEVICE(0x1045, NULL),
 258YAMAHA_INTERFACE(0x104e, 0, NULL),
 259YAMAHA_DEVICE(0x104f, NULL),
 260YAMAHA_DEVICE(0x1050, NULL),
 261YAMAHA_DEVICE(0x1051, NULL),
 262YAMAHA_DEVICE(0x1052, NULL),
 263YAMAHA_INTERFACE(0x1053, 0, NULL),
 264YAMAHA_INTERFACE(0x1054, 0, NULL),
 265YAMAHA_DEVICE(0x1055, NULL),
 266YAMAHA_DEVICE(0x1056, NULL),
 267YAMAHA_DEVICE(0x1057, NULL),
 268YAMAHA_DEVICE(0x1058, NULL),
 269YAMAHA_DEVICE(0x1059, NULL),
 270YAMAHA_DEVICE(0x105a, NULL),
 271YAMAHA_DEVICE(0x105b, NULL),
 272YAMAHA_DEVICE(0x105c, NULL),
 273YAMAHA_DEVICE(0x105d, NULL),
 274{
 275	USB_DEVICE(0x0499, 0x1503),
 276	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 277		/* .vendor_name = "Yamaha", */
 278		/* .product_name = "MOX6/MOX8", */
 279		.ifnum = QUIRK_ANY_INTERFACE,
 280		.type = QUIRK_COMPOSITE,
 281		.data = (const struct snd_usb_audio_quirk[]) {
 282			{
 283				.ifnum = 1,
 284				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 285			},
 286			{
 287				.ifnum = 2,
 288				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 289			},
 290			{
 291				.ifnum = 3,
 292				.type = QUIRK_MIDI_YAMAHA
 293			},
 294			{
 295				.ifnum = -1
 296			}
 297		}
 298	}
 299},
 300{
 301	USB_DEVICE(0x0499, 0x1507),
 302	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 303		/* .vendor_name = "Yamaha", */
 304		/* .product_name = "THR10", */
 305		.ifnum = QUIRK_ANY_INTERFACE,
 306		.type = QUIRK_COMPOSITE,
 307		.data = (const struct snd_usb_audio_quirk[]) {
 308			{
 309				.ifnum = 1,
 310				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 311			},
 312			{
 313				.ifnum = 2,
 314				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 315			},
 316			{
 317				.ifnum = 3,
 318				.type = QUIRK_MIDI_YAMAHA
 319			},
 320			{
 321				.ifnum = -1
 322			}
 323		}
 324	}
 325},
 326{
 327	USB_DEVICE(0x0499, 0x1509),
 328	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 329		/* .vendor_name = "Yamaha", */
 330		/* .product_name = "Steinberg UR22", */
 331		.ifnum = QUIRK_ANY_INTERFACE,
 332		.type = QUIRK_COMPOSITE,
 333		.data = (const struct snd_usb_audio_quirk[]) {
 334			{
 335				.ifnum = 1,
 336				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 337			},
 338			{
 339				.ifnum = 2,
 340				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 341			},
 342			{
 343				.ifnum = 3,
 344				.type = QUIRK_MIDI_YAMAHA
 345			},
 346			{
 347				.ifnum = 4,
 348				.type = QUIRK_IGNORE_INTERFACE
 349			},
 350			{
 351				.ifnum = -1
 352			}
 353		}
 354	}
 355},
 356{
 357	USB_DEVICE(0x0499, 0x150a),
 358	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 359		/* .vendor_name = "Yamaha", */
 360		/* .product_name = "THR5A", */
 361		.ifnum = QUIRK_ANY_INTERFACE,
 362		.type = QUIRK_COMPOSITE,
 363		.data = (const struct snd_usb_audio_quirk[]) {
 364			{
 365				.ifnum = 1,
 366				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 367			},
 368			{
 369				.ifnum = 2,
 370				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 371			},
 372			{
 373				.ifnum = 3,
 374				.type = QUIRK_MIDI_YAMAHA
 375			},
 376			{
 377				.ifnum = -1
 378			}
 379		}
 380	}
 381},
 382{
 383	USB_DEVICE(0x0499, 0x150c),
 384	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 385		/* .vendor_name = "Yamaha", */
 386		/* .product_name = "THR10C", */
 387		.ifnum = QUIRK_ANY_INTERFACE,
 388		.type = QUIRK_COMPOSITE,
 389		.data = (const struct snd_usb_audio_quirk[]) {
 390			{
 391				.ifnum = 1,
 392				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 393			},
 394			{
 395				.ifnum = 2,
 396				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 397			},
 398			{
 399				.ifnum = 3,
 400				.type = QUIRK_MIDI_YAMAHA
 401			},
 402			{
 403				.ifnum = -1
 404			}
 405		}
 406	}
 407},
 408YAMAHA_DEVICE(0x2000, "DGP-7"),
 409YAMAHA_DEVICE(0x2001, "DGP-5"),
 410YAMAHA_DEVICE(0x2002, NULL),
 411YAMAHA_DEVICE(0x2003, NULL),
 412YAMAHA_DEVICE(0x5000, "CS1D"),
 413YAMAHA_DEVICE(0x5001, "DSP1D"),
 414YAMAHA_DEVICE(0x5002, "DME32"),
 415YAMAHA_DEVICE(0x5003, "DM2000"),
 416YAMAHA_DEVICE(0x5004, "02R96"),
 417YAMAHA_DEVICE(0x5005, "ACU16-C"),
 418YAMAHA_DEVICE(0x5006, "NHB32-C"),
 419YAMAHA_DEVICE(0x5007, "DM1000"),
 420YAMAHA_DEVICE(0x5008, "01V96"),
 421YAMAHA_DEVICE(0x5009, "SPX2000"),
 422YAMAHA_DEVICE(0x500a, "PM5D"),
 423YAMAHA_DEVICE(0x500b, "DME64N"),
 424YAMAHA_DEVICE(0x500c, "DME24N"),
 425YAMAHA_DEVICE(0x500d, NULL),
 426YAMAHA_DEVICE(0x500e, NULL),
 427YAMAHA_DEVICE(0x500f, NULL),
 428YAMAHA_DEVICE(0x7000, "DTX"),
 429YAMAHA_DEVICE(0x7010, "UB99"),
 430#undef YAMAHA_DEVICE
 431#undef YAMAHA_INTERFACE
 432/* this catches most recent vendor-specific Yamaha devices */
 433{
 434	.match_flags = USB_DEVICE_ID_MATCH_VENDOR |
 435	               USB_DEVICE_ID_MATCH_INT_CLASS,
 436	.idVendor = 0x0499,
 437	.bInterfaceClass = USB_CLASS_VENDOR_SPEC,
 438	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
 439		.ifnum = QUIRK_ANY_INTERFACE,
 440		.type = QUIRK_AUTODETECT
 441	}
 442},
 443
 444/*
 445 * Roland/RolandED/Edirol/BOSS devices
 446 */
 447{
 448	USB_DEVICE(0x0582, 0x0000),
 449	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 450		.vendor_name = "Roland",
 451		.product_name = "UA-100",
 452		.ifnum = QUIRK_ANY_INTERFACE,
 453		.type = QUIRK_COMPOSITE,
 454		.data = (const struct snd_usb_audio_quirk[]) {
 455			{
 456				.ifnum = 0,
 457				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
 458				.data = & (const struct audioformat) {
 459					.formats = SNDRV_PCM_FMTBIT_S16_LE,
 460					.channels = 4,
 461					.iface = 0,
 462					.altsetting = 1,
 463					.altset_idx = 1,
 464					.attributes = 0,
 465					.endpoint = 0x01,
 466					.ep_attr = 0x09,
 467					.rates = SNDRV_PCM_RATE_CONTINUOUS,
 468					.rate_min = 44100,
 469					.rate_max = 44100,
 470				}
 471			},
 472			{
 473				.ifnum = 1,
 474				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
 475				.data = & (const struct audioformat) {
 476					.formats = SNDRV_PCM_FMTBIT_S16_LE,
 477					.channels = 2,
 478					.iface = 1,
 479					.altsetting = 1,
 480					.altset_idx = 1,
 481					.attributes = UAC_EP_CS_ATTR_FILL_MAX,
 482					.endpoint = 0x81,
 483					.ep_attr = 0x05,
 484					.rates = SNDRV_PCM_RATE_CONTINUOUS,
 485					.rate_min = 44100,
 486					.rate_max = 44100,
 487				}
 488			},
 489			{
 490				.ifnum = 2,
 491				.type = QUIRK_MIDI_FIXED_ENDPOINT,
 492				.data = & (const struct snd_usb_midi_endpoint_info) {
 493					.out_cables = 0x0007,
 494					.in_cables  = 0x0007
 495				}
 496			},
 497			{
 498				.ifnum = -1
 499			}
 500		}
 501	}
 502},
 503{
 504	USB_DEVICE(0x0582, 0x0002),
 505	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 506		.vendor_name = "EDIROL",
 507		.product_name = "UM-4",
 508		.ifnum = QUIRK_ANY_INTERFACE,
 509		.type = QUIRK_COMPOSITE,
 510		.data = (const struct snd_usb_audio_quirk[]) {
 511			{
 512				.ifnum = 0,
 513				.type = QUIRK_IGNORE_INTERFACE
 514			},
 515			{
 516				.ifnum = 1,
 517				.type = QUIRK_IGNORE_INTERFACE
 518			},
 519			{
 520				.ifnum = 2,
 521				.type = QUIRK_MIDI_FIXED_ENDPOINT,
 522				.data = & (const struct snd_usb_midi_endpoint_info) {
 523					.out_cables = 0x000f,
 524					.in_cables  = 0x000f
 525				}
 526			},
 527			{
 528				.ifnum = -1
 529			}
 530		}
 531	}
 532},
 533{
 534	USB_DEVICE(0x0582, 0x0003),
 535	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 536		.vendor_name = "Roland",
 537		.product_name = "SC-8850",
 538		.ifnum = QUIRK_ANY_INTERFACE,
 539		.type = QUIRK_COMPOSITE,
 540		.data = (const struct snd_usb_audio_quirk[]) {
 541			{
 542				.ifnum = 0,
 543				.type = QUIRK_IGNORE_INTERFACE
 544			},
 545			{
 546				.ifnum = 1,
 547				.type = QUIRK_IGNORE_INTERFACE
 548			},
 549			{
 550				.ifnum = 2,
 551				.type = QUIRK_MIDI_FIXED_ENDPOINT,
 552				.data = & (const struct snd_usb_midi_endpoint_info) {
 553					.out_cables = 0x003f,
 554					.in_cables  = 0x003f
 555				}
 556			},
 557			{
 558				.ifnum = -1
 559			}
 560		}
 561	}
 562},
 563{
 564	USB_DEVICE(0x0582, 0x0004),
 565	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 566		.vendor_name = "Roland",
 567		.product_name = "U-8",
 568		.ifnum = QUIRK_ANY_INTERFACE,
 569		.type = QUIRK_COMPOSITE,
 570		.data = (const struct snd_usb_audio_quirk[]) {
 571			{
 572				.ifnum = 0,
 573				.type = QUIRK_IGNORE_INTERFACE
 574			},
 575			{
 576				.ifnum = 1,
 577				.type = QUIRK_IGNORE_INTERFACE
 578			},
 579			{
 580				.ifnum = 2,
 581				.type = QUIRK_MIDI_FIXED_ENDPOINT,
 582				.data = & (const struct snd_usb_midi_endpoint_info) {
 583					.out_cables = 0x0005,
 584					.in_cables  = 0x0005
 585				}
 586			},
 587			{
 588				.ifnum = -1
 589			}
 590		}
 591	}
 592},
 593{
 594	/* Has ID 0x0099 when not in "Advanced Driver" mode.
 595	 * The UM-2EX has only one input, but we cannot detect this. */
 596	USB_DEVICE(0x0582, 0x0005),
 597	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 598		.vendor_name = "EDIROL",
 599		.product_name = "UM-2",
 600		.ifnum = QUIRK_ANY_INTERFACE,
 601		.type = QUIRK_COMPOSITE,
 602		.data = (const struct snd_usb_audio_quirk[]) {
 603			{
 604				.ifnum = 0,
 605				.type = QUIRK_IGNORE_INTERFACE
 606			},
 607			{
 608				.ifnum = 1,
 609				.type = QUIRK_IGNORE_INTERFACE
 610			},
 611			{
 612				.ifnum = 2,
 613				.type = QUIRK_MIDI_FIXED_ENDPOINT,
 614				.data = & (const struct snd_usb_midi_endpoint_info) {
 615					.out_cables = 0x0003,
 616					.in_cables  = 0x0003
 617				}
 618			},
 619			{
 620				.ifnum = -1
 621			}
 622		}
 623	}
 624},
 625{
 626	USB_DEVICE(0x0582, 0x0007),
 627	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 628		.vendor_name = "Roland",
 629		.product_name = "SC-8820",
 630		.ifnum = QUIRK_ANY_INTERFACE,
 631		.type = QUIRK_COMPOSITE,
 632		.data = (const struct snd_usb_audio_quirk[]) {
 633			{
 634				.ifnum = 0,
 635				.type = QUIRK_IGNORE_INTERFACE
 636			},
 637			{
 638				.ifnum = 1,
 639				.type = QUIRK_IGNORE_INTERFACE
 640			},
 641			{
 642				.ifnum = 2,
 643				.type = QUIRK_MIDI_FIXED_ENDPOINT,
 644				.data = & (const struct snd_usb_midi_endpoint_info) {
 645					.out_cables = 0x0013,
 646					.in_cables  = 0x0013
 647				}
 648			},
 649			{
 650				.ifnum = -1
 651			}
 652		}
 653	}
 654},
 655{
 656	USB_DEVICE(0x0582, 0x0008),
 657	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 658		.vendor_name = "Roland",
 659		.product_name = "PC-300",
 660		.ifnum = QUIRK_ANY_INTERFACE,
 661		.type = QUIRK_COMPOSITE,
 662		.data = (const struct snd_usb_audio_quirk[]) {
 663			{
 664				.ifnum = 0,
 665				.type = QUIRK_IGNORE_INTERFACE
 666			},
 667			{
 668				.ifnum = 1,
 669				.type = QUIRK_IGNORE_INTERFACE
 670			},
 671			{
 672				.ifnum = 2,
 673				.type = QUIRK_MIDI_FIXED_ENDPOINT,
 674				.data = & (const struct snd_usb_midi_endpoint_info) {
 675					.out_cables = 0x0001,
 676					.in_cables  = 0x0001
 677				}
 678			},
 679			{
 680				.ifnum = -1
 681			}
 682		}
 683	}
 684},
 685{
 686	/* has ID 0x009d when not in "Advanced Driver" mode */
 687	USB_DEVICE(0x0582, 0x0009),
 688	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 689		.vendor_name = "EDIROL",
 690		.product_name = "UM-1",
 691		.ifnum = QUIRK_ANY_INTERFACE,
 692		.type = QUIRK_COMPOSITE,
 693		.data = (const struct snd_usb_audio_quirk[]) {
 694			{
 695				.ifnum = 0,
 696				.type = QUIRK_IGNORE_INTERFACE
 697			},
 698			{
 699				.ifnum = 1,
 700				.type = QUIRK_IGNORE_INTERFACE
 701			},
 702			{
 703				.ifnum = 2,
 704				.type = QUIRK_MIDI_FIXED_ENDPOINT,
 705				.data = & (const struct snd_usb_midi_endpoint_info) {
 706					.out_cables = 0x0001,
 707					.in_cables  = 0x0001
 708				}
 709			},
 710			{
 711				.ifnum = -1
 712			}
 713		}
 714	}
 715},
 716{
 717	USB_DEVICE(0x0582, 0x000b),
 718	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 719		.vendor_name = "Roland",
 720		.product_name = "SK-500",
 721		.ifnum = QUIRK_ANY_INTERFACE,
 722		.type = QUIRK_COMPOSITE,
 723		.data = (const struct snd_usb_audio_quirk[]) {
 724			{
 725				.ifnum = 0,
 726				.type = QUIRK_IGNORE_INTERFACE
 727			},
 728			{
 729				.ifnum = 1,
 730				.type = QUIRK_IGNORE_INTERFACE
 731			},
 732			{
 733				.ifnum = 2,
 734				.type = QUIRK_MIDI_FIXED_ENDPOINT,
 735				.data = & (const struct snd_usb_midi_endpoint_info) {
 736					.out_cables = 0x0013,
 737					.in_cables  = 0x0013
 738				}
 739			},
 740			{
 741				.ifnum = -1
 742			}
 743		}
 744	}
 745},
 746{
 747	/* thanks to Emiliano Grilli <emillo@libero.it>
 748	 * for helping researching this data */
 749	USB_DEVICE(0x0582, 0x000c),
 750	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 751		.vendor_name = "Roland",
 752		.product_name = "SC-D70",
 753		.ifnum = QUIRK_ANY_INTERFACE,
 754		.type = QUIRK_COMPOSITE,
 755		.data = (const struct snd_usb_audio_quirk[]) {
 756			{
 757				.ifnum = 0,
 758				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 759			},
 760			{
 761				.ifnum = 1,
 762				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 763			},
 764			{
 765				.ifnum = 2,
 766				.type = QUIRK_MIDI_FIXED_ENDPOINT,
 767				.data = & (const struct snd_usb_midi_endpoint_info) {
 768					.out_cables = 0x0007,
 769					.in_cables  = 0x0007
 770				}
 771			},
 772			{
 773				.ifnum = -1
 774			}
 775		}
 776	}
 777},
 778{	/*
 779	 * This quirk is for the "Advanced Driver" mode of the Edirol UA-5.
 780	 * If the advanced mode switch at the back of the unit is off, the
 781	 * UA-5 has ID 0x0582/0x0011 and is standard compliant (no quirks),
 782	 * but offers only 16-bit PCM.
 783	 * In advanced mode, the UA-5 will output S24_3LE samples (two
 784	 * channels) at the rate indicated on the front switch, including
 785	 * the 96kHz sample rate.
 786	 */
 787	USB_DEVICE(0x0582, 0x0010),
 788	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 789		.vendor_name = "EDIROL",
 790		.product_name = "UA-5",
 791		.ifnum = QUIRK_ANY_INTERFACE,
 792		.type = QUIRK_COMPOSITE,
 793		.data = (const struct snd_usb_audio_quirk[]) {
 794			{
 795				.ifnum = 1,
 796				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 797			},
 798			{
 799				.ifnum = 2,
 800				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 801			},
 802			{
 803				.ifnum = -1
 804			}
 805		}
 806	}
 807},
 808{
 809	/* has ID 0x0013 when not in "Advanced Driver" mode */
 810	USB_DEVICE(0x0582, 0x0012),
 811	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 812		.vendor_name = "Roland",
 813		.product_name = "XV-5050",
 814		.ifnum = 0,
 815		.type = QUIRK_MIDI_FIXED_ENDPOINT,
 816		.data = & (const struct snd_usb_midi_endpoint_info) {
 817			.out_cables = 0x0001,
 818			.in_cables  = 0x0001
 819		}
 820	}
 821},
 822{
 823	/* has ID 0x0015 when not in "Advanced Driver" mode */
 824	USB_DEVICE(0x0582, 0x0014),
 825	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 826		.vendor_name = "EDIROL",
 827		.product_name = "UM-880",
 828		.ifnum = 0,
 829		.type = QUIRK_MIDI_FIXED_ENDPOINT,
 830		.data = & (const struct snd_usb_midi_endpoint_info) {
 831			.out_cables = 0x01ff,
 832			.in_cables  = 0x01ff
 833		}
 834	}
 835},
 836{
 837	/* has ID 0x0017 when not in "Advanced Driver" mode */
 838	USB_DEVICE(0x0582, 0x0016),
 839	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 840		.vendor_name = "EDIROL",
 841		.product_name = "SD-90",
 842		.ifnum = QUIRK_ANY_INTERFACE,
 843		.type = QUIRK_COMPOSITE,
 844		.data = (const struct snd_usb_audio_quirk[]) {
 845			{
 846				.ifnum = 0,
 847				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 848			},
 849			{
 850				.ifnum = 1,
 851				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 852			},
 853			{
 854				.ifnum = 2,
 855				.type = QUIRK_MIDI_FIXED_ENDPOINT,
 856				.data = & (const struct snd_usb_midi_endpoint_info) {
 857					.out_cables = 0x000f,
 858					.in_cables  = 0x000f
 859				}
 860			},
 861			{
 862				.ifnum = -1
 863			}
 864		}
 865	}
 866},
 867{
 868	/* has ID 0x001c when not in "Advanced Driver" mode */
 869	USB_DEVICE(0x0582, 0x001b),
 870	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 871		.vendor_name = "Roland",
 872		.product_name = "MMP-2",
 873		.ifnum = QUIRK_ANY_INTERFACE,
 874		.type = QUIRK_COMPOSITE,
 875		.data = (const struct snd_usb_audio_quirk[]) {
 876			{
 877				.ifnum = 0,
 878				.type = QUIRK_IGNORE_INTERFACE
 879			},
 880			{
 881				.ifnum = 1,
 882				.type = QUIRK_IGNORE_INTERFACE
 883			},
 884			{
 885				.ifnum = 2,
 886				.type = QUIRK_MIDI_FIXED_ENDPOINT,
 887				.data = & (const struct snd_usb_midi_endpoint_info) {
 888					.out_cables = 0x0001,
 889					.in_cables  = 0x0001
 890				}
 891			},
 892			{
 893				.ifnum = -1
 894			}
 895		}
 896	}
 897},
 898{
 899	/* has ID 0x001e when not in "Advanced Driver" mode */
 900	USB_DEVICE(0x0582, 0x001d),
 901	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 902		.vendor_name = "Roland",
 903		.product_name = "V-SYNTH",
 904		.ifnum = 0,
 905		.type = QUIRK_MIDI_FIXED_ENDPOINT,
 906		.data = & (const struct snd_usb_midi_endpoint_info) {
 907			.out_cables = 0x0001,
 908			.in_cables  = 0x0001
 909		}
 910	}
 911},
 912{
 913	/* has ID 0x0024 when not in "Advanced Driver" mode */
 914	USB_DEVICE(0x0582, 0x0023),
 915	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 916		.vendor_name = "EDIROL",
 917		.product_name = "UM-550",
 918		.ifnum = 0,
 919		.type = QUIRK_MIDI_FIXED_ENDPOINT,
 920		.data = & (const struct snd_usb_midi_endpoint_info) {
 921			.out_cables = 0x003f,
 922			.in_cables  = 0x003f
 923		}
 924	}
 925},
 926{
 927	/*
 928	 * This quirk is for the "Advanced Driver" mode. If off, the UA-20
 929	 * has ID 0x0026 and is standard compliant, but has only 16-bit PCM
 930	 * and no MIDI.
 931	 */
 932	USB_DEVICE(0x0582, 0x0025),
 933	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 934		.vendor_name = "EDIROL",
 935		.product_name = "UA-20",
 936		.ifnum = QUIRK_ANY_INTERFACE,
 937		.type = QUIRK_COMPOSITE,
 938		.data = (const struct snd_usb_audio_quirk[]) {
 939			{
 940				.ifnum = 0,
 941				.type = QUIRK_IGNORE_INTERFACE
 942			},
 943			{
 944				.ifnum = 1,
 945				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
 946				.data = & (const struct audioformat) {
 947					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
 948					.channels = 2,
 949					.iface = 1,
 950					.altsetting = 1,
 951					.altset_idx = 1,
 952					.attributes = 0,
 953					.endpoint = 0x01,
 954					.ep_attr = 0x01,
 955					.rates = SNDRV_PCM_RATE_CONTINUOUS,
 956					.rate_min = 44100,
 957					.rate_max = 44100,
 958				}
 959			},
 960			{
 961				.ifnum = 2,
 962				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
 963				.data = & (const struct audioformat) {
 964					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
 965					.channels = 2,
 966					.iface = 2,
 967					.altsetting = 1,
 968					.altset_idx = 1,
 969					.attributes = 0,
 970					.endpoint = 0x82,
 971					.ep_attr = 0x01,
 972					.rates = SNDRV_PCM_RATE_CONTINUOUS,
 973					.rate_min = 44100,
 974					.rate_max = 44100,
 975				}
 976			},
 977			{
 978				.ifnum = 3,
 979				.type = QUIRK_MIDI_FIXED_ENDPOINT,
 980				.data = & (const struct snd_usb_midi_endpoint_info) {
 981					.out_cables = 0x0001,
 982					.in_cables  = 0x0001
 983				}
 984			},
 985			{
 986				.ifnum = -1
 987			}
 988		}
 989	}
 990},
 991{
 992	/* has ID 0x0028 when not in "Advanced Driver" mode */
 993	USB_DEVICE(0x0582, 0x0027),
 994	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 995		.vendor_name = "EDIROL",
 996		.product_name = "SD-20",
 997		.ifnum = 0,
 998		.type = QUIRK_MIDI_FIXED_ENDPOINT,
 999		.data = & (const struct snd_usb_midi_endpoint_info) {
1000			.out_cables = 0x0003,
1001			.in_cables  = 0x0007
1002		}
1003	}
1004},
1005{
1006	/* has ID 0x002a when not in "Advanced Driver" mode */
1007	USB_DEVICE(0x0582, 0x0029),
1008	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1009		.vendor_name = "EDIROL",
1010		.product_name = "SD-80",
1011		.ifnum = 0,
1012		.type = QUIRK_MIDI_FIXED_ENDPOINT,
1013		.data = & (const struct snd_usb_midi_endpoint_info) {
1014			.out_cables = 0x000f,
1015			.in_cables  = 0x000f
1016		}
1017	}
1018},
1019{	/*
1020	 * This quirk is for the "Advanced" modes of the Edirol UA-700.
1021	 * If the sample format switch is not in an advanced setting, the
1022	 * UA-700 has ID 0x0582/0x002c and is standard compliant (no quirks),
1023	 * but offers only 16-bit PCM and no MIDI.
1024	 */
1025	USB_DEVICE_VENDOR_SPEC(0x0582, 0x002b),
1026	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1027		.vendor_name = "EDIROL",
1028		.product_name = "UA-700",
1029		.ifnum = QUIRK_ANY_INTERFACE,
1030		.type = QUIRK_COMPOSITE,
1031		.data = (const struct snd_usb_audio_quirk[]) {
1032			{
1033				.ifnum = 1,
1034				.type = QUIRK_AUDIO_EDIROL_UAXX
1035			},
1036			{
1037				.ifnum = 2,
1038				.type = QUIRK_AUDIO_EDIROL_UAXX
1039			},
1040			{
1041				.ifnum = 3,
1042				.type = QUIRK_AUDIO_EDIROL_UAXX
1043			},
1044			{
1045				.ifnum = -1
1046			}
1047		}
1048	}
1049},
1050{
1051	/* has ID 0x002e when not in "Advanced Driver" mode */
1052	USB_DEVICE(0x0582, 0x002d),
1053	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1054		.vendor_name = "Roland",
1055		.product_name = "XV-2020",
1056		.ifnum = 0,
1057		.type = QUIRK_MIDI_FIXED_ENDPOINT,
1058		.data = & (const struct snd_usb_midi_endpoint_info) {
1059			.out_cables = 0x0001,
1060			.in_cables  = 0x0001
1061		}
1062	}
1063},
1064{
1065	/* has ID 0x0030 when not in "Advanced Driver" mode */
1066	USB_DEVICE(0x0582, 0x002f),
1067	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1068		.vendor_name = "Roland",
1069		.product_name = "VariOS",
1070		.ifnum = 0,
1071		.type = QUIRK_MIDI_FIXED_ENDPOINT,
1072		.data = & (const struct snd_usb_midi_endpoint_info) {
1073			.out_cables = 0x0007,
1074			.in_cables  = 0x0007
1075		}
1076	}
1077},
1078{
1079	/* has ID 0x0034 when not in "Advanced Driver" mode */
1080	USB_DEVICE(0x0582, 0x0033),
1081	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1082		.vendor_name = "EDIROL",
1083		.product_name = "PCR",
1084		.ifnum = 0,
1085		.type = QUIRK_MIDI_FIXED_ENDPOINT,
1086		.data = & (const struct snd_usb_midi_endpoint_info) {
1087			.out_cables = 0x0003,
1088			.in_cables  = 0x0007
1089		}
1090	}
1091},
1092{
1093	/*
1094	 * Has ID 0x0038 when not in "Advanced Driver" mode;
1095	 * later revisions use IDs 0x0054 and 0x00a2.
1096	 */
1097	USB_DEVICE(0x0582, 0x0037),
1098	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1099		.vendor_name = "Roland",
1100		.product_name = "Digital Piano",
1101		.ifnum = 0,
1102		.type = QUIRK_MIDI_FIXED_ENDPOINT,
1103		.data = & (const struct snd_usb_midi_endpoint_info) {
1104			.out_cables = 0x0001,
1105			.in_cables  = 0x0001
1106		}
1107	}
1108},
1109{
1110	/*
1111	 * This quirk is for the "Advanced Driver" mode.  If off, the GS-10
1112	 * has ID 0x003c and is standard compliant, but has only 16-bit PCM
1113	 * and no MIDI.
1114	 */
1115	USB_DEVICE_VENDOR_SPEC(0x0582, 0x003b),
1116	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1117		.vendor_name = "BOSS",
1118		.product_name = "GS-10",
1119		.ifnum = QUIRK_ANY_INTERFACE,
1120		.type = QUIRK_COMPOSITE,
1121		.data = & (const struct snd_usb_audio_quirk[]) {
1122			{
1123				.ifnum = 1,
1124				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1125			},
1126			{
1127				.ifnum = 2,
1128				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1129			},
1130			{
1131				.ifnum = 3,
1132				.type = QUIRK_MIDI_STANDARD_INTERFACE
1133			},
1134			{
1135				.ifnum = -1
1136			}
1137		}
1138	}
1139},
1140{
1141	/* has ID 0x0041 when not in "Advanced Driver" mode */
1142	USB_DEVICE(0x0582, 0x0040),
1143	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1144		.vendor_name = "Roland",
1145		.product_name = "GI-20",
1146		.ifnum = 0,
1147		.type = QUIRK_MIDI_FIXED_ENDPOINT,
1148		.data = & (const struct snd_usb_midi_endpoint_info) {
1149			.out_cables = 0x0001,
1150			.in_cables  = 0x0001
1151		}
1152	}
1153},
1154{
1155	/* has ID 0x0043 when not in "Advanced Driver" mode */
1156	USB_DEVICE(0x0582, 0x0042),
1157	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1158		.vendor_name = "Roland",
1159		.product_name = "RS-70",
1160		.ifnum = 0,
1161		.type = QUIRK_MIDI_FIXED_ENDPOINT,
1162		.data = & (const struct snd_usb_midi_endpoint_info) {
1163			.out_cables = 0x0001,
1164			.in_cables  = 0x0001
1165		}
1166	}
1167},
1168{
1169	/* has ID 0x0049 when not in "Advanced Driver" mode */
1170	USB_DEVICE(0x0582, 0x0047),
1171	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1172		/* .vendor_name = "EDIROL", */
1173		/* .product_name = "UR-80", */
1174		.ifnum = QUIRK_ANY_INTERFACE,
1175		.type = QUIRK_COMPOSITE,
1176		.data = (const struct snd_usb_audio_quirk[]) {
1177			/* in the 96 kHz modes, only interface 1 is there */
1178			{
1179				.ifnum = 1,
1180				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1181			},
1182			{
1183				.ifnum = 2,
1184				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1185			},
1186			{
1187				.ifnum = -1
1188			}
1189		}
1190	}
1191},
1192{
1193	/* has ID 0x004a when not in "Advanced Driver" mode */
1194	USB_DEVICE(0x0582, 0x0048),
1195	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1196		/* .vendor_name = "EDIROL", */
1197		/* .product_name = "UR-80", */
1198		.ifnum = 0,
1199		.type = QUIRK_MIDI_FIXED_ENDPOINT,
1200		.data = & (const struct snd_usb_midi_endpoint_info) {
1201			.out_cables = 0x0003,
1202			.in_cables  = 0x0007
1203		}
1204	}
1205},
1206{
1207	/* has ID 0x004e when not in "Advanced Driver" mode */
1208	USB_DEVICE(0x0582, 0x004c),
1209	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1210		.vendor_name = "EDIROL",
1211		.product_name = "PCR-A",
1212		.ifnum = QUIRK_ANY_INTERFACE,
1213		.type = QUIRK_COMPOSITE,
1214		.data = (const struct snd_usb_audio_quirk[]) {
1215			{
1216				.ifnum = 1,
1217				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1218			},
1219			{
1220				.ifnum = 2,
1221				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1222			},
1223			{
1224				.ifnum = -1
1225			}
1226		}
1227	}
1228},
1229{
1230	/* has ID 0x004f when not in "Advanced Driver" mode */
1231	USB_DEVICE(0x0582, 0x004d),
1232	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1233		.vendor_name = "EDIROL",
1234		.product_name = "PCR-A",
1235		.ifnum = 0,
1236		.type = QUIRK_MIDI_FIXED_ENDPOINT,
1237		.data = & (const struct snd_usb_midi_endpoint_info) {
1238			.out_cables = 0x0003,
1239			.in_cables  = 0x0007
1240		}
1241	}
1242},
1243{
1244	/*
1245	 * This quirk is for the "Advanced Driver" mode. If off, the UA-3FX
1246	 * is standard compliant, but has only 16-bit PCM.
1247	 */
1248	USB_DEVICE(0x0582, 0x0050),
1249	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1250		.vendor_name = "EDIROL",
1251		.product_name = "UA-3FX",
1252		.ifnum = QUIRK_ANY_INTERFACE,
1253		.type = QUIRK_COMPOSITE,
1254		.data = (const struct snd_usb_audio_quirk[]) {
1255			{
1256				.ifnum = 1,
1257				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1258			},
1259			{
1260				.ifnum = 2,
1261				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1262			},
1263			{
1264				.ifnum = -1
1265			}
1266		}
1267	}
1268},
1269{
1270	USB_DEVICE(0x0582, 0x0052),
1271	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1272		.vendor_name = "EDIROL",
1273		.product_name = "UM-1SX",
1274		.ifnum = 0,
1275		.type = QUIRK_MIDI_STANDARD_INTERFACE
1276	}
1277},
1278{
1279	USB_DEVICE(0x0582, 0x0060),
1280	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1281		.vendor_name = "Roland",
1282		.product_name = "EXR Series",
1283		.ifnum = 0,
1284		.type = QUIRK_MIDI_STANDARD_INTERFACE
1285	}
1286},
1287{
1288	/* has ID 0x0066 when not in "Advanced Driver" mode */
1289	USB_DEVICE(0x0582, 0x0064),
1290	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1291		/* .vendor_name = "EDIROL", */
1292		/* .product_name = "PCR-1", */
1293		.ifnum = QUIRK_ANY_INTERFACE,
1294		.type = QUIRK_COMPOSITE,
1295		.data = (const struct snd_usb_audio_quirk[]) {
1296			{
1297				.ifnum = 1,
1298				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1299			},
1300			{
1301				.ifnum = 2,
1302				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1303			},
1304			{
1305				.ifnum = -1
1306			}
1307		}
1308	}
1309},
1310{
1311	/* has ID 0x0067 when not in "Advanced Driver" mode */
1312	USB_DEVICE(0x0582, 0x0065),
1313	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1314		/* .vendor_name = "EDIROL", */
1315		/* .product_name = "PCR-1", */
1316		.ifnum = 0,
1317		.type = QUIRK_MIDI_FIXED_ENDPOINT,
1318		.data = & (const struct snd_usb_midi_endpoint_info) {
1319			.out_cables = 0x0001,
1320			.in_cables  = 0x0003
1321		}
1322	}
1323},
1324{
1325	/* has ID 0x006e when not in "Advanced Driver" mode */
1326	USB_DEVICE(0x0582, 0x006d),
1327	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1328		.vendor_name = "Roland",
1329		.product_name = "FANTOM-X",
1330		.ifnum = 0,
1331		.type = QUIRK_MIDI_FIXED_ENDPOINT,
1332		.data = & (const struct snd_usb_midi_endpoint_info) {
1333			.out_cables = 0x0001,
1334			.in_cables  = 0x0001
1335		}
1336	}
1337},
1338{	/*
1339	 * This quirk is for the "Advanced" modes of the Edirol UA-25.
1340	 * If the switch is not in an advanced setting, the UA-25 has
1341	 * ID 0x0582/0x0073 and is standard compliant (no quirks), but
1342	 * offers only 16-bit PCM at 44.1 kHz and no MIDI.
1343	 */
1344	USB_DEVICE_VENDOR_SPEC(0x0582, 0x0074),
1345	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1346		.vendor_name = "EDIROL",
1347		.product_name = "UA-25",
1348		.ifnum = QUIRK_ANY_INTERFACE,
1349		.type = QUIRK_COMPOSITE,
1350		.data = (const struct snd_usb_audio_quirk[]) {
1351			{
1352				.ifnum = 0,
1353				.type = QUIRK_AUDIO_EDIROL_UAXX
1354			},
1355			{
1356				.ifnum = 1,
1357				.type = QUIRK_AUDIO_EDIROL_UAXX
1358			},
1359			{
1360				.ifnum = 2,
1361				.type = QUIRK_AUDIO_EDIROL_UAXX
1362			},
1363			{
1364				.ifnum = -1
1365			}
1366		}
1367	}
1368},
1369{
1370	/* has ID 0x0076 when not in "Advanced Driver" mode */
1371	USB_DEVICE(0x0582, 0x0075),
1372	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1373		.vendor_name = "BOSS",
1374		.product_name = "DR-880",
1375		.ifnum = 0,
1376		.type = QUIRK_MIDI_FIXED_ENDPOINT,
1377		.data = & (const struct snd_usb_midi_endpoint_info) {
1378			.out_cables = 0x0001,
1379			.in_cables  = 0x0001
1380		}
1381	}
1382},
1383{
1384	/* has ID 0x007b when not in "Advanced Driver" mode */
1385	USB_DEVICE_VENDOR_SPEC(0x0582, 0x007a),
1386	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1387		.vendor_name = "Roland",
1388		/* "RD" or "RD-700SX"? */
1389		.ifnum = 0,
1390		.type = QUIRK_MIDI_FIXED_ENDPOINT,
1391		.data = & (const struct snd_usb_midi_endpoint_info) {
1392			.out_cables = 0x0003,
1393			.in_cables  = 0x0003
1394		}
1395	}
1396},
1397{
1398	/* has ID 0x0081 when not in "Advanced Driver" mode */
1399	USB_DEVICE(0x0582, 0x0080),
1400	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1401		.vendor_name = "Roland",
1402		.product_name = "G-70",
1403		.ifnum = 0,
1404		.type = QUIRK_MIDI_FIXED_ENDPOINT,
1405		.data = & (const struct snd_usb_midi_endpoint_info) {
1406			.out_cables = 0x0001,
1407			.in_cables  = 0x0001
1408		}
1409	}
1410},
1411{
1412	/* has ID 0x008c when not in "Advanced Driver" mode */
1413	USB_DEVICE(0x0582, 0x008b),
1414	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1415		.vendor_name = "EDIROL",
1416		.product_name = "PC-50",
1417		.ifnum = 0,
1418		.type = QUIRK_MIDI_FIXED_ENDPOINT,
1419		.data = & (const struct snd_usb_midi_endpoint_info) {
1420			.out_cables = 0x0001,
1421			.in_cables  = 0x0001
1422		}
1423	}
1424},
1425{
1426	/*
1427	 * This quirk is for the "Advanced Driver" mode. If off, the UA-4FX
1428	 * is standard compliant, but has only 16-bit PCM and no MIDI.
1429	 */
1430	USB_DEVICE(0x0582, 0x00a3),
1431	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1432		.vendor_name = "EDIROL",
1433		.product_name = "UA-4FX",
1434		.ifnum = QUIRK_ANY_INTERFACE,
1435		.type = QUIRK_COMPOSITE,
1436		.data = (const struct snd_usb_audio_quirk[]) {
1437			{
1438				.ifnum = 0,
1439				.type = QUIRK_AUDIO_EDIROL_UAXX
1440			},
1441			{
1442				.ifnum = 1,
1443				.type = QUIRK_AUDIO_EDIROL_UAXX
1444			},
1445			{
1446				.ifnum = 2,
1447				.type = QUIRK_AUDIO_EDIROL_UAXX
1448			},
1449			{
1450				.ifnum = -1
1451			}
1452		}
1453	}
1454},
1455{
1456	/* Edirol M-16DX */
1457	USB_DEVICE(0x0582, 0x00c4),
1458	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1459		.ifnum = QUIRK_ANY_INTERFACE,
1460		.type = QUIRK_COMPOSITE,
1461		.data = (const struct snd_usb_audio_quirk[]) {
1462			{
1463				.ifnum = 0,
1464				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1465			},
1466			{
1467				.ifnum = 1,
1468				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1469			},
1470			{
1471				.ifnum = 2,
1472				.type = QUIRK_MIDI_FIXED_ENDPOINT,
1473				.data = & (const struct snd_usb_midi_endpoint_info) {
1474					.out_cables = 0x0001,
1475					.in_cables  = 0x0001
1476				}
1477			},
1478			{
1479				.ifnum = -1
1480			}
1481		}
1482	}
1483},
1484{
1485	/* Advanced modes of the Edirol UA-25EX.
1486	 * For the standard mode, UA-25EX has ID 0582:00e7, which
1487	 * offers only 16-bit PCM at 44.1 kHz and no MIDI.
1488	 */
1489	USB_DEVICE_VENDOR_SPEC(0x0582, 0x00e6),
1490	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1491		.vendor_name = "EDIROL",
1492		.product_name = "UA-25EX",
1493		.ifnum = QUIRK_ANY_INTERFACE,
1494		.type = QUIRK_COMPOSITE,
1495		.data = (const struct snd_usb_audio_quirk[]) {
1496			{
1497				.ifnum = 0,
1498				.type = QUIRK_AUDIO_EDIROL_UAXX
1499			},
1500			{
1501				.ifnum = 1,
1502				.type = QUIRK_AUDIO_EDIROL_UAXX
1503			},
1504			{
1505				.ifnum = 2,
1506				.type = QUIRK_AUDIO_EDIROL_UAXX
1507			},
1508			{
1509				.ifnum = -1
1510			}
1511		}
1512	}
1513},
1514{
1515	/* Edirol UM-3G */
1516	USB_DEVICE_VENDOR_SPEC(0x0582, 0x0108),
1517	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1518		.ifnum = 0,
1519		.type = QUIRK_MIDI_FIXED_ENDPOINT,
1520		.data = & (const struct snd_usb_midi_endpoint_info) {
1521			.out_cables = 0x0007,
1522			.in_cables  = 0x0007
1523		}
1524	}
1525},
1526{
1527	/* BOSS ME-25 */
1528	USB_DEVICE(0x0582, 0x0113),
1529	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1530		.ifnum = QUIRK_ANY_INTERFACE,
1531		.type = QUIRK_COMPOSITE,
1532		.data = (const struct snd_usb_audio_quirk[]) {
1533			{
1534				.ifnum = 0,
1535				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1536			},
1537			{
1538				.ifnum = 1,
1539				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1540			},
1541			{
1542				.ifnum = 2,
1543				.type = QUIRK_MIDI_FIXED_ENDPOINT,
1544				.data = & (const struct snd_usb_midi_endpoint_info) {
1545					.out_cables = 0x0001,
1546					.in_cables  = 0x0001
1547				}
1548			},
1549			{
1550				.ifnum = -1
1551			}
1552		}
1553	}
1554},
1555{
1556	/* only 44.1 kHz works at the moment */
1557	USB_DEVICE(0x0582, 0x0120),
1558	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1559		/* .vendor_name = "Roland", */
1560		/* .product_name = "OCTO-CAPTURE", */
1561		.ifnum = QUIRK_ANY_INTERFACE,
1562		.type = QUIRK_COMPOSITE,
1563		.data = (const struct snd_usb_audio_quirk[]) {
1564			{
1565				.ifnum = 0,
1566				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
1567				.data = & (const struct audioformat) {
1568					.formats = SNDRV_PCM_FMTBIT_S32_LE,
1569					.channels = 10,
1570					.iface = 0,
1571					.altsetting = 1,
1572					.altset_idx = 1,
1573					.endpoint = 0x05,
1574					.ep_attr = 0x05,
1575					.rates = SNDRV_PCM_RATE_44100,
1576					.rate_min = 44100,
1577					.rate_max = 44100,
1578					.nr_rates = 1,
1579					.rate_table = (unsigned int[]) { 44100 }
1580				}
1581			},
1582			{
1583				.ifnum = 1,
1584				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
1585				.data = & (const struct audioformat) {
1586					.formats = SNDRV_PCM_FMTBIT_S32_LE,
1587					.channels = 12,
1588					.iface = 1,
1589					.altsetting = 1,
1590					.altset_idx = 1,
1591					.endpoint = 0x85,
1592					.ep_attr = 0x25,
1593					.rates = SNDRV_PCM_RATE_44100,
1594					.rate_min = 44100,
1595					.rate_max = 44100,
1596					.nr_rates = 1,
1597					.rate_table = (unsigned int[]) { 44100 }
1598				}
1599			},
1600			{
1601				.ifnum = 2,
1602				.type = QUIRK_MIDI_FIXED_ENDPOINT,
1603				.data = & (const struct snd_usb_midi_endpoint_info) {
1604					.out_cables = 0x0001,
1605					.in_cables  = 0x0001
1606				}
1607			},
1608			{
1609				.ifnum = 3,
1610				.type = QUIRK_IGNORE_INTERFACE
1611			},
1612			{
1613				.ifnum = 4,
1614				.type = QUIRK_IGNORE_INTERFACE
1615			},
1616			{
1617				.ifnum = -1
1618			}
1619		}
1620	}
1621},
1622{
1623	/* only 44.1 kHz works at the moment */
1624	USB_DEVICE(0x0582, 0x012f),
1625	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1626		/* .vendor_name = "Roland", */
1627		/* .product_name = "QUAD-CAPTURE", */
1628		.ifnum = QUIRK_ANY_INTERFACE,
1629		.type = QUIRK_COMPOSITE,
1630		.data = (const struct snd_usb_audio_quirk[]) {
1631			{
1632				.ifnum = 0,
1633				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
1634				.data = & (const struct audioformat) {
1635					.formats = SNDRV_PCM_FMTBIT_S32_LE,
1636					.channels = 4,
1637					.iface = 0,
1638					.altsetting = 1,
1639					.altset_idx = 1,
1640					.endpoint = 0x05,
1641					.ep_attr = 0x05,
1642					.rates = SNDRV_PCM_RATE_44100,
1643					.rate_min = 44100,
1644					.rate_max = 44100,
1645					.nr_rates = 1,
1646					.rate_table = (unsigned int[]) { 44100 }
1647				}
1648			},
1649			{
1650				.ifnum = 1,
1651				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
1652				.data = & (const struct audioformat) {
1653					.formats = SNDRV_PCM_FMTBIT_S32_LE,
1654					.channels = 6,
1655					.iface = 1,
1656					.altsetting = 1,
1657					.altset_idx = 1,
1658					.endpoint = 0x85,
1659					.ep_attr = 0x25,
1660					.rates = SNDRV_PCM_RATE_44100,
1661					.rate_min = 44100,
1662					.rate_max = 44100,
1663					.nr_rates = 1,
1664					.rate_table = (unsigned int[]) { 44100 }
1665				}
1666			},
1667			{
1668				.ifnum = 2,
1669				.type = QUIRK_MIDI_FIXED_ENDPOINT,
1670				.data = & (const struct snd_usb_midi_endpoint_info) {
1671					.out_cables = 0x0001,
1672					.in_cables  = 0x0001
1673				}
1674			},
1675			{
1676				.ifnum = 3,
1677				.type = QUIRK_IGNORE_INTERFACE
1678			},
1679			{
1680				.ifnum = 4,
1681				.type = QUIRK_IGNORE_INTERFACE
1682			},
1683			{
1684				.ifnum = -1
1685			}
1686		}
1687	}
1688},
1689{
1690	USB_DEVICE(0x0582, 0x0159),
1691	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1692		/* .vendor_name = "Roland", */
1693		/* .product_name = "UA-22", */
1694		.ifnum = QUIRK_ANY_INTERFACE,
1695		.type = QUIRK_COMPOSITE,
1696		.data = (const struct snd_usb_audio_quirk[]) {
1697			{
1698				.ifnum = 0,
1699				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1700			},
1701			{
1702				.ifnum = 1,
1703				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1704			},
1705			{
1706				.ifnum = 2,
1707				.type = QUIRK_MIDI_FIXED_ENDPOINT,
1708				.data = & (const struct snd_usb_midi_endpoint_info) {
1709					.out_cables = 0x0001,
1710					.in_cables = 0x0001
1711				}
1712			},
1713			{
1714				.ifnum = -1
1715			}
1716		}
1717	}
1718},
1719
1720/* UA101 and co are supported by another driver */
1721{
1722	USB_DEVICE(0x0582, 0x0044), /* UA-1000 high speed */
1723	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1724		.ifnum = QUIRK_NODEV_INTERFACE
1725	},
1726},
1727{
1728	USB_DEVICE(0x0582, 0x007d), /* UA-101 high speed */
1729	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1730		.ifnum = QUIRK_NODEV_INTERFACE
1731	},
1732},
1733{
1734	USB_DEVICE(0x0582, 0x008d), /* UA-101 full speed */
1735	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1736		.ifnum = QUIRK_NODEV_INTERFACE
1737	},
1738},
1739
1740/* this catches most recent vendor-specific Roland devices */
1741{
1742	.match_flags = USB_DEVICE_ID_MATCH_VENDOR |
1743	               USB_DEVICE_ID_MATCH_INT_CLASS,
1744	.idVendor = 0x0582,
1745	.bInterfaceClass = USB_CLASS_VENDOR_SPEC,
1746	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
1747		.ifnum = QUIRK_ANY_INTERFACE,
1748		.type = QUIRK_AUTODETECT
1749	}
1750},
1751
1752/* Guillemot devices */
1753{
1754	/*
1755	 * This is for the "Windows Edition" where the external MIDI ports are
1756	 * the only MIDI ports; the control data is reported through HID
1757	 * interfaces.  The "Macintosh Edition" has ID 0xd002 and uses standard
1758	 * compliant USB MIDI ports for external MIDI and controls.
1759	 */
1760	USB_DEVICE_VENDOR_SPEC(0x06f8, 0xb000),
1761	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1762		.vendor_name = "Hercules",
1763		.product_name = "DJ Console (WE)",
1764		.ifnum = 4,
1765		.type = QUIRK_MIDI_FIXED_ENDPOINT,
1766		.data = & (const struct snd_usb_midi_endpoint_info) {
1767			.out_cables = 0x0001,
1768			.in_cables = 0x0001
1769		}
1770	}
1771},
1772
1773/* Midiman/M-Audio devices */
1774{
1775	USB_DEVICE_VENDOR_SPEC(0x0763, 0x1002),
1776	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1777		.vendor_name = "M-Audio",
1778		.product_name = "MidiSport 2x2",
1779		.ifnum = QUIRK_ANY_INTERFACE,
1780		.type = QUIRK_MIDI_MIDIMAN,
1781		.data = & (const struct snd_usb_midi_endpoint_info) {
1782			.out_cables = 0x0003,
1783			.in_cables  = 0x0003
1784		}
1785	}
1786},
1787{
1788	USB_DEVICE_VENDOR_SPEC(0x0763, 0x1011),
1789	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1790		.vendor_name = "M-Audio",
1791		.product_name = "MidiSport 1x1",
1792		.ifnum = QUIRK_ANY_INTERFACE,
1793		.type = QUIRK_MIDI_MIDIMAN,
1794		.data = & (const struct snd_usb_midi_endpoint_info) {
1795			.out_cables = 0x0001,
1796			.in_cables  = 0x0001
1797		}
1798	}
1799},
1800{
1801	USB_DEVICE_VENDOR_SPEC(0x0763, 0x1015),
1802	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1803		.vendor_name = "M-Audio",
1804		.product_name = "Keystation",
1805		.ifnum = QUIRK_ANY_INTERFACE,
1806		.type = QUIRK_MIDI_MIDIMAN,
1807		.data = & (const struct snd_usb_midi_endpoint_info) {
1808			.out_cables = 0x0001,
1809			.in_cables  = 0x0001
1810		}
1811	}
1812},
1813{
1814	USB_DEVICE_VENDOR_SPEC(0x0763, 0x1021),
1815	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1816		.vendor_name = "M-Audio",
1817		.product_name = "MidiSport 4x4",
1818		.ifnum = QUIRK_ANY_INTERFACE,
1819		.type = QUIRK_MIDI_MIDIMAN,
1820		.data = & (const struct snd_usb_midi_endpoint_info) {
1821			.out_cables = 0x000f,
1822			.in_cables  = 0x000f
1823		}
1824	}
1825},
1826{
1827	/*
1828	 * For hardware revision 1.05; in the later revisions (1.10 and
1829	 * 1.21), 0x1031 is the ID for the device without firmware.
1830	 * Thanks to Olaf Giesbrecht <Olaf_Giesbrecht@yahoo.de>
1831	 */
1832	USB_DEVICE_VER(0x0763, 0x1031, 0x0100, 0x0109),
1833	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1834		.vendor_name = "M-Audio",
1835		.product_name = "MidiSport 8x8",
1836		.ifnum = QUIRK_ANY_INTERFACE,
1837		.type = QUIRK_MIDI_MIDIMAN,
1838		.data = & (const struct snd_usb_midi_endpoint_info) {
1839			.out_cables = 0x01ff,
1840			.in_cables  = 0x01ff
1841		}
1842	}
1843},
1844{
1845	USB_DEVICE_VENDOR_SPEC(0x0763, 0x1033),
1846	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1847		.vendor_name = "M-Audio",
1848		.product_name = "MidiSport 8x8",
1849		.ifnum = QUIRK_ANY_INTERFACE,
1850		.type = QUIRK_MIDI_MIDIMAN,
1851		.data = & (const struct snd_usb_midi_endpoint_info) {
1852			.out_cables = 0x01ff,
1853			.in_cables  = 0x01ff
1854		}
1855	}
1856},
1857{
1858	USB_DEVICE_VENDOR_SPEC(0x0763, 0x1041),
1859	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1860		.vendor_name = "M-Audio",
1861		.product_name = "MidiSport 2x4",
1862		.ifnum = QUIRK_ANY_INTERFACE,
1863		.type = QUIRK_MIDI_MIDIMAN,
1864		.data = & (const struct snd_usb_midi_endpoint_info) {
1865			.out_cables = 0x000f,
1866			.in_cables  = 0x0003
1867		}
1868	}
1869},
1870{
1871	USB_DEVICE_VENDOR_SPEC(0x0763, 0x2001),
1872	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1873		.vendor_name = "M-Audio",
1874		.product_name = "Quattro",
1875		.ifnum = QUIRK_ANY_INTERFACE,
1876		.type = QUIRK_COMPOSITE,
1877		.data = & (const struct snd_usb_audio_quirk[]) {
1878			/*
1879			 * Interfaces 0-2 are "Windows-compatible", 16-bit only,
1880			 * and share endpoints with the other interfaces.
1881			 * Ignore them.  The other interfaces can do 24 bits,
1882			 * but captured samples are big-endian (see usbaudio.c).
1883			 */
1884			{
1885				.ifnum = 0,
1886				.type = QUIRK_IGNORE_INTERFACE
1887			},
1888			{
1889				.ifnum = 1,
1890				.type = QUIRK_IGNORE_INTERFACE
1891			},
1892			{
1893				.ifnum = 2,
1894				.type = QUIRK_IGNORE_INTERFACE
1895			},
1896			{
1897				.ifnum = 3,
1898				.type = QUIRK_IGNORE_INTERFACE
1899			},
1900			{
1901				.ifnum = 4,
1902				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1903			},
1904			{
1905				.ifnum = 5,
1906				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1907			},
1908			{
1909				.ifnum = 6,
1910				.type = QUIRK_IGNORE_INTERFACE
1911			},
1912			{
1913				.ifnum = 7,
1914				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1915			},
1916			{
1917				.ifnum = 8,
1918				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1919			},
1920			{
1921				.ifnum = 9,
1922				.type = QUIRK_MIDI_MIDIMAN,
1923				.data = & (const struct snd_usb_midi_endpoint_info) {
1924					.out_cables = 0x0001,
1925					.in_cables  = 0x0001
1926				}
1927			},
1928			{
1929				.ifnum = -1
1930			}
1931		}
1932	}
1933},
1934{
1935	USB_DEVICE_VENDOR_SPEC(0x0763, 0x2003),
1936	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1937		.vendor_name = "M-Audio",
1938		.product_name = "AudioPhile",
1939		.ifnum = 6,
1940		.type = QUIRK_MIDI_MIDIMAN,
1941		.data = & (const struct snd_usb_midi_endpoint_info) {
1942			.out_cables = 0x0001,
1943			.in_cables  = 0x0001
1944		}
1945	}
1946},
1947{
1948	USB_DEVICE_VENDOR_SPEC(0x0763, 0x2008),
1949	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1950		.vendor_name = "M-Audio",
1951		.product_name = "Ozone",
1952		.ifnum = 3,
1953		.type = QUIRK_MIDI_MIDIMAN,
1954		.data = & (const struct snd_usb_midi_endpoint_info) {
1955			.out_cables = 0x0001,
1956			.in_cables  = 0x0001
1957		}
1958	}
1959},
1960{
1961	USB_DEVICE_VENDOR_SPEC(0x0763, 0x200d),
1962	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1963		.vendor_name = "M-Audio",
1964		.product_name = "OmniStudio",
1965		.ifnum = QUIRK_ANY_INTERFACE,
1966		.type = QUIRK_COMPOSITE,
1967		.data = & (const struct snd_usb_audio_quirk[]) {
1968			{
1969				.ifnum = 0,
1970				.type = QUIRK_IGNORE_INTERFACE
1971			},
1972			{
1973				.ifnum = 1,
1974				.type = QUIRK_IGNORE_INTERFACE
1975			},
1976			{
1977				.ifnum = 2,
1978				.type = QUIRK_IGNORE_INTERFACE
1979			},
1980			{
1981				.ifnum = 3,
1982				.type = QUIRK_IGNORE_INTERFACE
1983			},
1984			{
1985				.ifnum = 4,
1986				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1987			},
1988			{
1989				.ifnum = 5,
1990				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1991			},
1992			{
1993				.ifnum = 6,
1994				.type = QUIRK_IGNORE_INTERFACE
1995			},
1996			{
1997				.ifnum = 7,
1998				.type = QUIRK_AUDIO_STANDARD_INTERFACE
1999			},
2000			{
2001				.ifnum = 8,
2002				.type = QUIRK_AUDIO_STANDARD_INTERFACE
2003			},
2004			{
2005				.ifnum = 9,
2006				.type = QUIRK_MIDI_MIDIMAN,
2007				.data = & (const struct snd_usb_midi_endpoint_info) {
2008					.out_cables = 0x0001,
2009					.in_cables  = 0x0001
2010				}
2011			},
2012			{
2013				.ifnum = -1
2014			}
2015		}
2016	}
2017},
2018{
2019	USB_DEVICE(0x0763, 0x2019),
2020	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2021		/* .vendor_name = "M-Audio", */
2022		/* .product_name = "Ozone Academic", */
2023		.ifnum = QUIRK_ANY_INTERFACE,
2024		.type = QUIRK_COMPOSITE,
2025		.data = & (const struct snd_usb_audio_quirk[]) {
2026			{
2027				.ifnum = 0,
2028				.type = QUIRK_AUDIO_STANDARD_INTERFACE
2029			},
2030			{
2031				.ifnum = 1,
2032				.type = QUIRK_AUDIO_STANDARD_INTERFACE
2033			},
2034			{
2035				.ifnum = 2,
2036				.type = QUIRK_AUDIO_STANDARD_INTERFACE
2037			},
2038			{
2039				.ifnum = 3,
2040				.type = QUIRK_MIDI_MIDIMAN,
2041				.data = & (const struct snd_usb_midi_endpoint_info) {
2042					.out_cables = 0x0001,
2043					.in_cables  = 0x0001
2044				}
2045			},
2046			{
2047				.ifnum = -1
2048			}
2049		}
2050	}
2051},
2052{
2053	USB_DEVICE_VENDOR_SPEC(0x0763, 0x2030),
2054	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2055		/* .vendor_name = "M-Audio", */
2056		/* .product_name = "Fast Track C400", */
2057		.ifnum = QUIRK_ANY_INTERFACE,
2058		.type = QUIRK_COMPOSITE,
2059		.data = &(const struct snd_usb_audio_quirk[]) {
2060			{
2061				.ifnum = 1,
2062				.type = QUIRK_AUDIO_STANDARD_MIXER,
2063			},
2064			/* Playback */
2065			{
2066				.ifnum = 2,
2067				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
2068				.data = &(const struct audioformat) {
2069					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
2070					.channels = 6,
2071					.iface = 2,
2072					.altsetting = 1,
2073					.altset_idx = 1,
2074					.attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2075					.endpoint = 0x01,
2076					.ep_attr = 0x09,
2077					.rates = SNDRV_PCM_RATE_44100 |
2078						 SNDRV_PCM_RATE_48000 |
2079						 SNDRV_PCM_RATE_88200 |
2080						 SNDRV_PCM_RATE_96000,
2081					.rate_min = 44100,
2082					.rate_max = 96000,
2083					.nr_rates = 4,
2084					.rate_table = (unsigned int[]) {
2085							44100, 48000, 88200, 96000
2086					},
2087					.clock = 0x80,
2088				}
2089			},
2090			/* Capture */
2091			{
2092				.ifnum = 3,
2093				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
2094				.data = &(const struct audioformat) {
2095					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
2096					.channels = 4,
2097					.iface = 3,
2098					.altsetting = 1,
2099					.altset_idx = 1,
2100					.attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2101					.endpoint = 0x81,
2102					.ep_attr = 0x05,
2103					.rates = SNDRV_PCM_RATE_44100 |
2104						 SNDRV_PCM_RATE_48000 |
2105						 SNDRV_PCM_RATE_88200 |
2106						 SNDRV_PCM_RATE_96000,
2107					.rate_min = 44100,
2108					.rate_max = 96000,
2109					.nr_rates = 4,
2110					.rate_table = (unsigned int[]) {
2111						44100, 48000, 88200, 96000
2112					},
2113					.clock = 0x80,
2114				}
2115			},
2116			/* MIDI */
2117			{
2118				.ifnum = -1 /* Interface = 4 */
2119			}
2120		}
2121	}
2122},
2123{
2124	USB_DEVICE_VENDOR_SPEC(0x0763, 0x2031),
2125	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2126		/* .vendor_name = "M-Audio", */
2127		/* .product_name = "Fast Track C600", */
2128		.ifnum = QUIRK_ANY_INTERFACE,
2129		.type = QUIRK_COMPOSITE,
2130		.data = &(const struct snd_usb_audio_quirk[]) {
2131			{
2132				.ifnum = 1,
2133				.type = QUIRK_AUDIO_STANDARD_MIXER,
2134			},
2135			/* Playback */
2136			{
2137				.ifnum = 2,
2138				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
2139				.data = &(const struct audioformat) {
2140					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
2141					.channels = 8,
2142					.iface = 2,
2143					.altsetting = 1,
2144					.altset_idx = 1,
2145					.attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2146					.endpoint = 0x01,
2147					.ep_attr = 0x09,
2148					.rates = SNDRV_PCM_RATE_44100 |
2149						 SNDRV_PCM_RATE_48000 |
2150						 SNDRV_PCM_RATE_88200 |
2151						 SNDRV_PCM_RATE_96000,
2152					.rate_min = 44100,
2153					.rate_max = 96000,
2154					.nr_rates = 4,
2155					.rate_table = (unsigned int[]) {
2156							44100, 48000, 88200, 96000
2157					},
2158					.clock = 0x80,
2159				}
2160			},
2161			/* Capture */
2162			{
2163				.ifnum = 3,
2164				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
2165				.data = &(const struct audioformat) {
2166					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
2167					.channels = 6,
2168					.iface = 3,
2169					.altsetting = 1,
2170					.altset_idx = 1,
2171					.attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2172					.endpoint = 0x81,
2173					.ep_attr = 0x05,
2174					.rates = SNDRV_PCM_RATE_44100 |
2175						 SNDRV_PCM_RATE_48000 |
2176						 SNDRV_PCM_RATE_88200 |
2177						 SNDRV_PCM_RATE_96000,
2178					.rate_min = 44100,
2179					.rate_max = 96000,
2180					.nr_rates = 4,
2181					.rate_table = (unsigned int[]) {
2182						44100, 48000, 88200, 96000
2183					},
2184					.clock = 0x80,
2185				}
2186			},
2187			/* MIDI */
2188			{
2189				.ifnum = -1 /* Interface = 4 */
2190			}
2191		}
2192	}
2193},
2194{
2195	USB_DEVICE_VENDOR_SPEC(0x0763, 0x2080),
2196	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2197		/* .vendor_name = "M-Audio", */
2198		/* .product_name = "Fast Track Ultra", */
2199		.ifnum = QUIRK_ANY_INTERFACE,
2200		.type = QUIRK_COMPOSITE,
2201		.data = & (const struct snd_usb_audio_quirk[]) {
2202			{
2203				.ifnum = 0,
2204				.type = QUIRK_AUDIO_STANDARD_MIXER,
2205			},
2206			{
2207				.ifnum = 1,
2208				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
2209				.data = & (const struct audioformat) {
2210					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
2211					.channels = 8,
2212					.iface = 1,
2213					.altsetting = 1,
2214					.altset_idx = 1,
2215					.attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2216					.endpoint = 0x01,
2217					.ep_attr = 0x09,
2218					.rates = SNDRV_PCM_RATE_44100 |
2219						 SNDRV_PCM_RATE_48000 |
2220						 SNDRV_PCM_RATE_88200 |
2221						 SNDRV_PCM_RATE_96000,
2222					.rate_min = 44100,
2223					.rate_max = 96000,
2224					.nr_rates = 4,
2225					.rate_table = (unsigned int[]) {
2226						44100, 48000, 88200, 96000
2227					}
2228				}
2229			},
2230			{
2231				.ifnum = 2,
2232				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
2233				.data = & (const struct audioformat) {
2234					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
2235					.channels = 8,
2236					.iface = 2,
2237					.altsetting = 1,
2238					.altset_idx = 1,
2239					.attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2240					.endpoint = 0x81,
2241					.ep_attr = 0x05,
2242					.rates = SNDRV_PCM_RATE_44100 |
2243						 SNDRV_PCM_RATE_48000 |
2244						 SNDRV_PCM_RATE_88200 |
2245						 SNDRV_PCM_RATE_96000,
2246					.rate_min = 44100,
2247					.rate_max = 96000,
2248					.nr_rates = 4,
2249					.rate_table = (unsigned int[]) {
2250						44100, 48000, 88200, 96000
2251					}
2252				}
2253			},
2254			/* interface 3 (MIDI) is standard compliant */
2255			{
2256				.ifnum = -1
2257			}
2258		}
2259	}
2260},
2261{
2262	USB_DEVICE_VENDOR_SPEC(0x0763, 0x2081),
2263	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2264		/* .vendor_name = "M-Audio", */
2265		/* .product_name = "Fast Track Ultra 8R", */
2266		.ifnum = QUIRK_ANY_INTERFACE,
2267		.type = QUIRK_COMPOSITE,
2268		.data = & (const struct snd_usb_audio_quirk[]) {
2269			{
2270				.ifnum = 0,
2271				.type = QUIRK_AUDIO_STANDARD_MIXER,
2272			},
2273			{
2274				.ifnum = 1,
2275				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
2276				.data = & (const struct audioformat) {
2277					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
2278					.channels = 8,
2279					.iface = 1,
2280					.altsetting = 1,
2281					.altset_idx = 1,
2282					.attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2283					.endpoint = 0x01,
2284					.ep_attr = 0x09,
2285					.rates = SNDRV_PCM_RATE_44100 |
2286						 SNDRV_PCM_RATE_48000 |
2287						 SNDRV_PCM_RATE_88200 |
2288						 SNDRV_PCM_RATE_96000,
2289					.rate_min = 44100,
2290					.rate_max = 96000,
2291					.nr_rates = 4,
2292					.rate_table = (unsigned int[]) {
2293							44100, 48000, 88200, 96000
2294					}
2295				}
2296			},
2297			{
2298				.ifnum = 2,
2299				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
2300				.data = & (const struct audioformat) {
2301					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
2302					.channels = 8,
2303					.iface = 2,
2304					.altsetting = 1,
2305					.altset_idx = 1,
2306					.attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2307					.endpoint = 0x81,
2308					.ep_attr = 0x05,
2309					.rates = SNDRV_PCM_RATE_44100 |
2310						 SNDRV_PCM_RATE_48000 |
2311						 SNDRV_PCM_RATE_88200 |
2312						 SNDRV_PCM_RATE_96000,
2313					.rate_min = 44100,
2314					.rate_max = 96000,
2315					.nr_rates = 4,
2316					.rate_table = (unsigned int[]) {
2317						44100, 48000, 88200, 96000
2318					}
2319				}
2320			},
2321			/* interface 3 (MIDI) is standard compliant */
2322			{
2323				.ifnum = -1
2324			}
2325		}
2326	}
2327},
2328
2329/* Casio devices */
2330{
2331	USB_DEVICE(0x07cf, 0x6801),
2332	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2333		.vendor_name = "Casio",
2334		.product_name = "PL-40R",
2335		.ifnum = 0,
2336		.type = QUIRK_MIDI_YAMAHA
2337	}
2338},
2339{
2340	/* this ID is used by several devices without a product ID */
2341	USB_DEVICE(0x07cf, 0x6802),
2342	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2343		.vendor_name = "Casio",
2344		.product_name = "Keyboard",
2345		.ifnum = 0,
2346		.type = QUIRK_MIDI_YAMAHA
2347	}
2348},
2349
2350/* Mark of the Unicorn devices */
2351{
2352	/* thanks to Robert A. Lerche <ral 'at' msbit.com> */
2353	.match_flags = USB_DEVICE_ID_MATCH_VENDOR |
2354		       USB_DEVICE_ID_MATCH_PRODUCT |
2355		       USB_DEVICE_ID_MATCH_DEV_SUBCLASS,
2356	.idVendor = 0x07fd,
2357	.idProduct = 0x0001,
2358	.bDeviceSubClass = 2,
2359	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2360		.vendor_name = "MOTU",
2361		.product_name = "Fastlane",
2362		.ifnum = QUIRK_ANY_INTERFACE,
2363		.type = QUIRK_COMPOSITE,
2364		.data = & (const struct snd_usb_audio_quirk[]) {
2365			{
2366				.ifnum = 0,
2367				.type = QUIRK_MIDI_RAW_BYTES
2368			},
2369			{
2370				.ifnum = 1,
2371				.type = QUIRK_IGNORE_INTERFACE
2372			},
2373			{
2374				.ifnum = -1
2375			}
2376		}
2377	}
2378},
2379
2380/* Emagic devices */
2381{
2382	USB_DEVICE(0x086a, 0x0001),
2383	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2384		.vendor_name = "Emagic",
2385		.product_name = "Unitor8",
2386		.ifnum = 2,
2387		.type = QUIRK_MIDI_EMAGIC,
2388		.data = & (const struct snd_usb_midi_endpoint_info) {
2389			.out_cables = 0x80ff,
2390			.in_cables  = 0x80ff
2391		}
2392	}
2393},
2394{
2395	USB_DEVICE(0x086a, 0x0002),
2396	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2397		.vendor_name = "Emagic",
2398		/* .product_name = "AMT8", */
2399		.ifnum = 2,
2400		.type = QUIRK_MIDI_EMAGIC,
2401		.data = & (const struct snd_usb_midi_endpoint_info) {
2402			.out_cables = 0x80ff,
2403			.in_cables  = 0x80ff
2404		}
2405	}
2406},
2407{
2408	USB_DEVICE(0x086a, 0x0003),
2409	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2410		.vendor_name = "Emagic",
2411		/* .product_name = "MT4", */
2412		.ifnum = 2,
2413		.type = QUIRK_MIDI_EMAGIC,
2414		.data = & (const struct snd_usb_midi_endpoint_info) {
2415			.out_cables = 0x800f,
2416			.in_cables  = 0x8003
2417		}
2418	}
2419},
2420
2421/* KORG devices */
2422{
2423	USB_DEVICE_VENDOR_SPEC(0x0944, 0x0200),
2424	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2425		.vendor_name = "KORG, Inc.",
2426		/* .product_name = "PANDORA PX5D", */
2427		.ifnum = 3,
2428		.type = QUIRK_MIDI_STANDARD_INTERFACE,
2429	}
2430},
2431
2432{
2433	USB_DEVICE_VENDOR_SPEC(0x0944, 0x0201),
2434	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2435		.vendor_name = "KORG, Inc.",
2436		/* .product_name = "ToneLab ST", */
2437		.ifnum = 3,
2438		.type = QUIRK_MIDI_STANDARD_INTERFACE,
2439	}
2440},
2441
2442{
2443	USB_DEVICE_VENDOR_SPEC(0x0944, 0x0204),
2444	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2445		.vendor_name = "KORG, Inc.",
2446		/* .product_name = "ToneLab EX", */
2447		.ifnum = 3,
2448		.type = QUIRK_MIDI_STANDARD_INTERFACE,
2449	}
2450},
2451
2452/* AKAI devices */
2453{
2454	USB_DEVICE(0x09e8, 0x0062),
2455	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2456		.vendor_name = "AKAI",
2457		.product_name = "MPD16",
2458		.ifnum = 0,
2459		.type = QUIRK_MIDI_AKAI,
2460	}
2461},
2462
2463{
2464	/* Akai MPC Element */
2465	USB_DEVICE(0x09e8, 0x0021),
2466	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2467		.ifnum = QUIRK_ANY_INTERFACE,
2468		.type = QUIRK_COMPOSITE,
2469		.data = & (const struct snd_usb_audio_quirk[]) {
2470			{
2471				.ifnum = 0,
2472				.type = QUIRK_IGNORE_INTERFACE
2473			},
2474			{
2475				.ifnum = 1,
2476				.type = QUIRK_MIDI_STANDARD_INTERFACE
2477			},
2478			{
2479				.ifnum = -1
2480			}
2481		}
2482	}
2483},
2484
2485/* Steinberg devices */
2486{
2487	/* Steinberg MI2 */
2488	USB_DEVICE_VENDOR_SPEC(0x0a4e, 0x2040),
2489	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2490		.ifnum = QUIRK_ANY_INTERFACE,
2491		.type = QUIRK_COMPOSITE,
2492		.data = & (const struct snd_usb_audio_quirk[]) {
2493			{
2494				.ifnum = 0,
2495				.type = QUIRK_AUDIO_STANDARD_INTERFACE
2496			},
2497			{
2498				.ifnum = 1,
2499				.type = QUIRK_AUDIO_STANDARD_INTERFACE
2500			},
2501			{
2502				.ifnum = 2,
2503				.type = QUIRK_AUDIO_STANDARD_INTERFACE
2504			},
2505			{
2506				.ifnum = 3,
2507				.type = QUIRK_MIDI_FIXED_ENDPOINT,
2508				.data = &(const struct snd_usb_midi_endpoint_info) {
2509					.out_cables = 0x0001,
2510					.in_cables  = 0x0001
2511				}
2512			},
2513			{
2514				.ifnum = -1
2515			}
2516		}
2517	}
2518},
2519{
2520	/* Steinberg MI4 */
2521	USB_DEVICE_VENDOR_SPEC(0x0a4e, 0x4040),
2522	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2523		.ifnum = QUIRK_ANY_INTERFACE,
2524		.type = QUIRK_COMPOSITE,
2525		.data = & (const struct snd_usb_audio_quirk[]) {
2526			{
2527				.ifnum = 0,
2528				.type = QUIRK_AUDIO_STANDARD_INTERFACE
2529			},
2530			{
2531				.ifnum = 1,
2532				.type = QUIRK_AUDIO_STANDARD_INTERFACE
2533			},
2534			{
2535				.ifnum = 2,
2536				.type = QUIRK_AUDIO_STANDARD_INTERFACE
2537			},
2538			{
2539				.ifnum = 3,
2540				.type = QUIRK_MIDI_FIXED_ENDPOINT,
2541				.data = &(const struct snd_usb_midi_endpoint_info) {
2542					.out_cables = 0x0001,
2543					.in_cables  = 0x0001
2544				}
2545			},
2546			{
2547				.ifnum = -1
2548			}
2549		}
2550	}
2551},
2552
2553/* TerraTec devices */
2554{
2555	USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0012),
2556	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2557		.vendor_name = "TerraTec",
2558		.product_name = "PHASE 26",
2559		.ifnum = 3,
2560		.type = QUIRK_MIDI_STANDARD_INTERFACE
2561	}
2562},
2563{
2564	USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0013),
2565	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2566		.vendor_name = "TerraTec",
2567		.product_name = "PHASE 26",
2568		.ifnum = 3,
2569		.type = QUIRK_MIDI_STANDARD_INTERFACE
2570	}
2571},
2572{
2573	USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0014),
2574	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2575		.vendor_name = "TerraTec",
2576		.product_name = "PHASE 26",
2577		.ifnum = 3,
2578		.type = QUIRK_MIDI_STANDARD_INTERFACE
2579	}
2580},
2581{
 
 
 
 
2582	USB_DEVICE(0x0ccd, 0x0035),
2583	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2584		.vendor_name = "Miditech",
2585		.product_name = "Play'n Roll",
2586		.ifnum = 0,
2587		.type = QUIRK_MIDI_CME
2588	}
2589},
2590
 
 
 
 
 
 
 
 
 
 
2591/* Novation EMS devices */
2592{
2593	USB_DEVICE_VENDOR_SPEC(0x1235, 0x0001),
2594	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2595		.vendor_name = "Novation",
2596		.product_name = "ReMOTE Audio/XStation",
2597		.ifnum = 4,
2598		.type = QUIRK_MIDI_NOVATION
2599	}
2600},
2601{
2602	USB_DEVICE_VENDOR_SPEC(0x1235, 0x0002),
2603	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2604		.vendor_name = "Novation",
2605		.product_name = "Speedio",
2606		.ifnum = 3,
2607		.type = QUIRK_MIDI_NOVATION
2608	}
2609},
2610{
2611	USB_DEVICE(0x1235, 0x000a),
2612	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2613		/* .vendor_name = "Novation", */
2614		/* .product_name = "Nocturn", */
2615		.ifnum = 0,
2616		.type = QUIRK_MIDI_RAW_BYTES
2617	}
2618},
2619{
2620	USB_DEVICE(0x1235, 0x000e),
2621	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2622		/* .vendor_name = "Novation", */
2623		/* .product_name = "Launchpad", */
2624		.ifnum = 0,
2625		.type = QUIRK_MIDI_RAW_BYTES
2626	}
2627},
2628{
2629	USB_DEVICE(0x1235, 0x0010),
2630	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2631		.vendor_name = "Focusrite",
2632		.product_name = "Saffire 6 USB",
2633		.ifnum = QUIRK_ANY_INTERFACE,
2634		.type = QUIRK_COMPOSITE,
2635		.data = (const struct snd_usb_audio_quirk[]) {
2636			{
2637				.ifnum = 0,
2638				.type = QUIRK_AUDIO_STANDARD_MIXER,
2639			},
2640			{
2641				.ifnum = 0,
2642				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
2643				.data = &(const struct audioformat) {
2644					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
2645					.channels = 4,
2646					.iface = 0,
2647					.altsetting = 1,
2648					.altset_idx = 1,
2649					.attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2650					.endpoint = 0x01,
2651					.ep_attr = USB_ENDPOINT_XFER_ISOC,
2652					.datainterval = 1,
2653					.maxpacksize = 0x024c,
2654					.rates = SNDRV_PCM_RATE_44100 |
2655						 SNDRV_PCM_RATE_48000,
2656					.rate_min = 44100,
2657					.rate_max = 48000,
2658					.nr_rates = 2,
2659					.rate_table = (unsigned int[]) {
2660						44100, 48000
2661					}
2662				}
2663			},
2664			{
2665				.ifnum = 0,
2666				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
2667				.data = &(const struct audioformat) {
2668					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
2669					.channels = 2,
2670					.iface = 0,
2671					.altsetting = 1,
2672					.altset_idx = 1,
2673					.attributes = 0,
2674					.endpoint = 0x82,
2675					.ep_attr = USB_ENDPOINT_XFER_ISOC,
2676					.datainterval = 1,
2677					.maxpacksize = 0x0126,
2678					.rates = SNDRV_PCM_RATE_44100 |
2679						 SNDRV_PCM_RATE_48000,
2680					.rate_min = 44100,
2681					.rate_max = 48000,
2682					.nr_rates = 2,
2683					.rate_table = (unsigned int[]) {
2684						44100, 48000
2685					}
2686				}
2687			},
2688			{
2689				.ifnum = 1,
2690				.type = QUIRK_MIDI_RAW_BYTES
2691			},
2692			{
2693				.ifnum = -1
2694			}
2695		}
2696	}
2697},
2698{
2699	USB_DEVICE(0x1235, 0x0018),
2700	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2701		.vendor_name = "Novation",
2702		.product_name = "Twitch",
2703		.ifnum = QUIRK_ANY_INTERFACE,
2704		.type = QUIRK_COMPOSITE,
2705		.data = (const struct snd_usb_audio_quirk[]) {
2706			{
2707				.ifnum = 0,
2708				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
2709				.data = & (const struct audioformat) {
2710					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
2711					.channels = 4,
2712					.iface = 0,
2713					.altsetting = 1,
2714					.altset_idx = 1,
2715					.attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2716					.endpoint = 0x01,
2717					.ep_attr = USB_ENDPOINT_XFER_ISOC,
2718					.rates = SNDRV_PCM_RATE_44100 |
2719						 SNDRV_PCM_RATE_48000,
2720					.rate_min = 44100,
2721					.rate_max = 48000,
2722					.nr_rates = 2,
2723					.rate_table = (unsigned int[]) {
2724						44100, 48000
2725					}
2726				}
2727			},
2728			{
2729				.ifnum = 1,
2730				.type = QUIRK_MIDI_RAW_BYTES
2731			},
2732			{
2733				.ifnum = -1
2734			}
2735		}
2736	}
2737},
2738{
2739	USB_DEVICE_VENDOR_SPEC(0x1235, 0x4661),
2740	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2741		.vendor_name = "Novation",
2742		.product_name = "ReMOTE25",
2743		.ifnum = 0,
2744		.type = QUIRK_MIDI_NOVATION
2745	}
2746},
2747
2748/* Access Music devices */
2749{
2750	/* VirusTI Desktop */
2751	USB_DEVICE_VENDOR_SPEC(0x133e, 0x0815),
2752	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2753		.ifnum = QUIRK_ANY_INTERFACE,
2754		.type = QUIRK_COMPOSITE,
2755		.data = &(const struct snd_usb_audio_quirk[]) {
2756			{
2757				.ifnum = 3,
2758				.type = QUIRK_MIDI_FIXED_ENDPOINT,
2759				.data = &(const struct snd_usb_midi_endpoint_info) {
2760					.out_cables = 0x0003,
2761					.in_cables  = 0x0003
2762				}
2763			},
2764			{
2765				.ifnum = 4,
2766				.type = QUIRK_IGNORE_INTERFACE
2767			},
2768			{
2769				.ifnum = -1
2770			}
2771		}
2772	}
2773},
2774
 
 
 
 
 
 
 
2775/* Lenovo ThinkStation P620 Rear Line-in, Line-out and Microphone */
2776{
2777	USB_DEVICE(0x17aa, 0x1046),
2778	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 
 
 
2779		.ifnum = QUIRK_ANY_INTERFACE,
2780		.type = QUIRK_SETUP_DISABLE_AUTOSUSPEND
2781	}
2782},
2783/* Lenovo ThinkStation P620 Internal Speaker + Front Headset */
2784{
2785	USB_DEVICE(0x17aa, 0x104d),
2786	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 
 
 
2787		.ifnum = QUIRK_ANY_INTERFACE,
2788		.type = QUIRK_SETUP_DISABLE_AUTOSUSPEND
2789	}
2790},
2791
2792/* Native Instruments MK2 series */
2793{
2794	/* Komplete Audio 6 */
2795	.match_flags = USB_DEVICE_ID_MATCH_DEVICE,
2796	.idVendor = 0x17cc,
2797	.idProduct = 0x1000,
2798},
2799{
2800	/* Traktor Audio 6 */
2801	.match_flags = USB_DEVICE_ID_MATCH_DEVICE,
2802	.idVendor = 0x17cc,
2803	.idProduct = 0x1010,
2804},
2805{
2806	/* Traktor Audio 10 */
2807	.match_flags = USB_DEVICE_ID_MATCH_DEVICE,
2808	.idVendor = 0x17cc,
2809	.idProduct = 0x1020,
2810},
2811
2812/* QinHeng devices */
2813{
2814	USB_DEVICE(0x1a86, 0x752d),
2815	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2816		.vendor_name = "QinHeng",
2817		.product_name = "CH345",
2818		.ifnum = 1,
2819		.type = QUIRK_MIDI_CH345
2820	}
2821},
2822
2823/* KeithMcMillen Stringport */
2824{ USB_DEVICE(0x1f38, 0x0001) }, /* FIXME: should be more restrictive matching */
 
 
 
2825
2826/* Miditech devices */
2827{
2828	USB_DEVICE(0x4752, 0x0011),
2829	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2830		.vendor_name = "Miditech",
2831		.product_name = "Midistart-2",
2832		.ifnum = 0,
2833		.type = QUIRK_MIDI_CME
2834	}
2835},
2836
2837/* Central Music devices */
2838{
2839	/* this ID used by both Miditech MidiStudio-2 and CME UF-x */
2840	USB_DEVICE(0x7104, 0x2202),
2841	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2842		.ifnum = 0,
2843		.type = QUIRK_MIDI_CME
2844	}
2845},
2846
2847/*
2848 * Auvitek au0828 devices with audio interface.
2849 * This should be kept in sync with drivers/media/usb/au0828/au0828-cards.c
2850 * Please notice that some drivers are DVB only, and don't need to be
2851 * here. That's the case, for example, of DVICO_FUSIONHDTV7.
2852 */
2853
2854#define AU0828_DEVICE(vid, pid, vname, pname) { \
2855	USB_AUDIO_DEVICE(vid, pid), \
 
 
 
 
 
 
2856	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) { \
2857		.vendor_name = vname, \
2858		.product_name = pname, \
2859		.ifnum = QUIRK_ANY_INTERFACE, \
2860		.type = QUIRK_AUDIO_ALIGN_TRANSFER, \
2861		.shares_media_device = 1, \
2862	} \
2863}
2864
2865AU0828_DEVICE(0x2040, 0x7200, "Hauppauge", "HVR-950Q"),
2866AU0828_DEVICE(0x2040, 0x7240, "Hauppauge", "HVR-850"),
2867AU0828_DEVICE(0x2040, 0x7210, "Hauppauge", "HVR-950Q"),
2868AU0828_DEVICE(0x2040, 0x7217, "Hauppauge", "HVR-950Q"),
2869AU0828_DEVICE(0x2040, 0x721b, "Hauppauge", "HVR-950Q"),
2870AU0828_DEVICE(0x2040, 0x721e, "Hauppauge", "HVR-950Q"),
2871AU0828_DEVICE(0x2040, 0x721f, "Hauppauge", "HVR-950Q"),
2872AU0828_DEVICE(0x2040, 0x7280, "Hauppauge", "HVR-950Q"),
2873AU0828_DEVICE(0x0fd9, 0x0008, "Hauppauge", "HVR-950Q"),
2874AU0828_DEVICE(0x2040, 0x7201, "Hauppauge", "HVR-950Q-MXL"),
2875AU0828_DEVICE(0x2040, 0x7211, "Hauppauge", "HVR-950Q-MXL"),
2876AU0828_DEVICE(0x2040, 0x7281, "Hauppauge", "HVR-950Q-MXL"),
2877AU0828_DEVICE(0x05e1, 0x0480, "Hauppauge", "Woodbury"),
2878AU0828_DEVICE(0x2040, 0x8200, "Hauppauge", "Woodbury"),
2879AU0828_DEVICE(0x2040, 0x7260, "Hauppauge", "HVR-950Q"),
2880AU0828_DEVICE(0x2040, 0x7213, "Hauppauge", "HVR-950Q"),
2881AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"),
2882
2883/* Syntek STK1160 */
2884{
2885	USB_AUDIO_DEVICE(0x05e1, 0x0408),
 
 
 
 
 
 
2886	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2887		.vendor_name = "Syntek",
2888		.product_name = "STK1160",
2889		.ifnum = QUIRK_ANY_INTERFACE,
2890		.type = QUIRK_AUDIO_ALIGN_TRANSFER
2891	}
2892},
2893
2894/* Digidesign Mbox */
2895{
2896	/* Thanks to Clemens Ladisch <clemens@ladisch.de> */
2897	USB_DEVICE(0x0dba, 0x1000),
2898	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2899		.vendor_name = "Digidesign",
2900		.product_name = "MBox",
2901		.ifnum = QUIRK_ANY_INTERFACE,
2902		.type = QUIRK_COMPOSITE,
2903		.data = (const struct snd_usb_audio_quirk[]){
2904			{
2905				.ifnum = 0,
2906				.type = QUIRK_AUDIO_STANDARD_MIXER,
2907			},
2908			{
2909				.ifnum = 1,
2910				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
2911				.data = &(const struct audioformat) {
2912					.formats = SNDRV_PCM_FMTBIT_S24_3BE,
2913					.channels = 2,
2914					.iface = 1,
2915					.altsetting = 1,
2916					.altset_idx = 1,
2917					.attributes = 0x4,
2918					.endpoint = 0x02,
2919					.ep_attr = USB_ENDPOINT_XFER_ISOC |
2920						USB_ENDPOINT_SYNC_SYNC,
2921					.maxpacksize = 0x130,
2922					.rates = SNDRV_PCM_RATE_48000,
2923					.rate_min = 48000,
2924					.rate_max = 48000,
2925					.nr_rates = 1,
2926					.rate_table = (unsigned int[]) {
2927						48000
2928					}
2929				}
2930			},
2931			{
2932				.ifnum = 1,
2933				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
2934				.data = &(const struct audioformat) {
2935					.formats = SNDRV_PCM_FMTBIT_S24_3BE,
2936					.channels = 2,
2937					.iface = 1,
2938					.altsetting = 1,
2939					.altset_idx = 1,
2940					.attributes = 0x4,
2941					.endpoint = 0x81,
2942					.ep_attr = USB_ENDPOINT_XFER_ISOC |
2943						USB_ENDPOINT_SYNC_ASYNC,
2944					.maxpacksize = 0x130,
2945					.rates = SNDRV_PCM_RATE_48000,
2946					.rate_min = 48000,
2947					.rate_max = 48000,
2948					.nr_rates = 1,
2949					.rate_table = (unsigned int[]) {
2950						48000
2951					}
2952				}
2953			},
2954			{
2955				.ifnum = -1
2956			}
2957		}
2958	}
2959},
2960
2961/* DIGIDESIGN MBOX 2 */
2962{
2963	USB_DEVICE(0x0dba, 0x3000),
2964	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2965		.vendor_name = "Digidesign",
2966		.product_name = "Mbox 2",
2967		.ifnum = QUIRK_ANY_INTERFACE,
2968		.type = QUIRK_COMPOSITE,
2969		.data = (const struct snd_usb_audio_quirk[]) {
2970			{
2971				.ifnum = 0,
2972				.type = QUIRK_IGNORE_INTERFACE
2973			},
2974			{
2975				.ifnum = 1,
2976				.type = QUIRK_IGNORE_INTERFACE
2977			},
2978			{
2979				.ifnum = 2,
2980				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
2981				.data = &(const struct audioformat) {
2982					.formats = SNDRV_PCM_FMTBIT_S24_3BE,
2983					.channels = 2,
2984					.iface = 2,
2985					.altsetting = 2,
2986					.altset_idx = 1,
2987					.attributes = 0x00,
2988					.endpoint = 0x03,
2989					.ep_attr = USB_ENDPOINT_SYNC_ASYNC,
2990					.rates = SNDRV_PCM_RATE_48000,
2991					.rate_min = 48000,
2992					.rate_max = 48000,
2993					.nr_rates = 1,
2994					.rate_table = (unsigned int[]) {
2995						48000
2996					}
2997				}
2998			},
2999			{
3000				.ifnum = 3,
3001				.type = QUIRK_IGNORE_INTERFACE
3002			},
3003			{
3004				.ifnum = 4,
3005				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3006				.data = &(const struct audioformat) {
3007				.formats = SNDRV_PCM_FMTBIT_S24_3BE,
3008					.channels = 2,
3009					.iface = 4,
3010					.altsetting = 2,
3011					.altset_idx = 1,
3012					.attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
3013					.endpoint = 0x85,
3014					.ep_attr = USB_ENDPOINT_SYNC_SYNC,
3015					.rates = SNDRV_PCM_RATE_48000,
3016					.rate_min = 48000,
3017					.rate_max = 48000,
3018					.nr_rates = 1,
3019					.rate_table = (unsigned int[]) {
3020						48000
3021					}
3022				}
3023			},
3024			{
3025				.ifnum = 5,
3026				.type = QUIRK_IGNORE_INTERFACE
3027			},
3028			{
3029				.ifnum = 6,
3030				.type = QUIRK_MIDI_MIDIMAN,
3031				.data = &(const struct snd_usb_midi_endpoint_info) {
3032					.out_ep =  0x02,
3033					.out_cables = 0x0001,
3034					.in_ep = 0x81,
3035					.in_interval = 0x01,
3036					.in_cables = 0x0001
3037				}
3038			},
3039			{
3040				.ifnum = -1
3041			}
3042		}
3043	}
3044},
3045{
3046	/* Tascam US122 MKII - playback-only support */
3047	USB_DEVICE_VENDOR_SPEC(0x0644, 0x8021),
 
 
 
3048	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3049		.vendor_name = "TASCAM",
3050		.product_name = "US122 MKII",
3051		.ifnum = QUIRK_ANY_INTERFACE,
3052		.type = QUIRK_COMPOSITE,
3053		.data = (const struct snd_usb_audio_quirk[]) {
3054			{
3055				.ifnum = 0,
3056				.type = QUIRK_IGNORE_INTERFACE
3057			},
3058			{
3059				.ifnum = 1,
3060				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3061				.data = &(const struct audioformat) {
3062					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
3063					.channels = 2,
3064					.iface = 1,
3065					.altsetting = 1,
3066					.altset_idx = 1,
3067					.attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
3068					.endpoint = 0x02,
3069					.ep_attr = USB_ENDPOINT_XFER_ISOC,
3070					.rates = SNDRV_PCM_RATE_44100 |
3071						 SNDRV_PCM_RATE_48000 |
3072						 SNDRV_PCM_RATE_88200 |
3073						 SNDRV_PCM_RATE_96000,
3074					.rate_min = 44100,
3075					.rate_max = 96000,
3076					.nr_rates = 4,
3077					.rate_table = (unsigned int[]) {
3078						44100, 48000, 88200, 96000
3079					}
3080				}
3081			},
3082			{
3083				.ifnum = -1
3084			}
3085		}
3086	}
3087},
3088
3089/* Denon DN-X1600 */
3090{
3091	USB_AUDIO_DEVICE(0x154e, 0x500e),
3092	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3093		.vendor_name = "Denon",
3094		.product_name = "DN-X1600",
3095		.ifnum = QUIRK_ANY_INTERFACE,
3096		.type = QUIRK_COMPOSITE,
3097		.data = (const struct snd_usb_audio_quirk[]){
3098			{
3099				.ifnum = 0,
3100				.type = QUIRK_IGNORE_INTERFACE,
3101			},
3102			{
3103				.ifnum = 1,
3104				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3105				.data = &(const struct audioformat) {
3106					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
3107					.channels = 8,
3108					.iface = 1,
3109					.altsetting = 1,
3110					.altset_idx = 1,
3111					.attributes = 0x0,
3112					.endpoint = 0x01,
3113					.ep_attr = USB_ENDPOINT_XFER_ISOC |
3114						USB_ENDPOINT_SYNC_ADAPTIVE,
3115					.maxpacksize = 0x138,
3116					.rates = SNDRV_PCM_RATE_48000,
3117					.rate_min = 48000,
3118					.rate_max = 48000,
3119					.nr_rates = 1,
3120					.rate_table = (unsigned int[]) {
3121						48000
3122					}
3123				}
3124			},
3125			{
3126				.ifnum = 2,
3127				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3128				.data = &(const struct audioformat) {
3129					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
3130					.channels = 8,
3131					.iface = 2,
3132					.altsetting = 1,
3133					.altset_idx = 1,
3134					.attributes = 0x0,
3135					.endpoint = 0x85,
3136					.ep_attr = USB_ENDPOINT_XFER_ISOC |
3137						USB_ENDPOINT_SYNC_ADAPTIVE,
3138					.maxpacksize = 0x138,
3139					.rates = SNDRV_PCM_RATE_48000,
3140					.rate_min = 48000,
3141					.rate_max = 48000,
3142					.nr_rates = 1,
3143					.rate_table = (unsigned int[]) {
3144						48000
3145					}
3146				}
3147			},
3148			{
3149				.ifnum = 4,
3150				.type = QUIRK_MIDI_STANDARD_INTERFACE,
3151			},
3152			{
3153				.ifnum = -1
3154			}
3155		}
3156	}
3157},
3158
3159/* Microsoft XboxLive Headset/Xbox Communicator */
3160{
3161	USB_DEVICE(0x045e, 0x0283),
3162	.bInterfaceClass = USB_CLASS_PER_INTERFACE,
3163	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3164		.vendor_name = "Microsoft",
3165		.product_name = "XboxLive Headset/Xbox Communicator",
3166		.ifnum = QUIRK_ANY_INTERFACE,
3167		.type = QUIRK_COMPOSITE,
3168		.data = &(const struct snd_usb_audio_quirk[]) {
3169			{
3170				/* playback */
3171				.ifnum = 0,
3172				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3173				.data = &(const struct audioformat) {
3174					.formats = SNDRV_PCM_FMTBIT_S16_LE,
3175					.channels = 1,
3176					.iface = 0,
3177					.altsetting = 0,
3178					.altset_idx = 0,
3179					.attributes = 0,
3180					.endpoint = 0x04,
3181					.ep_attr = 0x05,
3182					.rates = SNDRV_PCM_RATE_CONTINUOUS,
3183					.rate_min = 22050,
3184					.rate_max = 22050
3185				}
3186			},
3187			{
3188				/* capture */
3189				.ifnum = 1,
3190				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3191				.data = &(const struct audioformat) {
3192					.formats = SNDRV_PCM_FMTBIT_S16_LE,
3193					.channels = 1,
3194					.iface = 1,
3195					.altsetting = 0,
3196					.altset_idx = 0,
3197					.attributes = 0,
3198					.endpoint = 0x85,
3199					.ep_attr = 0x05,
3200					.rates = SNDRV_PCM_RATE_CONTINUOUS,
3201					.rate_min = 16000,
3202					.rate_max = 16000
3203				}
3204			},
3205			{
3206				.ifnum = -1
3207			}
3208		}
3209	}
3210},
3211
3212/* Reloop Play */
3213{
3214	USB_DEVICE(0x200c, 0x100b),
3215	.bInterfaceClass = USB_CLASS_PER_INTERFACE,
3216	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3217		.ifnum = QUIRK_ANY_INTERFACE,
3218		.type = QUIRK_COMPOSITE,
3219		.data = &(const struct snd_usb_audio_quirk[]) {
3220			{
3221				.ifnum = 0,
3222				.type = QUIRK_AUDIO_STANDARD_MIXER,
3223			},
3224			{
3225				.ifnum = 1,
3226				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3227				.data = &(const struct audioformat) {
3228					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
3229					.channels = 4,
3230					.iface = 1,
3231					.altsetting = 1,
3232					.altset_idx = 1,
3233					.attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
3234					.endpoint = 0x01,
3235					.ep_attr = USB_ENDPOINT_SYNC_ADAPTIVE,
3236					.rates = SNDRV_PCM_RATE_44100 |
3237						 SNDRV_PCM_RATE_48000,
3238					.rate_min = 44100,
3239					.rate_max = 48000,
3240					.nr_rates = 2,
3241					.rate_table = (unsigned int[]) {
3242						44100, 48000
3243					}
3244				}
3245			},
3246			{
3247				.ifnum = -1
3248			}
3249		}
3250	}
3251},
3252
3253{
3254	/*
3255	 * ZOOM R16/24 in audio interface mode.
3256	 * Playback requires an extra four byte LE length indicator
3257	 * at the start of each isochronous packet. This quirk is
3258	 * enabled in create_standard_audio_quirk().
3259	 */
3260	USB_DEVICE(0x1686, 0x00dd),
3261	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
3262		.ifnum = QUIRK_ANY_INTERFACE,
3263		.type = QUIRK_COMPOSITE,
3264		.data = (const struct snd_usb_audio_quirk[]) {
3265			{
3266				/* Playback  */
3267				.ifnum = 1,
3268				.type = QUIRK_AUDIO_STANDARD_INTERFACE,
3269			},
3270			{
3271				/* Capture */
3272				.ifnum = 2,
3273				.type = QUIRK_AUDIO_STANDARD_INTERFACE,
3274			},
3275			{
3276				/* Midi */
3277				.ifnum = 3,
3278				.type = QUIRK_MIDI_STANDARD_INTERFACE
3279			},
3280			{
3281				.ifnum = -1
3282			},
3283		}
3284	}
3285},
3286
3287{
3288	/*
3289	 * Some USB MIDI devices don't have an audio control interface,
3290	 * so we have to grab MIDI streaming interfaces here.
3291	 */
3292	.match_flags = USB_DEVICE_ID_MATCH_INT_CLASS |
3293		       USB_DEVICE_ID_MATCH_INT_SUBCLASS,
3294	.bInterfaceClass = USB_CLASS_AUDIO,
3295	.bInterfaceSubClass = USB_SUBCLASS_MIDISTREAMING,
3296	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
3297		.ifnum = QUIRK_ANY_INTERFACE,
3298		.type = QUIRK_MIDI_STANDARD_INTERFACE
3299	}
3300},
3301
 
 
 
 
 
 
 
 
 
 
 
 
 
3302/* disabled due to regression for other devices;
3303 * see https://bugzilla.kernel.org/show_bug.cgi?id=199905
3304 */
3305#if 0
3306{
3307	/*
3308	 * Nura's first gen headphones use Cambridge Silicon Radio's vendor
3309	 * ID, but it looks like the product ID actually is only for Nura.
3310	 * The capture interface does not work at all (even on Windows),
3311	 * and only the 48 kHz sample rate works for the playback interface.
3312	 */
3313	USB_DEVICE(0x0a12, 0x1243),
3314	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3315		.ifnum = QUIRK_ANY_INTERFACE,
3316		.type = QUIRK_COMPOSITE,
3317		.data = (const struct snd_usb_audio_quirk[]) {
3318			{
3319				.ifnum = 0,
3320				.type = QUIRK_AUDIO_STANDARD_MIXER,
3321			},
3322			/* Capture */
3323			{
3324				.ifnum = 1,
3325				.type = QUIRK_IGNORE_INTERFACE,
3326			},
3327			/* Playback */
3328			{
3329				.ifnum = 2,
3330				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3331				.data = &(const struct audioformat) {
3332					.formats = SNDRV_PCM_FMTBIT_S16_LE,
3333					.channels = 2,
3334					.iface = 2,
3335					.altsetting = 1,
3336					.altset_idx = 1,
3337					.attributes = UAC_EP_CS_ATTR_FILL_MAX |
3338						UAC_EP_CS_ATTR_SAMPLE_RATE,
3339					.endpoint = 0x03,
3340					.ep_attr = USB_ENDPOINT_XFER_ISOC,
3341					.rates = SNDRV_PCM_RATE_48000,
3342					.rate_min = 48000,
3343					.rate_max = 48000,
3344					.nr_rates = 1,
3345					.rate_table = (unsigned int[]) {
3346						48000
3347					}
3348				}
3349			},
3350			{
3351				.ifnum = -1
3352			},
3353		}
3354	}
3355},
3356#endif /* disabled */
3357
3358{
3359	/*
3360	 * Bower's & Wilkins PX headphones only support the 48 kHz sample rate
3361	 * even though it advertises more. The capture interface doesn't work
3362	 * even on windows.
3363	 */
3364	USB_DEVICE(0x19b5, 0x0021),
3365	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3366		.ifnum = QUIRK_ANY_INTERFACE,
3367		.type = QUIRK_COMPOSITE,
3368		.data = (const struct snd_usb_audio_quirk[]) {
3369			{
3370				.ifnum = 0,
3371				.type = QUIRK_AUDIO_STANDARD_MIXER,
3372			},
3373			/* Playback */
3374			{
3375				.ifnum = 1,
3376				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3377				.data = &(const struct audioformat) {
3378					.formats = SNDRV_PCM_FMTBIT_S16_LE,
3379					.channels = 2,
3380					.iface = 1,
3381					.altsetting = 1,
3382					.altset_idx = 1,
3383					.attributes = UAC_EP_CS_ATTR_FILL_MAX |
3384						UAC_EP_CS_ATTR_SAMPLE_RATE,
3385					.endpoint = 0x03,
3386					.ep_attr = USB_ENDPOINT_XFER_ISOC,
3387					.rates = SNDRV_PCM_RATE_48000,
3388					.rate_min = 48000,
3389					.rate_max = 48000,
3390					.nr_rates = 1,
3391					.rate_table = (unsigned int[]) {
3392						48000
3393					}
3394				}
3395			},
3396			{
3397				.ifnum = -1
3398			},
3399		}
3400	}
3401},
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3402/* MOTU Microbook II */
3403{
3404	USB_DEVICE_VENDOR_SPEC(0x07fd, 0x0004),
3405	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3406		.vendor_name = "MOTU",
3407		.product_name = "MicroBookII",
3408		.ifnum = QUIRK_ANY_INTERFACE,
3409		.type = QUIRK_COMPOSITE,
3410		.data = (const struct snd_usb_audio_quirk[]) {
3411			{
3412				.ifnum = 0,
3413				.type = QUIRK_AUDIO_STANDARD_MIXER,
3414			},
3415			{
3416				.ifnum = 0,
3417				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3418				.data = &(const struct audioformat) {
3419					.formats = SNDRV_PCM_FMTBIT_S24_3BE,
3420					.channels = 6,
3421					.iface = 0,
3422					.altsetting = 1,
3423					.altset_idx = 1,
3424					.attributes = 0,
3425					.endpoint = 0x84,
3426					.rates = SNDRV_PCM_RATE_96000,
3427					.ep_attr = USB_ENDPOINT_XFER_ISOC |
3428						   USB_ENDPOINT_SYNC_ASYNC,
3429					.rate_min = 96000,
3430					.rate_max = 96000,
3431					.nr_rates = 1,
3432					.maxpacksize = 0x00d8,
3433					.rate_table = (unsigned int[]) {
3434						96000
3435					}
3436				}
3437			},
3438			{
3439				.ifnum = 0,
3440				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3441				.data = &(const struct audioformat) {
3442					.formats = SNDRV_PCM_FMTBIT_S24_3BE,
3443					.channels = 8,
3444					.iface = 0,
3445					.altsetting = 1,
3446					.altset_idx = 1,
3447					.attributes = 0,
3448					.endpoint = 0x03,
3449					.rates = SNDRV_PCM_RATE_96000,
3450					.ep_attr = USB_ENDPOINT_XFER_ISOC |
3451						   USB_ENDPOINT_SYNC_ASYNC,
3452					.rate_min = 96000,
3453					.rate_max = 96000,
3454					.nr_rates = 1,
3455					.maxpacksize = 0x0120,
3456					.rate_table = (unsigned int[]) {
3457						96000
3458					}
3459				}
3460			},
3461			{
3462				.ifnum = -1
3463			}
3464		}
3465	}
3466},
3467{
3468	/*
3469	 * PIONEER DJ DDJ-SX3
3470	 * PCM is 12 channels out, 10 channels in @ 44.1 fixed
3471	 * interface 0, vendor class alt setting 1 for endpoints 5 and 0x86
3472	 * The feedback for the output is the input.
3473	 */
3474	USB_DEVICE_VENDOR_SPEC(0x2b73, 0x0023),
3475	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3476		.ifnum = QUIRK_ANY_INTERFACE,
3477		.type = QUIRK_COMPOSITE,
3478		.data = (const struct snd_usb_audio_quirk[]) {
3479			{
3480				.ifnum = 0,
3481				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3482				.data = &(const struct audioformat) {
3483					.formats = SNDRV_PCM_FMTBIT_S32_LE,
3484					.channels = 12,
3485					.iface = 0,
3486					.altsetting = 1,
3487					.altset_idx = 1,
3488					.endpoint = 0x05,
3489					.ep_attr = USB_ENDPOINT_XFER_ISOC|
3490						   USB_ENDPOINT_SYNC_ASYNC,
3491					.rates = SNDRV_PCM_RATE_44100,
3492					.rate_min = 44100,
3493					.rate_max = 44100,
3494					.nr_rates = 1,
3495					.rate_table = (unsigned int[]) { 44100 }
3496				}
3497			},
3498			{
3499				.ifnum = 0,
3500				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3501				.data = &(const struct audioformat) {
3502					.formats = SNDRV_PCM_FMTBIT_S32_LE,
3503					.channels = 10,
3504					.iface = 0,
3505					.altsetting = 1,
3506					.altset_idx = 1,
3507					.endpoint = 0x86,
3508					.ep_idx = 1,
3509					.ep_attr = USB_ENDPOINT_XFER_ISOC|
3510						 USB_ENDPOINT_SYNC_ASYNC|
3511						 USB_ENDPOINT_USAGE_IMPLICIT_FB,
3512					.rates = SNDRV_PCM_RATE_44100,
3513					.rate_min = 44100,
3514					.rate_max = 44100,
3515					.nr_rates = 1,
3516					.rate_table = (unsigned int[]) { 44100 }
3517				}
3518			},
3519			{
3520				.ifnum = -1
3521			}
3522		}
3523	}
3524},
3525{
3526	/*
3527	 * Pioneer DJ DJM-250MK2
3528	 * PCM is 8 channels out @ 48 fixed (endpoint 0x01)
3529	 * and 8 channels in @ 48 fixed (endpoint 0x82).
3530	 *
3531	 * Both playback and recording is working, even simultaneously.
3532	 *
3533	 * Playback channels could be mapped to:
3534	 *  - CH1
3535	 *  - CH2
3536	 *  - AUX
3537	 *
3538	 * Recording channels could be mapped to:
3539	 *  - Post CH1 Fader
3540	 *  - Post CH2 Fader
3541	 *  - Cross Fader A
3542	 *  - Cross Fader B
3543	 *  - MIC
3544	 *  - AUX
3545	 *  - REC OUT
3546	 *
3547	 * There is remaining problem with recording directly from PHONO/LINE.
3548	 * If we map a channel to:
3549	 *  - CH1 Control Tone PHONO
3550	 *  - CH1 Control Tone LINE
3551	 *  - CH2 Control Tone PHONO
3552	 *  - CH2 Control Tone LINE
3553	 * it is silent.
3554	 * There is no signal even on other operating systems with official drivers.
3555	 * The signal appears only when a supported application is started.
3556	 * This needs to be investigated yet...
3557	 * (there is quite a lot communication on the USB in both directions)
3558	 *
3559	 * In current version this mixer could be used for playback
3560	 * and for recording from vinyls (through Post CH* Fader)
3561	 * but not for DVS (Digital Vinyl Systems) like in Mixxx.
3562	 */
3563	USB_DEVICE_VENDOR_SPEC(0x2b73, 0x0017),
3564	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3565		.ifnum = QUIRK_ANY_INTERFACE,
3566		.type = QUIRK_COMPOSITE,
3567		.data = (const struct snd_usb_audio_quirk[]) {
3568			{
3569				.ifnum = 0,
3570				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3571				.data = &(const struct audioformat) {
3572					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
3573					.channels = 8, // outputs
3574					.iface = 0,
3575					.altsetting = 1,
3576					.altset_idx = 1,
3577					.endpoint = 0x01,
3578					.ep_attr = USB_ENDPOINT_XFER_ISOC|
3579						USB_ENDPOINT_SYNC_ASYNC,
3580					.rates = SNDRV_PCM_RATE_48000,
3581					.rate_min = 48000,
3582					.rate_max = 48000,
3583					.nr_rates = 1,
3584					.rate_table = (unsigned int[]) { 48000 }
3585					}
3586			},
3587			{
3588				.ifnum = 0,
3589				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3590				.data = &(const struct audioformat) {
3591					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
3592					.channels = 8, // inputs
3593					.iface = 0,
3594					.altsetting = 1,
3595					.altset_idx = 1,
3596					.endpoint = 0x82,
3597					.ep_idx = 1,
3598					.ep_attr = USB_ENDPOINT_XFER_ISOC|
3599						USB_ENDPOINT_SYNC_ASYNC|
3600						USB_ENDPOINT_USAGE_IMPLICIT_FB,
3601					.rates = SNDRV_PCM_RATE_48000,
3602					.rate_min = 48000,
3603					.rate_max = 48000,
3604					.nr_rates = 1,
3605					.rate_table = (unsigned int[]) { 48000 }
3606				}
3607			},
3608			{
3609				.ifnum = -1
3610			}
3611		}
3612	}
3613},
3614{
3615	/*
3616	 * PIONEER DJ DDJ-RB
3617	 * PCM is 4 channels out, 2 dummy channels in @ 44.1 fixed
3618	 * The feedback for the output is the dummy input.
3619	 */
3620	USB_DEVICE_VENDOR_SPEC(0x2b73, 0x000e),
3621	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3622		.ifnum = QUIRK_ANY_INTERFACE,
3623		.type = QUIRK_COMPOSITE,
3624		.data = (const struct snd_usb_audio_quirk[]) {
3625			{
3626				.ifnum = 0,
3627				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3628				.data = &(const struct audioformat) {
3629					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
3630					.channels = 4,
3631					.iface = 0,
3632					.altsetting = 1,
3633					.altset_idx = 1,
3634					.endpoint = 0x01,
3635					.ep_attr = USB_ENDPOINT_XFER_ISOC|
3636						   USB_ENDPOINT_SYNC_ASYNC,
3637					.rates = SNDRV_PCM_RATE_44100,
3638					.rate_min = 44100,
3639					.rate_max = 44100,
3640					.nr_rates = 1,
3641					.rate_table = (unsigned int[]) { 44100 }
3642				}
3643			},
3644			{
3645				.ifnum = 0,
3646				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3647				.data = &(const struct audioformat) {
3648					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
3649					.channels = 2,
3650					.iface = 0,
3651					.altsetting = 1,
3652					.altset_idx = 1,
3653					.endpoint = 0x82,
3654					.ep_idx = 1,
3655					.ep_attr = USB_ENDPOINT_XFER_ISOC|
3656						 USB_ENDPOINT_SYNC_ASYNC|
3657						 USB_ENDPOINT_USAGE_IMPLICIT_FB,
3658					.rates = SNDRV_PCM_RATE_44100,
3659					.rate_min = 44100,
3660					.rate_max = 44100,
3661					.nr_rates = 1,
3662					.rate_table = (unsigned int[]) { 44100 }
3663				}
3664			},
3665			{
3666				.ifnum = -1
3667			}
3668		}
3669	}
3670},
3671
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3672{
3673	/*
3674	 * PIONEER DJ DDJ-RR
3675	 * PCM is 6 channels out & 4 channels in @ 44.1 fixed
3676	 */
3677	USB_DEVICE_VENDOR_SPEC(0x2b73, 0x000d),
3678	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3679		.ifnum = QUIRK_ANY_INTERFACE,
3680		.type = QUIRK_COMPOSITE,
3681		.data = (const struct snd_usb_audio_quirk[]) {
3682			{
3683				.ifnum = 0,
3684				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3685				.data = &(const struct audioformat) {
3686					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
3687					.channels = 6, //Master, Headphones & Booth
3688					.iface = 0,
3689					.altsetting = 1,
3690					.altset_idx = 1,
3691					.endpoint = 0x01,
3692					.ep_attr = USB_ENDPOINT_XFER_ISOC|
3693						   USB_ENDPOINT_SYNC_ASYNC,
3694					.rates = SNDRV_PCM_RATE_44100,
3695					.rate_min = 44100,
3696					.rate_max = 44100,
3697					.nr_rates = 1,
3698					.rate_table = (unsigned int[]) { 44100 }
3699				}
3700			},
3701			{
3702				.ifnum = 0,
3703				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3704				.data = &(const struct audioformat) {
3705					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
3706					.channels = 4, //2x RCA inputs (CH1 & CH2)
3707					.iface = 0,
3708					.altsetting = 1,
3709					.altset_idx = 1,
3710					.endpoint = 0x82,
3711					.ep_idx = 1,
3712					.ep_attr = USB_ENDPOINT_XFER_ISOC|
3713						 USB_ENDPOINT_SYNC_ASYNC|
3714						 USB_ENDPOINT_USAGE_IMPLICIT_FB,
3715					.rates = SNDRV_PCM_RATE_44100,
3716					.rate_min = 44100,
3717					.rate_max = 44100,
3718					.nr_rates = 1,
3719					.rate_table = (unsigned int[]) { 44100 }
3720				}
3721			},
3722			{
3723				.ifnum = -1
3724			}
3725		}
3726	}
3727},
3728
3729{
3730	/*
3731	 * PIONEER DJ DDJ-SR2
3732	 * PCM is 4 channels out, 6 channels in @ 44.1 fixed
3733	 * The Feedback for the output is the input
3734	 */
3735	USB_DEVICE_VENDOR_SPEC(0x2b73, 0x001e),
3736		.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3737		.ifnum = QUIRK_ANY_INTERFACE,
3738		.type = QUIRK_COMPOSITE,
3739		.data = (const struct snd_usb_audio_quirk[]) {
3740			{
3741				.ifnum = 0,
3742				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3743				.data = &(const struct audioformat) {
3744					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
3745					.channels = 4,
3746					.iface = 0,
3747					.altsetting = 1,
3748					.altset_idx = 1,
3749					.endpoint = 0x01,
3750					.ep_attr = USB_ENDPOINT_XFER_ISOC|
3751						USB_ENDPOINT_SYNC_ASYNC,
3752					.rates = SNDRV_PCM_RATE_44100,
3753					.rate_min = 44100,
3754					.rate_max = 44100,
3755					.nr_rates = 1,
3756					.rate_table = (unsigned int[]) { 44100 }
3757				}
3758			},
3759			{
3760				.ifnum = 0,
3761				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3762				.data = &(const struct audioformat) {
3763					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
3764					.channels = 6,
3765					.iface = 0,
3766					.altsetting = 1,
3767					.altset_idx = 1,
3768					.endpoint = 0x82,
3769					.ep_idx = 1,
3770					.ep_attr = USB_ENDPOINT_XFER_ISOC|
3771						USB_ENDPOINT_SYNC_ASYNC|
3772					USB_ENDPOINT_USAGE_IMPLICIT_FB,
3773					.rates = SNDRV_PCM_RATE_44100,
3774					.rate_min = 44100,
3775					.rate_max = 44100,
3776					.nr_rates = 1,
3777					.rate_table = (unsigned int[]) { 44100 }
3778				}
3779			},
3780			{
3781				.ifnum = -1
3782			}
3783		}
3784	}
3785},
3786
3787{
3788	/*
3789	 * Pioneer DJ DJM-900NXS2
3790	 * 10 channels playback & 12 channels capture @ 44.1/48/96kHz S24LE
3791	 */
3792	USB_DEVICE_VENDOR_SPEC(0x2b73, 0x000a),
3793	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3794		.ifnum = QUIRK_ANY_INTERFACE,
3795		.type = QUIRK_COMPOSITE,
3796		.data = (const struct snd_usb_audio_quirk[]) {
3797			{
3798				.ifnum = 0,
3799				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3800				.data = &(const struct audioformat) {
3801					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
3802					.channels = 10,
3803					.iface = 0,
3804					.altsetting = 1,
3805					.altset_idx = 1,
3806					.endpoint = 0x01,
3807					.ep_attr = USB_ENDPOINT_XFER_ISOC|
3808					    USB_ENDPOINT_SYNC_ASYNC,
3809					.rates = SNDRV_PCM_RATE_44100|
3810					    SNDRV_PCM_RATE_48000|
3811					    SNDRV_PCM_RATE_96000,
3812					.rate_min = 44100,
3813					.rate_max = 96000,
3814					.nr_rates = 3,
3815					.rate_table = (unsigned int[]) {
3816						44100, 48000, 96000
3817					}
3818				}
3819			},
3820			{
3821				.ifnum = 0,
3822				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3823				.data = &(const struct audioformat) {
3824					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
3825					.channels = 12,
3826					.iface = 0,
3827					.altsetting = 1,
3828					.altset_idx = 1,
3829					.endpoint = 0x82,
3830					.ep_idx = 1,
3831					.ep_attr = USB_ENDPOINT_XFER_ISOC|
3832					    USB_ENDPOINT_SYNC_ASYNC|
3833					    USB_ENDPOINT_USAGE_IMPLICIT_FB,
3834					.rates = SNDRV_PCM_RATE_44100|
3835					    SNDRV_PCM_RATE_48000|
3836					    SNDRV_PCM_RATE_96000,
3837					.rate_min = 44100,
3838					.rate_max = 96000,
3839					.nr_rates = 3,
3840					.rate_table = (unsigned int[]) {
3841						44100, 48000, 96000
3842					}
3843				}
3844			},
3845			{
3846				.ifnum = -1
3847			}
3848		}
3849	}
3850},
3851
3852/*
3853 * MacroSilicon MS2109 based HDMI capture cards
3854 *
3855 * These claim 96kHz 1ch in the descriptors, but are actually 48kHz 2ch.
3856 * They also need QUIRK_AUDIO_ALIGN_TRANSFER, which makes one wonder if
3857 * they pretend to be 96kHz mono as a workaround for stereo being broken
3858 * by that...
3859 *
3860 * They also have an issue with initial stream alignment that causes the
3861 * channels to be swapped and out of phase, which is dealt with in quirks.c.
3862 */
3863{
3864	USB_AUDIO_DEVICE(0x534d, 0x2109),
 
 
 
 
 
 
3865	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3866		.vendor_name = "MacroSilicon",
3867		.product_name = "MS2109",
3868		.ifnum = QUIRK_ANY_INTERFACE,
3869		.type = QUIRK_COMPOSITE,
3870		.data = &(const struct snd_usb_audio_quirk[]) {
3871			{
3872				.ifnum = 2,
3873				.type = QUIRK_AUDIO_ALIGN_TRANSFER,
3874			},
3875			{
3876				.ifnum = 2,
3877				.type = QUIRK_AUDIO_STANDARD_MIXER,
3878			},
3879			{
3880				.ifnum = 3,
3881				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3882				.data = &(const struct audioformat) {
3883					.formats = SNDRV_PCM_FMTBIT_S16_LE,
3884					.channels = 2,
3885					.iface = 3,
3886					.altsetting = 1,
3887					.altset_idx = 1,
3888					.attributes = 0,
3889					.endpoint = 0x82,
3890					.ep_attr = USB_ENDPOINT_XFER_ISOC |
3891						USB_ENDPOINT_SYNC_ASYNC,
3892					.rates = SNDRV_PCM_RATE_CONTINUOUS,
3893					.rate_min = 48000,
3894					.rate_max = 48000,
3895				}
3896			},
3897			{
3898				.ifnum = -1
3899			}
3900		}
3901	}
3902},
3903{
3904	/*
3905	 * Pioneer DJ DJM-750
3906	 * 8 channels playback & 8 channels capture @ 44.1/48/96kHz S24LE
3907	 */
3908	USB_DEVICE_VENDOR_SPEC(0x08e4, 0x017f),
3909	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3910		.ifnum = QUIRK_ANY_INTERFACE,
3911		.type = QUIRK_COMPOSITE,
3912		.data = (const struct snd_usb_audio_quirk[]) {
3913			{
3914				.ifnum = 0,
3915				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3916				.data = &(const struct audioformat) {
3917					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
3918					.channels = 8,
3919					.iface = 0,
3920					.altsetting = 1,
3921					.altset_idx = 1,
3922					.endpoint = 0x05,
3923					.ep_attr = USB_ENDPOINT_XFER_ISOC|
3924					    USB_ENDPOINT_SYNC_ASYNC,
3925					.rates = SNDRV_PCM_RATE_44100|
3926						SNDRV_PCM_RATE_48000|
3927						SNDRV_PCM_RATE_96000,
3928					.rate_min = 44100,
3929					.rate_max = 96000,
3930					.nr_rates = 3,
3931					.rate_table = (unsigned int[]) { 44100, 48000, 96000 }
3932				}
3933			},
3934			{
3935				.ifnum = 0,
3936				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3937				.data = &(const struct audioformat) {
3938					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
3939					.channels = 8,
3940					.iface = 0,
3941					.altsetting = 1,
3942					.altset_idx = 1,
3943					.endpoint = 0x86,
3944					.ep_idx = 1,
3945					.ep_attr = USB_ENDPOINT_XFER_ISOC|
3946						USB_ENDPOINT_SYNC_ASYNC|
3947						USB_ENDPOINT_USAGE_IMPLICIT_FB,
3948					.rates = SNDRV_PCM_RATE_44100|
3949						SNDRV_PCM_RATE_48000|
3950						SNDRV_PCM_RATE_96000,
3951					.rate_min = 44100,
3952					.rate_max = 96000,
3953					.nr_rates = 3,
3954					.rate_table = (unsigned int[]) { 44100, 48000, 96000 }
3955				}
3956			},
3957			{
3958				.ifnum = -1
3959			}
3960		}
3961	}
3962},
3963{
3964	/*
3965	 * Pioneer DJ DJM-850
3966	 * 8 channels playback and 8 channels capture @ 44.1/48/96kHz S24LE
3967	 * Playback on EP 0x05
3968	 * Capture on EP 0x86
3969	 */
3970	USB_DEVICE_VENDOR_SPEC(0x08e4, 0x0163),
3971	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3972		.ifnum = QUIRK_ANY_INTERFACE,
3973		.type = QUIRK_COMPOSITE,
3974		.data = (const struct snd_usb_audio_quirk[]) {
3975			{
3976				.ifnum = 0,
3977				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
3978				.data = &(const struct audioformat) {
3979					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
3980					.channels = 8,
3981					.iface = 0,
3982					.altsetting = 1,
3983					.altset_idx = 1,
3984					.endpoint = 0x05,
3985					.ep_attr = USB_ENDPOINT_XFER_ISOC|
3986					    USB_ENDPOINT_SYNC_ASYNC|
3987						USB_ENDPOINT_USAGE_DATA,
3988					.rates = SNDRV_PCM_RATE_44100|
3989						SNDRV_PCM_RATE_48000|
3990						SNDRV_PCM_RATE_96000,
3991					.rate_min = 44100,
3992					.rate_max = 96000,
3993					.nr_rates = 3,
3994					.rate_table = (unsigned int[]) { 44100, 48000, 96000 }
3995				}
3996			},
3997			{
3998				.ifnum = 0,
3999				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
4000				.data = &(const struct audioformat) {
4001					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
4002					.channels = 8,
4003					.iface = 0,
4004					.altsetting = 1,
4005					.altset_idx = 1,
4006					.endpoint = 0x86,
4007					.ep_idx = 1,
4008					.ep_attr = USB_ENDPOINT_XFER_ISOC|
4009						USB_ENDPOINT_SYNC_ASYNC|
4010						USB_ENDPOINT_USAGE_DATA,
4011					.rates = SNDRV_PCM_RATE_44100|
4012						SNDRV_PCM_RATE_48000|
4013						SNDRV_PCM_RATE_96000,
4014					.rate_min = 44100,
4015					.rate_max = 96000,
4016					.nr_rates = 3,
4017					.rate_table = (unsigned int[]) { 44100, 48000, 96000 }
4018				}
4019			},
4020			{
4021				.ifnum = -1
4022			}
4023		}
4024	}
4025},
4026{
4027	/*
4028	 * Pioneer DJ DJM-450
4029	 * PCM is 8 channels out @ 48 fixed (endpoint 0x01)
4030	 * and 8 channels in @ 48 fixed (endpoint 0x82).
4031	 */
4032	USB_DEVICE_VENDOR_SPEC(0x2b73, 0x0013),
4033	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
4034		.ifnum = QUIRK_ANY_INTERFACE,
4035		.type = QUIRK_COMPOSITE,
4036		.data = (const struct snd_usb_audio_quirk[]) {
4037			{
4038				.ifnum = 0,
4039				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
4040				.data = &(const struct audioformat) {
4041					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
4042					.channels = 8, // outputs
4043					.iface = 0,
4044					.altsetting = 1,
4045					.altset_idx = 1,
4046					.endpoint = 0x01,
4047					.ep_attr = USB_ENDPOINT_XFER_ISOC|
4048						USB_ENDPOINT_SYNC_ASYNC,
4049					.rates = SNDRV_PCM_RATE_48000,
4050					.rate_min = 48000,
4051					.rate_max = 48000,
4052					.nr_rates = 1,
4053					.rate_table = (unsigned int[]) { 48000 }
4054					}
4055			},
4056			{
4057				.ifnum = 0,
4058				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
4059				.data = &(const struct audioformat) {
4060					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
4061					.channels = 8, // inputs
4062					.iface = 0,
4063					.altsetting = 1,
4064					.altset_idx = 1,
4065					.endpoint = 0x82,
4066					.ep_idx = 1,
4067					.ep_attr = USB_ENDPOINT_XFER_ISOC|
4068						USB_ENDPOINT_SYNC_ASYNC|
4069						USB_ENDPOINT_USAGE_IMPLICIT_FB,
4070					.rates = SNDRV_PCM_RATE_48000,
4071					.rate_min = 48000,
4072					.rate_max = 48000,
4073					.nr_rates = 1,
4074					.rate_table = (unsigned int[]) { 48000 }
4075				}
4076			},
4077			{
4078				.ifnum = -1
4079			}
4080		}
4081	}
4082},
4083{
4084	/*
4085	 * Sennheiser GSP670
4086	 * Change order of interfaces loaded
4087	 */
4088	USB_DEVICE(0x1395, 0x0300),
4089	.bInterfaceClass = USB_CLASS_PER_INTERFACE,
4090	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
4091		.ifnum = QUIRK_ANY_INTERFACE,
4092		.type = QUIRK_COMPOSITE,
4093		.data = &(const struct snd_usb_audio_quirk[]) {
4094			// Communication
4095			{
4096				.ifnum = 3,
4097				.type = QUIRK_AUDIO_STANDARD_INTERFACE
4098			},
4099			// Recording
4100			{
4101				.ifnum = 4,
4102				.type = QUIRK_AUDIO_STANDARD_INTERFACE
4103			},
4104			// Main
4105			{
4106				.ifnum = 1,
4107				.type = QUIRK_AUDIO_STANDARD_INTERFACE
4108			},
4109			{
4110				.ifnum = -1
4111			}
4112		}
4113	}
4114},
4115
4116#undef USB_DEVICE_VENDOR_SPEC
4117#undef USB_AUDIO_DEVICE