mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-17 09:14:19 +08:00
V4L/DVB: gspca - sn9c20x: Fix exposure control for HV7131R sensor
Make the range of exposure values (0-0x1770) distribute evenly through HV7131R's exposure control bytes. Signed-off-by: German Galkin <galkinga@gmail.com> Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
24f222e77a
commit
e10f73194d
@ -1655,9 +1655,9 @@ static int set_exposure(struct gspca_dev *gspca_dev)
|
||||
case SENSOR_HV7131R:
|
||||
exp[0] |= (4 << 4);
|
||||
exp[2] = 0x25;
|
||||
exp[3] = ((sd->exposure * 0xffffff) / 0xffff) >> 16;
|
||||
exp[4] = ((sd->exposure * 0xffffff) / 0xffff) >> 8;
|
||||
exp[5] = ((sd->exposure * 0xffffff) / 0xffff) & 0xff;
|
||||
exp[3] = (sd->exposure >> 5) & 0xff;
|
||||
exp[4] = (sd->exposure << 3) & 0xff;
|
||||
exp[5] = 0;
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user