aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ov9640.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <lyakh@axis700.grange>2010-07-22 15:52:51 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-08-02 15:43:36 -0400
commitace6e9799f585994c92ac3c0696bc336e50077e6 (patch)
treeb271f7c965f66d8180109ca223b129a868829001 /drivers/media/video/ov9640.c
parent0f9313ad068af4156109661fb8e94ee7fcb79001 (diff)
V4L/DVB: mediabus: fix ambiguous pixel code names
Endianness notation is meaningless for 8 bit YUYV codes. Switch pixel code names to explicitly state the order of colour components in the data stream. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/ov9640.c')
-rw-r--r--drivers/media/video/ov9640.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/media/video/ov9640.c b/drivers/media/video/ov9640.c
index 7ce9e05b4781..40cdfab74ccc 100644
--- a/drivers/media/video/ov9640.c
+++ b/drivers/media/video/ov9640.c
@@ -155,7 +155,7 @@ static const struct ov9640_reg ov9640_regs_rgb[] = {
155}; 155};
156 156
157static enum v4l2_mbus_pixelcode ov9640_codes[] = { 157static enum v4l2_mbus_pixelcode ov9640_codes[] = {
158 V4L2_MBUS_FMT_YUYV8_2X8_BE, 158 V4L2_MBUS_FMT_UYVY8_2X8,
159 V4L2_MBUS_FMT_RGB555_2X8_PADHI_LE, 159 V4L2_MBUS_FMT_RGB555_2X8_PADHI_LE,
160 V4L2_MBUS_FMT_RGB565_2X8_LE, 160 V4L2_MBUS_FMT_RGB565_2X8_LE,
161}; 161};
@@ -430,7 +430,7 @@ static void ov9640_alter_regs(enum v4l2_mbus_pixelcode code,
430{ 430{
431 switch (code) { 431 switch (code) {
432 default: 432 default:
433 case V4L2_MBUS_FMT_YUYV8_2X8_BE: 433 case V4L2_MBUS_FMT_UYVY8_2X8:
434 alt->com12 = OV9640_COM12_YUV_AVG; 434 alt->com12 = OV9640_COM12_YUV_AVG;
435 alt->com13 = OV9640_COM13_Y_DELAY_EN | 435 alt->com13 = OV9640_COM13_Y_DELAY_EN |
436 OV9640_COM13_YUV_DLY(0x01); 436 OV9640_COM13_YUV_DLY(0x01);
@@ -493,7 +493,7 @@ static int ov9640_write_regs(struct i2c_client *client, u32 width,
493 } 493 }
494 494
495 /* select color matrix configuration for given color encoding */ 495 /* select color matrix configuration for given color encoding */
496 if (code == V4L2_MBUS_FMT_YUYV8_2X8_BE) { 496 if (code == V4L2_MBUS_FMT_UYVY8_2X8) {
497 matrix_regs = ov9640_regs_yuv; 497 matrix_regs = ov9640_regs_yuv;
498 matrix_regs_len = ARRAY_SIZE(ov9640_regs_yuv); 498 matrix_regs_len = ARRAY_SIZE(ov9640_regs_yuv);
499 } else { 499 } else {
@@ -579,8 +579,8 @@ static int ov9640_s_fmt(struct v4l2_subdev *sd,
579 cspace = V4L2_COLORSPACE_SRGB; 579 cspace = V4L2_COLORSPACE_SRGB;
580 break; 580 break;
581 default: 581 default:
582 code = V4L2_MBUS_FMT_YUYV8_2X8_BE; 582 code = V4L2_MBUS_FMT_UYVY8_2X8;
583 case V4L2_MBUS_FMT_YUYV8_2X8_BE: 583 case V4L2_MBUS_FMT_UYVY8_2X8:
584 cspace = V4L2_COLORSPACE_JPEG; 584 cspace = V4L2_COLORSPACE_JPEG;
585 } 585 }
586 586
@@ -606,8 +606,8 @@ static int ov9640_try_fmt(struct v4l2_subdev *sd,
606 mf->colorspace = V4L2_COLORSPACE_SRGB; 606 mf->colorspace = V4L2_COLORSPACE_SRGB;
607 break; 607 break;
608 default: 608 default:
609 mf->code = V4L2_MBUS_FMT_YUYV8_2X8_BE; 609 mf->code = V4L2_MBUS_FMT_UYVY8_2X8;
610 case V4L2_MBUS_FMT_YUYV8_2X8_BE: 610 case V4L2_MBUS_FMT_UYVY8_2X8:
611 mf->colorspace = V4L2_COLORSPACE_JPEG; 611 mf->colorspace = V4L2_COLORSPACE_JPEG;
612 } 612 }
613 613