diff options
author | Robert Jarzmik <robert.jarzmik@free.fr> | 2008-12-17 12:05:31 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-30 06:40:13 -0500 |
commit | 88f4b8990fd2b4d856f63c3689bb4df18029da06 (patch) | |
tree | 6ba208313563223dc92ff9fca4ecd1e8b38a47f0 /drivers/media/video/mt9m111.c | |
parent | 0f28b79346439ef5db130020aa07be9ca7c2ee84 (diff) |
V4L/DVB (10065): mt9m111: add all yuv format combinations.
The Micron mt9m111 offers 4 byte orders for YCbCr
output. This patchs adds all possible outputs capabilities
to the mt9m111 driver.
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/mt9m111.c')
-rw-r--r-- | drivers/media/video/mt9m111.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/drivers/media/video/mt9m111.c b/drivers/media/video/mt9m111.c index 343be9252fe7..b4a238f49600 100644 --- a/drivers/media/video/mt9m111.c +++ b/drivers/media/video/mt9m111.c | |||
@@ -128,9 +128,14 @@ | |||
128 | .colorspace = _colorspace } | 128 | .colorspace = _colorspace } |
129 | #define RGB_FMT(_name, _depth, _fourcc) \ | 129 | #define RGB_FMT(_name, _depth, _fourcc) \ |
130 | COL_FMT(_name, _depth, _fourcc, V4L2_COLORSPACE_SRGB) | 130 | COL_FMT(_name, _depth, _fourcc, V4L2_COLORSPACE_SRGB) |
131 | #define JPG_FMT(_name, _depth, _fourcc) \ | ||
132 | COL_FMT(_name, _depth, _fourcc, V4L2_COLORSPACE_JPEG) | ||
131 | 133 | ||
132 | static const struct soc_camera_data_format mt9m111_colour_formats[] = { | 134 | static const struct soc_camera_data_format mt9m111_colour_formats[] = { |
133 | COL_FMT("YCrYCb 8 bit", 8, V4L2_PIX_FMT_YUYV, V4L2_COLORSPACE_JPEG), | 135 | JPG_FMT("CbYCrY 16 bit", 16, V4L2_PIX_FMT_UYVY), |
136 | JPG_FMT("CrYCbY 16 bit", 16, V4L2_PIX_FMT_VYUY), | ||
137 | JPG_FMT("YCbYCr 16 bit", 16, V4L2_PIX_FMT_YUYV), | ||
138 | JPG_FMT("YCrYCb 16 bit", 16, V4L2_PIX_FMT_YVYU), | ||
134 | RGB_FMT("RGB 565", 16, V4L2_PIX_FMT_RGB565), | 139 | RGB_FMT("RGB 565", 16, V4L2_PIX_FMT_RGB565), |
135 | RGB_FMT("RGB 555", 16, V4L2_PIX_FMT_RGB555), | 140 | RGB_FMT("RGB 555", 16, V4L2_PIX_FMT_RGB555), |
136 | RGB_FMT("Bayer (sRGB) 10 bit", 10, V4L2_PIX_FMT_SBGGR16), | 141 | RGB_FMT("Bayer (sRGB) 10 bit", 10, V4L2_PIX_FMT_SBGGR16), |
@@ -438,7 +443,24 @@ static int mt9m111_set_pixfmt(struct soc_camera_device *icd, u32 pixfmt) | |||
438 | case V4L2_PIX_FMT_RGB565: | 443 | case V4L2_PIX_FMT_RGB565: |
439 | ret = mt9m111_setfmt_rgb565(icd); | 444 | ret = mt9m111_setfmt_rgb565(icd); |
440 | break; | 445 | break; |
446 | case V4L2_PIX_FMT_UYVY: | ||
447 | mt9m111->swap_yuv_y_chromas = 0; | ||
448 | mt9m111->swap_yuv_cb_cr = 0; | ||
449 | ret = mt9m111_setfmt_yuv(icd); | ||
450 | break; | ||
451 | case V4L2_PIX_FMT_VYUY: | ||
452 | mt9m111->swap_yuv_y_chromas = 0; | ||
453 | mt9m111->swap_yuv_cb_cr = 1; | ||
454 | ret = mt9m111_setfmt_yuv(icd); | ||
455 | break; | ||
441 | case V4L2_PIX_FMT_YUYV: | 456 | case V4L2_PIX_FMT_YUYV: |
457 | mt9m111->swap_yuv_y_chromas = 1; | ||
458 | mt9m111->swap_yuv_cb_cr = 0; | ||
459 | ret = mt9m111_setfmt_yuv(icd); | ||
460 | break; | ||
461 | case V4L2_PIX_FMT_YVYU: | ||
462 | mt9m111->swap_yuv_y_chromas = 1; | ||
463 | mt9m111->swap_yuv_cb_cr = 1; | ||
442 | ret = mt9m111_setfmt_yuv(icd); | 464 | ret = mt9m111_setfmt_yuv(icd); |
443 | break; | 465 | break; |
444 | default: | 466 | default: |