From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Sylwester Nawrocki <snjw23@gmail.com>,
linux-media@vger.kernel.org, sakari.ailus@iki.fi,
hverkuil@xs4all.nl, riverful.kim@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: Tue, 06 Dec 2011 18:25:44 +0100 [thread overview]
Message-ID: <4EDE5018.30409@samsung.com> (raw)
In-Reply-To: <201112061331.14987.laurent.pinchart@ideasonboard.com>
Hi Laurent,
On 12/06/2011 01:31 PM, Laurent Pinchart wrote:
> Hi Sylwester,
>
> On Sunday 04 December 2011 16:16:12 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 think the mapping is wrong, please see my answer to 2/5.
Yes, agreed. Please see my answer to you answer to 2/5 :)
>
>> To trigger single auto focus action in V4L2_FOCUS_AUTO mode the
>> V4L2_DO_AUTO_FOCUS control can be used, which is also added in this
>> patch.
>>
>> Signed-off-by: Heungjun Kim <riverful.kim@samsung.com>
>> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
>> Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
>> ---
>> Documentation/DocBook/media/v4l/controls.xml | 52
>> +++++++++++++++++++++++-- drivers/media/video/v4l2-ctrls.c |
>> 13 ++++++-
>> include/linux/videodev2.h | 8 ++++
>> 3 files changed, 67 insertions(+), 6 deletions(-)
>>
>> diff --git a/Documentation/DocBook/media/v4l/controls.xml
>> b/Documentation/DocBook/media/v4l/controls.xml index 3bc5ee8..5ccb0b0
>> 100644
>> --- a/Documentation/DocBook/media/v4l/controls.xml
>> +++ b/Documentation/DocBook/media/v4l/controls.xml
>> @@ -2782,12 +2782,54 @@ negative values towards infinity. This is a
>> write-only control.</entry> </row>
>> <row><entry></entry></row>
>>
>> - <row>
>> + <row id="v4l2-focus-auto-type">
>> <entry
>> spanname="id"><constant>V4L2_CID_FOCUS_AUTO</constant> </entry> -
>> <entry>boolean</entry>
>> - </row><row><entry spanname="descr">Enables automatic focus
>> -adjustments. The effect of manual focus adjustments while this feature
>> -is enabled is undefined, drivers should ignore such requests.</entry>
>> + <entry>enum v4l2_focus_auto_type</entry>
>> + </row><row><entry spanname="descr">Determines the camera
>> +focus mode. The effect of manual focus adjustments while <constant>
>> +V4L2_CID_FOCUS_AUTO </constant> is not set to <constant>
>> +V4L2_FOCUS_MANUAL</constant> is undefined, drivers should ignore such
>> +requests.</entry>
>> + </row>
>> + <row>
>> + <entrytbl spanname="descr" cols="2">
>> + <tbody valign="top">
>> + <row>
>> + <entry><constant>V4L2_FOCUS_MANUAL</constant> </entry>
>> + <entry>Manual focus.</entry>
>> + </row>
>> + <row>
>> + <entry><constant>V4L2_FOCUS_AUTO</constant> </entry>
>> + <entry>Single shot auto focus. When switched to
>> +this mode the camera focuses on a subject just once. <constant>
>> +V4L2_CID_DO_AUTO_FOCUS</constant> control can be used to manually
>> +invoke auto focusing.</entry>
>> + </row>
>
> Do we need this single-shot auto-focus menu entry ? We could just use
> V4L2_CID_DO_AUTO_FOCUS in V4L2_FOCUS_MANUAL mode to do this. This is what
> happens with one-shot white balance.
There might be various flavours of single-shot auto focus, there may be some
more focus modes than those in this patch.
If we have removed them from the menu entry then we would likely have to
come up with more V4L2_CID_DO_AUTO_FOCUS_* controls.
>
>> + <row>
>> + <entry><constant>V4L2_FOCUS_AUTO_MACRO</constant> </entry>
>> + <entry>Macro (close-up) auto focus. Usually camera
>> +auto focus algorithms do not attempt to focus on a subject that is
>> +closer than a given distance. This mode can be used to tell the camera
>> +to use minimum distance for focus that it is capable of.</entry>
>> + </row>
>> + <row>
>> + <entry><constant>V4L2_FOCUS_AUTO_CONTINUOUS</constant> </entry>
>> + <entry>Continuous auto focus. When switched to this
>> +mode the camera continually adjusts focus.</entry>
>> + </row>
>> + </tbody>
>> + </entrytbl>
>> + </row>
>> + <row><entry></entry></row>
>> +
>> + <row>
>> + <entry
>> spanname="id"><constant>V4L2_CID_DO_AUTO_FOCUS</constant> </entry> +
>> <entry>button</entry>
>> + </row><row><entry spanname="descr">When this control is set
>
> Wouldn't "written" be better than "set" here ? I understand "When this control
> is set" as "while the control has a non-zero value" (but it might just be me).
Sure, I could change to that. However this is a button control, so "written"
doesn't quite match IMHO. And we do set/get controls, rather than read/write.
Originally I had (copied form V4L2_CID_DO_WHITE_BALANCE):
"This is an action control. When it is set (the value is ignored)..."
How about "When this control is applied.." ?
>
>> +the camera will perform one shot auto focus. The effect of using this
>> +control when <constant>V4L2_CID_FOCUS_AUTO</constant> is in mode
>> +different than <constant>V4L2_FOCUS_AUTO</constant> is undefined,
>> +drivers should ignore such requests. </entry>
>> </row>
--
Thanks,
Sylwester
next prev parent reply other threads:[~2011-12-06 17:25 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 [this message]
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
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=4EDE5018.30409@samsung.com \
--to=s.nawrocki@samsung.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=sakari.ailus@iki.fi \
--cc=snjw23@gmail.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 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.