diff options
author | Guennadi Liakhovetski <lyakh@axis700.grange> | 2010-07-22 15:52:51 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-08-02 15:43:36 -0400 |
commit | ace6e9799f585994c92ac3c0696bc336e50077e6 (patch) | |
tree | b271f7c965f66d8180109ca223b129a868829001 | |
parent | 0f9313ad068af4156109661fb8e94ee7fcb79001 (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>
-rw-r--r-- | arch/sh/boards/mach-ap325rxa/setup.c | 2 | ||||
-rw-r--r-- | drivers/media/video/ak881x.c | 6 | ||||
-rw-r--r-- | drivers/media/video/mt9m111.c | 16 | ||||
-rw-r--r-- | drivers/media/video/mt9t112.c | 12 | ||||
-rw-r--r-- | drivers/media/video/ov772x.c | 8 | ||||
-rw-r--r-- | drivers/media/video/ov9640.c | 14 | ||||
-rw-r--r-- | drivers/media/video/pxa_camera.c | 8 | ||||
-rw-r--r-- | drivers/media/video/rj54n1cb0c.c | 8 | ||||
-rw-r--r-- | drivers/media/video/sh_mobile_ceu_camera.c | 16 | ||||
-rw-r--r-- | drivers/media/video/sh_vou.c | 8 | ||||
-rw-r--r-- | drivers/media/video/soc_mediabus.c | 8 | ||||
-rw-r--r-- | drivers/media/video/tw9910.c | 8 | ||||
-rw-r--r-- | include/media/v4l2-mediabus.h | 8 |
13 files changed, 61 insertions, 61 deletions
diff --git a/arch/sh/boards/mach-ap325rxa/setup.c b/arch/sh/boards/mach-ap325rxa/setup.c index 3a170bd3f3d0..de375b64e410 100644 --- a/arch/sh/boards/mach-ap325rxa/setup.c +++ b/arch/sh/boards/mach-ap325rxa/setup.c | |||
@@ -316,7 +316,7 @@ static struct soc_camera_platform_info camera_info = { | |||
316 | .format_name = "UYVY", | 316 | .format_name = "UYVY", |
317 | .format_depth = 16, | 317 | .format_depth = 16, |
318 | .format = { | 318 | .format = { |
319 | .code = V4L2_MBUS_FMT_YUYV8_2X8_BE, | 319 | .code = V4L2_MBUS_FMT_UYVY8_2X8, |
320 | .colorspace = V4L2_COLORSPACE_SMPTE170M, | 320 | .colorspace = V4L2_COLORSPACE_SMPTE170M, |
321 | .field = V4L2_FIELD_NONE, | 321 | .field = V4L2_FIELD_NONE, |
322 | .width = 640, | 322 | .width = 640, |
diff --git a/drivers/media/video/ak881x.c b/drivers/media/video/ak881x.c index 1573392f74bd..b388654d48cd 100644 --- a/drivers/media/video/ak881x.c +++ b/drivers/media/video/ak881x.c | |||
@@ -126,7 +126,7 @@ static int ak881x_try_g_mbus_fmt(struct v4l2_subdev *sd, | |||
126 | v4l_bound_align_image(&mf->width, 0, 720, 2, | 126 | v4l_bound_align_image(&mf->width, 0, 720, 2, |
127 | &mf->height, 0, ak881x->lines, 1, 0); | 127 | &mf->height, 0, ak881x->lines, 1, 0); |
128 | mf->field = V4L2_FIELD_INTERLACED; | 128 | mf->field = V4L2_FIELD_INTERLACED; |
129 | mf->code = V4L2_MBUS_FMT_YUYV8_2X8_LE; | 129 | mf->code = V4L2_MBUS_FMT_YUYV8_2X8; |
130 | mf->colorspace = V4L2_COLORSPACE_SMPTE170M; | 130 | mf->colorspace = V4L2_COLORSPACE_SMPTE170M; |
131 | 131 | ||
132 | return 0; | 132 | return 0; |
@@ -136,7 +136,7 @@ static int ak881x_s_mbus_fmt(struct v4l2_subdev *sd, | |||
136 | struct v4l2_mbus_framefmt *mf) | 136 | struct v4l2_mbus_framefmt *mf) |
137 | { | 137 | { |
138 | if (mf->field != V4L2_FIELD_INTERLACED || | 138 | if (mf->field != V4L2_FIELD_INTERLACED || |
139 | mf->code != V4L2_MBUS_FMT_YUYV8_2X8_LE) | 139 | mf->code != V4L2_MBUS_FMT_YUYV8_2X8) |
140 | return -EINVAL; | 140 | return -EINVAL; |
141 | 141 | ||
142 | return ak881x_try_g_mbus_fmt(sd, mf); | 142 | return ak881x_try_g_mbus_fmt(sd, mf); |
@@ -148,7 +148,7 @@ static int ak881x_enum_mbus_fmt(struct v4l2_subdev *sd, unsigned int index, | |||
148 | if (index) | 148 | if (index) |
149 | return -EINVAL; | 149 | return -EINVAL; |
150 | 150 | ||
151 | *code = V4L2_MBUS_FMT_YUYV8_2X8_LE; | 151 | *code = V4L2_MBUS_FMT_YUYV8_2X8; |
152 | return 0; | 152 | return 0; |
153 | } | 153 | } |
154 | 154 | ||
diff --git a/drivers/media/video/mt9m111.c b/drivers/media/video/mt9m111.c index fbd0fc794720..31cc3d04bcc4 100644 --- a/drivers/media/video/mt9m111.c +++ b/drivers/media/video/mt9m111.c | |||
@@ -143,10 +143,10 @@ static const struct mt9m111_datafmt *mt9m111_find_datafmt( | |||
143 | } | 143 | } |
144 | 144 | ||
145 | static const struct mt9m111_datafmt mt9m111_colour_fmts[] = { | 145 | static const struct mt9m111_datafmt mt9m111_colour_fmts[] = { |
146 | {V4L2_MBUS_FMT_YUYV8_2X8_LE, V4L2_COLORSPACE_JPEG}, | 146 | {V4L2_MBUS_FMT_YUYV8_2X8, V4L2_COLORSPACE_JPEG}, |
147 | {V4L2_MBUS_FMT_YVYU8_2X8_LE, V4L2_COLORSPACE_JPEG}, | 147 | {V4L2_MBUS_FMT_YVYU8_2X8, V4L2_COLORSPACE_JPEG}, |
148 | {V4L2_MBUS_FMT_YUYV8_2X8_BE, V4L2_COLORSPACE_JPEG}, | 148 | {V4L2_MBUS_FMT_UYVY8_2X8, V4L2_COLORSPACE_JPEG}, |
149 | {V4L2_MBUS_FMT_YVYU8_2X8_BE, V4L2_COLORSPACE_JPEG}, | 149 | {V4L2_MBUS_FMT_VYUY8_2X8, V4L2_COLORSPACE_JPEG}, |
150 | {V4L2_MBUS_FMT_RGB555_2X8_PADHI_LE, V4L2_COLORSPACE_SRGB}, | 150 | {V4L2_MBUS_FMT_RGB555_2X8_PADHI_LE, V4L2_COLORSPACE_SRGB}, |
151 | {V4L2_MBUS_FMT_RGB565_2X8_LE, V4L2_COLORSPACE_SRGB}, | 151 | {V4L2_MBUS_FMT_RGB565_2X8_LE, V4L2_COLORSPACE_SRGB}, |
152 | {V4L2_MBUS_FMT_SBGGR8_1X8, V4L2_COLORSPACE_SRGB}, | 152 | {V4L2_MBUS_FMT_SBGGR8_1X8, V4L2_COLORSPACE_SRGB}, |
@@ -505,22 +505,22 @@ static int mt9m111_set_pixfmt(struct i2c_client *client, | |||
505 | case V4L2_MBUS_FMT_RGB565_2X8_LE: | 505 | case V4L2_MBUS_FMT_RGB565_2X8_LE: |
506 | ret = mt9m111_setfmt_rgb565(client); | 506 | ret = mt9m111_setfmt_rgb565(client); |
507 | break; | 507 | break; |
508 | case V4L2_MBUS_FMT_YUYV8_2X8_BE: | 508 | case V4L2_MBUS_FMT_UYVY8_2X8: |
509 | mt9m111->swap_yuv_y_chromas = 0; | 509 | mt9m111->swap_yuv_y_chromas = 0; |
510 | mt9m111->swap_yuv_cb_cr = 0; | 510 | mt9m111->swap_yuv_cb_cr = 0; |
511 | ret = mt9m111_setfmt_yuv(client); | 511 | ret = mt9m111_setfmt_yuv(client); |
512 | break; | 512 | break; |
513 | case V4L2_MBUS_FMT_YVYU8_2X8_BE: | 513 | case V4L2_MBUS_FMT_VYUY8_2X8: |
514 | mt9m111->swap_yuv_y_chromas = 0; | 514 | mt9m111->swap_yuv_y_chromas = 0; |
515 | mt9m111->swap_yuv_cb_cr = 1; | 515 | mt9m111->swap_yuv_cb_cr = 1; |
516 | ret = mt9m111_setfmt_yuv(client); | 516 | ret = mt9m111_setfmt_yuv(client); |
517 | break; | 517 | break; |
518 | case V4L2_MBUS_FMT_YUYV8_2X8_LE: | 518 | case V4L2_MBUS_FMT_YUYV8_2X8: |
519 | mt9m111->swap_yuv_y_chromas = 1; | 519 | mt9m111->swap_yuv_y_chromas = 1; |
520 | mt9m111->swap_yuv_cb_cr = 0; | 520 | mt9m111->swap_yuv_cb_cr = 0; |
521 | ret = mt9m111_setfmt_yuv(client); | 521 | ret = mt9m111_setfmt_yuv(client); |
522 | break; | 522 | break; |
523 | case V4L2_MBUS_FMT_YVYU8_2X8_LE: | 523 | case V4L2_MBUS_FMT_YVYU8_2X8: |
524 | mt9m111->swap_yuv_y_chromas = 1; | 524 | mt9m111->swap_yuv_y_chromas = 1; |
525 | mt9m111->swap_yuv_cb_cr = 1; | 525 | mt9m111->swap_yuv_cb_cr = 1; |
526 | ret = mt9m111_setfmt_yuv(client); | 526 | ret = mt9m111_setfmt_yuv(client); |
diff --git a/drivers/media/video/mt9t112.c b/drivers/media/video/mt9t112.c index e4bf1db9a87b..8ec47e42d4d0 100644 --- a/drivers/media/video/mt9t112.c +++ b/drivers/media/video/mt9t112.c | |||
@@ -121,22 +121,22 @@ struct mt9t112_priv { | |||
121 | 121 | ||
122 | static const struct mt9t112_format mt9t112_cfmts[] = { | 122 | static const struct mt9t112_format mt9t112_cfmts[] = { |
123 | { | 123 | { |
124 | .code = V4L2_MBUS_FMT_YUYV8_2X8_BE, | 124 | .code = V4L2_MBUS_FMT_UYVY8_2X8, |
125 | .colorspace = V4L2_COLORSPACE_JPEG, | 125 | .colorspace = V4L2_COLORSPACE_JPEG, |
126 | .fmt = 1, | 126 | .fmt = 1, |
127 | .order = 0, | 127 | .order = 0, |
128 | }, { | 128 | }, { |
129 | .code = V4L2_MBUS_FMT_YVYU8_2X8_BE, | 129 | .code = V4L2_MBUS_FMT_VYUY8_2X8, |
130 | .colorspace = V4L2_COLORSPACE_JPEG, | 130 | .colorspace = V4L2_COLORSPACE_JPEG, |
131 | .fmt = 1, | 131 | .fmt = 1, |
132 | .order = 1, | 132 | .order = 1, |
133 | }, { | 133 | }, { |
134 | .code = V4L2_MBUS_FMT_YUYV8_2X8_LE, | 134 | .code = V4L2_MBUS_FMT_YUYV8_2X8, |
135 | .colorspace = V4L2_COLORSPACE_JPEG, | 135 | .colorspace = V4L2_COLORSPACE_JPEG, |
136 | .fmt = 1, | 136 | .fmt = 1, |
137 | .order = 2, | 137 | .order = 2, |
138 | }, { | 138 | }, { |
139 | .code = V4L2_MBUS_FMT_YVYU8_2X8_LE, | 139 | .code = V4L2_MBUS_FMT_YVYU8_2X8, |
140 | .colorspace = V4L2_COLORSPACE_JPEG, | 140 | .colorspace = V4L2_COLORSPACE_JPEG, |
141 | .fmt = 1, | 141 | .fmt = 1, |
142 | .order = 3, | 142 | .order = 3, |
@@ -972,7 +972,7 @@ static int mt9t112_s_crop(struct v4l2_subdev *sd, struct v4l2_crop *a) | |||
972 | struct v4l2_rect *rect = &a->c; | 972 | struct v4l2_rect *rect = &a->c; |
973 | 973 | ||
974 | return mt9t112_set_params(client, rect->width, rect->height, | 974 | return mt9t112_set_params(client, rect->width, rect->height, |
975 | V4L2_MBUS_FMT_YUYV8_2X8_BE); | 975 | V4L2_MBUS_FMT_UYVY8_2X8); |
976 | } | 976 | } |
977 | 977 | ||
978 | static int mt9t112_g_fmt(struct v4l2_subdev *sd, | 978 | static int mt9t112_g_fmt(struct v4l2_subdev *sd, |
@@ -983,7 +983,7 @@ static int mt9t112_g_fmt(struct v4l2_subdev *sd, | |||
983 | 983 | ||
984 | if (!priv->format) { | 984 | if (!priv->format) { |
985 | int ret = mt9t112_set_params(client, VGA_WIDTH, VGA_HEIGHT, | 985 | int ret = mt9t112_set_params(client, VGA_WIDTH, VGA_HEIGHT, |
986 | V4L2_MBUS_FMT_YUYV8_2X8_BE); | 986 | V4L2_MBUS_FMT_UYVY8_2X8); |
987 | if (ret < 0) | 987 | if (ret < 0) |
988 | return ret; | 988 | return ret; |
989 | } | 989 | } |
diff --git a/drivers/media/video/ov772x.c b/drivers/media/video/ov772x.c index 34034a710214..25eb5d637eea 100644 --- a/drivers/media/video/ov772x.c +++ b/drivers/media/video/ov772x.c | |||
@@ -440,21 +440,21 @@ static const struct regval_list ov772x_vga_regs[] = { | |||
440 | */ | 440 | */ |
441 | static const struct ov772x_color_format ov772x_cfmts[] = { | 441 | static const struct ov772x_color_format ov772x_cfmts[] = { |
442 | { | 442 | { |
443 | .code = V4L2_MBUS_FMT_YUYV8_2X8_LE, | 443 | .code = V4L2_MBUS_FMT_YUYV8_2X8, |
444 | .colorspace = V4L2_COLORSPACE_JPEG, | 444 | .colorspace = V4L2_COLORSPACE_JPEG, |
445 | .dsp3 = 0x0, | 445 | .dsp3 = 0x0, |
446 | .com3 = SWAP_YUV, | 446 | .com3 = SWAP_YUV, |
447 | .com7 = OFMT_YUV, | 447 | .com7 = OFMT_YUV, |
448 | }, | 448 | }, |
449 | { | 449 | { |
450 | .code = V4L2_MBUS_FMT_YVYU8_2X8_LE, | 450 | .code = V4L2_MBUS_FMT_YVYU8_2X8, |
451 | .colorspace = V4L2_COLORSPACE_JPEG, | 451 | .colorspace = V4L2_COLORSPACE_JPEG, |
452 | .dsp3 = UV_ON, | 452 | .dsp3 = UV_ON, |
453 | .com3 = SWAP_YUV, | 453 | .com3 = SWAP_YUV, |
454 | .com7 = OFMT_YUV, | 454 | .com7 = OFMT_YUV, |
455 | }, | 455 | }, |
456 | { | 456 | { |
457 | .code = V4L2_MBUS_FMT_YUYV8_2X8_BE, | 457 | .code = V4L2_MBUS_FMT_UYVY8_2X8, |
458 | .colorspace = V4L2_COLORSPACE_JPEG, | 458 | .colorspace = V4L2_COLORSPACE_JPEG, |
459 | .dsp3 = 0x0, | 459 | .dsp3 = 0x0, |
460 | .com3 = 0x0, | 460 | .com3 = 0x0, |
@@ -960,7 +960,7 @@ static int ov772x_g_fmt(struct v4l2_subdev *sd, | |||
960 | if (!priv->win || !priv->cfmt) { | 960 | if (!priv->win || !priv->cfmt) { |
961 | u32 width = VGA_WIDTH, height = VGA_HEIGHT; | 961 | u32 width = VGA_WIDTH, height = VGA_HEIGHT; |
962 | int ret = ov772x_set_params(client, &width, &height, | 962 | int ret = ov772x_set_params(client, &width, &height, |
963 | V4L2_MBUS_FMT_YUYV8_2X8_LE); | 963 | V4L2_MBUS_FMT_YUYV8_2X8); |
964 | if (ret < 0) | 964 | if (ret < 0) |
965 | return ret; | 965 | return ret; |
966 | } | 966 | } |
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 | ||
157 | static enum v4l2_mbus_pixelcode ov9640_codes[] = { | 157 | static 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 | ||
diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c index 5835acf7fa7a..9de7d59916bd 100644 --- a/drivers/media/video/pxa_camera.c +++ b/drivers/media/video/pxa_camera.c | |||
@@ -1284,7 +1284,7 @@ static int pxa_camera_get_formats(struct soc_camera_device *icd, unsigned int id | |||
1284 | } | 1284 | } |
1285 | 1285 | ||
1286 | switch (code) { | 1286 | switch (code) { |
1287 | case V4L2_MBUS_FMT_YUYV8_2X8_BE: | 1287 | case V4L2_MBUS_FMT_UYVY8_2X8: |
1288 | formats++; | 1288 | formats++; |
1289 | if (xlate) { | 1289 | if (xlate) { |
1290 | xlate->host_fmt = &pxa_camera_formats[0]; | 1290 | xlate->host_fmt = &pxa_camera_formats[0]; |
@@ -1293,9 +1293,9 @@ static int pxa_camera_get_formats(struct soc_camera_device *icd, unsigned int id | |||
1293 | dev_dbg(dev, "Providing format %s using code %d\n", | 1293 | dev_dbg(dev, "Providing format %s using code %d\n", |
1294 | pxa_camera_formats[0].name, code); | 1294 | pxa_camera_formats[0].name, code); |
1295 | } | 1295 | } |
1296 | case V4L2_MBUS_FMT_YVYU8_2X8_BE: | 1296 | case V4L2_MBUS_FMT_VYUY8_2X8: |
1297 | case V4L2_MBUS_FMT_YUYV8_2X8_LE: | 1297 | case V4L2_MBUS_FMT_YUYV8_2X8: |
1298 | case V4L2_MBUS_FMT_YVYU8_2X8_LE: | 1298 | case V4L2_MBUS_FMT_YVYU8_2X8: |
1299 | case V4L2_MBUS_FMT_RGB565_2X8_LE: | 1299 | case V4L2_MBUS_FMT_RGB565_2X8_LE: |
1300 | case V4L2_MBUS_FMT_RGB555_2X8_PADHI_LE: | 1300 | case V4L2_MBUS_FMT_RGB555_2X8_PADHI_LE: |
1301 | if (xlate) | 1301 | if (xlate) |
diff --git a/drivers/media/video/rj54n1cb0c.c b/drivers/media/video/rj54n1cb0c.c index 47fd207ba3b1..d319aef7527e 100644 --- a/drivers/media/video/rj54n1cb0c.c +++ b/drivers/media/video/rj54n1cb0c.c | |||
@@ -127,8 +127,8 @@ static const struct rj54n1_datafmt *rj54n1_find_datafmt( | |||
127 | } | 127 | } |
128 | 128 | ||
129 | static const struct rj54n1_datafmt rj54n1_colour_fmts[] = { | 129 | static const struct rj54n1_datafmt rj54n1_colour_fmts[] = { |
130 | {V4L2_MBUS_FMT_YUYV8_2X8_LE, V4L2_COLORSPACE_JPEG}, | 130 | {V4L2_MBUS_FMT_YUYV8_2X8, V4L2_COLORSPACE_JPEG}, |
131 | {V4L2_MBUS_FMT_YVYU8_2X8_LE, V4L2_COLORSPACE_JPEG}, | 131 | {V4L2_MBUS_FMT_YVYU8_2X8, V4L2_COLORSPACE_JPEG}, |
132 | {V4L2_MBUS_FMT_RGB565_2X8_LE, V4L2_COLORSPACE_SRGB}, | 132 | {V4L2_MBUS_FMT_RGB565_2X8_LE, V4L2_COLORSPACE_SRGB}, |
133 | {V4L2_MBUS_FMT_RGB565_2X8_BE, V4L2_COLORSPACE_SRGB}, | 133 | {V4L2_MBUS_FMT_RGB565_2X8_BE, V4L2_COLORSPACE_SRGB}, |
134 | {V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_LE, V4L2_COLORSPACE_SRGB}, | 134 | {V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_LE, V4L2_COLORSPACE_SRGB}, |
@@ -1046,12 +1046,12 @@ static int rj54n1_s_fmt(struct v4l2_subdev *sd, | |||
1046 | 1046 | ||
1047 | /* RA_SEL_UL is only relevant for raw modes, ignored otherwise. */ | 1047 | /* RA_SEL_UL is only relevant for raw modes, ignored otherwise. */ |
1048 | switch (mf->code) { | 1048 | switch (mf->code) { |
1049 | case V4L2_MBUS_FMT_YUYV8_2X8_LE: | 1049 | case V4L2_MBUS_FMT_YUYV8_2X8: |
1050 | ret = reg_write(client, RJ54N1_OUT_SEL, 0); | 1050 | ret = reg_write(client, RJ54N1_OUT_SEL, 0); |
1051 | if (!ret) | 1051 | if (!ret) |
1052 | ret = reg_set(client, RJ54N1_BYTE_SWAP, 8, 8); | 1052 | ret = reg_set(client, RJ54N1_BYTE_SWAP, 8, 8); |
1053 | break; | 1053 | break; |
1054 | case V4L2_MBUS_FMT_YVYU8_2X8_LE: | 1054 | case V4L2_MBUS_FMT_YVYU8_2X8: |
1055 | ret = reg_write(client, RJ54N1_OUT_SEL, 0); | 1055 | ret = reg_write(client, RJ54N1_OUT_SEL, 0); |
1056 | if (!ret) | 1056 | if (!ret) |
1057 | ret = reg_set(client, RJ54N1_BYTE_SWAP, 0, 8); | 1057 | ret = reg_set(client, RJ54N1_BYTE_SWAP, 0, 8); |
diff --git a/drivers/media/video/sh_mobile_ceu_camera.c b/drivers/media/video/sh_mobile_ceu_camera.c index d40b1e08bcec..86869dbcbab0 100644 --- a/drivers/media/video/sh_mobile_ceu_camera.c +++ b/drivers/media/video/sh_mobile_ceu_camera.c | |||
@@ -743,16 +743,16 @@ static int sh_mobile_ceu_set_bus_param(struct soc_camera_device *icd, | |||
743 | case V4L2_PIX_FMT_NV16: | 743 | case V4L2_PIX_FMT_NV16: |
744 | case V4L2_PIX_FMT_NV61: | 744 | case V4L2_PIX_FMT_NV61: |
745 | switch (cam->code) { | 745 | switch (cam->code) { |
746 | case V4L2_MBUS_FMT_YUYV8_2X8_BE: | 746 | case V4L2_MBUS_FMT_UYVY8_2X8: |
747 | value = 0x00000000; /* Cb0, Y0, Cr0, Y1 */ | 747 | value = 0x00000000; /* Cb0, Y0, Cr0, Y1 */ |
748 | break; | 748 | break; |
749 | case V4L2_MBUS_FMT_YVYU8_2X8_BE: | 749 | case V4L2_MBUS_FMT_VYUY8_2X8: |
750 | value = 0x00000100; /* Cr0, Y0, Cb0, Y1 */ | 750 | value = 0x00000100; /* Cr0, Y0, Cb0, Y1 */ |
751 | break; | 751 | break; |
752 | case V4L2_MBUS_FMT_YUYV8_2X8_LE: | 752 | case V4L2_MBUS_FMT_YUYV8_2X8: |
753 | value = 0x00000200; /* Y0, Cb0, Y1, Cr0 */ | 753 | value = 0x00000200; /* Y0, Cb0, Y1, Cr0 */ |
754 | break; | 754 | break; |
755 | case V4L2_MBUS_FMT_YVYU8_2X8_LE: | 755 | case V4L2_MBUS_FMT_YVYU8_2X8: |
756 | value = 0x00000300; /* Y0, Cr0, Y1, Cb0 */ | 756 | value = 0x00000300; /* Y0, Cr0, Y1, Cb0 */ |
757 | break; | 757 | break; |
758 | default: | 758 | default: |
@@ -965,10 +965,10 @@ static int sh_mobile_ceu_get_formats(struct soc_camera_device *icd, unsigned int | |||
965 | cam->extra_fmt = NULL; | 965 | cam->extra_fmt = NULL; |
966 | 966 | ||
967 | switch (code) { | 967 | switch (code) { |
968 | case V4L2_MBUS_FMT_YUYV8_2X8_BE: | 968 | case V4L2_MBUS_FMT_UYVY8_2X8: |
969 | case V4L2_MBUS_FMT_YVYU8_2X8_BE: | 969 | case V4L2_MBUS_FMT_VYUY8_2X8: |
970 | case V4L2_MBUS_FMT_YUYV8_2X8_LE: | 970 | case V4L2_MBUS_FMT_YUYV8_2X8: |
971 | case V4L2_MBUS_FMT_YVYU8_2X8_LE: | 971 | case V4L2_MBUS_FMT_YVYU8_2X8: |
972 | if (cam->extra_fmt) | 972 | if (cam->extra_fmt) |
973 | break; | 973 | break; |
974 | 974 | ||
diff --git a/drivers/media/video/sh_vou.c b/drivers/media/video/sh_vou.c index 5f73a017961c..3869d515febd 100644 --- a/drivers/media/video/sh_vou.c +++ b/drivers/media/video/sh_vou.c | |||
@@ -678,7 +678,7 @@ static int sh_vou_s_fmt_vid_out(struct file *file, void *priv, | |||
678 | struct sh_vou_geometry geo; | 678 | struct sh_vou_geometry geo; |
679 | struct v4l2_mbus_framefmt mbfmt = { | 679 | struct v4l2_mbus_framefmt mbfmt = { |
680 | /* Revisit: is this the correct code? */ | 680 | /* Revisit: is this the correct code? */ |
681 | .code = V4L2_MBUS_FMT_YUYV8_2X8_LE, | 681 | .code = V4L2_MBUS_FMT_YUYV8_2X8, |
682 | .field = V4L2_FIELD_INTERLACED, | 682 | .field = V4L2_FIELD_INTERLACED, |
683 | .colorspace = V4L2_COLORSPACE_SMPTE170M, | 683 | .colorspace = V4L2_COLORSPACE_SMPTE170M, |
684 | }; | 684 | }; |
@@ -726,7 +726,7 @@ static int sh_vou_s_fmt_vid_out(struct file *file, void *priv, | |||
726 | /* Sanity checks */ | 726 | /* Sanity checks */ |
727 | if ((unsigned)mbfmt.width > VOU_MAX_IMAGE_WIDTH || | 727 | if ((unsigned)mbfmt.width > VOU_MAX_IMAGE_WIDTH || |
728 | (unsigned)mbfmt.height > VOU_MAX_IMAGE_HEIGHT || | 728 | (unsigned)mbfmt.height > VOU_MAX_IMAGE_HEIGHT || |
729 | mbfmt.code != V4L2_MBUS_FMT_YUYV8_2X8_LE) | 729 | mbfmt.code != V4L2_MBUS_FMT_YUYV8_2X8) |
730 | return -EIO; | 730 | return -EIO; |
731 | 731 | ||
732 | if (mbfmt.width != geo.output.width || | 732 | if (mbfmt.width != geo.output.width || |
@@ -937,7 +937,7 @@ static int sh_vou_s_crop(struct file *file, void *fh, struct v4l2_crop *a) | |||
937 | struct sh_vou_geometry geo; | 937 | struct sh_vou_geometry geo; |
938 | struct v4l2_mbus_framefmt mbfmt = { | 938 | struct v4l2_mbus_framefmt mbfmt = { |
939 | /* Revisit: is this the correct code? */ | 939 | /* Revisit: is this the correct code? */ |
940 | .code = V4L2_MBUS_FMT_YUYV8_2X8_LE, | 940 | .code = V4L2_MBUS_FMT_YUYV8_2X8, |
941 | .field = V4L2_FIELD_INTERLACED, | 941 | .field = V4L2_FIELD_INTERLACED, |
942 | .colorspace = V4L2_COLORSPACE_SMPTE170M, | 942 | .colorspace = V4L2_COLORSPACE_SMPTE170M, |
943 | }; | 943 | }; |
@@ -982,7 +982,7 @@ static int sh_vou_s_crop(struct file *file, void *fh, struct v4l2_crop *a) | |||
982 | /* Sanity checks */ | 982 | /* Sanity checks */ |
983 | if ((unsigned)mbfmt.width > VOU_MAX_IMAGE_WIDTH || | 983 | if ((unsigned)mbfmt.width > VOU_MAX_IMAGE_WIDTH || |
984 | (unsigned)mbfmt.height > VOU_MAX_IMAGE_HEIGHT || | 984 | (unsigned)mbfmt.height > VOU_MAX_IMAGE_HEIGHT || |
985 | mbfmt.code != V4L2_MBUS_FMT_YUYV8_2X8_LE) | 985 | mbfmt.code != V4L2_MBUS_FMT_YUYV8_2X8) |
986 | return -EIO; | 986 | return -EIO; |
987 | 987 | ||
988 | geo.output.width = mbfmt.width; | 988 | geo.output.width = mbfmt.width; |
diff --git a/drivers/media/video/soc_mediabus.c b/drivers/media/video/soc_mediabus.c index 8b63b6545e76..91391214c682 100644 --- a/drivers/media/video/soc_mediabus.c +++ b/drivers/media/video/soc_mediabus.c | |||
@@ -18,28 +18,28 @@ | |||
18 | #define MBUS_IDX(f) (V4L2_MBUS_FMT_ ## f - V4L2_MBUS_FMT_FIXED - 1) | 18 | #define MBUS_IDX(f) (V4L2_MBUS_FMT_ ## f - V4L2_MBUS_FMT_FIXED - 1) |
19 | 19 | ||
20 | static const struct soc_mbus_pixelfmt mbus_fmt[] = { | 20 | static const struct soc_mbus_pixelfmt mbus_fmt[] = { |
21 | [MBUS_IDX(YUYV8_2X8_LE)] = { | 21 | [MBUS_IDX(YUYV8_2X8)] = { |
22 | .fourcc = V4L2_PIX_FMT_YUYV, | 22 | .fourcc = V4L2_PIX_FMT_YUYV, |
23 | .name = "YUYV", | 23 | .name = "YUYV", |
24 | .bits_per_sample = 8, | 24 | .bits_per_sample = 8, |
25 | .packing = SOC_MBUS_PACKING_2X8_PADHI, | 25 | .packing = SOC_MBUS_PACKING_2X8_PADHI, |
26 | .order = SOC_MBUS_ORDER_LE, | 26 | .order = SOC_MBUS_ORDER_LE, |
27 | }, | 27 | }, |
28 | [MBUS_IDX(YVYU8_2X8_LE)] = { | 28 | [MBUS_IDX(YVYU8_2X8)] = { |
29 | .fourcc = V4L2_PIX_FMT_YVYU, | 29 | .fourcc = V4L2_PIX_FMT_YVYU, |
30 | .name = "YVYU", | 30 | .name = "YVYU", |
31 | .bits_per_sample = 8, | 31 | .bits_per_sample = 8, |
32 | .packing = SOC_MBUS_PACKING_2X8_PADHI, | 32 | .packing = SOC_MBUS_PACKING_2X8_PADHI, |
33 | .order = SOC_MBUS_ORDER_LE, | 33 | .order = SOC_MBUS_ORDER_LE, |
34 | }, | 34 | }, |
35 | [MBUS_IDX(YUYV8_2X8_BE)] = { | 35 | [MBUS_IDX(UYVY8_2X8)] = { |
36 | .fourcc = V4L2_PIX_FMT_UYVY, | 36 | .fourcc = V4L2_PIX_FMT_UYVY, |
37 | .name = "UYVY", | 37 | .name = "UYVY", |
38 | .bits_per_sample = 8, | 38 | .bits_per_sample = 8, |
39 | .packing = SOC_MBUS_PACKING_2X8_PADHI, | 39 | .packing = SOC_MBUS_PACKING_2X8_PADHI, |
40 | .order = SOC_MBUS_ORDER_LE, | 40 | .order = SOC_MBUS_ORDER_LE, |
41 | }, | 41 | }, |
42 | [MBUS_IDX(YVYU8_2X8_BE)] = { | 42 | [MBUS_IDX(VYUY8_2X8)] = { |
43 | .fourcc = V4L2_PIX_FMT_VYUY, | 43 | .fourcc = V4L2_PIX_FMT_VYUY, |
44 | .name = "VYUY", | 44 | .name = "VYUY", |
45 | .bits_per_sample = 8, | 45 | .bits_per_sample = 8, |
diff --git a/drivers/media/video/tw9910.c b/drivers/media/video/tw9910.c index 445dc93413e3..a727962781a3 100644 --- a/drivers/media/video/tw9910.c +++ b/drivers/media/video/tw9910.c | |||
@@ -768,7 +768,7 @@ static int tw9910_g_fmt(struct v4l2_subdev *sd, | |||
768 | 768 | ||
769 | mf->width = priv->scale->width; | 769 | mf->width = priv->scale->width; |
770 | mf->height = priv->scale->height; | 770 | mf->height = priv->scale->height; |
771 | mf->code = V4L2_MBUS_FMT_YUYV8_2X8_BE; | 771 | mf->code = V4L2_MBUS_FMT_UYVY8_2X8; |
772 | mf->colorspace = V4L2_COLORSPACE_JPEG; | 772 | mf->colorspace = V4L2_COLORSPACE_JPEG; |
773 | mf->field = V4L2_FIELD_INTERLACED_BT; | 773 | mf->field = V4L2_FIELD_INTERLACED_BT; |
774 | 774 | ||
@@ -797,7 +797,7 @@ static int tw9910_s_fmt(struct v4l2_subdev *sd, | |||
797 | /* | 797 | /* |
798 | * check color format | 798 | * check color format |
799 | */ | 799 | */ |
800 | if (mf->code != V4L2_MBUS_FMT_YUYV8_2X8_BE) | 800 | if (mf->code != V4L2_MBUS_FMT_UYVY8_2X8) |
801 | return -EINVAL; | 801 | return -EINVAL; |
802 | 802 | ||
803 | mf->colorspace = V4L2_COLORSPACE_JPEG; | 803 | mf->colorspace = V4L2_COLORSPACE_JPEG; |
@@ -824,7 +824,7 @@ static int tw9910_try_fmt(struct v4l2_subdev *sd, | |||
824 | return -EINVAL; | 824 | return -EINVAL; |
825 | } | 825 | } |
826 | 826 | ||
827 | mf->code = V4L2_MBUS_FMT_YUYV8_2X8_BE; | 827 | mf->code = V4L2_MBUS_FMT_UYVY8_2X8; |
828 | mf->colorspace = V4L2_COLORSPACE_JPEG; | 828 | mf->colorspace = V4L2_COLORSPACE_JPEG; |
829 | 829 | ||
830 | /* | 830 | /* |
@@ -909,7 +909,7 @@ static int tw9910_enum_fmt(struct v4l2_subdev *sd, unsigned int index, | |||
909 | if (index) | 909 | if (index) |
910 | return -EINVAL; | 910 | return -EINVAL; |
911 | 911 | ||
912 | *code = V4L2_MBUS_FMT_YUYV8_2X8_BE; | 912 | *code = V4L2_MBUS_FMT_UYVY8_2X8; |
913 | return 0; | 913 | return 0; |
914 | } | 914 | } |
915 | 915 | ||
diff --git a/include/media/v4l2-mediabus.h b/include/media/v4l2-mediabus.h index 865cda7cd611..a87096598416 100644 --- a/include/media/v4l2-mediabus.h +++ b/include/media/v4l2-mediabus.h | |||
@@ -24,10 +24,10 @@ | |||
24 | */ | 24 | */ |
25 | enum v4l2_mbus_pixelcode { | 25 | enum v4l2_mbus_pixelcode { |
26 | V4L2_MBUS_FMT_FIXED = 1, | 26 | V4L2_MBUS_FMT_FIXED = 1, |
27 | V4L2_MBUS_FMT_YUYV8_2X8_LE, | 27 | V4L2_MBUS_FMT_YUYV8_2X8, |
28 | V4L2_MBUS_FMT_YVYU8_2X8_LE, | 28 | V4L2_MBUS_FMT_YVYU8_2X8, |
29 | V4L2_MBUS_FMT_YUYV8_2X8_BE, | 29 | V4L2_MBUS_FMT_UYVY8_2X8, |
30 | V4L2_MBUS_FMT_YVYU8_2X8_BE, | 30 | V4L2_MBUS_FMT_VYUY8_2X8, |
31 | V4L2_MBUS_FMT_RGB555_2X8_PADHI_LE, | 31 | V4L2_MBUS_FMT_RGB555_2X8_PADHI_LE, |
32 | V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE, | 32 | V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE, |
33 | V4L2_MBUS_FMT_RGB565_2X8_LE, | 33 | V4L2_MBUS_FMT_RGB565_2X8_LE, |