Skip to content

Commit

Permalink
[ALSA] usb audio: Fix another Dallas quirk
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pavel Machek authored and Takashi Iwai committed Apr 24, 2008
1 parent eaa9985 commit b9d43bc
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion sound/usb/usbaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit b9d43bc

Please sign in to comment.