diff options
author | Pavel Machek <pavel@suse.cz> | 2008-04-14 13:12:47 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-04-24 12:00:33 +0200 |
commit | b9d43bcd061956c8144bcb453d07d13236b6ab28 (patch) | |
tree | a81f7f606db1ed1ea428b6ad4e5fb496fe6ecf1a /sound | |
parent | eaa9985b4edb5f8008998abdda8b85ddeba05f1f (diff) |
[ALSA] usb audio: Fix another Dallas quirk
Dallas USB speakers are buggy in more than one way. One of configs
they offer does not work at all.
Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/usb/usbaudio.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index 5c40c031dd57..ff2e09a46133 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c @@ -2676,12 +2676,23 @@ static int parse_audio_endpoints(struct snd_usb_audio *chip, int iface_no) int format; struct audioformat *fp; unsigned char *fmt, *csep; + int num; dev = chip->dev; /* parse the interface's altsettings */ iface = usb_ifnum_to_if(dev, iface_no); - for (i = 0; i < iface->num_altsetting; i++) { + + num = iface->num_altsetting; + + /* + * Dallas DS4201 workaround: It presents 5 altsettings, but the last + * one misses syncpipe, and does not produce any sound. + */ + if (chip->usb_id == USB_ID(0x04fa, 0x4201)) + num = 4; + + for (i = 0; i < num; i++) { alts = &iface->altsetting[i]; altsd = get_iface_desc(alts); /* skip invalid one */ |