@@ -162,6 +162,11 @@ activated, keeps adjusting the white balance.</entry>
<entry>Red chroma balance.</entry>
</row>
<row>
+ <entry><constant>V4L2_CID_GREEN_BALANCE</constant></entry>
+ <entry>integer</entry>
+ <entry>Green chroma balance.</entry>
+ </row>
+ <row>
<entry><constant>V4L2_CID_BLUE_BALANCE</constant></entry>
<entry>integer</entry>
<entry>Blue chroma balance.</entry>
@@ -575,6 +575,7 @@ const char *v4l2_ctrl_get_name(u32 id)
case V4L2_CID_MIN_BUFFERS_FOR_OUTPUT: return "Min Number of Output Buffers";
case V4L2_CID_ALPHA_COMPONENT: return "Alpha Component";
case V4L2_CID_COLORFX_CBCR: return "Color Effects, CbCr";
+ case V4L2_CID_GREEN_BALANCE: return "Green Balance";
/* MPEG controls */
/* Keep the order of the 'case's the same as in videodev2.h! */
@@ -941,6 +942,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
case V4L2_CID_SATURATION:
case V4L2_CID_HUE:
case V4L2_CID_RED_BALANCE:
+ case V4L2_CID_GREEN_BALANCE:
case V4L2_CID_BLUE_BALANCE:
case V4L2_CID_GAMMA:
case V4L2_CID_SHARPNESS:
@@ -1390,8 +1390,10 @@ enum v4l2_colorfx {
#define V4L2_CID_ALPHA_COMPONENT (V4L2_CID_BASE+41)
#define V4L2_CID_COLORFX_CBCR (V4L2_CID_BASE+42)
+#define V4L2_CID_GREEN_BALANCE (V4L2_CID_BASE+43)
+
/* last CID + 1 */
-#define V4L2_CID_LASTP1 (V4L2_CID_BASE+43)
+#define V4L2_CID_LASTP1 (V4L2_CID_BASE+44)
/* MPEG-class control IDs defined by V4L2 */
#define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900)
We already support the red balance (V4L2_CID_RED_BALANCE) and blue balance (V4L2_CID_BLUE_BALANCE) controls and lots of hardware provides a possibility to adjust the green balance, too. Several drivers already support this as custom controls, other just don't do that due to the lack of a V4L2 standard control. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> --- Documentation/DocBook/media/v4l/controls.xml | 5 +++++ drivers/media/v4l2-core/v4l2-ctrls.c | 2 ++ include/linux/videodev2.h | 4 +++- 3 files changed, 10 insertions(+), 1 deletions(-)