Re: Improving kernel -> userspace (usbfs) usb device hand off

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

 




On Sat, 11 Jun 2011, Xiaofan Chen wrote:

> On Sat, Jun 11, 2011 at 6:43 AM, Theodore Kilgore
> <kilgota@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> > I do not believe that we have found the optimal solution, yet. The ideal
> > thing would be some kind of hack which allows the kernel to be used when
> > it is needed, and when it is not needed it does not interfere.
> 
> Just wondering if you can use libusb-1.0 for the user space still image
> functionality.
> 
> libusb-1.0 offers the following functions to do that for you under Linux.
> 
> int 	libusb_kernel_driver_active (libusb_device_handle *dev, int interface)
>  	Determine if a kernel driver is active on an interface.
> int 	libusb_detach_kernel_driver (libusb_device_handle *dev, int interface)
>  	Detach a kernel driver from an interface.
> int 	libusb_attach_kernel_driver (libusb_device_handle *dev, int interface)
>  	Re-attach an interface's kernel driver, which was previously
> detached using libusb_detach_kernel_driver().
> 
> So you can detach the kernel v4l2 driver at the beginning and later
> re-attach it when you finish.

Well, then, this solves the problem, doesn't it? Of course, those who deal 
with creating those "simple" and "user-friendly" GUI environments would 
probably still do well if they would open a dialog box for dual-mode 
hardware.

Theodore Kilgore
--
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