Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 148508
b: refs/heads/master
c: 92a4379
h: refs/heads/master
v: v3
  • Loading branch information
Dan Allongo authored and Takashi Iwai committed Jun 8, 2009
1 parent 05a9c71 commit b5812e8
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ca85b6ba59b69b7b5adcc64a98bd2478f73b2542
refs/heads/master: 92a43793a908f395dc687e6c5fc90d63f999d6d5
25 changes: 25 additions & 0 deletions trunk/sound/usb/usbaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -3279,6 +3279,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
Expand Down Expand Up @@ -3565,6 +3584,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
*/
Expand Down

0 comments on commit b5812e8

Please sign in to comment.