aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/quirks.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-03-18 13:46:37 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-18 13:46:37 -0400
commitd3e458d78167102cc961237cfceef6fffc80c0b3 (patch)
treee9195c1294daf053614e63ac52b0b44a28479017 /sound/usb/quirks.c
parentf2e1fbb5f2177227f71c4fc0491e531dd7acd385 (diff)
parentd351cf4603edb2a5bfa9a48d06c425511c63f2a3 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (308 commits) ALSA: sound/pci/asihpi: check adapter index in hpi_ioctl ALSA: aloop - Fix possible IRQ lock inversion ALSA: sound/core: merge list_del()/list_add_tail() to list_move_tail() ALSA: ctxfi - use list_move() instead of list_del()/list_add() combination ALSA: firewire - msleep needs delay.h ALSA: firewire-lib, firewire-speakers: handle packet queueing errors ALSA: firewire-lib: allocate DMA buffer separately ALSA: firewire-lib: use no-info SYT for packets without SYT sample ALSA: add LaCie FireWire Speakers/Griffin FireWave Surround driver ALSA: hda - Remove an unused variable in patch_realtek.c ALSA: hda - pin-adc-mux-dmic auto-configuration of 92HD8X codecs ALSA: hda - fix digital mic selection in mixer on 92HD8X codecs ALSA: hda - Move default input-src selection to init part ALSA: hda - Initialize special cases for input src in init phase ALSA: ctxfi - Clear input settings before initialization ALSA: ctxfi - Fix SPDIF status retrieval ALSA: ctxfi - Fix incorrect SPDIF status bit mask ALSA: ctxfi - Fix microphone boost codes/comments ALSA: atiixp - Fix wrong time-out checks during ac-link reset ALSA: intel8x0m: append 'm' to "r_intel8x0" ...
Diffstat (limited to 'sound/usb/quirks.c')
-rw-r--r--sound/usb/quirks.c56
1 files changed, 45 insertions, 11 deletions
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index e314cdb85003..355759bad581 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -425,6 +425,34 @@ static int snd_usb_accessmusic_boot_quirk(struct usb_device *dev)
425} 425}
426 426
427/* 427/*
428 * Some sound cards from Native Instruments are in fact compliant to the USB
429 * audio standard of version 2 and other approved USB standards, even though
430 * they come up as vendor-specific device when first connected.
431 *
432 * However, they can be told to come up with a new set of descriptors
433 * upon their next enumeration, and the interfaces announced by the new
434 * descriptors will then be handled by the kernel's class drivers. As the
435 * product ID will also change, no further checks are required.
436 */
437
438static int snd_usb_nativeinstruments_boot_quirk(struct usb_device *dev)
439{
440 int ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
441 0xaf, USB_TYPE_VENDOR | USB_RECIP_DEVICE,
442 cpu_to_le16(1), 0, NULL, 0, 1000);
443
444 if (ret < 0)
445 return ret;
446
447 usb_reset_device(dev);
448
449 /* return -EAGAIN, so the creation of an audio interface for this
450 * temporary device is aborted. The device will reconnect with a
451 * new product ID */
452 return -EAGAIN;
453}
454
455/*
428 * Setup quirks 456 * Setup quirks
429 */ 457 */
430#define AUDIOPHILE_SET 0x01 /* if set, parse device_setup */ 458#define AUDIOPHILE_SET 0x01 /* if set, parse device_setup */
@@ -489,27 +517,33 @@ int snd_usb_apply_boot_quirk(struct usb_device *dev,
489 u32 id = USB_ID(le16_to_cpu(dev->descriptor.idVendor), 517 u32 id = USB_ID(le16_to_cpu(dev->descriptor.idVendor),
490 le16_to_cpu(dev->descriptor.idProduct)); 518 le16_to_cpu(dev->descriptor.idProduct));
491 519
492 /* SB Extigy needs special boot-up sequence */ 520 switch (id) {
493 /* if more models come, this will go to the quirk list. */ 521 case USB_ID(0x041e, 0x3000):
494 if (id == USB_ID(0x041e, 0x3000)) 522 /* SB Extigy needs special boot-up sequence */
523 /* if more models come, this will go to the quirk list. */
495 return snd_usb_extigy_boot_quirk(dev, intf); 524 return snd_usb_extigy_boot_quirk(dev, intf);
496 525
497 /* SB Audigy 2 NX needs its own boot-up magic, too */ 526 case USB_ID(0x041e, 0x3020):
498 if (id == USB_ID(0x041e, 0x3020)) 527 /* SB Audigy 2 NX needs its own boot-up magic, too */
499 return snd_usb_audigy2nx_boot_quirk(dev); 528 return snd_usb_audigy2nx_boot_quirk(dev);
500 529
501 /* C-Media CM106 / Turtle Beach Audio Advantage Roadie */ 530 case USB_ID(0x10f5, 0x0200):
502 if (id == USB_ID(0x10f5, 0x0200)) 531 /* C-Media CM106 / Turtle Beach Audio Advantage Roadie */
503 return snd_usb_cm106_boot_quirk(dev); 532 return snd_usb_cm106_boot_quirk(dev);
504 533
505 /* C-Media CM6206 / CM106-Like Sound Device */ 534 case USB_ID(0x0d8c, 0x0102):
506 if (id == USB_ID(0x0d8c, 0x0102)) 535 /* C-Media CM6206 / CM106-Like Sound Device */
507 return snd_usb_cm6206_boot_quirk(dev); 536 return snd_usb_cm6206_boot_quirk(dev);
508 537
509 /* Access Music VirusTI Desktop */ 538 case USB_ID(0x133e, 0x0815):
510 if (id == USB_ID(0x133e, 0x0815)) 539 /* Access Music VirusTI Desktop */
511 return snd_usb_accessmusic_boot_quirk(dev); 540 return snd_usb_accessmusic_boot_quirk(dev);
512 541
542 case USB_ID(0x17cc, 0x1010): /* Traktor Audio 6 */
543 case USB_ID(0x17cc, 0x1020): /* Traktor Audio 10 */
544 return snd_usb_nativeinstruments_boot_quirk(dev);
545 }
546
513 return 0; 547 return 0;
514} 548}
515 549