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, m.szyprowski@samsung.com,
kyungmin.park@samsung.com, laurent.pinchart@ideasonboard.com,
sw0312.kim@samsung.com, riverful.kim@samsung.com
Subject: Re: [PATCH v1 2/3] v4l: Add AUTO option for the V4L2_CID_POWER_LINE_FREQUENCY control
Date: Tue, 20 Sep 2011 23:25:31 +0200 [thread overview]
Message-ID: <4E7904CB.3000006@gmail.com> (raw)
In-Reply-To: <20110920205730.GN1845@valkosipuli.localdomain>
Hi Sakari,
On 09/20/2011 10:57 PM, Sakari Ailus wrote:
> Hi Sylwester,
>
> On Tue, Sep 20, 2011 at 01:58:58PM +0200, Sylwester Nawrocki wrote:
>> V4L2_CID_POWER_LINE_FREQUENCY control allows applications to instruct
>> a driver what is the power line frequency so an appropriate filter
>> can be used by the device to cancel flicker by compensating the light
>> intensity ripple and thus. Currently in the menu we have entries for
>> 50 and 60 Hz and for entirely disabling the anti-flicker filter.
>> However some devices are capable of automatically detecting the
>> frequency, so add V4L2_CID_POWER_LINE_FREQUENCY_AUTO entry for them.
>>
>> Signed-off-by: Sylwester Nawrocki<s.nawrocki@samsung.com>
>> Signed-off-by: Kyungmin Park<kyungmin.park@samsung.com>
>> Acked-by: Laurent Pinchart<laurent.pinchart@ideasonboard.com>
>> ---
>> Documentation/DocBook/media/v4l/controls.xml | 5 +++--
>> drivers/media/video/v4l2-ctrls.c | 1 +
>> include/linux/videodev2.h | 1 +
>> 3 files changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml
>> index 2420e4a..c6b3c46 100644
>> --- a/Documentation/DocBook/media/v4l/controls.xml
>> +++ b/Documentation/DocBook/media/v4l/controls.xml
>> @@ -232,8 +232,9 @@ control is deprecated. New drivers and applications should use the
>> <entry>Enables a power line frequency filter to avoid
>> flicker. Possible values for<constant>enum v4l2_power_line_frequency</constant> are:
>> <constant>V4L2_CID_POWER_LINE_FREQUENCY_DISABLED</constant> (0),
>> -<constant>V4L2_CID_POWER_LINE_FREQUENCY_50HZ</constant> (1) and
>> -<constant>V4L2_CID_POWER_LINE_FREQUENCY_60HZ</constant> (2).</entry>
>> +<constant>V4L2_CID_POWER_LINE_FREQUENCY_50HZ</constant> (1),
>> +<constant>V4L2_CID_POWER_LINE_FREQUENCY_60HZ</constant> (2) and
>> +<constant>V4L2_CID_POWER_LINE_FREQUENCY_AUTO</constant> (3).</entry>
>
> A stupid question: wouldn't this be a case for a new control for automatic
> power line frequency, in other words enabling or disabling it?
IMO this would complicate things in kernel and user land, without any reasonable
positive effects. AUTO seems to fit well here, it's just another mode of operation
of a power line noise filter. Why make things more complicated than they need to be ?
>
>> </row>
>> <row>
>> <entry><constant>V4L2_CID_HUE_AUTO</constant></entry>
>> diff --git a/drivers/media/video/v4l2-ctrls.c b/drivers/media/video/v4l2-ctrls.c
>> index 06b6014..20abe5d 100644
>> --- a/drivers/media/video/v4l2-ctrls.c
>> +++ b/drivers/media/video/v4l2-ctrls.c
>> @@ -210,6 +210,7 @@ const char * const *v4l2_ctrl_get_menu(u32 id)
>> "Disabled",
>> "50 Hz",
>> "60 Hz",
>> + "Auto",
>> NULL
>> };
>> static const char * const camera_exposure_auto[] = {
>> diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
>> index c33f462..87210f1 100644
>> --- a/include/linux/videodev2.h
>> +++ b/include/linux/videodev2.h
>> @@ -1125,6 +1125,7 @@ enum v4l2_power_line_frequency {
>> V4L2_CID_POWER_LINE_FREQUENCY_DISABLED = 0,
>> V4L2_CID_POWER_LINE_FREQUENCY_50HZ = 1,
>> V4L2_CID_POWER_LINE_FREQUENCY_60HZ = 2,
>> + V4L2_CID_POWER_LINE_FREQUENCY_AUTO = 3,
>> };
>> #define V4L2_CID_HUE_AUTO (V4L2_CID_BASE+25)
>> #define V4L2_CID_WHITE_BALANCE_TEMPERATURE (V4L2_CID_BASE+26)
>> --
>> 1.7.6.3
>>
>
--
Thanks,
Sylwester
next prev parent reply other threads:[~2011-09-20 21:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-20 11:58 [PATCH v1 0/3] Add v4l2 subdev driver for S5K6AAFX sensor with embedded SoC ISP Sylwester Nawrocki
2011-09-20 11:58 ` [PATCH v1 1/3] v4l: Extend V4L2_CID_COLORFX control with AQUA effect Sylwester Nawrocki
2011-09-20 11:58 ` [PATCH v1 2/3] v4l: Add AUTO option for the V4L2_CID_POWER_LINE_FREQUENCY control Sylwester Nawrocki
2011-09-20 20:57 ` Sakari Ailus
2011-09-20 21:25 ` Sylwester Nawrocki [this message]
2011-09-20 22:17 ` Sakari Ailus
2011-09-21 12:28 ` Sylwester Nawrocki
2011-09-21 12:47 ` Laurent Pinchart
2011-09-21 17:20 ` Sakari Ailus
2011-09-20 11:58 ` [PATCH v1 3/3] v4l: Add v4l2 subdev driver for S5K6AAFX sensor Sylwester Nawrocki
2011-09-20 22:10 ` Sakari Ailus
2011-09-21 10:25 ` 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=4E7904CB.3000006@gmail.com \
--to=snjw23@gmail.com \
--cc=kyungmin.park@samsung.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--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 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.