aboutsummaryrefslogtreecommitdiff
path: root/sound/usb/stream.c
diff options
context:
space:
mode:
authorAndrey Konovalov <andrey.konovalov@linaro.org>2013-05-08 22:31:27 +0400
committerAndrey Konovalov <andrey.konovalov@linaro.org>2013-05-08 22:31:27 +0400
commit79dbf9d1a443fc015e05dbeb5ab610059c6d9bf1 (patch)
tree044b23d8cb4827763dc0728dbaa76c4cd0eb7ac2 /sound/usb/stream.c
parentde507154419bcaf3c135b94ba3bbb3f3a6464447 (diff)
parentc554f06fc801004f3fc3b162c490d8fdf4e79725 (diff)
Merge branch 'tracking-linux-3.9.y' into merge-linux-linaro-core-trackingllct-20130508.0
Diffstat (limited to 'sound/usb/stream.c')
-rw-r--r--sound/usb/stream.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/usb/stream.c b/sound/usb/stream.c
index ad181d538bd9..cfc4d4eaf42b 100644
--- a/sound/usb/stream.c
+++ b/sound/usb/stream.c
@@ -94,6 +94,7 @@ static void snd_usb_init_substream(struct snd_usb_stream *as,
subs->dev = as->chip->dev;
subs->txfr_quirk = as->chip->txfr_quirk;
subs->speed = snd_usb_get_speed(subs->dev);
+ subs->pkt_offset_adj = 0;
snd_usb_set_pcm_ops(as->pcm, stream);
@@ -396,6 +397,14 @@ static int parse_uac_endpoint_attributes(struct snd_usb_audio *chip,
if (!csep && altsd->bNumEndpoints >= 2)
csep = snd_usb_find_desc(alts->endpoint[1].extra, alts->endpoint[1].extralen, NULL, USB_DT_CS_ENDPOINT);
+ /*
+ * If we can't locate the USB_DT_CS_ENDPOINT descriptor in the extra
+ * bytes after the first endpoint, go search the entire interface.
+ * Some devices have it directly *before* the standard endpoint.
+ */
+ if (!csep)
+ csep = snd_usb_find_desc(alts->extra, alts->extralen, NULL, USB_DT_CS_ENDPOINT);
+
if (!csep || csep->bLength < 7 ||
csep->bDescriptorSubtype != UAC_EP_GENERAL) {
snd_printk(KERN_WARNING "%d:%u:%d : no or invalid"