All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <snjw23@gmail.com>
To: Sakari Ailus <sakari.ailus@iki.fi>, laurent.pinchart@ideasonboard.com
Cc: linux-media@vger.kernel.org, hverkuil@xs4all.nl,
	riverful.kim@samsung.com, s.nawrocki@samsung.com,
	Kyungmin Park <kyungmin.park@samsung.com>
Subject: Re: [RFC/PATCH 1/5] v4l: Convert V4L2_CID_FOCUS_AUTO control to a menu control
Date: Sun, 11 Dec 2011 17:18:08 +0100	[thread overview]
Message-ID: <4EE4D7C0.6070903@gmail.com> (raw)
In-Reply-To: <20111210103344.GF1967@valkosipuli.localdomain>

On 12/10/2011 11:33 AM, Sakari Ailus wrote:
> On Sun, Dec 04, 2011 at 04:16:12PM +0100, Sylwester Nawrocki wrote:
>> Change the V4L2_CID_FOCUS_AUTO control type from boolean to a menu
>> type. In case of boolean control we had values 0 and 1 corresponding
>> to manual and automatic focus respectively.
>>
>> The V4L2_CID_FOCUS_AUTO menu control has currently following items:
>>   0 - V4L2_FOCUS_MANUAL,
>>   1 - V4L2_FOCUS_AUTO,
>>   2 - V4L2_FOCUS_AUTO_MACRO,
>>   3 - V4L2_FOCUS_AUTO_CONTINUOUS.
> 
> I would put the macro mode to a separate menu since it's configuration for
> how the regular AF works rather than really different mode.
> 
> ...
> 
>> @@ -567,6 +576,7 @@ const char *v4l2_ctrl_get_name(u32 id)
>>  	case V4L2_CID_PRIVACY:			return "Privacy";
>>  	case V4L2_CID_IRIS_ABSOLUTE:		return "Iris, Absolute";
>>  	case V4L2_CID_IRIS_RELATIVE:		return "Iris, Relative";
>> +	case V4L2_CID_DO_AUTO_FOCUS:		return "Do Auto Focus";
> 
> I'd perhaps use "begin" or "start". How does the user learn the autofocus
> has finished? I think this looks like quite similar problem than telling the
> flash strobe status to the user. The solution could also be similar to that.

Hi,

considering your previous comments, how about the below focusing control set ?

Controls for starting/stopping auto focusing (for V4L2_CID_FOCUS_AUTO ==
V4L2_FOCUS_MANUAL):

V4L2_CID_START_AUTO_FOCUS  - (button) - start auto focusing,
V4L2_CID_STOP_AUTO_FOCUS   - (button) - stop auto focusing (might be also
                                        useful in V4L2_FOCUS_AUTO_CONTINUOUS
                                        mode)
and auto focus status:

V4L2_CID_AUTO_FOCUS_STATUS - (boolean) - whether focusing is in progress or not
                             (when V4L2_CID_FOCUS_AUTO == V4L2_FOCUS_MANUAL)


V4L2_CID_FOCUS_AUTO would basically retain it's current semantics:

V4L2_CID_FOCUS_AUTO        - (boolean) - select focus type (manual/auto
                                         continuous)
        V4L2_FOCUS_MANUAL              - manual focus
        V4L2_FOCUS_AUTO_CONTINUOUS     - continuous auto focus
                                         (or V4L2_FOCUS_AUTO)

New menu control to choose behaviour of auto focus (either single-shot
or continuous):

V4L2_CID_AF_MODE                        - select auto focus mode
        V4L2_AF_MODE_NORMAL             - "normal" auto focus
        V4L2_AF_MODE_MACRO              - macro (close-up)
        V4L2_AF_MODE_SPOT               - spot location passed with
                                          selection API or other control
        V4L2_AF_MODE_FACE_DETECTION	- focus point indicated by internal
                                          face detector


I might try it out and implement in M-5MOLS driver, to see how it works
in practice.

Does it make sense for you ?

--

Regards,
Sylwester

  parent reply	other threads:[~2011-12-11 16:18 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-04 15:16 [RFC/PATCH 0/5] v4l: New camera controls Sylwester Nawrocki
2011-12-04 15:16 ` [RFC/PATCH 1/5] v4l: Convert V4L2_CID_FOCUS_AUTO control to a menu control Sylwester Nawrocki
2011-12-06 12:31   ` Laurent Pinchart
2011-12-06 17:25     ` Sylwester Nawrocki
2011-12-10 10:33   ` Sakari Ailus
2011-12-10 14:42     ` Sylwester Nawrocki
2011-12-31 12:00       ` Sakari Ailus
2012-01-01 16:49         ` Sylwester Nawrocki
2012-01-02 11:16           ` Laurent Pinchart
2012-01-02 20:55             ` Sylwester Nawrocki
2012-01-03 13:55               ` Laurent Pinchart
2012-01-04 22:04                 ` Sylwester Nawrocki
2012-01-04 14:04               ` Sakari Ailus
2012-01-06 14:22                 ` Sylwester Nawrocki
2012-01-04 13:22           ` Sakari Ailus
2012-01-06 13:56             ` Sylwester Nawrocki
2011-12-11 16:18     ` Sylwester Nawrocki [this message]
2011-12-04 15:16 ` [RFC/PATCH 2/5] uvc: Adapt the driver to new type of V4L2_CID_FOCUS_AUTO control Sylwester Nawrocki
2011-12-06 12:26   ` Laurent Pinchart
2011-12-06 17:10     ` Sylwester Nawrocki
2011-12-04 15:16 ` [RFC/PATCH 3/5] v4l: Add V4L2_CID_METERING_MODE camera control Sylwester Nawrocki
2011-12-06 12:32   ` Laurent Pinchart
2011-12-06 16:27     ` Sylwester Nawrocki
2011-12-07 11:09       ` Sylwester Nawrocki
2011-12-10 10:44         ` Sakari Ailus
2011-12-10 14:14           ` Sylwester Nawrocki
2011-12-04 15:16 ` [RFC/PATCH 4/5] v4l: Add V4L2_CID_EXPOSURE_BIAS " Sylwester Nawrocki
2011-12-04 15:16 ` [RFC/PATCH 5/5] v4l: Add V4L2_CID_ISO and V4L2_CID_ISO_AUTO controls Sylwester Nawrocki
2011-12-06 12:34 ` [RFC/PATCH 0/5] v4l: New camera controls Laurent Pinchart
2011-12-07 10:32   ` Sylwester Nawrocki
2011-12-10 10:20     ` Sakari Ailus

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=4EE4D7C0.6070903@gmail.com \
    --to=snjw23@gmail.com \
    --cc=hverkuil@xs4all.nl \
    --cc=kyungmin.park@samsung.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=riverful.kim@samsung.com \
    --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.