diff options
author | David S. Miller <davem@davemloft.net> | 2009-08-09 21:29:47 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-09 21:29:47 -0700 |
commit | f222e8b40f2177b1c4cac015b117744c1d3fa3e9 (patch) | |
tree | 7c5fc22c08da900e21b0e7ab2376e8e8e44a63c0 /sound/usb/usbaudio.c | |
parent | 819ae6a389d4acfab9a7bb874fa1977aa464d14b (diff) | |
parent | f4b9a988685da6386d7f9a72df3098bcc3270526 (diff) |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'sound/usb/usbaudio.c')
-rw-r--r-- | sound/usb/usbaudio.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index c7b902358b7..44b9cdc8a83 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c @@ -2661,7 +2661,7 @@ static int parse_audio_endpoints(struct snd_usb_audio *chip, int iface_no) struct usb_interface_descriptor *altsd; int i, altno, err, stream; int format; - struct audioformat *fp; + struct audioformat *fp = NULL; unsigned char *fmt, *csep; int num; @@ -2734,6 +2734,18 @@ static int parse_audio_endpoints(struct snd_usb_audio *chip, int iface_no) continue; } + /* + * Blue Microphones workaround: The last altsetting is identical + * with the previous one, except for a larger packet size, but + * is actually a mislabeled two-channel setting; ignore it. + */ + if (fmt[4] == 1 && fmt[5] == 2 && altno == 2 && num == 3 && + fp && fp->altsetting == 1 && fp->channels == 1 && + fp->format == SNDRV_PCM_FORMAT_S16_LE && + le16_to_cpu(get_endpoint(alts, 0)->wMaxPacketSize) == + fp->maxpacksize * 2) + continue; + csep = snd_usb_find_desc(alts->endpoint[0].extra, alts->endpoint[0].extralen, NULL, USB_DT_CS_ENDPOINT); /* Creamware Noah has this descriptor after the 2nd endpoint */ if (!csep && altsd->bNumEndpoints >= 2) |