Created attachment 365839 [details] Return the dual-mode device to kernel once we don't use it Description of problem: I got an el-cheapo dual-mode USB camera which is capable of either taking pictures and storing it in its internal batery-powered memory or streaming a video. It's not a multi-configuration device and has only single interface which is claimed by both in-kernel v4l driver and user-space gphoto2 driver. Immediately upon attaching the camera, gvfs-gphoto2-volume-monitor gets the device attach uevent from udev and touches the device via libgphoto2. libgphoto2 unbinds the in-kernel driver via USBFS_DISCONNECT, but never USBFS_CONNECTs it back. Version-Release number of selected component (if applicable): libgphoto2-2.4.7-1.fc12.i686 How reproducible: Always. Steps to Reproduce: 1. Run udevadm monitor 2. Attach the cammera 3. See the video4linux driver vanish Actual results: KERNEL[1256297918.485870] remove /devices/pci0000:00/0000:00:1d.3/usb5/5-2/5-2:1.0/video4linux/video0 (video4linux) KERNEL[1256297918.628902] add /devices/pci0000:00/0000:00:1d.3/usb5/5-2/5-2:1.0/video4linux/video0 (video4linux) [v4l gone, lkundrak sad] Expected results: KERNEL[1256297918.485870] remove /devices/pci0000:00/0000:00:1d.3/usb5/5-2/5-2:1.0/video4linux/video0 (video4linux) KERNEL[1256297918.628902] add /devices/pci0000:00/0000:00:1d.3/usb5/5-2/5-2:1.0/video4linux/video0 (video4linux) [*munch* *munch*, let libgphoto do its job] UDEV [1256297918.737319] remove /devices/pci0000:00/0000:00:1d.3/usb5/5-2/5-2:1.0/video4linux/video0 (video4linux) UDEV [1256297919.200147] add /devices/pci0000:00/0000:00:1d.3/usb5/5-2/5-2:1.0/video4linux/video0 (video4linux) [video interface back, lkundrak happy, can stream picture of his cat all around the internets] Additional info: I have verified the patch to work, a scratch build is here: http://koji.fedoraproject.org/koji/taskinfo?taskID=1764329
Applied in rawhide, thanks. Now: [video interface back, lkundrak happy, can stream picture of his cat all around the internets] since libgphoto2-2.4.7-2.fc13
lkundrak, thanks for fixing this! p.s. What sort of cam do you have (usb id, just curious) ? Jindrich, thanks for taking this patch, but I noticed you only fixed this for F-13, I've spend quite a bit of time making dual mode camera's work in webcam mode for F-12, so I would really like to see this fixed in F-12 too. Can you please also build this for F-12 and request it to be tagged into F-12 (so things will work out of the box with the livecd). Thanks! p.s. Re-opening, sorry about that but I'm afraid otherwise this comment may drop below the radar.
(In reply to comment #2) > lkundrak, thanks for fixing this! p.s. What sort of cam do you have (usb id, > just curious) ? Hans, I don't have the camera here now, but I'm fairly sure it's this one (using it with the hunk that added it applied against f12 kernel since, as you probably know, it's not yet there): (linux/drivers/media/video/gspca/mr97310a.c) + {USB_DEVICE(0x093a, 0x010e)}, /* All known MR97310A CIF cams */
(In reply to comment #3) > (In reply to comment #2) > > lkundrak, thanks for fixing this! p.s. What sort of cam do you have (usb id, > > just curious) ? > > Hans, I don't have the camera here now, but I'm fairly sure it's this one > (using it with the hunk that added it applied against f12 kernel since, as you > probably know, it's not yet there): > > (linux/drivers/media/video/gspca/mr97310a.c) > + {USB_DEVICE(0x093a, 0x010e)}, /* All known MR97310A CIF cams */ Ah, yes so you probably have a vivitar mini digital camera ? Funny I'm still working on fixing some kinks with these cams (when the image it is "viewing" compresses badly we get usb bandwidth issues, causing the bottom part of the frame to become corrupted).
The update for F12 is built but I'm unable to add an update in the Fedora release system. It refuses to tag it. Maybe I need to file a releng ticket in order to push this update to F12 as it is in beta state now.
Thanks, and yes atm you need to file rel-eng requests to get new packages into F-12.
Filed as ticket #2772.
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle. Changing version to '12'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
It should be fixed now since libgphoto2-2.4.7-1.fc12.