summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
authorErik Andr?n <erik.andren@gmail.com>2009-01-20 08:16:28 +0100
committerErik Andr?n <erik.andren@gmail.com>2009-01-20 08:16:28 +0100
commit85f3f08688a8e7c02d6646531af94875452cdb76 (patch)
treea21184406c436f4fe4e159120e503921c2cfa64a /linux/drivers/media/video
parent9ae69affd3d0f322a1aeb125b84858d358386160 (diff)
downloadmediapointer-dvb-s2-85f3f08688a8e7c02d6646531af94875452cdb76.tar.gz
mediapointer-dvb-s2-85f3f08688a8e7c02d6646531af94875452cdb76.tar.bz2
gspca - m5602-mt9m111: Add experimental QVGA support
From: Erik Andr?n <erik.andren@gmail.com> Priority: normal Signed-off-by: Erik Andr?n <erik.andren@gmail.com>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/gspca/m5602/m5602_mt9m111.c19
-rw-r--r--linux/drivers/media/video/gspca/m5602/m5602_mt9m111.h2
2 files changed, 21 insertions, 0 deletions
diff --git a/linux/drivers/media/video/gspca/m5602/m5602_mt9m111.c b/linux/drivers/media/video/gspca/m5602/m5602_mt9m111.c
index e7399f3d1..54ccc7391 100644
--- a/linux/drivers/media/video/gspca/m5602/m5602_mt9m111.c
+++ b/linux/drivers/media/video/gspca/m5602/m5602_mt9m111.c
@@ -37,6 +37,15 @@ static int mt9m111_set_red_balance(struct gspca_dev *gspca_dev, __s32 val);
static struct v4l2_pix_format mt9m111_modes[] = {
{
+ 320,
+ 240,
+ V4L2_PIX_FMT_SBGGR8,
+ V4L2_FIELD_NONE,
+ .sizeimage = 320 * 240,
+ .bytesperline = 320,
+ .colorspace = V4L2_COLORSPACE_SRGB,
+ .priv = 0
+ }, {
640,
480,
V4L2_PIX_FMT_SBGGR8,
@@ -340,6 +349,16 @@ int mt9m111_start(struct sd *sd)
err = m5602_write_sensor(sd, MT9M111_SC_R_MODE_CONTEXT_B, data, 2);
break;
+
+ case 320:
+ PDEBUG(D_V4L2, "Configuring camera for QVGA mode");
+ data[0] = MT9M111_RMB_OVER_SIZED;
+ data[1] = MT9M111_RMB_ROW_SKIP_4X |
+ MT9M111_RMB_COLUMN_SKIP_4X |
+ (sensor_settings[VFLIP_IDX] << 0) |
+ (sensor_settings[HFLIP_IDX] << 1);
+ err = m5602_write_sensor(sd, MT9M111_SC_R_MODE_CONTEXT_B, data, 2);
+ break;
}
return err;
}
diff --git a/linux/drivers/media/video/gspca/m5602/m5602_mt9m111.h b/linux/drivers/media/video/gspca/m5602/m5602_mt9m111.h
index 668422676..716aba523 100644
--- a/linux/drivers/media/video/gspca/m5602/m5602_mt9m111.h
+++ b/linux/drivers/media/video/gspca/m5602/m5602_mt9m111.h
@@ -85,6 +85,8 @@
#define MT9M111_RMB_MIRROR_COLS (1 << 1)
#define MT9M111_RMB_ROW_SKIP_2X (1 << 2)
#define MT9M111_RMB_COLUMN_SKIP_2X (1 << 3)
+#define MT9M111_RMB_ROW_SKIP_4X (1 << 4)
+#define MT9M111_RMB_COLUMN_SKIP_4X (1 << 5)
#define MT9M111_COLOR_MATRIX_BYPASS (1 << 4)
#define MT9M111_SEL_CONTEXT_B (1 << 3)