Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7136e705 authored by Erik Andr?n's avatar Erik Andr?n Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (11419): gspca - m5602-ov9650: Don't read exposure data from COM1.



ov9650: Reading the COM1 register corrupts the image.
Decrease the granularity of the exposure and limit its upper range
as setting such high values doesn't have any effect on the image.

Signed-off-by: default avatarErik Andr?n <erik.andren@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 5a0489b3
Loading
Loading
Loading
Loading
+2 −7
Original line number Original line Diff line number Diff line
@@ -75,8 +75,8 @@ const static struct ctrl ov9650_ctrls[] = {
			.type		= V4L2_CTRL_TYPE_INTEGER,
			.type		= V4L2_CTRL_TYPE_INTEGER,
			.name		= "exposure",
			.name		= "exposure",
			.minimum	= 0x00,
			.minimum	= 0x00,
			.maximum	= 0xffff,
			.maximum	= 0x1ff,
			.step		= 0x1,
			.step		= 0x4,
			.default_value 	= EXPOSURE_DEFAULT,
			.default_value 	= EXPOSURE_DEFAULT,
			.flags         	= V4L2_CTRL_FLAG_SLIDER
			.flags         	= V4L2_CTRL_FLAG_SLIDER
		},
		},
@@ -407,11 +407,6 @@ int ov9650_get_exposure(struct gspca_dev *gspca_dev, __s32 *val)
	u8 i2c_data;
	u8 i2c_data;
	int err;
	int err;


	err = m5602_read_sensor(sd, OV9650_COM1, &i2c_data, 1);
	if (err < 0)
		return err;
	*val = i2c_data & 0x03;

	err = m5602_read_sensor(sd, OV9650_AECH, &i2c_data, 1);
	err = m5602_read_sensor(sd, OV9650_AECH, &i2c_data, 1);
	if (err < 0)
	if (err < 0)
		return err;
		return err;
+1 −1
Original line number Original line Diff line number Diff line
@@ -123,7 +123,7 @@
#define GAIN_DEFAULT			0x14
#define GAIN_DEFAULT			0x14
#define RED_GAIN_DEFAULT		0x70
#define RED_GAIN_DEFAULT		0x70
#define BLUE_GAIN_DEFAULT		0x20
#define BLUE_GAIN_DEFAULT		0x20
#define EXPOSURE_DEFAULT		0x5003
#define EXPOSURE_DEFAULT		0x1ff


/*****************************************************************************/
/*****************************************************************************/