linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <snjw23@gmail.com>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>,
	linux-media@vger.kernel.org, laurent.pinchart@ideasonboard.com,
	g.liakhovetski@gmx.de, hdegoede@redhat.com, moinejf@free.fr,
	m.szyprowski@samsung.com, riverful.kim@samsung.com,
	sw0312.kim@samsung.com, Kyungmin Park <kyungmin.park@samsung.com>
Subject: Re: [PATCH 10/15] V4L: Add camera 3A lock control
Date: Tue, 24 Apr 2012 22:12:01 +0200	[thread overview]
Message-ID: <4F970911.5000404@gmail.com> (raw)
In-Reply-To: <20120423054627.GA7913@valkosipuli.localdomain>

Moikka Sakari,

On 04/23/2012 07:47 AM, Sakari Ailus wrote:
> Sylwester Nawrocki wrote:
>> On 04/17/2012 06:09 PM, Sakari Ailus wrote:
>>> On Tue, Apr 17, 2012 at 12:09:51PM +0200, Sylwester Nawrocki wrote:
>>>> The V4L2_CID_3A_LOCK bitmask control allows applications to pause
>>>> or resume the automatic exposure, focus and wite balance adjustments.
>>>> It can be used, for example, to lock the 3A adjustments right before
>>>> a still image is captured, for pre-focus, etc.
>>>> The applications can control each of the algorithms independently,
>>>> through a corresponding control bit, if driver allows that.
>>>
>>> How is disabling e.g. focus algorithm different from locking focus?
>>
>> The difference looks quite obvious to me. When some AUTO control is
>> switched from auto to manual mode there is no guarantee about the
>> related parameters the device will end up. E.g. lens may be positioned
>> into default position, rather than kept at current one, exposure might
>> be set to manual value from before AE was enabled, etc.
>>
>> I've seen separate registers at the sensor interfaces for AE, AWB
>> locking/unlocking and for disabling/enabling those algorithms.
>> With the proposed control applications can be sure that, for example,
>> exposure is retained when the V4L2_CID_3A_LOCK is set.
>>
>> Does it answer your question ?
> 
> Yes, it does.
> 
> I was thinking how does the situation really differ from disabling the
> corresponding automatic algorithm. There may be subtle differences in
> practice albeit in principle the two are no different. And if some of the
> sensors implement it as lock, then I guess it gives us few options for the
> user space interface.

Can you anticipate any any possible issues such diversity might bring to
applications ? I imagine such control can be quite useful for snapshot,
and with current control API design and the drivers' behaviour applications 
cannot be sure what settings a device ends up with after switching from
"auto" to "manual" - last auto settings or the manual values. Usually its
just the previous manual values.

Such a bitmask control looks quite useful to me. Moreover, at the moment 
there is no control that would provide similar functionality for auto focus.
The bitmask control allows to easily control auto exposure, wb and focus
atomically. However that's not a big deal, since this could be well achieved
with the extended control API.

Although V4L2_CID_3A_LOCK might be hard to implement in driver which use
the control framework, since it would depend on multiple other controls.
But this could be worked around by updating proper control current values
and sending a control event from driver manually, unless you want to cluster
almost all controls.

--

Regards,
Sylwester

  reply	other threads:[~2012-04-24 20:12 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-17 10:09 [PATCH 00/15] V4L camera control enhancements Sylwester Nawrocki
2012-04-17 10:09 ` [PATCH 01/15] V4L: Extend V4L2_CID_COLORFX with more image effects Sylwester Nawrocki
2012-04-17 10:51   ` Rémi Denis-Courmont
2012-04-17 11:28     ` Sylwester Nawrocki
2012-04-22 16:00       ` Sylwester Nawrocki
2012-04-17 10:09 ` [PATCH 02/15] V4L: Add helper function for standard integer menu controls Sylwester Nawrocki
2012-04-17 10:09 ` [PATCH 03/15] V4L: Add camera exposure bias control Sylwester Nawrocki
2012-04-17 10:09 ` [PATCH 04/15] V4L: Add camera white balance preset control Sylwester Nawrocki
2012-04-17 13:23   ` Hans de Goede
2012-04-18  8:46     ` Sylwester Nawrocki
2012-04-17 10:09 ` [PATCH 05/15] V4L: Add camera wide dynamic range control Sylwester Nawrocki
2012-04-17 10:09 ` [PATCH 06/15] V4L: Add camera image stabilization control Sylwester Nawrocki
2012-04-17 10:09 ` [PATCH 07/15] V4L: Add camera ISO sensitivity controls Sylwester Nawrocki
2012-04-17 10:09 ` [PATCH 08/15] V4L: Add camera exposure metering control Sylwester Nawrocki
2012-04-17 10:09 ` [PATCH 09/15] V4L: Add camera scene mode control Sylwester Nawrocki
2012-04-17 10:09 ` [PATCH 10/15] V4L: Add camera 3A lock control Sylwester Nawrocki
2012-04-17 16:09   ` Sakari Ailus
2012-04-18  9:01     ` Sylwester Nawrocki
2012-04-23  5:47       ` Sakari Ailus
2012-04-24 20:12         ` Sylwester Nawrocki [this message]
2012-04-24 20:59           ` Sakari Ailus
2012-04-29  9:27             ` Sylwester Nawrocki
2012-04-17 10:09 ` [PATCH 11/15] V4L: Add auto focus targets to the selections API Sylwester Nawrocki
2012-04-17 10:09 ` [PATCH 12/15] V4L: Add auto focus targets to the subdev " Sylwester Nawrocki
2012-04-17 10:09 ` [PATCH 13/15] V4L: Add camera auto focus controls Sylwester Nawrocki
2012-04-17 10:09 ` [PATCH 14/15] V4L: Add S5C73M3 sensor sub-device driver Sylwester Nawrocki
2012-04-17 10:09 ` [PATCH 15/15] vivi: Add controls Sylwester Nawrocki

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=4F970911.5000404@gmail.com \
    --to=snjw23@gmail.com \
    --cc=g.liakhovetski@gmx.de \
    --cc=hdegoede@redhat.com \
    --cc=kyungmin.park@samsung.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=moinejf@free.fr \
    --cc=riverful.kim@samsung.com \
    --cc=s.nawrocki@samsung.com \
    --cc=sakari.ailus@iki.fi \
    --cc=sw0312.kim@samsung.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;
as well as URLs for NNTP newsgroup(s).