===================================================================
@@ -660,6 +660,10 @@ static struct isp_interface_config mt9p0
.wenlog = ISPCCDC_CFG_WENLOG_OR,
.dcsub = 42,
.raw_fmt_in = ISPCCDC_INPUT_FMT_GR_BG,
+ .wbal.coef0 = 0x23,
+ .wbal.coef1 = 0x20,
+ .wbal.coef2 = 0x20,
+ .wbal.coef3 = 0x30,
.u.par.par_bridge = 0x0,
.u.par.par_clk_pol = 0x0,
};
@@ -783,6 +787,10 @@ static struct isp_interface_config ov364
.wenlog = ISPCCDC_CFG_WENLOG_AND,
.dcsub = OV3640_BLACK_LEVEL_10BIT,
.raw_fmt_in = ISPCCDC_INPUT_FMT_BG_GR,
+ .wbal.coef0 = 0x23,
+ .wbal.coef1 = 0x20,
+ .wbal.coef2 = 0x20,
+ .wbal.coef3 = 0x30,
.u.csi.crc = 0x0,
.u.csi.mode = 0x0,
.u.csi.edge = 0x0,
@@ -991,6 +999,10 @@ static struct isp_interface_config imx04
.wenlog = ISPCCDC_CFG_WENLOG_OR,
.dcsub = IMX046_BLACK_LEVEL_AVG,
.raw_fmt_in = ISPCCDC_INPUT_FMT_RG_GB,
+ .wbal.coef0 = 0x23,
+ .wbal.coef1 = 0x20,
+ .wbal.coef2 = 0x20,
+ .wbal.coef3 = 0x39,
.u.csi.crc = 0x0,
.u.csi.mode = 0x0,
.u.csi.edge = 0x0,
===================================================================
@@ -625,6 +625,10 @@ static struct isp_interface_config ov364
.wenlog = ISPCCDC_CFG_WENLOG_AND,
.dcsub = OV3640_BLACK_LEVEL_10BIT,
.raw_fmt_in = ISPCCDC_INPUT_FMT_BG_GR,
+ .wbal.coef0 = 0x23,
+ .wbal.coef1 = 0x20,
+ .wbal.coef2 = 0x20,
+ .wbal.coef3 = 0x30,
.u.csi.crc = 0x0,
.u.csi.mode = 0x0,
.u.csi.edge = 0x0,
===================================================================
@@ -371,6 +371,10 @@ static struct isp_interface_config imx04
.wenlog = ISPCCDC_CFG_WENLOG_OR,
.dcsub = IMX046_BLACK_LEVEL_AVG,
.raw_fmt_in = ISPCCDC_INPUT_FMT_RG_GB,
+ .wbal.coef0 = 0x23,
+ .wbal.coef1 = 0x20,
+ .wbal.coef2 = 0x20,
+ .wbal.coef3 = 0x39,
.u.csi.crc = 0x0,
.u.csi.mode = 0x0,
.u.csi.edge = 0x0,
===================================================================
@@ -952,6 +952,7 @@ int isp_configure_interface(struct isp_i
ispccdc_set_wenlog(config->wenlog);
ispccdc_set_dcsub(config->dcsub);
ispccdc_set_crop_offset(config->raw_fmt_in);
+ isppreview_set_whitebalance(&config->wbal);
return 0;
}
===================================================================
@@ -27,6 +27,8 @@
#include <media/videobuf-dma-sg.h>
#include <linux/videodev2.h>
+#include <mach/isp_user.h>
+
#include "ispmmu.h"
#define OMAP_ISP_CCDC (1 << 0)
@@ -205,6 +207,7 @@ struct isp_interface_config {
u32 wenlog;
u32 dcsub;
enum ispccdc_raw_fmt raw_fmt_in;
+ struct ispprev_wbal wbal;
union {
struct par {
unsigned par_bridge:2;
===================================================================
@@ -1253,6 +1253,24 @@ void isppreview_enable_chroma_suppressio
EXPORT_SYMBOL(isppreview_enable_chroma_suppression);
/**
+ * isppreview_set_whitebalance - Change the White Balance parameters.
+ * @prev_wbal: Pointer to structure containing the digital gain and
+ * white balance coefficient.
+ *
+ * Store and set the Coefficient matrix.
+ **/
+void isppreview_set_whitebalance(struct ispprev_wbal *wbal)
+{
+ params->wbal.coef0 = wbal->coef0;
+ params->wbal.coef1 = wbal->coef1;
+ params->wbal.coef2 = wbal->coef2;
+ params->wbal.coef3 = wbal->coef3;
+
+ isppreview_config_whitebalance(params->wbal);
+}
+EXPORT_SYMBOL(isppreview_set_whitebalance);
+
+/**
* isppreview_config_whitebalance - Configures the White Balance parameters.
* @prev_wbal: Structure containing the digital gain and white balance
* coefficient.
===================================================================
@@ -359,4 +359,6 @@ int omap34xx_isp_tables_update(struct is
void isppreview_set_skip(u32 h, u32 v);
+void isppreview_set_whitebalance(struct ispprev_wbal *wbal);
+
#endif/* OMAP_ISP_PREVIEW_H */