[OMAPZOOM][PATCH] Set the dcsub value for the OV3640 sensor.

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

 



From: Dominic Curran <dcurran@xxxxxx>
Subject: [OMAPZOOM][PATCH] Set the dcsub value for the OV3640 sensor.

Explicitly set the dcsub (black level subtraction) value for the OV3640 sensor.
For the OV3640 sensor the manufacturer recommends a BLC of 16 (for 10-bit data).
This is a constant value that can be read from the sensors BLC9[3:0] register. 
The reg value (0x4) is for 8-bit data, so for 10-bit data this value should be 
left shifted by 2 (0x10).

Signed-off-by: Dominic Curran <dcurran@xxxxxx>
---
 arch/arm/mach-omap2/board-3430sdp.c |    1 +
 arch/arm/mach-omap2/board-ldp.c     |    1 +
 drivers/media/video/ov3640.h        |    2 ++
 3 files changed, 4 insertions(+)

Index: omapzoom04/arch/arm/mach-omap2/board-3430sdp.c
===================================================================
--- omapzoom04.orig/arch/arm/mach-omap2/board-3430sdp.c
+++ omapzoom04/arch/arm/mach-omap2/board-3430sdp.c
@@ -756,6 +756,7 @@ static struct isp_interface_config ov364
 	.prev_sph = 2,
 	.prev_slv = 1,
 	.wenlog = ISPCCDC_CFG_WENLOG_AND,
+	.dcsub = OV3640_BLACK_LEVEL_10BIT,
 	.u.csi.crc = 0x0,
 	.u.csi.mode = 0x0,
 	.u.csi.edge = 0x0,
Index: omapzoom04/arch/arm/mach-omap2/board-ldp.c
===================================================================
--- omapzoom04.orig/arch/arm/mach-omap2/board-ldp.c
+++ omapzoom04/arch/arm/mach-omap2/board-ldp.c
@@ -625,6 +625,7 @@ static struct isp_interface_config ov364
 	.prev_sph = 2,
 	.prev_slv = 1,
 	.wenlog = ISPCCDC_CFG_WENLOG_AND,
+	.dcsub = OV3640_BLACK_LEVEL_10BIT,
 	.u.csi.crc = 0x0,
 	.u.csi.mode = 0x0,
 	.u.csi.edge = 0x0,
Index: omapzoom04/drivers/media/video/ov3640.h
===================================================================
--- omapzoom04.orig/drivers/media/video/ov3640.h
+++ omapzoom04/drivers/media/video/ov3640.h
@@ -62,6 +62,8 @@
 #define OV3640_MAX_COLOR		2
 #define OV3640_COLOR_STEP		1
 
+#define OV3640_BLACK_LEVEL_10BIT	16
+
 #define SENSOR_DETECTED		1
 #define SENSOR_NOT_DETECTED	0
 
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux