RFC: allow usb drivers to disallow USBDEVFS_DISCONNECT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Sorry not coded yet, I first wanted to discuss the
principle.

I'm working on supporting so called dual mode cameras, which
are cheap still cameras (low res, fixed lens, photos stored in
battery backed sram), which can double as webcams.

We currently have webcam drivers in the v4l subsystem for quite a
few of these, but the coordination with libgphoto, which handles
the still cam function from userspace is less then ideal.

One of the problems is that if gphoto tries to access the device
while another app is streaming from the webcam, this is allowed
and the webcam driver sees a usb disconnect, after which the webcam
app often is left in a very confused state.

So I would like to be able to tell from the driver to return
-EBUSY to the USBDEVFS_DISCONNECT ioctl.

The idea here is for the driver to temporary disable USBDEVFS_DISCONNECT,
when the application starts the video stream (not on opening
the device as some apps like control panels for webcams will keep the
device open indefinitely). And re-allow it when the cam stops streaming.

Does this sound something for which a patch to allow driver to
temporary disable USBDEVFS_DISCONNECT would be acceptable ?

Regards,

Hans
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux