diff options
Diffstat (limited to 'sound/usb/usbaudio.c')
-rw-r--r-- | sound/usb/usbaudio.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index a6b88482637b..e87121751dd0 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c | |||
@@ -3279,6 +3279,25 @@ static int snd_usb_cm106_boot_quirk(struct usb_device *dev) | |||
3279 | return snd_usb_cm106_write_int_reg(dev, 2, 0x8004); | 3279 | return snd_usb_cm106_write_int_reg(dev, 2, 0x8004); |
3280 | } | 3280 | } |
3281 | 3281 | ||
3282 | /* | ||
3283 | * C-Media CM6206 is based on CM106 with two additional | ||
3284 | * registers that are not documented in the data sheet. | ||
3285 | * Values here are chosen based on sniffing USB traffic | ||
3286 | * under Windows. | ||
3287 | */ | ||
3288 | static int snd_usb_cm6206_boot_quirk(struct usb_device *dev) | ||
3289 | { | ||
3290 | int err, reg; | ||
3291 | int val[] = {0x200c, 0x3000, 0xf800, 0x143f, 0x0000, 0x3000}; | ||
3292 | |||
3293 | for (reg = 0; reg < ARRAY_SIZE(val); reg++) { | ||
3294 | err = snd_usb_cm106_write_int_reg(dev, reg, val[reg]); | ||
3295 | if (err < 0) | ||
3296 | return err; | ||
3297 | } | ||
3298 | |||
3299 | return err; | ||
3300 | } | ||
3282 | 3301 | ||
3283 | /* | 3302 | /* |
3284 | * Setup quirks | 3303 | * Setup quirks |
@@ -3565,6 +3584,12 @@ static void *snd_usb_audio_probe(struct usb_device *dev, | |||
3565 | goto __err_val; | 3584 | goto __err_val; |
3566 | } | 3585 | } |
3567 | 3586 | ||
3587 | /* C-Media CM6206 / CM106-Like Sound Device */ | ||
3588 | if (id == USB_ID(0x0d8c, 0x0102)) { | ||
3589 | if (snd_usb_cm6206_boot_quirk(dev) < 0) | ||
3590 | goto __err_val; | ||
3591 | } | ||
3592 | |||
3568 | /* | 3593 | /* |
3569 | * found a config. now register to ALSA | 3594 | * found a config. now register to ALSA |
3570 | */ | 3595 | */ |