* [OMAPZOOM][PATCH] Set the dcsub value for the OV3640 sensor.
@ 2009-01-07 21:24 Dominic Curran
0 siblings, 0 replies; only message in thread
From: Dominic Curran @ 2009-01-07 21:24 UTC (permalink / raw)
To: linux-omap
From: Dominic Curran <dcurran@ti.com>
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@ti.com>
---
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-01-07 21:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-07 21:24 [OMAPZOOM][PATCH] Set the dcsub value for the OV3640 sensor Dominic Curran
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox