From dfb9afd9ee426993f459068acc2c891faca64888 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Wed, 8 Feb 2012 00:59:48 +0100 Subject: controls: Add support for sensor gain Support setting the global sensor gain. Signed-off-by: Laurent Pinchart --- isp/controls.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'isp/controls.c') 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) { -- cgit v1.2.3