]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
[media] ov2640: add information about DSP register 0xc7
authorFrank Schaefer <fschaefer.oss@googlemail.com>
Sun, 16 Apr 2017 17:35:42 +0000 (14:35 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 19 Apr 2017 11:55:07 +0000 (08:55 -0300)
According to ov2640 software application notes, there are two Automatic
White Balance (AWB) modes, which are selected by DSP register 0xc7:

1) Simple AWB: assumes the average color is gray
   + independent from lens
   - doesn't work well if captured area contains unbalanced colors
     (e.g. large blue background)

2) Advanced AWB: uses color temperature information
   + more accurate, works with all image contents
   - lens specific, requires calibration

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/i2c/ov2640.c

index 33c849cb00306a64527dfc237334d6572a839c88..e207d1dd003c515b5024922870077753985b1c97 100644 (file)
 #define   CTRL1_AWB_GAIN     0x04
 #define   CTRL1_LENC         0x02
 #define   CTRL1_PRE          0x01
+/*      REG 0xC7 (unknown name): affects Auto White Balance (AWB)
+ *       AWB_OFF            0x40
+ *       AWB_SIMPLE         0x10
+ *       AWB_ON             0x00       (Advanced AWB ?) */
 #define R_DVP_SP    0xD3 /* DVP output speed control */
 #define   R_DVP_SP_AUTO_MODE 0x80
 #define   R_DVP_SP_DVP_MASK  0x3F /* DVP PCLK = sysclk (48)/[6:0] (YUV0);
@@ -449,7 +453,7 @@ static const struct regval_list ov2640_init_regs[] = {
        { 0xc5,   0x11 },
        { 0xc6,   0x51 },
        { 0xbf,   0x80 },
-       { 0xc7,   0x10 },
+       { 0xc7,   0x10 },       /* simple AWB */
        { 0xb6,   0x66 },
        { 0xb8,   0xA5 },
        { 0xb7,   0x64 },