[PATCH v2 2/2] sh_mobile_ceu: Add field signal operation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



sh_mobile_ceu can support "field signal" from external module.
To support this operation, SH_CEU_FLAG_USE_FLDID_{HIGH, LOW}
are added to header.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@xxxxxxxxxxx>
---
v1 -> v2
o field name fix

 drivers/media/video/sh_mobile_ceu_camera.c |    7 +++++++
 include/media/sh_mobile_ceu.h              |    2 ++
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/sh_mobile_ceu_camera.c b/drivers/media/video/sh_mobile_ceu_camera.c
index aa20745..1f746e1 100644
--- a/drivers/media/video/sh_mobile_ceu_camera.c
+++ b/drivers/media/video/sh_mobile_ceu_camera.c
@@ -118,6 +118,12 @@ static unsigned long make_bus_param(struct sh_mobile_ceu_dev *pcdev)
 	if (pcdev->pdata->flags & SH_CEU_FLAG_USE_16BIT_BUS)
 		flags |= SOCAM_DATAWIDTH_16;
 
+	if (pcdev->pdata->flags & SH_CEU_FLAG_USE_FLDID_HIGH)
+		flags |= SOCAM_FIELD_ID_ACTIVE_HIGH;
+
+	if (pcdev->pdata->flags & SH_CEU_FLAG_USE_FLDID_LOW)
+		flags |= SOCAM_FIELD_ID_ACTIVE_LOW;
+
 	if (flags & SOCAM_DATAWIDTH_MASK)
 		return flags;
 
@@ -474,6 +480,7 @@ static int sh_mobile_ceu_set_bus_param(struct soc_camera_device *icd,
 	    icd->current_fmt->fourcc == V4L2_PIX_FMT_NV61)
 		value ^= 0x00000100; /* swap U, V to change from NV1x->NVx1 */
 
+	value |= common_flags & SOCAM_FIELD_ID_ACTIVE_LOW ? 1 << 16 : 0;
 	value |= common_flags & SOCAM_VSYNC_ACTIVE_LOW ? 1 << 1 : 0;
 	value |= common_flags & SOCAM_HSYNC_ACTIVE_LOW ? 1 << 0 : 0;
 	value |= buswidth == 16 ? 1 << 12 : 0;
diff --git a/include/media/sh_mobile_ceu.h b/include/media/sh_mobile_ceu.h
index 0f3524c..8da9437 100644
--- a/include/media/sh_mobile_ceu.h
+++ b/include/media/sh_mobile_ceu.h
@@ -3,6 +3,8 @@
 
 #define SH_CEU_FLAG_USE_8BIT_BUS	(1 << 0) /* use  8bit bus width */
 #define SH_CEU_FLAG_USE_16BIT_BUS	(1 << 1) /* use 16bit bus width */
+#define SH_CEU_FLAG_USE_FLDID_HIGH	(1 << 2) /* top field if FLD is high */
+#define SH_CEU_FLAG_USE_FLDID_LOW	(1 << 3) /* top field if FLD is low */
 
 struct sh_mobile_ceu_info {
 	unsigned long flags;
-- 
1.5.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux