]> git.hungrycats.org Git - linux/commitdiff
ALSA: usb-audio: Add support for Zoom R16/24 capture and midi interfaces
authorPanu Matilainen <pmatilai@laiskiainen.org>
Sun, 30 Nov 2014 16:45:40 +0000 (18:45 +0200)
committerSasha Levin <sasha.levin@oracle.com>
Tue, 9 Jun 2015 18:31:46 +0000 (14:31 -0400)
[ Upstream commit dacacb0aa0cb6fdeb69313db6acfc82456945d7e ]

This makes the midi interface and capture work out of the box with
R16 (and presumably R24 too but untested). Playback stream would also
seem to function fine except for one caveat: no sound is produced,
so it is disabled for now. Mixer descriptors are garbage and will
require further quirks to enable functionality, also disabled here.

Signed-off-by: Panu Matilainen <pmatilai@laiskiainen.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
sound/usb/quirks-table.h
sound/usb/quirks.c

index 5293b5ac8b9d6022fce2eafa939781b733a01497..fde5b6e3c8e5b547274281d498aac239a23ecb60 100644 (file)
@@ -3143,6 +3143,46 @@ AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"),
        }
 },
 
+{
+       /*
+        * ZOOM R16/24 in audio interface mode.
+        * Mixer descriptors are garbage, further quirks will be needed
+        * to make any of it functional, thus disabled for now.
+        * Playback stream appears to start and run fine but no sound
+        * is produced, so also disabled for now.
+        */
+       USB_DEVICE(0x1686, 0x00dd),
+       .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
+               .ifnum = QUIRK_ANY_INTERFACE,
+               .type = QUIRK_COMPOSITE,
+               .data = (const struct snd_usb_audio_quirk[]) {
+                       {
+                               /* Mixer */
+                               .ifnum = 0,
+                               .type = QUIRK_IGNORE_INTERFACE,
+                       },
+                       {
+                               /* Playback  */
+                               .ifnum = 1,
+                               .type = QUIRK_IGNORE_INTERFACE,
+                       },
+                       {
+                               /* Capture */
+                               .ifnum = 2,
+                               .type = QUIRK_AUDIO_STANDARD_INTERFACE,
+                       },
+                       {
+                               /* Midi */
+                               .ifnum = 3,
+                               .type = QUIRK_MIDI_STANDARD_INTERFACE
+                       },
+                       {
+                               .ifnum = -1
+                       },
+               }
+       }
+},
+
 {
        /*
         * Some USB MIDI devices don't have an audio control interface,
index 8039495ac85aaed550c61fbf2455378aa89e51ed..7907ea6c6aa52774dab4d0450df614c9922fd486 100644 (file)
@@ -1198,6 +1198,14 @@ void snd_usb_ctl_msg_quirk(struct usb_device *dev, unsigned int pipe,
                        break;
                }
        }
+
+       /* Zoom R16/24 needs a tiny delay here, otherwise requests like
+        * get/set frequency return as failed despite actually succeeding.
+        */
+       if ((le16_to_cpu(dev->descriptor.idVendor) == 0x1686) &&
+           (le16_to_cpu(dev->descriptor.idProduct) == 0x00dd) &&
+           (requesttype & USB_TYPE_MASK) == USB_TYPE_CLASS)
+               mdelay(1);
 }
 
 /*