Commit ccbaba43 authored by Jean-François Moine's avatar Jean-François Moine Committed by Mauro Carvalho Chehab

[media] gspca - sn9c20x: Simplify register write for capture start/stop

The bridge register 1061 may take only the values 01 (stop) or 03 (start).
Signed-off-by: default avatarJean-François Moine <moinejf@free.fr>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 92dcffcf
...@@ -2107,9 +2107,7 @@ static int sd_start(struct gspca_dev *gspca_dev) ...@@ -2107,9 +2107,7 @@ static int sd_start(struct gspca_dev *gspca_dev)
set_hvflip(gspca_dev); set_hvflip(gspca_dev);
reg_w1(gspca_dev, 0x1007, 0x20); reg_w1(gspca_dev, 0x1007, 0x20);
reg_w1(gspca_dev, 0x1061, 0x03);
reg_r(gspca_dev, 0x1061, 1);
reg_w1(gspca_dev, 0x1061, gspca_dev->usb_buf[0] | 0x02);
/* if JPEG, prepare the compression quality update */ /* if JPEG, prepare the compression quality update */
if (mode & MODE_JPEG) { if (mode & MODE_JPEG) {
...@@ -2125,9 +2123,7 @@ static int sd_start(struct gspca_dev *gspca_dev) ...@@ -2125,9 +2123,7 @@ static int sd_start(struct gspca_dev *gspca_dev)
static void sd_stopN(struct gspca_dev *gspca_dev) static void sd_stopN(struct gspca_dev *gspca_dev)
{ {
reg_w1(gspca_dev, 0x1007, 0x00); reg_w1(gspca_dev, 0x1007, 0x00);
reg_w1(gspca_dev, 0x1061, 0x01);
reg_r(gspca_dev, 0x1061, 1);
reg_w1(gspca_dev, 0x1061, gspca_dev->usb_buf[0] & ~0x02);
} }
/* called on streamoff with alt==0 and on disconnect */ /* called on streamoff with alt==0 and on disconnect */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment