aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2014-05-28 08:38:21 -0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-08-21 16:25:11 -0400
commit0fc87864879c46afe145e20ec09c9dba2328e3be (patch)
treec8735e46974dfd18d7e29f20b50636c39f105410
parent5275a3b6b01664317b1a0bdc95ad981dbbb62283 (diff)
[media] v4l: Add test pattern colour component controls
In many cases the test pattern has selectable values for each colour component. Implement controls for raw bayer components. Additional controls should be defined for colour components that are not covered by these controls. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r--Documentation/DocBook/media/v4l/controls.xml34
-rw-r--r--drivers/media/v4l2-core/v4l2-ctrls.c4
-rw-r--r--include/uapi/linux/v4l2-controls.h4
3 files changed, 42 insertions, 0 deletions
diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml
index 9f5ffd85560b..a7eb1bde8b92 100644
--- a/Documentation/DocBook/media/v4l/controls.xml
+++ b/Documentation/DocBook/media/v4l/controls.xml
@@ -4790,6 +4790,40 @@ interface and may change in the future.</para>
4790 conversion. 4790 conversion.
4791 </entry> 4791 </entry>
4792 </row> 4792 </row>
4793 <row>
4794 <entry spanname="id"><constant>V4L2_CID_TEST_PATTERN_RED</constant></entry>
4795 <entry>integer</entry>
4796 </row>
4797 <row>
4798 <entry spanname="descr">Test pattern red colour component.
4799 </entry>
4800 </row>
4801 <row>
4802 <entry spanname="id"><constant>V4L2_CID_TEST_PATTERN_GREENR</constant></entry>
4803 <entry>integer</entry>
4804 </row>
4805 <row>
4806 <entry spanname="descr">Test pattern green (next to red)
4807 colour component.
4808 </entry>
4809 </row>
4810 <row>
4811 <entry spanname="id"><constant>V4L2_CID_TEST_PATTERN_BLUE</constant></entry>
4812 <entry>integer</entry>
4813 </row>
4814 <row>
4815 <entry spanname="descr">Test pattern blue colour component.
4816 </entry>
4817 </row>
4818 <row>
4819 <entry spanname="id"><constant>V4L2_CID_TEST_PATTERN_GREENB</constant></entry>
4820 <entry>integer</entry>
4821 </row>
4822 <row>
4823 <entry spanname="descr">Test pattern green (next to blue)
4824 colour component.
4825 </entry>
4826 </row>
4793 <row><entry></entry></row> 4827 <row><entry></entry></row>
4794 </tbody> 4828 </tbody>
4795 </tgroup> 4829 </tgroup>
diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c
index f030d6a9e044..35d1f3d5045b 100644
--- a/drivers/media/v4l2-core/v4l2-ctrls.c
+++ b/drivers/media/v4l2-core/v4l2-ctrls.c
@@ -859,6 +859,10 @@ const char *v4l2_ctrl_get_name(u32 id)
859 case V4L2_CID_VBLANK: return "Vertical Blanking"; 859 case V4L2_CID_VBLANK: return "Vertical Blanking";
860 case V4L2_CID_HBLANK: return "Horizontal Blanking"; 860 case V4L2_CID_HBLANK: return "Horizontal Blanking";
861 case V4L2_CID_ANALOGUE_GAIN: return "Analogue Gain"; 861 case V4L2_CID_ANALOGUE_GAIN: return "Analogue Gain";
862 case V4L2_CID_TEST_PATTERN_RED: return "Red Pixel Value";
863 case V4L2_CID_TEST_PATTERN_GREENR: return "Green (Red) Pixel Value";
864 case V4L2_CID_TEST_PATTERN_BLUE: return "Blue Pixel Value";
865 case V4L2_CID_TEST_PATTERN_GREENB: return "Green (Blue) Pixel Value";
862 866
863 /* Image processing controls */ 867 /* Image processing controls */
864 /* Keep the order of the 'case's the same as in v4l2-controls.h! */ 868 /* Keep the order of the 'case's the same as in v4l2-controls.h! */
diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h
index e946e43fb8d5..8b930210a4b9 100644
--- a/include/uapi/linux/v4l2-controls.h
+++ b/include/uapi/linux/v4l2-controls.h
@@ -865,6 +865,10 @@ enum v4l2_jpeg_chroma_subsampling {
865#define V4L2_CID_VBLANK (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 1) 865#define V4L2_CID_VBLANK (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 1)
866#define V4L2_CID_HBLANK (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 2) 866#define V4L2_CID_HBLANK (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 2)
867#define V4L2_CID_ANALOGUE_GAIN (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 3) 867#define V4L2_CID_ANALOGUE_GAIN (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 3)
868#define V4L2_CID_TEST_PATTERN_RED (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 4)
869#define V4L2_CID_TEST_PATTERN_GREENR (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 5)
870#define V4L2_CID_TEST_PATTERN_BLUE (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 6)
871#define V4L2_CID_TEST_PATTERN_GREENB (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 7)
868 872
869 873
870/* Image processing controls */ 874/* Image processing controls */