Re: [PATCH] uvcvideo: add fix suspend/resume quirk for Microdia camera

2011-07-15 Thread Ming Lei
Hi, On Thu, Jul 14, 2011 at 11:03 PM, Alan Stern st...@rowland.harvard.edu wrote: More likely, the reset erases some device setting that uvcvideo installed while binding.  Evidently uvcvideo does not re-install the setting during reset-resume; this is probably a bug in the driver. Alan, you

Re: [PATCH] uvcvideo: add fix suspend/resume quirk for Microdia camera

2011-07-15 Thread Alan Stern
On Fri, 15 Jul 2011, Ming Lei wrote: Hi, On Thu, Jul 14, 2011 at 11:03 PM, Alan Stern st...@rowland.harvard.edu wrote: More likely, the reset erases some device setting that uvcvideo installed while binding. �Evidently uvcvideo does not re-install the setting during reset-resume;

Re: [PATCH] uvcvideo: add fix suspend/resume quirk for Microdia camera

2011-07-15 Thread Ming Lei
Hi, On Fri, Jul 15, 2011 at 10:27 PM, Alan Stern st...@rowland.harvard.edu wrote: This is fine with me.  However, it is strange that the Set-Interface request is necessary.  After being reset, the device should automatically be in altsetting 0 for all interfaces. For uvc devices, seems it is

Re: [PATCH] uvcvideo: add fix suspend/resume quirk for Microdia camera

2011-07-15 Thread Alan Stern
On Fri, 15 Jul 2011, Ming Lei wrote: Hi, On Fri, Jul 15, 2011 at 10:27 PM, Alan Stern st...@rowland.harvard.edu wrote: This is fine with me. �However, it is strange that the Set-Interface request is necessary. �After being reset, the device should automatically be in altsetting 0

Re: [PATCH] uvcvideo: add fix suspend/resume quirk for Microdia camera

2011-07-14 Thread Ming Lei
Hi, On Wed, Jul 13, 2011 at 11:59 PM, Alan Stern st...@rowland.harvard.edu wrote: On Wed, 13 Jul 2011, Ming Lei wrote: Almost same. Come on.  Almost same means they are different.  That difference is clearly the important thing you need to track down. I didn't say entirely same because we

Re: [PATCH] uvcvideo: add fix suspend/resume quirk for Microdia camera

2011-07-14 Thread Alan Stern
On Thu, 14 Jul 2011, Ming Lei wrote: Hi, On Wed, Jul 13, 2011 at 11:59 PM, Alan Stern st...@rowland.harvard.edu wrote: On Wed, 13 Jul 2011, Ming Lei wrote: Almost same. Come on. �Almost same means they are different. �That difference is clearly the important thing you need to

Re: [PATCH] uvcvideo: add fix suspend/resume quirk for Microdia camera

2011-07-14 Thread Ming Lei
Hi, On Thu, Jul 14, 2011 at 11:03 PM, Alan Stern st...@rowland.harvard.edu wrote: All right; this tends to confirm your guess that the BIOS messes up the device by resetting it during system resume. Yes. BIOS messes the device first, then usbcore has to reset the device at the end of resume,

Re: [PATCH] uvcvideo: add fix suspend/resume quirk for Microdia camera

2011-07-13 Thread Ming Lei
Hi, On Tue, Jul 12, 2011 at 11:44 PM, Alan Stern st...@rowland.harvard.edu wrote: On Tue, 12 Jul 2011, Ming Lei wrote: Hi Laurent, After resume from sleep,  all the ISO packets from camera are like below: 880122d9f400 3527230728 S Zi:1:004:1 -115:1:2568 32 -18:0:1600 -18:1600:1600

Re: [PATCH] uvcvideo: add fix suspend/resume quirk for Microdia camera

2011-07-13 Thread Ming Lei
Hi, On Tue, Jul 12, 2011 at 11:44 PM, Alan Stern st...@rowland.harvard.edu wrote: Maybe this device needs a USB_QUIRK_RESET_RESUME entry in quirks.c. RESET_RESUME quirk makes things worse, now stream data is not received from the camera at all even in resume from runtime suspend case. So the

Re: [PATCH] uvcvideo: add fix suspend/resume quirk for Microdia camera

2011-07-13 Thread Laurent Pinchart
On Tuesday 12 July 2011 03:21:05 Ming Lei wrote: On Mon, Jul 11, 2011 at 6:44 PM, Laurent Pinchart wrote: That's unfortunately not acceptable as-is. If two cameras are connected to the system, and only one of them doesn't support suspend/resume, the other will be affected by your patch.

Re: [PATCH] uvcvideo: add fix suspend/resume quirk for Microdia camera

2011-07-13 Thread Ming Lei
Hi, On Wed, Jul 13, 2011 at 4:38 PM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: They can still work, but not optimally, as they will be reset instead of suspended/resumed. That's not acceptable. If the reset you mentioned is usb bus reset signal, I think unbindbind will not

Re: [PATCH] uvcvideo: add fix suspend/resume quirk for Microdia camera

