From 90b9a1489fded22048dc9cd3f7fadb9868ea3c39 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Fri, 30 Dec 2011 18:26:53 -0300 Subject: [PATCH] --- yaml --- r: 285683 b: refs/heads/master c: 2d39059a656c0d0f61cfee8225f3d222dac7f3ac h: refs/heads/master i: 285681: fe68a0abadd95a5d2844263cf2ebbcd1e4f5e427 285679: 4f6ad44ccaa01651932d170c518c627bbbc32173 v: v3 --- [refs] | 2 +- trunk/drivers/media/video/gspca/gspca.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index e15c5a98e5ee..c6705c573157 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5dae603d84ff5b6b24186b521f4353b3860b11e2 +refs/heads/master: 2d39059a656c0d0f61cfee8225f3d222dac7f3ac diff --git a/trunk/drivers/media/video/gspca/gspca.c b/trunk/drivers/media/video/gspca/gspca.c index 338dae448787..4a3bbffafcd4 100644 --- a/trunk/drivers/media/video/gspca/gspca.c +++ b/trunk/drivers/media/video/gspca/gspca.c @@ -726,6 +726,23 @@ static int build_isoc_ep_tb(struct gspca_dev *gspca_dev, ep_tb++; } + /* + * If the camera: + * has a usb audio class interface (a built in usb mic); and + * is a usb 1 full speed device; and + * uses the max full speed iso bandwidth; and + * and has more than 1 alt setting + * then skip the highest alt setting to spare bandwidth for the mic + */ + if (gspca_dev->audio && + gspca_dev->dev->speed == USB_SPEED_FULL && + last_bw >= 1000000 && + i > 1) { + PDEBUG(D_STREAM, "dev has usb audio, skipping highest alt"); + i--; + ep_tb--; + } + /* get the requested bandwidth and start at the highest atlsetting */ bandwidth = which_bandwidth(gspca_dev); ep_tb--;