diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-02-08 00:59:48 +0100 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-04-16 23:44:56 +0200 |
commit | dfb9afd9ee426993f459068acc2c891faca64888 (patch) | |
tree | becba9c29972ab36ea6c09ac3693ed25e36ccd22 /isp | |
parent | c0cc496bc56d4704a335f9f9931f324ad07d9d96 (diff) |
controls: Add support for sensor gain
Support setting the global sensor gain.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'isp')
-rw-r--r-- | isp/controls.c | 10 | ||||
-rw-r--r-- | isp/omap3isp.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/isp/controls.c b/isp/controls.c index f75402b..4939ae0 100644 --- a/isp/controls.c +++ b/isp/controls.c @@ -370,6 +370,16 @@ int omap3_isp_sensor_set_exposure(struct omap3_isp_device *isp, return v4l2_subdev_set_controls(isp->sensor.entity, ARRAY_SIZE(ctrls), ctrls); } +int omap3_isp_sensor_set_gain(struct omap3_isp_device *isp, unsigned int gain) +{ + struct v4l2_ext_control ctrls[1]; + + ctrls[0].id = V4L2_CID_GAIN; + ctrls[0].value = gain; + + return v4l2_subdev_set_controls(isp->sensor.entity, ARRAY_SIZE(ctrls), ctrls); +} + int omap3_isp_sensor_set_gains(struct omap3_isp_device *isp, unsigned int red, unsigned int green, unsigned int blue) { diff --git a/isp/omap3isp.h b/isp/omap3isp.h index 23a5577..db1002e 100644 --- a/isp/omap3isp.h +++ b/isp/omap3isp.h @@ -86,6 +86,7 @@ int omap3_isp_sensor_get_exposure(struct omap3_isp_device *isp, unsigned int *exposure); int omap3_isp_sensor_set_exposure(struct omap3_isp_device *isp, unsigned int exposure); +int omap3_isp_sensor_set_gain(struct omap3_isp_device *isp, unsigned int gain); int omap3_isp_sensor_set_gains(struct omap3_isp_device *isp, unsigned int red, unsigned int green, unsigned int blue); |