提交 e10f7319 编写于 作者: G German Galkin 提交者: Mauro Carvalho Chehab

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: NGerman Galkin <galkinga@gmail.com>
Signed-off-by: NJean-François Moine <moinejf@free.fr>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 24f222e7
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册