Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124515
b: refs/heads/master
c: 03f46de
h: refs/heads/master
i:
  124513: f3a41ed
  124511: c4ad660
v: v3
  • Loading branch information
Erik Andrén authored and Mauro Carvalho Chehab committed Dec 30, 2008
1 parent c8e4688 commit 49728da
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 2 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: 1b0b27b87fcae1cfbfa74b544bcf452797be7af1
refs/heads/master: 03f46de925b87b26fcdf611b8fda182002627bd1
13 changes: 13 additions & 0 deletions trunk/drivers/media/video/gspca/m5602/m5602_ov9650.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,19 @@ int ov9650_start(struct sd *sd)
}
break;

case 352:
PDEBUG(D_V4L2, "Configuring camera for CIF mode");

for (i = 0; i < ARRAY_SIZE(CIF_ov9650) && !err; i++) {
u8 data = CIF_ov9650[i][2];
if (CIF_ov9650[i][0] == SENSOR)
err = m5602_write_sensor(sd,
CIF_ov9650[i][1], &data, 1);
else
err = m5602_write_bridge(sd, CIF_ov9650[i][1], data);
}
break;

case 320:
PDEBUG(D_V4L2, "Configuring camera for QVGA mode");

Expand Down
39 changes: 38 additions & 1 deletion trunk/drivers/media/video/gspca/m5602/m5602_ov9650.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@

#define OV9650_REGISTER_RESET (1 << 7)
#define OV9650_VGA_SELECT (1 << 6)
#define OV9650_CIF_SELECT (1 << 5)
#define OV9650_QVGA_SELECT (1 << 4)
#define OV9650_RGB_SELECT (1 << 2)
#define OV9650_RAW_RGB_SELECT (1 << 0)
Expand Down Expand Up @@ -258,7 +259,7 @@ static struct m5602_sensor ov9650 = {
}
},

.nmodes = 2,
.nmodes = 3,
.modes = {
{
320,
Expand All @@ -270,6 +271,16 @@ static struct m5602_sensor ov9650 = {
.bytesperline = 320,
.colorspace = V4L2_COLORSPACE_SRGB,
.priv = 0
}, {
352,
288,
V4L2_PIX_FMT_SBGGR8,
V4L2_FIELD_NONE,
.sizeimage =
352 * 288,
.bytesperline = 352,
.colorspace = V4L2_COLORSPACE_SRGB,
.priv = 0
}, {
640,
480,
Expand Down Expand Up @@ -469,6 +480,32 @@ static const unsigned char VGA_ov9650[][3] =
{BRIDGE, M5602_XB_HSYNC_PARA, 0xe2}
};

static const unsigned char CIF_ov9650[][3] =
{
{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},

/* Moves the view window in a vertical orientation */
{BRIDGE, M5602_XB_VSYNC_PARA, 0x00},
{BRIDGE, M5602_XB_VSYNC_PARA, 0x09},
{BRIDGE, M5602_XB_VSYNC_PARA, 0x00},
{BRIDGE, M5602_XB_VSYNC_PARA, 0x01},
{BRIDGE, M5602_XB_VSYNC_PARA, 0x20}, /* 288 */
{BRIDGE, M5602_XB_VSYNC_PARA, 0x00},
{BRIDGE, M5602_XB_VSYNC_PARA, 0x00},
{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}
};

static const unsigned char QVGA_ov9650[][3] =
{
{SENSOR, OV9650_COM7, OV9650_QVGA_SELECT |
Expand Down

0 comments on commit 49728da

Please sign in to comment.