summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/stk-sensor.c
diff options
context:
space:
mode:
authorJaime Velasco Juan <jsagarribay@gmail.com>2008-01-27 12:24:58 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-02-18 11:14:57 -0300
commit1112fb68ae9c838294d38e1f209fedbc0dbf11d5 (patch)
treeb67cebd5214e32a60c9691873519c47e60bc0b61 /drivers/media/video/stk-sensor.c
parent0ed464e13e9321de9d1fff356eda58498574272e (diff)
downloadop-kernel-dev-1112fb68ae9c838294d38e1f209fedbc0dbf11d5.zip
op-kernel-dev-1112fb68ae9c838294d38e1f209fedbc0dbf11d5.tar.gz
V4L/DVB (7088): V4L: stkwebcam: Add support for YUYV format
Signed-off-by: Jaime Velasco Juan <jsagarribay@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/stk-sensor.c')
-rw-r--r--drivers/media/video/stk-sensor.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/media/video/stk-sensor.c b/drivers/media/video/stk-sensor.c
index 4a9a0b6..1a8692d 100644
--- a/drivers/media/video/stk-sensor.c
+++ b/drivers/media/video/stk-sensor.c
@@ -380,7 +380,7 @@ int stk_sensor_init(struct stk_camera *dev)
STK_ERROR("Strange error reading sensor ID\n");
return -ENODEV;
}
- if (idh != 0x7F || idl != 0xA2) {
+ if (idh != 0x7f || idl != 0xa2) {
STK_ERROR("Huh? you don't have a sensor from ovt\n");
return -ENODEV;
}
@@ -409,6 +409,19 @@ static struct regval ov_fmt_uyvy[] = {
{REG_COM15, COM15_R00FF },
{0xff, 0xff}, /* END MARKER */
};
+/* V4L2_PIX_FMT_YUYV */
+static struct regval ov_fmt_yuyv[] = {
+ {REG_TSLB, 0 },
+ { 0x4f, 0x80 }, /* "matrix coefficient 1" */
+ { 0x50, 0x80 }, /* "matrix coefficient 2" */
+ { 0x51, 0 }, /* vb */
+ { 0x52, 0x22 }, /* "matrix coefficient 4" */
+ { 0x53, 0x5e }, /* "matrix coefficient 5" */
+ { 0x54, 0x80 }, /* "matrix coefficient 6" */
+ {REG_COM13, COM13_UVSAT|COM13_CMATRIX},
+ {REG_COM15, COM15_R00FF },
+ {0xff, 0xff}, /* END MARKER */
+};
/* V4L2_PIX_FMT_RGB565X rrrrrggg gggbbbbb */
static struct regval ov_fmt_rgbr[] = {
@@ -519,6 +532,10 @@ int stk_sensor_configure(struct stk_camera *dev)
com7 |= COM7_YUV;
rv = ov_fmt_uyvy;
break;
+ case V4L2_PIX_FMT_YUYV:
+ com7 |= COM7_YUV;
+ rv = ov_fmt_yuyv;
+ break;
case V4L2_PIX_FMT_RGB565:
com7 |= COM7_RGB;
rv = ov_fmt_rgbp;
OpenPOWER on IntegriCloud