Bug 44191
Summary: | 046d:08c1 Quickcam Fusion stops working after first time (from 2.6.39-rc1 onward) | ||
---|---|---|---|
Product: | v4l-dvb | Reporter: | Eric Ding (jk79xfbjhg) |
Component: | webcam | Assignee: | Alan (alan) |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | alan, jrnieder |
Priority: | P1 | ||
Hardware: | i386 | ||
OS: | Linux | ||
Kernel Version: | 3.2.0-25-generic | Subsystem: | |
Regression: | Yes | Bisected commit-id: | |
Attachments: |
disable autosuspend for Logitech Quickcam Fusion
turn on USB_QUIRK_RESET_RESUME for Logitech Quickcam Fusion |
Description
Eric Ding
2012-07-03 14:33:17 UTC
Just to clarify: this webcam works on my Thinkpad R61 even after a system suspend/resume cycle in 2.6.38 (but not 2.6.39-rc1 or later)! So the problem's not as simple as "this webcam doesn't work after resume". What this might imply, I'm at the moment a little too tired to figure out. But it does seem like it might be significant. I think the right thing to do for now is probably to disable autosuspend on this specific camera It ought to be enough to just check id->idVendor and id->idProduct so I'd give it a go and see Disabling autosuspend for the appropriate device would work around this issue in part, though it doesn't resolve the issue where it doesn't work after resume. Still, given that I rarely keep the webcam connected through sleep/resume cycles, and that the webcam also fails on Win7 after a suspend/resume cycle, I'm not too concerned about that use case. Are you suggesting that I do this manually, or that this be programmatically implemented? I'd just stick the code in the probe to not enable autosuspend at the end for that specific device, test it and if it work ssubmit the patch. Suspend/resume may be trickier. One thing to try is whether unloading and reloading the driver fixes it. If that makes a difference then it would imply that making suspend/resume for that device do a complete re-initialize might do the trick. If that fails it may simply not be fixable. Created attachment 74911 [details]
disable autosuspend for Logitech Quickcam Fusion
This patch works ok for me. It takes advantage of the fact that this webcam is already mentioned in uvc_driver.c in the uvc_ids[] table. Rather than just looking for this specific webcam in uvc_probe(), I've just added another quirk so that the code is a little more elegant.
Created attachment 74921 [details]
turn on USB_QUIRK_RESET_RESUME for Logitech Quickcam Fusion
This is a better patch, which just turns on USB_QUIRK_RESET_RESUME for this webcam. This indirectly disables autosuspend for this webcam, incidentally matches the way that several other Logitech webcams are handled, and avoids adding a specific UVC_QUIRK for this problem.
What's more, the camera now works even after a suspend/resume cycle.
In case you need it, by the way, I also add this comment: Signed-off-by: Eric Ding <ericding <at> alum.mit.edu> I do indeed. Added and will push to Greg KH shortly Thanks!! Will this change make it into any of the stable releases, or just to 3.5.0 and later? 3.6 certainly, if it scrapes 3.5 is GregKH's call. It does look a stable candidate. Alan |