From: Jean-François Moine Date: Mon, 26 Jul 2010 09:58:18 +0000 (-0300) Subject: V4L/DVB: gspca - sq930x: Change the gain value for Micron sensors X-Git-Tag: firefly_0821_release~9833^2~774^2~93 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b3c0af6e1f870dc1ade19382177f931f47499d86;p=firefly-linux-kernel-4.4.55.git V4L/DVB: gspca - sq930x: Change the gain value for Micron sensors The bit 7 of the sensor gain register multiplies the 7bits value by two. It is now always set with half the user gain value. Signed-off-by: Jean-François Moine Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/gspca/sq930x.c b/drivers/media/video/gspca/sq930x.c index 8032190cd12a..04516b42283a 100644 --- a/drivers/media/video/gspca/sq930x.c +++ b/drivers/media/video/gspca/sq930x.c @@ -862,7 +862,7 @@ static void setexposure(struct gspca_dev *gspca_dev) buf[i++] = 0x35; /* reg = global gain */ buf[i++] = 0x00; /* val H */ buf[i++] = sensor->i2c_dum; - buf[i++] = sd->gain; /* val L */ + buf[i++] = 0x80 + sd->gain / 2; /* val L */ buf[i++] = 0x00; buf[i++] = 0x00; buf[i++] = 0x00;