summaryrefslogtreecommitdiff
path: root/sound/usb/quirks.c
diff options
context:
space:
mode:
authorMark Hills <mark@xwax.org>2013-03-17 15:07:53 +0400
committerTakashi Iwai <tiwai@suse.de>2013-03-18 11:46:18 +0400
commit5e212332cc7eed0ffbf91fbe5bab6e2a44b83de6 (patch)
treeb967bb0d8b676e03a6d01761a561dcb7877794b7 /sound/usb/quirks.c
parentba615b86d6a3ba6e244973672c63903c8b2831a3 (diff)
downloadlinux-5e212332cc7eed0ffbf91fbe5bab6e2a44b83de6.tar.xz
ALSA: usb-audio: Playback and MIDI support for Novation Twitch DJ controller
The hardware also has a PCM capture device which is not implemented in this patch. It may be possible to generalise this to Saffire 6 USB support and some of the other Focusrite interfaces, but as I don't have access to these devices we should wait until capture support is working first. Capture support is not implemented because the code assumes the endpoint to have its own interface (instead, it shares the interface with playback) and some thought will be needed to lift this limitation. Signed-off-by: Mark Hills <mark@xwax.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/quirks.c')
-rw-r--r--sound/usb/quirks.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index 5325a3869bb7..7c4fe5a634f0 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -446,6 +446,17 @@ static int snd_usb_cm6206_boot_quirk(struct usb_device *dev)
}
/*
+ * Novation Twitch DJ controller
+ */
+static int snd_usb_twitch_boot_quirk(struct usb_device *dev)
+{
+ /* preemptively set up the device because otherwise the
+ * raw MIDI endpoints are not active */
+ usb_set_interface(dev, 0, 1);
+ return 0;
+}
+
+/*
* This call will put the synth in "USB send" mode, i.e it will send MIDI
* messages through USB (this is disabled at startup). The synth will
* acknowledge by sending a sysex on endpoint 0x85 and by displaying a USB
@@ -746,6 +757,10 @@ int snd_usb_apply_boot_quirk(struct usb_device *dev,
/* Digidesign Mbox 2 */
return snd_usb_mbox2_boot_quirk(dev);
+ case USB_ID(0x1235, 0x0018):
+ /* Focusrite Novation Twitch */
+ return snd_usb_twitch_boot_quirk(dev);
+
case USB_ID(0x133e, 0x0815):
/* Access Music VirusTI Desktop */
return snd_usb_accessmusic_boot_quirk(dev);