From: Jean-Francois Moine <moinejf@free.fr>
To: Trent Piepho <xyzzy@speakeasy.org>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
linux-media@vger.kernel.org
Subject: Re: [PATCH] LED control
Date: Tue, 17 Mar 2009 09:28:54 +0100 [thread overview]
Message-ID: <20090317092854.55f27763@free.fr> (raw)
In-Reply-To: <Pine.LNX.4.58.0903150805140.28292@shell2.speakeasy.net>
On Sun, 15 Mar 2009 08:14:56 -0700 (PDT)
Trent Piepho <xyzzy@speakeasy.org> wrote:
> > - this asks to have a kernel generated with CONFIG_NEW_LEDS,
>
> So?
>
> > - the user must use some new program to
> > access /sys/class/leds/<device>,
>
> echo, cat?
>
> > - he must know how the LEDs of his webcam are named in the /sys
> > tree.
>
> Just give them a name like video0:power and it will be easy enough to
> associate them with the device. I think links in sysfs would do it
> to, /sys/class/video4linux/video0/device/<ledname> or something like
> that.
>
> The advantage of using the led class is that you get support for
> triggers and automatic blink functions, etc.
Sorry for I don't see the usage of blinking the LEDs for a webcam.
Again, using the led class makes me wonder about:
1) The end users.
Many Linux users don't know the kernel internal, nor which of the too
many applications they should use to make their devices work. If no
developper creates a tool to handle the webcams, the users have to
search again and again. Even if there is a full documentation, they
will try anything and eventually ask the kernel developpers why they
cannot have their LEDs switched on.
Actually, there are a few programs that can handle the webcam
parameters. In fact I know only 'v4l2-ctl': I did not succeeded to
compile qv4l2; v4l2ucp has been removed from Debian; and, anyway, these
programs don't handle the VIDIOC_G_JPEGCOMP and VIDIOC_S_JPEGCOMP
ioctls.
2) The memory overhead.
Using the led class adds more kernel code and asks the webcam drivers
to create a new device. Also, the function called for changing the LED
brighness cannot sleep, so the use a workqueue is required.
On contrary, with a webcam control, only one byte (for 8 LEDs) is added
to the webcam structure and the change is immediatly done in the ioctl.
3) The development time.
I already spent 2 hours to look how the led class was working. I am not
sure to develop a full LED mechanism in less than 5 to 8 hours, and, as
I cannot test it by myself, I will have to wait for testers to know if
the various protections (USB access, USB disconnection) work in all
cases.
Otherwise, adding a new control in a driver may be done in less than
half an hour, and, sure, it will work well at the first go!
--
Ken ar c'hentañ | ** Breizh ha Linux atav! **
Jef | http://moinejf.free.fr/
next prev parent reply other threads:[~2009-03-17 8:35 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-14 11:59 [PATCH] LED control Jean-Francois Moine
2009-03-14 12:17 ` Mauro Carvalho Chehab
2009-03-14 13:25 ` Jean-Francois Moine
2009-03-14 13:58 ` Andy Walls
2009-03-14 20:16 ` Trent Piepho
2009-03-15 9:50 ` Jean-Francois Moine
2009-03-15 10:16 ` Laurent Pinchart
2009-03-15 15:14 ` Trent Piepho
2009-03-17 8:28 ` Jean-Francois Moine [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-09-04 11:10 Jean-Francois Moine
2010-09-04 19:50 ` Andy Walls
2010-09-05 7:56 ` Hans de Goede
2010-09-05 8:04 ` Peter Korsgaard
2010-09-05 8:19 ` Hans de Goede
2010-09-05 18:23 ` Andy Walls
2010-09-05 8:56 ` Jean-Francois Moine
2010-09-05 13:54 ` Hans de Goede
2010-09-05 18:43 ` Andy Walls
2010-09-05 19:34 ` Hans de Goede
2010-09-13 6:43 ` Laurent Pinchart
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=20090317092854.55f27763@free.fr \
--to=moinejf@free.fr \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=xyzzy@speakeasy.org \
/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