This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit f2b117ee9a60f8e4427d918f3242ad131ae18018 Author: raiden00pl <[email protected]> AuthorDate: Tue Nov 3 13:44:46 2026 +0100 video: Add the V4L2_CID_GAIN control. Add V4L2_CID_GAIN and IMGSENSOR_ID_GAIN for the sensor gain, used by raw sensors whose exposure is controlled by the host ISP. Assisted-by: Claude:claude-fable-5-1 Signed-off-by: raiden00pl <[email protected]> --- drivers/video/v4l2_cap.c | 4 ++++ include/nuttx/video/imgsensor.h | 1 + include/sys/video_controls.h | 1 + 3 files changed, 6 insertions(+) diff --git a/drivers/video/v4l2_cap.c b/drivers/video/v4l2_cap.c index 879e832caa0..2a8abde7942 100644 --- a/drivers/video/v4l2_cap.c +++ b/drivers/video/v4l2_cap.c @@ -506,6 +506,10 @@ static const capture_parameter_name_t g_capture_parameter_name[] = IMGSENSOR_ID_ROTATE, "Rotate" }, + { + IMGSENSOR_ID_GAIN, "Gain" + }, + { IMGSENSOR_ID_EXPOSURE_AUTO, "Auto Exposure" }, diff --git a/include/nuttx/video/imgsensor.h b/include/nuttx/video/imgsensor.h index c09f454ca8d..e99a0ac5f0e 100644 --- a/include/nuttx/video/imgsensor.h +++ b/include/nuttx/video/imgsensor.h @@ -55,6 +55,7 @@ #define IMGSENSOR_ID_COLORFX V4L2_CID_COLORFX #define IMGSENSOR_ID_AUTOBRIGHTNESS V4L2_CID_AUTOBRIGHTNESS #define IMGSENSOR_ID_ROTATE V4L2_CID_ROTATE +#define IMGSENSOR_ID_GAIN V4L2_CID_GAIN #define IMGSENSOR_ID_EXPOSURE_AUTO V4L2_CID_EXPOSURE_AUTO #define IMGSENSOR_ID_EXPOSURE_ABSOLUTE V4L2_CID_EXPOSURE_ABSOLUTE #define IMGSENSOR_ID_FOCUS_ABSOLUTE V4L2_CID_FOCUS_ABSOLUTE diff --git a/include/sys/video_controls.h b/include/sys/video_controls.h index 452bc14b16e..b50c3925630 100644 --- a/include/sys/video_controls.h +++ b/include/sys/video_controls.h @@ -105,6 +105,7 @@ enum v4l2_colorfx #define V4L2_CID_AUTOBRIGHTNESS USER_CID(17) /* Auto brightness */ #define V4L2_CID_ROTATE USER_CID(18) /* Rotation */ +#define V4L2_CID_GAIN USER_CID(19) /* Gain */ #define V4L2_CID_LENS_SHADING_CORRECTION USER_CID(19) /* Lens shading correction */
