summaryrefslogtreecommitdiffstats
path: root/sound/usb/usbaudio.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-06-10 07:26:49 +0200
committerTakashi Iwai <tiwai@suse.de>2009-06-10 07:26:49 +0200
commit85e013a18acfad98473a4432bb7082d1fcc74a25 (patch)
tree660baeaf0b026686f70890472adcf29ab20f4439 /sound/usb/usbaudio.c
parentMerge branch 'topic/seq-kconfig-cleanup' into for-linus (diff)
parentALSA: usb - Add boot quirk for C-Media 6206 USB Audio (diff)
downloadlinux-85e013a18acfad98473a4432bb7082d1fcc74a25.tar.xz
linux-85e013a18acfad98473a4432bb7082d1fcc74a25.zip
Merge branch 'topic/usb-audio' into for-linus
* topic/usb-audio: ALSA: usb - Add boot quirk for C-Media 6206 USB Audio ALSA: usb-audio - errata corrige for quirk ALSA: usb-audio - Add quirk for Roland/Edirol M-16DX ALSA: usb-audio - quirk for USB Aureon cards
Diffstat (limited to 'sound/usb/usbaudio.c')
-rw-r--r--sound/usb/usbaudio.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
index a8ef2cbcc03b..c7b902358b7b 100644
--- a/sound/usb/usbaudio.c
+++ b/sound/usb/usbaudio.c
@@ -3291,6 +3291,25 @@ static int snd_usb_cm106_boot_quirk(struct usb_device *dev)
return snd_usb_cm106_write_int_reg(dev, 2, 0x8004);
}
+/*
+ * C-Media CM6206 is based on CM106 with two additional
+ * registers that are not documented in the data sheet.
+ * Values here are chosen based on sniffing USB traffic
+ * under Windows.
+ */
+static int snd_usb_cm6206_boot_quirk(struct usb_device *dev)
+{
+ int err, reg;
+ int val[] = {0x200c, 0x3000, 0xf800, 0x143f, 0x0000, 0x3000};
+
+ for (reg = 0; reg < ARRAY_SIZE(val); reg++) {
+ err = snd_usb_cm106_write_int_reg(dev, reg, val[reg]);
+ if (err < 0)
+ return err;
+ }
+
+ return err;
+}
/*
* Setup quirks
@@ -3577,6 +3596,12 @@ static void *snd_usb_audio_probe(struct usb_device *dev,
goto __err_val;
}
+ /* C-Media CM6206 / CM106-Like Sound Device */
+ if (id == USB_ID(0x0d8c, 0x0102)) {
+ if (snd_usb_cm6206_boot_quirk(dev) < 0)
+ goto __err_val;
+ }
+
/*
* found a config. now register to ALSA
*/