mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
media/i2c: ov7251: Switch from V4L2_CID_GAIN to V4L2_CID_ANALOGUE_GAIN
The mainline driver has implemented analogue gain using the control V4L2_CID_GAIN instead of V4L2_CID_ANALOGUE_GAIN. libcamera requires V4L2_CID_ANALOGUE_GAIN, and therefore fails. Update the driver to use V4L2_CID_ANALOGUE_GAIN. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
This commit is contained in:
committed by
Dom Cobley
parent
fa82142db4
commit
ac1b308c4a
@@ -1065,7 +1065,7 @@ static int ov7251_s_ctrl(struct v4l2_ctrl *ctrl)
|
||||
case V4L2_CID_EXPOSURE:
|
||||
ret = ov7251_set_exposure(ov7251, ctrl->val);
|
||||
break;
|
||||
case V4L2_CID_GAIN:
|
||||
case V4L2_CID_ANALOGUE_GAIN:
|
||||
ret = ov7251_set_gain(ov7251, ctrl->val);
|
||||
break;
|
||||
case V4L2_CID_TEST_PATTERN:
|
||||
@@ -1616,7 +1616,7 @@ static int ov7251_init_ctrls(struct ov7251 *ov7251)
|
||||
ov7251->exposure = v4l2_ctrl_new_std(&ov7251->ctrls, &ov7251_ctrl_ops,
|
||||
V4L2_CID_EXPOSURE, 1, 32, 1, 32);
|
||||
ov7251->gain = v4l2_ctrl_new_std(&ov7251->ctrls, &ov7251_ctrl_ops,
|
||||
V4L2_CID_GAIN, 16, 1023, 1, 16);
|
||||
V4L2_CID_ANALOGUE_GAIN, 16, 1023, 1, 16);
|
||||
v4l2_ctrl_new_std_menu_items(&ov7251->ctrls, &ov7251_ctrl_ops,
|
||||
V4L2_CID_TEST_PATTERN,
|
||||
ARRAY_SIZE(ov7251_test_pattern_menu) - 1,
|
||||
|
||||
Reference in New Issue
Block a user