summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-02-20 09:50:52 +0100
committerHans Verkuil <hverkuil@xs4all.nl>2009-02-20 09:50:52 +0100
commitb2e7077468076b3bfb3f6ad572808dab4a8795ae (patch)
tree63228a07387de0af8e19da8e93036e4d2d12917f /linux/drivers
parent147808f20de9bee3b123a79fcff6ea4432d533a5 (diff)
downloadmediapointer-dvb-s2-b2e7077468076b3bfb3f6ad572808dab4a8795ae.tar.gz
mediapointer-dvb-s2-b2e7077468076b3bfb3f6ad572808dab4a8795ae.tar.bz2
v4l2: add colorfx support to v4l2-common.c, and add to 'Changes' in spec.
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers')
-rw-r--r--linux/drivers/media/video/v4l2-common.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/linux/drivers/media/video/v4l2-common.c b/linux/drivers/media/video/v4l2-common.c
index 8ae8dd366..ec81afb19 100644
--- a/linux/drivers/media/video/v4l2-common.c
+++ b/linux/drivers/media/video/v4l2-common.c
@@ -335,6 +335,12 @@ const char **v4l2_ctrl_get_menu(u32 id)
"Aperture Priority Mode",
NULL
};
+ static const char *colorfx[] = {
+ "None",
+ "Black & White",
+ "Sepia",
+ NULL
+ };
switch (id) {
case V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ:
@@ -371,6 +377,8 @@ const char **v4l2_ctrl_get_menu(u32 id)
return camera_power_line_frequency;
case V4L2_CID_EXPOSURE_AUTO:
return camera_exposure_auto;
+ case V4L2_CID_COLORFX:
+ return colorfx;
default:
return NULL;
}
@@ -413,6 +421,7 @@ const char *v4l2_ctrl_get_name(u32 id)
case V4L2_CID_BACKLIGHT_COMPENSATION: return "Backlight Compensation";
case V4L2_CID_CHROMA_AGC: return "Chroma AGC";
case V4L2_CID_COLOR_KILLER: return "Color Killer";
+ case V4L2_CID_COLORFX: return "Color Effects";
/* MPEG controls */
case V4L2_CID_MPEG_CLASS: return "MPEG Encoder Controls";
@@ -518,6 +527,7 @@ int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 ste
case V4L2_CID_MPEG_STREAM_TYPE:
case V4L2_CID_MPEG_STREAM_VBI_FMT:
case V4L2_CID_EXPOSURE_AUTO:
+ case V4L2_CID_COLORFX:
qctrl->type = V4L2_CTRL_TYPE_MENU;
step = 1;
break;
@@ -586,6 +596,8 @@ int v4l2_ctrl_query_fill_std(struct v4l2_queryctrl *qctrl)
return v4l2_ctrl_query_fill(qctrl, 0, 127, 1, 64);
case V4L2_CID_HUE:
return v4l2_ctrl_query_fill(qctrl, -128, 127, 1, 0);
+ case V4L2_CID_COLORFX:
+ return v4l2_ctrl_query_fill(qctrl, 0, 1, 1, 0);
/* MPEG controls */
case V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ: