FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

LinkBack Thread Tools
Old 07-16-2011, 03:29 AM
Ming Lei
Default UBUNTU: SAUCE: uvcvideo: add SetInterface(0) in .reset_resume handler

As commented in uvc_video_init,

/* Alternate setting 0 should be the default, yet the XBox Live Vision
* Cam (and possibly other devices) crash or otherwise misbehave if
* they don't receive a SET_INTERFACE request before any other video
* control request.

so it does make sense to add the SetInterface(0) in .reset_resume
handler so that this kind of devices can work well if they are reseted
during resume from system or runtime suspend.

We have found, without the patch, Microdia camera(0c45:6437) can't send
stream data any longer after it is reseted during resume from
system suspend.

SRU Justification:

- without the patch, the Microdia camera(0c45:6437) can't
work after system resume

- After applying the patch, the camera can work well after
system resume

BugLink: http://bugs.launchpad.net/bugs/733509

upstream discusstion: http://marc.info/?t=131037773100002&r=1&w=2

Signed-off-by: Ming Lei <ming.lei@canonical.com>
Cc: Jeremy Kerr <jeremy.kerr@canonical.com>
BTW: The patch will enter 3.1-rc later, not sure how Oneiric will merge
the patch.
drivers/media/video/uvc/uvc_driver.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/uvc/uvc_driver.c b/drivers/media/video/uvc/uvc_driver.c
index b6eae48..41c6d1a 100644
--- a/drivers/media/video/uvc/uvc_driver.c
+++ b/drivers/media/video/uvc/uvc_driver.c
@@ -1959,8 +1959,20 @@ static int __uvc_resume(struct usb_interface *intf, int reset)

list_for_each_entry(stream, &dev->streams, list) {
- if (stream->intf == intf)
+ if (stream->intf == intf) {
+ /*
+ * After usb bus reset, some devices may
+ * misbehave if SetInterface(0) is not done, for
+ * example, Microdia camera(0c45:6437) will stop
+ * sending streaming data. Looks like XBox Live
+ * Vision Cam needs it too, as commented in
+ * uvc_video_init.
+ */
+ if (reset)
+ usb_set_interface(stream->dev->udev,
+ stream->intfnum, 0);
return uvc_video_resume(stream);
+ }

uvc_trace(UVC_TRACE_SUSPEND, "Resume: video streaming USB interface "

Ming Lei

kernel-team mailing list

Thread Tools

All times are GMT. The time now is 03:52 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org