]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[ALSA] usb-audio - enable high speed (not) on Audigy 2 NX
authorClemens Ladisch <clemens@ladisch.de>
Mon, 9 May 2005 07:20:31 +0000 (09:20 +0200)
committerJaroslav Kysela <perex@suse.cz>
Sun, 29 May 2005 08:06:28 +0000 (10:06 +0200)
USB generic driver
The SB Audigy 2 NX needs a special boot-up command before it works in
high speed mode.

However, we don't actually enable it yet because high speed
synchronization doesn't seem to work with this device.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
sound/usb/usbaudio.c

index da1fe0f0bca0e2d602643550828da2b428705be6..34d5f58985b63457a90bfb593767c254f25eff56 100644 (file)
@@ -2925,6 +2925,25 @@ static int snd_usb_extigy_boot_quirk(struct usb_device *dev, struct usb_interfac
        return 0;
 }
 
+static int snd_usb_audigy2nx_boot_quirk(struct usb_device *dev)
+{
+#if 0
+       /* TODO: enable this when high speed synchronization actually works */
+       u8 buf = 1;
+
+       snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), 0x2a,
+                       USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_OTHER,
+                       0, 0, &buf, 1, 1000);
+       if (buf == 0) {
+               snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), 0x29,
+                               USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER,
+                               1, 2000, NULL, 0, 1000);
+               return -ENODEV;
+       }
+#endif
+       return 0;
+}
+
 
 /*
  * audio-interface quirks
@@ -3154,6 +3173,11 @@ static void *snd_usb_audio_probe(struct usb_device *dev,
                        goto __err_val;
                config = dev->actconfig;
        }
+       /* SB Audigy 2 NX needs its own boot-up magic, too */
+       if (id == USB_ID(0x041e, 0x3020)) {
+               if (snd_usb_audigy2nx_boot_quirk(dev) < 0)
+                       goto __err_val;
+       }
 
        /*
         * found a config.  now register to ALSA