Bug 530545 - [PATCH] gphoto stole my camera
Summary: [PATCH] gphoto stole my camera
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: libgphoto2
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jindrich Novy
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-10-23 11:57 UTC by Lubomir Rintel
Modified: 2013-07-02 23:39 UTC (History)
3 users (show)

Fixed In Version: libgphoto2-2.4.7-1.fc12
Clone Of:
Environment:
Last Closed: 2010-03-19 13:14:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Return the dual-mode device to kernel once we don't use it (934 bytes, text/plain)
2009-10-23 11:57 UTC, Lubomir Rintel
no flags Details

Description Lubomir Rintel 2009-10-23 11:57:03 UTC
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

Comment 1 Jindrich Novy 2009-10-23 14:27:25 UTC
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

Comment 2 Hans de Goede 2009-10-26 09:32:21 UTC
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.

Comment 3 Lubomir Rintel 2009-10-26 10:08:09 UTC
(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 */

Comment 4 Hans de Goede 2009-10-26 10:13:20 UTC
(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).

Comment 5 Jindrich Novy 2009-10-27 11:50:43 UTC
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.

Comment 6 Hans de Goede 2009-10-27 12:14:35 UTC
Thanks, and yes atm you need to file rel-eng requests to get new packages into F-12.

Comment 7 Jindrich Novy 2009-10-27 13:56:01 UTC
Filed as ticket #2772.

Comment 8 Bug Zapper 2009-11-16 14:06:46 UTC
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

Comment 9 Jindrich Novy 2010-03-19 13:14:40 UTC
It should be fixed now since libgphoto2-2.4.7-1.fc12.


Note You need to log in before you can comment on or make changes to this bug.