aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2012-04-30 03:34:10 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-05-14 13:24:24 -0400
commitcf072139c7952e267a2eff334f224a62c949ee96 (patch)
tree9e793840d43b70152f506a43fe7e06ee97e7f524 /drivers/media
parent7f84ad8bdb63a8bfcbb83755e487e06be5db54cf (diff)
[media] V4L: Add camera exposure metering control
The V4L2_CID_EXPOSURE_METERING control allows to determine a method used by the camera for measuring the amount of light available for automatic exposure. 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')
-rw-r--r--drivers/media/video/v4l2-ctrls.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/media/video/v4l2-ctrls.c b/drivers/media/video/v4l2-ctrls.c
index debaf9fb9004..55dd813b7341 100644
--- a/drivers/media/video/v4l2-ctrls.c
+++ b/drivers/media/video/v4l2-ctrls.c
@@ -230,6 +230,12 @@ const char * const *v4l2_ctrl_get_menu(u32 id)
230 "Aperture Priority Mode", 230 "Aperture Priority Mode",
231 NULL 231 NULL
232 }; 232 };
233 static const char * const camera_exposure_metering[] = {
234 "Average",
235 "Center Weighted",
236 "Spot",
237 NULL
238 };
233 static const char * const colorfx[] = { 239 static const char * const colorfx[] = {
234 "None", 240 "None",
235 "Black & White", 241 "Black & White",
@@ -434,6 +440,8 @@ const char * const *v4l2_ctrl_get_menu(u32 id)
434 return camera_power_line_frequency; 440 return camera_power_line_frequency;
435 case V4L2_CID_EXPOSURE_AUTO: 441 case V4L2_CID_EXPOSURE_AUTO:
436 return camera_exposure_auto; 442 return camera_exposure_auto;
443 case V4L2_CID_EXPOSURE_METERING:
444 return camera_exposure_metering;
437 case V4L2_CID_COLORFX: 445 case V4L2_CID_COLORFX:
438 return colorfx; 446 return colorfx;
439 case V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE: 447 case V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE:
@@ -632,6 +640,7 @@ const char *v4l2_ctrl_get_name(u32 id)
632 case V4L2_CID_IMAGE_STABILIZATION: return "Image Stabilization"; 640 case V4L2_CID_IMAGE_STABILIZATION: return "Image Stabilization";
633 case V4L2_CID_ISO_SENSITIVITY: return "ISO Sensitivity"; 641 case V4L2_CID_ISO_SENSITIVITY: return "ISO Sensitivity";
634 case V4L2_CID_ISO_SENSITIVITY_AUTO: return "ISO Sensitivity, Auto"; 642 case V4L2_CID_ISO_SENSITIVITY_AUTO: return "ISO Sensitivity, Auto";
643 case V4L2_CID_EXPOSURE_METERING: return "Exposure, Metering Mode";
635 644
636 /* FM Radio Modulator control */ 645 /* FM Radio Modulator control */
637 /* Keep the order of the 'case's the same as in videodev2.h! */ 646 /* Keep the order of the 'case's the same as in videodev2.h! */
@@ -783,6 +792,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
783 case V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE: 792 case V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE:
784 case V4L2_CID_JPEG_CHROMA_SUBSAMPLING: 793 case V4L2_CID_JPEG_CHROMA_SUBSAMPLING:
785 case V4L2_CID_ISO_SENSITIVITY_AUTO: 794 case V4L2_CID_ISO_SENSITIVITY_AUTO:
795 case V4L2_CID_EXPOSURE_METERING:
786 *type = V4L2_CTRL_TYPE_MENU; 796 *type = V4L2_CTRL_TYPE_MENU;
787 break; 797 break;
788 case V4L2_CID_LINK_FREQ: 798 case V4L2_CID_LINK_FREQ: