From ef6f239d3b43a0a0df9ddee4b7d56cfbe4090d2a Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 3 Oct 2010 17:40:29 -0300 Subject: [PATCH] --- yaml --- r: 219315 b: refs/heads/master c: 9bb7262de9c077ccccb129f47d128edb7af5f92e h: refs/heads/master i: 219313: 405fb2fd72e11820b3b25ce1377484bec62fbeb9 219311: 6823582c9efa696e4ec1d6532727a845038d215e v: v3 --- [refs] | 2 +- trunk/drivers/media/video/uvc/uvc_video.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index ae04fa9a14a2..babb1658e9df 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 11fc5baf1dab2d30f03a391cabc5fd1808cfbe29 +refs/heads/master: 9bb7262de9c077ccccb129f47d128edb7af5f92e diff --git a/trunk/drivers/media/video/uvc/uvc_video.c b/trunk/drivers/media/video/uvc/uvc_video.c index ee5e2338b417..5a2022c01528 100644 --- a/trunk/drivers/media/video/uvc/uvc_video.c +++ b/trunk/drivers/media/video/uvc/uvc_video.c @@ -138,6 +138,15 @@ static void uvc_fixup_video_ctrl(struct uvc_streaming *stream, bandwidth /= 8; bandwidth += 12; + /* The bandwidth estimate is too low for many cameras. Don't use + * maximum packet sizes lower than 1024 bytes to try and work + * around the problem. According to measurements done on two + * different camera models, the value is high enough to get most + * resolutions working while not preventing two simultaneous + * VGA streams at 15 fps. + */ + bandwidth = max_t(u32, bandwidth, 1024); + ctrl->dwMaxPayloadTransferSize = bandwidth; } }