All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Sakari Ailus <sakari.ailus@iki.fi>,
	linux-media@vger.kernel.org, s.nawrocki@samsung.com,
	hechtb@googlemail.com, g.liakhovetski@gmx.de
Subject: Re: [RFC] New class for low level sensors controls?
Date: Mon, 26 Sep 2011 11:54:26 +0200	[thread overview]
Message-ID: <201109261154.27553.laurent.pinchart@ideasonboard.com> (raw)
In-Reply-To: <201109261151.05572.hverkuil@xs4all.nl>

Hi Hans,

On Monday 26 September 2011 11:51:05 Hans Verkuil wrote:
> On Tuesday, September 06, 2011 13:36:53 Sakari Ailus wrote:
> > Hi all,
> > 
> > We are beginning to have raw bayer image sensor drivers in the mainline.
> > Typically such sensors are not controlled by general purpose applications
> > but e.g. require a camera control algorithm framework in user space. This
> > needs to be implemented in libv4l for general purpose applications to
> > work properly on this kind of hardware.
> > 
> > These sensors expose controls such as
> > 
> > - Per-component gain controls. Red, blue, green (blue) and green (red)
> > 
> >   gains.
> > 
> > - Link frequency. The frequency of the data link from the sensor to the
> > 
> >   bridge.
> > 
> > - Horizontal and vertical blanking.
> > 
> > None of these controls are suitable for use of general purpose
> > applications (let alone the end user!) but for the camera control
> > algorithms.
> > 
> > We have a control class called V4L2_CTRL_CLASS_CAMERA for camera
> > controls. However, the controls in this class are relatively high level
> > controls which are suitable for end user. The algorithms in the libv4l
> > or a webcam could implement many of these controls whereas I see that
> > only
> > V4L2_CID_EXPOSURE_ABSOLUTE might be implemented by raw bayer sensors.
> > 
> > My question is: would it make sense to create a new class of controls for
> > the low level sensor controls in a similar fashion we have a control
> > class for the flash controls?
> 
> I'm plowing through all the mails on this list that piled up during the
> last 3-4 weeks, so my reply is a bit late :-)
> 
> I don't believe a new class is the right approach. If such controls are
> part of a sub-device, then they can be marked 'private', which means they
> are only accessible through the subdev device node.

We're not trying to hide controls, but to standardize low-level sensor 
controls that are common across many sensors. They don't really belong to any 
of the existing classes, hence the idea of creating a new class for them.

> For low-level controls that are part of the bridge chip there is currently
> no suitable way of hiding them.
> 
> In that case the best approach would be to add a new control flag called
> V4L2_CTRL_FLAG_HIDE (or _INVISIBLE, or _LOW_LEVEL, or something similar).
> Applications can filter such controls and not show them.
> 
> I've toyed with this idea before, but of course it has the disadvantage of
> requiring application support.
> 
> One alternative to this is to let QUERYCTRL skip such hidden controls
> unless instructed otherwise (e.g. by adding a V4L2_CTRL_FLAG_SHOW_ALL to
> the control's id). But I think that's getting a bit too complex.
> 
> I think adding a 'HIDE' flag of some sort is a good idea. It's simple and
> does the job.

-- 
Regards,

Laurent Pinchart

      reply	other threads:[~2011-09-26  9:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-06 11:36 [RFC] New class for low level sensors controls? Sakari Ailus
2011-09-06 11:41 ` Laurent Pinchart
2011-09-06 12:22   ` Sakari Ailus
2011-09-08  9:51     ` Laurent Pinchart
2011-09-08 10:40       ` Sakari Ailus
2011-09-08 11:24     ` Subash Patel
2011-09-08 11:44       ` Sakari Ailus
2011-09-13 10:33         ` Laurent Pinchart
2011-09-13 12:00           ` Sakari Ailus
2011-09-13 13:12             ` Laurent Pinchart
2011-09-08 12:35     ` Guennadi Liakhovetski
2011-09-08 13:21       ` Sakari Ailus
2011-09-08 13:43         ` Guennadi Liakhovetski
2011-09-13 10:31       ` Laurent Pinchart
2011-09-13 14:26         ` Guennadi Liakhovetski
2011-09-26  9:51 ` Hans Verkuil
2011-09-26  9:54   ` Laurent Pinchart [this message]

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=201109261154.27553.laurent.pinchart@ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=g.liakhovetski@gmx.de \
    --cc=hechtb@googlemail.com \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=s.nawrocki@samsung.com \
    --cc=sakari.ailus@iki.fi \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.