summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2008-12-18 16:45:33 +0100
committerGuennadi Liakhovetski <g.liakhovetski@gmx.de>2008-12-18 16:45:33 +0100
commita9e35d7bb7815127898ada251d5f834389d1aec9 (patch)
tree4fc0a9481d313c42ba0b3b3e697cfc6f20630cc1 /linux/drivers
parent7efe1bcfe7af1611109106fb9bbf033eaa56b00b (diff)
downloadmediapointer-dvb-s2-a9e35d7bb7815127898ada251d5f834389d1aec9.tar.gz
mediapointer-dvb-s2-a9e35d7bb7815127898ada251d5f834389d1aec9.tar.bz2
sh_mobile_ceu: add NV16 and NV61 support
From: Magnus Damm <damm@igel.co.jp> This patch adds NV16/NV61 support to the sh_mobile_ceu driver. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> --- drivers/media/video/sh_mobile_ceu_camera.c | 22 ++++++++++++++++++++-- 1 files changed, 20 insertions(+), 2 deletions(-)
Diffstat (limited to 'linux/drivers')
-rw-r--r--linux/drivers/media/video/sh_mobile_ceu_camera.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/linux/drivers/media/video/sh_mobile_ceu_camera.c b/linux/drivers/media/video/sh_mobile_ceu_camera.c
index 5e7f7c381..cbb5df048 100644
--- a/linux/drivers/media/video/sh_mobile_ceu_camera.c
+++ b/linux/drivers/media/video/sh_mobile_ceu_camera.c
@@ -178,6 +178,8 @@ static void sh_mobile_ceu_capture(struct sh_mobile_ceu_dev *pcdev)
switch (icd->current_fmt->fourcc) {
case V4L2_PIX_FMT_NV12:
case V4L2_PIX_FMT_NV21:
+ case V4L2_PIX_FMT_NV16:
+ case V4L2_PIX_FMT_NV61:
phys_addr += (icd->width * icd->height);
ceu_write(pcdev, CDACR, phys_addr);
}
@@ -408,6 +410,9 @@ static int sh_mobile_ceu_set_bus_param(struct soc_camera_device *icd,
case V4L2_PIX_FMT_NV12:
case V4L2_PIX_FMT_NV21:
yuv_lineskip = 1; /* skip for NV12/21, no skip for NV16/61 */
+ /* fall-through */
+ case V4L2_PIX_FMT_NV16:
+ case V4L2_PIX_FMT_NV61:
yuv_mode = 1;
switch (pcdev->camera_fmt->fourcc) {
case V4L2_PIX_FMT_UYVY:
@@ -427,8 +432,9 @@ static int sh_mobile_ceu_set_bus_param(struct soc_camera_device *icd,
}
}
- if (icd->current_fmt->fourcc == V4L2_PIX_FMT_NV21)
- value ^= 0x00000100; /* swap U, V to change from NV12->NV21 */
+ if ((icd->current_fmt->fourcc == V4L2_PIX_FMT_NV21) ||
+ (icd->current_fmt->fourcc == V4L2_PIX_FMT_NV61))
+ value ^= 0x00000100; /* swap U, V to change from NV1x->NVx1 */
value |= (common_flags & SOCAM_VSYNC_ACTIVE_LOW) ? (1 << 1) : 0;
value |= (common_flags & SOCAM_HSYNC_ACTIVE_LOW) ? (1 << 0) : 0;
@@ -510,6 +516,18 @@ static const struct soc_camera_data_format sh_mobile_ceu_formats[] = {
.fourcc = V4L2_PIX_FMT_NV21,
.colorspace = V4L2_COLORSPACE_JPEG,
},
+ {
+ .name = "NV16",
+ .depth = 16,
+ .fourcc = V4L2_PIX_FMT_NV16,
+ .colorspace = V4L2_COLORSPACE_JPEG,
+ },
+ {
+ .name = "NV61",
+ .depth = 16,
+ .fourcc = V4L2_PIX_FMT_NV61,
+ .colorspace = V4L2_COLORSPACE_JPEG,
+ },
};
static int sh_mobile_ceu_get_formats(struct soc_camera_device *icd, int idx,