Set the dcsub value for the OV3640 sensor.
Subsystems (4)
PATCH 1/1 Set the dcsub value for the OV3640 sensor.
From: Dominic Curran <[email protected]>
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 <[email protected]>
--- 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(+)
arch/arm/mach-omap2/board-3430sdp.c +1 -0
@@ -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,
arch/arm/mach-omap2/board-ldp.c +1 -0
@@ -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,
drivers/media/video/ov3640.h +2 -0
@@ -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