diff options
author | Erik Andr?n <erik.andren@gmail.com> | 2008-12-27 13:30:10 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-04-06 21:44:36 -0300 |
commit | e31f9dd6624de2250d32b7ca88042b0bc51b3cc5 (patch) | |
tree | b15c1126302497529d8b765d4fdce45f8a9aa86c /drivers/media | |
parent | 051781b3a8ea31f1834fddb916607a3088a28f71 (diff) | |
download | linux-3.10-e31f9dd6624de2250d32b7ca88042b0bc51b3cc5.tar.gz linux-3.10-e31f9dd6624de2250d32b7ca88042b0bc51b3cc5.tar.bz2 linux-3.10-e31f9dd6624de2250d32b7ca88042b0bc51b3cc5.zip |
V4L/DVB (11406): gspca - m5602-ov9650: Add QCIF resolution support
Adds QCIF support for the ov9650 sensor
Signed-off-by: Erik Andr?n <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_ov9650.c | 14 | ||||
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_ov9650.h | 33 |
2 files changed, 46 insertions, 1 deletions
diff --git a/drivers/media/video/gspca/m5602/m5602_ov9650.c b/drivers/media/video/gspca/m5602/m5602_ov9650.c index 81e5d1d3bdb..a50432c6269 100644 --- a/drivers/media/video/gspca/m5602/m5602_ov9650.c +++ b/drivers/media/video/gspca/m5602/m5602_ov9650.c @@ -194,6 +194,20 @@ int ov9650_start(struct sd *sd) err = m5602_write_bridge(sd, QVGA_ov9650[i][1], data); } break; + + case 176: + PDEBUG(D_V4L2, "Configuring camera for QCIF mode"); + + for (i = 0; i < ARRAY_SIZE(QCIF_ov9650) && !err; i++) { + u8 data = QCIF_ov9650[i][2]; + if (QCIF_ov9650[i][0] == SENSOR) + err = m5602_write_sensor(sd, + QCIF_ov9650[i][1], &data, 1); + else + err = m5602_write_bridge(sd, QCIF_ov9650[i][1], data); + } + break; + } return err; } diff --git a/drivers/media/video/gspca/m5602/m5602_ov9650.h b/drivers/media/video/gspca/m5602/m5602_ov9650.h index f4b33b8e8da..92536da9db6 100644 --- a/drivers/media/video/gspca/m5602/m5602_ov9650.h +++ b/drivers/media/video/gspca/m5602/m5602_ov9650.h @@ -96,6 +96,7 @@ #define OV9650_VGA_SELECT (1 << 6) #define OV9650_CIF_SELECT (1 << 5) #define OV9650_QVGA_SELECT (1 << 4) +#define OV9650_QCIF_SELECT (1 << 3) #define OV9650_RGB_SELECT (1 << 2) #define OV9650_RAW_RGB_SELECT (1 << 0) @@ -262,9 +263,19 @@ static struct m5602_sensor ov9650 = { } }, - .nmodes = 3, + .nmodes = 4, .modes = { { + 176, + 144, + V4L2_PIX_FMT_SBGGR8, + V4L2_FIELD_NONE, + .sizeimage = + 176 * 144, + .bytesperline = 176, + .colorspace = V4L2_COLORSPACE_SRGB, + .priv = 0 + }, { 320, 240, V4L2_PIX_FMT_SBGGR8, @@ -530,4 +541,24 @@ static const unsigned char QVGA_ov9650[][3] = OV9650_RAW_RGB_SELECT}, }; +static const unsigned char QCIF_ov9650[][3] = +{ + /* 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, 0x00}, + {BRIDGE, M5602_XB_VSYNC_PARA, 0x90}, /* 144 */ + {BRIDGE, M5602_XB_VSYNC_PARA, 0x00}, + {BRIDGE, M5602_XB_VSYNC_PARA, 0x00}, + {BRIDGE, M5602_XB_HSYNC_PARA, 0x00}, + {BRIDGE, M5602_XB_HSYNC_PARA, 0x31}, /* 48 */ + {BRIDGE, M5602_XB_HSYNC_PARA, 0x00}, /* 176 + 49 */ + {BRIDGE, M5602_XB_HSYNC_PARA, 0xe1}, + + {SENSOR, OV9650_COM7, OV9650_QCIF_SELECT | + OV9650_RGB_SELECT | + OV9650_RAW_RGB_SELECT}, +}; + #endif |