From: Hans de Goede <j.w.r.degoede@hhs.nl>
To: kilgota@banach.math.auburn.edu
Cc: video4linux-list@redhat.com, sqcam-devel@lists.sourceforge.net
Subject: Re: [sqcam-devel] Advice wanted on producing an in kernel sq905 driver
Date: Mon, 24 Nov 2008 12:26:59 +0100 [thread overview]
Message-ID: <492A8F83.1020208@hhs.nl> (raw)
In-Reply-To: <Pine.LNX.4.64.0811211658290.4727@banach.math.auburn.edu>
kilgota@banach.math.auburn.edu wrote:
>
<snip>
> Unfortunately libusb doesn't include a
>> corresponding attach method for libgphoto2 to use when it has finished
>> so it
>> can't re-instate the kernel driver.
>
> True. But what I am wondering is, if it would be possible to write the
> kernel driver in such a way that it does not need to get detached, then
> it would be possible to solve the problem in both directions, not just
> one. Somehow, arrange things so that if an app requires the kernel
> driver, then the kernel driver obliges. But if the app wants to approach
> the device through libusb, then libusb, upon discovering that the kernel
> driver is loaded, asks the kernel driver for access and then the kernel
> driver, under certain reasonable conditions, obliges. For example, in
> the case of a dual-mode camera I would probably tend to consider that
> the kernel module ought not to surrender while a webcam app is actually
> in use, but in other circumstances ought to allow "pass through." I
> mean, if I am a userspace app which peaceably and above-board wants
> access to a still camera through libusb then do I care if there is a
> device /dev/videoXX which is associated with my USB vendor:product
> number? Actually, not. I only care that if I am an app which never wants
> even to go near to any /dev/videoXX then nobody is going to try to force
> me to do that. In particular, why does the kernel driver for the device
> have to force me to access /dev/videoXX even if I never requested any
> such thing? So it could work like this:
>
I've been thinking along similar lines (keeping /dev/videoX present when using
the still image function). But thinking about this some more I don't think this
is worth the trouble. A camera which can do both still images and function as
webcam really is a multifunction device, with one function active at a time,
this is just like any usb device with multiple usb configurations, and when you
change the configuration certain functionality becomes not available and other
becomes available. If this cam would be correctly using usb configuaration
profiles for this, the /dev/videoX would also disappear.
Also by just unloading the driver removing /dev/videoX things stay KISS.
Last it is not that strange for the webcam not to show up as a webcam to choose
from for use in a webcam app, when you've got a photo app open for importing
photo's (and when the import dialog is closed the device should be given back
to the /dev/videoX driver).
So all in all I believe that having some mechanism:
-to unload the driver when libusb wants access *AND*
-reload it when libusb is done
Is enough, and is nice and KISS, which I like.
Regards,
Hans
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
next prev parent reply other threads:[~2008-11-24 11:21 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.208512.1227000563.24145.sqcam-devel@lists.sourceforge.net>
[not found] ` <Pine.LNX.4.64.0811181216270.2778@banach.math.auburn.edu>
2008-11-19 0:20 ` [sqcam-devel] Advice wanted on producing an in kernel sq905 driver Adam Baker
2008-11-19 7:46 ` Antonio Ospite
2008-11-19 8:42 ` Hans de Goede
[not found] ` <alpine.LNX.1.10.0811192005020.2980@banach.math.auburn.edu>
2008-11-20 9:38 ` Hans de Goede
[not found] ` <Pine.LNX.4.64.0811201130410.3570@banach.math.auburn.edu>
2008-11-20 19:37 ` Hans de Goede
[not found] ` <Pine.LNX.4.64.0811201657020.3763@banach.math.auburn.edu>
2008-11-21 8:37 ` Hans de Goede
[not found] ` <Pine.LNX.4.64.0811202306360.3930@banach.math.auburn.edu>
2008-11-21 10:54 ` Hans de Goede
[not found] ` <Pine.LNX.4.64.0811211244120.4475@banach.math.auburn.edu>
2008-11-21 21:25 ` Hans de Goede
[not found] ` <Pine.LNX.4.64.0811211929220.4832@banach.math.auburn.edu>
2008-11-23 9:36 ` Report on time needed for completing v4l Bayer interpolation Hans de Goede
[not found] ` <Pine.LNX.4.64.0811231522510.6135@banach.math.auburn.edu>
2008-11-24 8:15 ` Apparent inconsistency in the labels of Bayer tilings Hans de Goede
2008-11-21 21:57 ` [sqcam-devel] Advice wanted on producing an in kernel sq905 driver Adam Baker
2008-11-21 23:39 ` Adam Baker
[not found] ` <Pine.LNX.4.64.0811211658290.4727@banach.math.auburn.edu>
2008-11-22 0:05 ` Adam Baker
[not found] ` <Pine.LNX.4.64.0811211955490.4832@banach.math.auburn.edu>
2008-11-22 21:55 ` The userspace-kernelspace thing. Continuation of sq905 driver discussion Adam Baker
2008-11-24 11:26 ` Hans de Goede [this message]
[not found] ` <alpine.LNX.1.10.0811191937370.2980@banach.math.auburn.edu>
2008-11-20 7:48 ` [sqcam-devel] Advice wanted on producing an in kernel sq905 driver Hans de Goede
[not found] ` <492A8E76.3070701@redhat.com>
[not found] ` <Pine.LNX.4.64.0811241446210.6862@banach.math.auburn.edu>
2008-11-25 0:02 ` Adam Baker
[not found] ` <Pine.LNX.4.64.0811241929420.7049@banach.math.auburn.edu>
2008-11-25 20:57 ` Adam Baker
2008-11-25 8:03 ` Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=492A8F83.1020208@hhs.nl \
--to=j.w.r.degoede@hhs.nl \
--cc=kilgota@banach.math.auburn.edu \
--cc=sqcam-devel@lists.sourceforge.net \
--cc=video4linux-list@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox