aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2012-04-16 09:45:44 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-05-14 13:28:19 -0400
commit0bf6b7dc5fd1e60e93657d4fe4b3d788216b9d5e (patch)
tree7fc860e2ee33601d4e2c5a478e0327b8e49538a6 /drivers/media/video
parentcf072139c7952e267a2eff334f224a62c949ee96 (diff)
[media] V4L: Add camera scene mode control
Add control for the scene mode feature available in image sensor with more advanced ISP firmware. The V4L2_CID_SCENE_MODE menu control allows to select a set of parameters or a specific image processing and capture control algorithm optimized for common image capture conditions. 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> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/v4l2-ctrls.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/media/video/v4l2-ctrls.c b/drivers/media/video/v4l2-ctrls.c
index 55dd813b7341..d4dc8ba7b755 100644
--- a/drivers/media/video/v4l2-ctrls.c
+++ b/drivers/media/video/v4l2-ctrls.c
@@ -273,6 +273,23 @@ const char * const *v4l2_ctrl_get_menu(u32 id)
273 "Auto", 273 "Auto",
274 NULL 274 NULL
275 }; 275 };
276 static const char * const scene_mode[] = {
277 "None",
278 "Backlight",
279 "Beach/Snow",
280 "Candle Light",
281 "Dusk/Dawn",
282 "Fall Colors",
283 "Fireworks",
284 "Landscape",
285 "Night",
286 "Party/Indoor",
287 "Portrait",
288 "Sports",
289 "Sunset",
290 "Text",
291 NULL
292 };
276 static const char * const tune_preemphasis[] = { 293 static const char * const tune_preemphasis[] = {
277 "No Preemphasis", 294 "No Preemphasis",
278 "50 Microseconds", 295 "50 Microseconds",
@@ -448,6 +465,8 @@ const char * const *v4l2_ctrl_get_menu(u32 id)
448 return auto_n_preset_white_balance; 465 return auto_n_preset_white_balance;
449 case V4L2_CID_ISO_SENSITIVITY_AUTO: 466 case V4L2_CID_ISO_SENSITIVITY_AUTO:
450 return camera_iso_sensitivity_auto; 467 return camera_iso_sensitivity_auto;
468 case V4L2_CID_SCENE_MODE:
469 return scene_mode;
451 case V4L2_CID_TUNE_PREEMPHASIS: 470 case V4L2_CID_TUNE_PREEMPHASIS:
452 return tune_preemphasis; 471 return tune_preemphasis;
453 case V4L2_CID_FLASH_LED_MODE: 472 case V4L2_CID_FLASH_LED_MODE:
@@ -641,6 +660,7 @@ const char *v4l2_ctrl_get_name(u32 id)
641 case V4L2_CID_ISO_SENSITIVITY: return "ISO Sensitivity"; 660 case V4L2_CID_ISO_SENSITIVITY: return "ISO Sensitivity";
642 case V4L2_CID_ISO_SENSITIVITY_AUTO: return "ISO Sensitivity, Auto"; 661 case V4L2_CID_ISO_SENSITIVITY_AUTO: return "ISO Sensitivity, Auto";
643 case V4L2_CID_EXPOSURE_METERING: return "Exposure, Metering Mode"; 662 case V4L2_CID_EXPOSURE_METERING: return "Exposure, Metering Mode";
663 case V4L2_CID_SCENE_MODE: return "Scene Mode";
644 664
645 /* FM Radio Modulator control */ 665 /* FM Radio Modulator control */
646 /* Keep the order of the 'case's the same as in videodev2.h! */ 666 /* Keep the order of the 'case's the same as in videodev2.h! */
@@ -793,6 +813,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
793 case V4L2_CID_JPEG_CHROMA_SUBSAMPLING: 813 case V4L2_CID_JPEG_CHROMA_SUBSAMPLING:
794 case V4L2_CID_ISO_SENSITIVITY_AUTO: 814 case V4L2_CID_ISO_SENSITIVITY_AUTO:
795 case V4L2_CID_EXPOSURE_METERING: 815 case V4L2_CID_EXPOSURE_METERING:
816 case V4L2_CID_SCENE_MODE:
796 *type = V4L2_CTRL_TYPE_MENU; 817 *type = V4L2_CTRL_TYPE_MENU;
797 break; 818 break;
798 case V4L2_CID_LINK_FREQ: 819 case V4L2_CID_LINK_FREQ: