Skip to content

Commit a8f438c

Browse files
hfruchet-stmchehab
authored andcommitted
media: ov5640: fix auto controls values when switching to manual mode
When switching from auto to manual mode, V4L2 core is calling g_volatile_ctrl() in manual mode in order to get the manual initial value. Remove the manual mode check/return to not break this behaviour. Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com> Tested-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
1 parent c2c3f42 commit a8f438c

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

‎drivers/media/i2c/ov5640.c‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2334,16 +2334,12 @@ static int ov5640_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
23342334

23352335
switch (ctrl->id) {
23362336
case V4L2_CID_AUTOGAIN:
2337-
if (!ctrl->val)
2338-
return 0;
23392337
val = ov5640_get_gain(sensor);
23402338
if (val < 0)
23412339
return val;
23422340
sensor->ctrls.gain->val = val;
23432341
break;
23442342
case V4L2_CID_EXPOSURE_AUTO:
2345-
if (ctrl->val == V4L2_EXPOSURE_MANUAL)
2346-
return 0;
23472343
val = ov5640_get_exposure(sensor);
23482344
if (val < 0)
23492345
return val;

0 commit comments

Comments
 (0)