diff options
-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) | |||
2676 | int format; | 2676 | int format; |
2677 | struct audioformat *fp; | 2677 | struct audioformat *fp; |
2678 | unsigned char *fmt, *csep; | 2678 | unsigned char *fmt, *csep; |
2679 | int num; | ||
2679 | 2680 | ||
2680 | dev = chip->dev; | 2681 | dev = chip->dev; |
2681 | 2682 | ||
2682 | /* parse the interface's altsettings */ | 2683 | /* parse the interface's altsettings */ |
2683 | iface = usb_ifnum_to_if(dev, iface_no); | 2684 | iface = usb_ifnum_to_if(dev, iface_no); |
2684 | for (i = 0; i < iface->num_altsetting; i++) { | 2685 | |
2686 | num = iface->num_altsetting; | ||
2687 | |||
2688 | /* | ||
2689 | * Dallas DS4201 workaround: It presents 5 altsettings, but the last | ||
2690 | * one misses syncpipe, and does not produce any sound. | ||
2691 | */ | ||
2692 | if (chip->usb_id == USB_ID(0x04fa, 0x4201)) | ||
2693 | num = 4; | ||
2694 | |||
2695 | for (i = 0; i < num; i++) { | ||
2685 | alts = &iface->altsetting[i]; | 2696 | alts = &iface->altsetting[i]; |
2686 | altsd = get_iface_desc(alts); | 2697 | altsd = get_iface_desc(alts); |
2687 | /* skip invalid one */ | 2698 | /* skip invalid one */ |