diff options
author | Sylwester Nawrocki | 2012-03-06 07:04:26 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab | 2012-05-14 14:04:30 -0300 |
commit | e40a05736d4503950ec303610a51f838bd59cdc1 (patch) | |
tree | ffd2cfa05d4fdd0d031729bc7f2deffc6003ee86 /drivers/media/video/v4l2-ctrls.c | |
parent | d58083c949b3d76aba225be9f303ab5dab585064 (diff) |
[media] V4L: Add an extended camera white balance control
This patch adds V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE control which is
an extended version of the V4L2_CID_AUTO_WHITE_BALANCE control,
including white balance presets. The following presets are defined:
- V4L2_WHITE_BALANCE_INCANDESCENT,
- V4L2_WHITE_BALANCE_FLUORESCENT,
- V4L2_WHITE_BALANCE_FLUORESCENT_H,
- V4L2_WHITE_BALANCE_HORIZON,
- V4L2_WHITE_BALANCE_DAYLIGHT,
- V4L2_WHITE_BALANCE_FLASH,
- V4L2_WHITE_BALANCE_CLOUDY,
- V4L2_WHITE_BALANCE_SHADE.
Signed-off-by: HeungJun Kim <riverful.kim@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/v4l2-ctrls.c')
-rw-r--r-- | drivers/media/video/v4l2-ctrls.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/media/video/v4l2-ctrls.c b/drivers/media/video/v4l2-ctrls.c index 5bfef90e88ee..56ac71c8ba37 100644 --- a/drivers/media/video/v4l2-ctrls.c +++ b/drivers/media/video/v4l2-ctrls.c @@ -249,6 +249,19 @@ const char * const *v4l2_ctrl_get_menu(u32 id) "Set Cb/Cr", NULL }; + static const char * const auto_n_preset_white_balance[] = { + "Manual", + "Auto", + "Incandescent", + "Fluorescent", + "Fluorescent H", + "Horizon", + "Daylight", + "Flash", + "Cloudy", + "Shade", + NULL, + }; static const char * const tune_preemphasis[] = { "No Preemphasis", "50 Microseconds", @@ -418,6 +431,8 @@ const char * const *v4l2_ctrl_get_menu(u32 id) return camera_exposure_auto; case V4L2_CID_COLORFX: return colorfx; + case V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE: + return auto_n_preset_white_balance; case V4L2_CID_TUNE_PREEMPHASIS: return tune_preemphasis; case V4L2_CID_FLASH_LED_MODE: @@ -605,6 +620,7 @@ const char *v4l2_ctrl_get_name(u32 id) case V4L2_CID_IRIS_ABSOLUTE: return "Iris, Absolute"; case V4L2_CID_IRIS_RELATIVE: return "Iris, Relative"; case V4L2_CID_AUTO_EXPOSURE_BIAS: return "Auto Exposure, Bias"; + case V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE: return "White Balance, Auto & Preset"; /* FM Radio Modulator control */ /* Keep the order of the 'case's the same as in videodev2.h! */ @@ -739,6 +755,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type, case V4L2_CID_MPEG_STREAM_VBI_FMT: case V4L2_CID_EXPOSURE_AUTO: case V4L2_CID_COLORFX: + case V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE: case V4L2_CID_TUNE_PREEMPHASIS: case V4L2_CID_FLASH_LED_MODE: case V4L2_CID_FLASH_STROBE_SOURCE: |