Commit 98192670 authored by Erik Andr?n's avatar Erik Andr?n Committed by Mauro Carvalho Chehab

V4L/DVB (11536): gspca - m5602-po1030: Impove the bridge vsync/hsync configuration

Signed-off-by: default avatarErik Andr?n <erik.andren@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 931a1c8d
...@@ -367,11 +367,6 @@ int po1030_start(struct sd *sd) ...@@ -367,11 +367,6 @@ int po1030_start(struct sd *sd)
break; break;
case 640: case 640:
data = 0;
err = m5602_write_sensor(sd, PO1030_CONTROL3, &data, 1);
if (err < 0)
return err;
data = ((width + 7) >> 8) & 0xff; data = ((width + 7) >> 8) & 0xff;
err = m5602_write_sensor(sd, PO1030_WINDOWWIDTH_H, &data, 1); err = m5602_write_sensor(sd, PO1030_WINDOWWIDTH_H, &data, 1);
if (err < 0) if (err < 0)
...@@ -394,6 +389,9 @@ int po1030_start(struct sd *sd) ...@@ -394,6 +389,9 @@ int po1030_start(struct sd *sd)
width -= 2; width -= 2;
break; break;
} }
err = m5602_write_bridge(sd, M5602_XB_SENSOR_TYPE, 0x0c);
if (err < 0)
return err;
err = m5602_write_bridge(sd, M5602_XB_LINE_OF_FRAME_H, 0x81); err = m5602_write_bridge(sd, M5602_XB_LINE_OF_FRAME_H, 0x81);
if (err < 0) if (err < 0)
...@@ -403,6 +401,10 @@ int po1030_start(struct sd *sd) ...@@ -403,6 +401,10 @@ int po1030_start(struct sd *sd)
if (err < 0) if (err < 0)
return err; return err;
err = m5602_write_bridge(sd, M5602_XB_SIG_INI, 0x01);
if (err < 0)
return err;
err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA,
((ver_offs >> 8) & 0xff)); ((ver_offs >> 8) & 0xff));
if (err < 0) if (err < 0)
...@@ -412,6 +414,7 @@ int po1030_start(struct sd *sd) ...@@ -412,6 +414,7 @@ int po1030_start(struct sd *sd)
if (err < 0) if (err < 0)
return err; return err;
for (i = 0; i < 2 && !err; i++)
err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, 0); err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, 0);
if (err < 0) if (err < 0)
return err; return err;
...@@ -427,6 +430,9 @@ int po1030_start(struct sd *sd) ...@@ -427,6 +430,9 @@ int po1030_start(struct sd *sd)
for (i = 0; i < 2 && !err; i++) for (i = 0; i < 2 && !err; i++)
err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, 0); err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, 0);
for (i = 0; i < 2 && !err; i++)
err = m5602_write_bridge(sd, M5602_XB_SIG_INI, 0);
for (i = 0; i < 2 && !err; i++) for (i = 0; i < 2 && !err; i++)
err = m5602_write_bridge(sd, M5602_XB_HSYNC_PARA, 0); err = m5602_write_bridge(sd, M5602_XB_HSYNC_PARA, 0);
if (err < 0) if (err < 0)
...@@ -437,6 +443,10 @@ int po1030_start(struct sd *sd) ...@@ -437,6 +443,10 @@ int po1030_start(struct sd *sd)
return err; return err;
err = m5602_write_bridge(sd, M5602_XB_HSYNC_PARA, (width & 0xff)); err = m5602_write_bridge(sd, M5602_XB_HSYNC_PARA, (width & 0xff));
if (err < 0)
return err;
err = m5602_write_bridge(sd, M5602_XB_SIG_INI, 0);
return err; return err;
} }
......
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