Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124517
b: refs/heads/master
c: 27b1e4c
h: refs/heads/master
i:
  124515: 49728da
v: v3
  • Loading branch information
Erik Andrén authored and Mauro Carvalho Chehab committed Dec 30, 2008
1 parent 173b7bf commit 5aeb407
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 36 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1f614f40b5ab302596374356f7a2065602e80e25
refs/heads/master: 27b1e4ca21d6322a16978127b9f227c432f10ae6
8 changes: 7 additions & 1 deletion trunk/drivers/media/video/gspca/m5602/m5602_ov9650.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ int ov9650_init(struct sd *sd)
data = 0x30;
err = m5602_write_sensor(sd, OV9650_MVFP, &data, 1);
}

return err;
}

Expand All @@ -148,6 +147,13 @@ int ov9650_start(struct sd *sd)
int i, err = 0;
struct cam *cam = &sd->gspca_dev.cam;

for (i = 0; i < ARRAY_SIZE(res_init_ov9650) && !err; i++) {
u8 data = res_init_ov9650[i][1];
err = m5602_write_bridge(sd, res_init_ov9650[i][0], data);
}
if (err < 0)
return err;

switch (cam->cam_mode[sd->gspca_dev.curr_mode].width)
{
case 640:
Expand Down
59 changes: 25 additions & 34 deletions trunk/drivers/media/video/gspca/m5602/m5602_ov9650.h
Original file line number Diff line number Diff line change
Expand Up @@ -458,21 +458,20 @@ static const unsigned char power_down_ov9650[][3] =
{BRIDGE, M5602_XB_GPIO_EN_L, 0x06},
{BRIDGE, M5602_XB_GPIO_DAT_H, 0x02},
{BRIDGE, M5602_XB_SEN_CLK_DIV, 0x04},
{BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0}
{BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0},
};

static const unsigned char VGA_ov9650[][3] =
static const unsigned char res_init_ov9650[][2] =
{
{SENSOR, OV9650_COM7, OV9650_VGA_SELECT |
OV9650_RGB_SELECT |
OV9650_RAW_RGB_SELECT},

{BRIDGE, M5602_XB_LINE_OF_FRAME_H, 0x82},
{BRIDGE, M5602_XB_LINE_OF_FRAME_L, 0x00},
{BRIDGE, M5602_XB_PIX_OF_LINE_H, 0x82},
{BRIDGE, M5602_XB_PIX_OF_LINE_L, 0x00},
{BRIDGE, M5602_XB_SIG_INI, 0x01},
{M5602_XB_LINE_OF_FRAME_H, 0x82},
{M5602_XB_LINE_OF_FRAME_L, 0x00},
{M5602_XB_PIX_OF_LINE_H, 0x82},
{M5602_XB_PIX_OF_LINE_L, 0x00},
{M5602_XB_SIG_INI, 0x01}
};

static const unsigned char VGA_ov9650[][3] =
{
/* Moves the view window in a vertical orientation */
{BRIDGE, M5602_XB_VSYNC_PARA, 0x00},
{BRIDGE, M5602_XB_VSYNC_PARA, 0x09},
Expand All @@ -484,21 +483,15 @@ static const unsigned char VGA_ov9650[][3] =
{BRIDGE, M5602_XB_HSYNC_PARA, 0x00},
{BRIDGE, M5602_XB_HSYNC_PARA, 0x62}, /* 98 */
{BRIDGE, M5602_XB_HSYNC_PARA, 0x02}, /* 640 + 98 */
{BRIDGE, M5602_XB_HSYNC_PARA, 0xe2}
};
{BRIDGE, M5602_XB_HSYNC_PARA, 0xe2},

static const unsigned char CIF_ov9650[][3] =
{
{SENSOR, OV9650_COM7, OV9650_CIF_SELECT |
{SENSOR, OV9650_COM7, OV9650_VGA_SELECT |
OV9650_RGB_SELECT |
OV9650_RAW_RGB_SELECT},
};

{BRIDGE, M5602_XB_LINE_OF_FRAME_H, 0x82},
{BRIDGE, M5602_XB_LINE_OF_FRAME_L, 0x00},
{BRIDGE, M5602_XB_PIX_OF_LINE_H, 0x82},
{BRIDGE, M5602_XB_PIX_OF_LINE_L, 0x00},
{BRIDGE, M5602_XB_SIG_INI, 0x01},

static const unsigned char CIF_ov9650[][3] =
{
/* Moves the view window in a vertical orientation */
{BRIDGE, M5602_XB_VSYNC_PARA, 0x00},
{BRIDGE, M5602_XB_VSYNC_PARA, 0x09},
Expand All @@ -510,21 +503,15 @@ static const unsigned char CIF_ov9650[][3] =
{BRIDGE, M5602_XB_HSYNC_PARA, 0x00},
{BRIDGE, M5602_XB_HSYNC_PARA, 0x62}, /* 98 */
{BRIDGE, M5602_XB_HSYNC_PARA, 0x01}, /* 352 + 98 */
{BRIDGE, M5602_XB_HSYNC_PARA, 0xc2}
};
{BRIDGE, M5602_XB_HSYNC_PARA, 0xc2},

static const unsigned char QVGA_ov9650[][3] =
{
{SENSOR, OV9650_COM7, OV9650_QVGA_SELECT |
{SENSOR, OV9650_COM7, OV9650_CIF_SELECT |
OV9650_RGB_SELECT |
OV9650_RAW_RGB_SELECT},
};

{BRIDGE, M5602_XB_LINE_OF_FRAME_H, 0x82},
{BRIDGE, M5602_XB_LINE_OF_FRAME_L, 0x00},
{BRIDGE, M5602_XB_PIX_OF_LINE_H, 0x82},
{BRIDGE, M5602_XB_PIX_OF_LINE_L, 0x00},
{BRIDGE, M5602_XB_SIG_INI, 0x01},

static const unsigned char QVGA_ov9650[][3] =
{
/* Moves the view window in a vertical orientation */
{BRIDGE, M5602_XB_VSYNC_PARA, 0x00},
{BRIDGE, M5602_XB_VSYNC_PARA, 0x08},
Expand All @@ -536,7 +523,11 @@ static const unsigned char QVGA_ov9650[][3] =
{BRIDGE, M5602_XB_HSYNC_PARA, 0x00},
{BRIDGE, M5602_XB_HSYNC_PARA, 0x31}, /* 50 */
{BRIDGE, M5602_XB_HSYNC_PARA, 0x01}, /* 320 + 50 */
{BRIDGE, M5602_XB_HSYNC_PARA, 0x71}
{BRIDGE, M5602_XB_HSYNC_PARA, 0x71},

{SENSOR, OV9650_COM7, OV9650_QVGA_SELECT |
OV9650_RGB_SELECT |
OV9650_RAW_RGB_SELECT},
};

#endif

0 comments on commit 5aeb407

Please sign in to comment.