diff options
author | Takashi Iwai <tiwai@suse.de> | 2007-02-06 19:09:48 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-02-23 16:24:26 -0800 |
commit | 945acd5445047109e9102dae8c47a24585abaf32 (patch) | |
tree | b4a56dd8541ec93e60929b188e8ae0adc71cdb0e | |
parent | d0a0ad6ff5d23e30548c62ea9192dc4d4ab92773 (diff) | |
download | lwn-945acd5445047109e9102dae8c47a24585abaf32.tar.gz lwn-945acd5445047109e9102dae8c47a24585abaf32.zip |
usb-audio: work around wrong frequency in CM6501 descriptors
The C-Media CM6501 chip's descriptors say that altsetting 5 supports
48 kHz, but it actually plays at 96 kHz.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | sound/usb/usbaudio.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index 67202b9eeb77..88f3a94b8351 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c @@ -2471,7 +2471,13 @@ static int parse_audio_format_rates(struct snd_usb_audio *chip, struct audioform fp->nr_rates = nr_rates; fp->rate_min = fp->rate_max = combine_triple(&fmt[8]); for (r = 0, idx = offset + 1; r < nr_rates; r++, idx += 3) { - unsigned int rate = fp->rate_table[r] = combine_triple(&fmt[idx]); + unsigned int rate = combine_triple(&fmt[idx]); + /* C-Media CM6501 mislabels its 96 kHz altsetting */ + if (rate == 48000 && nr_rates == 1 && + chip->usb_id == USB_ID(0x0d8c, 0x0201) && + fp->altsetting == 5 && fp->maxpacksize == 392) + rate = 96000; + fp->rate_table[r] = rate; if (rate < fp->rate_min) fp->rate_min = rate; else if (rate > fp->rate_max) |