2011-07-13 Thread Oliver Neukum
Am Mittwoch, 13. Juli 2011, 10:51:11 schrieb Ming Lei: Hi, On Wed, Jul 13, 2011 at 4:38 PM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: They can still work, but not optimally, as they will be reset instead of suspended/resumed. That's not acceptable. If the reset you

Re: [PATCH] uvcvideo: add fix suspend/resume quirk for Microdia camera

2011-07-13 Thread Laurent Pinchart
On Wednesday 13 July 2011 10:51:11 Ming Lei wrote: On Wed, Jul 13, 2011 at 4:38 PM, Laurent Pinchart wrote: They can still work, but not optimally, as they will be reset instead of suspended/resumed. That's not acceptable. If the reset you mentioned is usb bus reset signal, I think

Re: [PATCH] uvcvideo: add fix suspend/resume quirk for Microdia camera

2011-07-13 Thread Ming Lei
Hi, On Wed, Jul 13, 2011 at 4:59 PM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: Sorry, I haven't been clear. If you remove the suspend/resume handlers from the driver, the USB core will unbind and rebind the driver instead of suspending/resuming the device properly. As this

Re: [PATCH] uvcvideo: add fix suspend/resume quirk for Microdia camera

2011-07-13 Thread Alan Stern
On Wed, 13 Jul 2011, Ming Lei wrote: Hi, On Tue, Jul 12, 2011 at 11:44 PM, Alan Stern st...@rowland.harvard.edu wrote: On Tue, 12 Jul 2011, Ming Lei wrote: Hi Laurent, After resume from sleep, �all the ISO packets from camera are like below: 880122d9f400 3527230728 S

Re: [PATCH] uvcvideo: add fix suspend/resume quirk for Microdia camera

2011-07-13 Thread Ming Lei
Hi, On Wed, Jul 13, 2011 at 11:20 PM, Alan Stern st...@rowland.harvard.edu wrote: Why should system suspend be different from runtime suspend?  Have you This is also my puzzle, :-) compared usbmon traces for the two types of suspend? Almost same. If I add USB_QUIRK_RESET_RESUME quirk for

Re: [PATCH] uvcvideo: add fix suspend/resume quirk for Microdia camera

2011-07-13 Thread Alan Stern
On Wed, 13 Jul 2011, Ming Lei wrote: Hi, On Wed, Jul 13, 2011 at 11:20 PM, Alan Stern st...@rowland.harvard.edu wrote: Why should system suspend be different from runtime suspend? �Have you This is also my puzzle, :-) compared usbmon traces for the two types of suspend? Almost

Re: [PATCH] uvcvideo: add fix suspend/resume quirk for Microdia camera

2011-07-12 Thread Ming Lei
Hi Laurent, After resume from sleep, all the ISO packets from camera are like below: 880122d9f400 3527230728 S Zi:1:004:1 -115:1:2568 32 -18:0:1600 -18:1600:1600 -18:3200:1600 -18:4800:1600 -18:6400:1600 51200 880122d9d400 3527234708 C Zi:1:004:1 0:1:2600:0 32 0:0:12 0:1600:12

Re: [PATCH] uvcvideo: add fix suspend/resume quirk for Microdia camera

2011-07-12 Thread Alan Stern
On Tue, 12 Jul 2011, Ming Lei wrote: Hi Laurent, After resume from sleep, all the ISO packets from camera are like below: 880122d9f400 3527230728 S Zi:1:004:1 -115:1:2568 32 -18:0:1600 -18:1600:1600 -18:3200:1600 -18:4800:1600 -18:6400:1600 51200 880122d9d400 3527234708 C

Re: [PATCH] uvcvideo: add fix suspend/resume quirk for Microdia camera

2011-07-11 Thread Laurent Pinchart
Hi, On Monday 11 July 2011 11:48:11 Ming Lei wrote: From 989d894a2af7ceadf2574f455d9e68779f4ae674 Mon Sep 17 00:00:00 2001 From: Ming Lei ming@canonical.com Date: Mon, 11 Jul 2011 17:04:31 +0800 Subject: [PATCH] uvcvideo: add fix suspend/resume quirk for Microdia camera We found this

Re: [PATCH] uvcvideo: add fix suspend/resume quirk for Microdia camera

2011-07-11 Thread Sergei Shtylyov
Hello. On 11-07-2011 13:48, Ming Lei wrote: From 989d894a2af7ceadf2574f455d9e68779f4ae674 Mon Sep 17 00:00:00 2001 From: Ming Leiming@canonical.com Date: Mon, 11 Jul 2011 17:04:31 +0800 Subject: [PATCH] uvcvideo: add fix suspend/resume quirk for Microdia camera Please omit this

Re: [PATCH] uvcvideo: add fix suspend/resume quirk for Microdia camera

2011-07-11 Thread Ming Lei
Hi, Thanks for your reply. On Mon, Jul 11, 2011 at 6:44 PM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: That's unfortunately not acceptable as-is. If two cameras are connected to the system, and only one of them doesn't support suspend/resume, the other will be affected by your