]> Pileus Git - ~andy/linux/commitdiff
[media] v4l: Add AUTO option for the V4L2_CID_POWER_LINE_FREQUENCY control
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Sun, 4 Sep 2011 22:08:54 +0000 (19:08 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 3 Nov 2011 20:29:09 +0000 (18:29 -0200)
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. Currently in the menu we have entries for 50 Hz 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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Documentation/DocBook/media/v4l/controls.xml
drivers/media/video/v4l2-ctrls.c
include/linux/videodev2.h

index 23fdf79f8cf366fbecb9e10b1fd2ad70b2905e21..3bc5ee8b2c749ced60196d119e35b07295a42c45 100644 (file)
@@ -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>
          </row>
          <row>
            <entry><constant>V4L2_CID_HUE_AUTO</constant></entry>
index fc8666ae408fd5c0b79f98c6f004e921a065f130..5552f8137571e640bfdcec380b9d3c3773a917df 100644 (file)
@@ -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[] = {
index 66945a6f628de604d8aad971a40abb305dfb7acf..4b752d5ee80e8c7aca14f02eedc72dac6d7d3d8d 100644 (file)
@@ -1169,6 +1169,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)