[pkg-fso-commits] [SCM] linux-2.6-openmoko, the Linux 2.6 kernel tree from Openmoko branch, andy-tracking, updated. upstream/20090303.gitb9de904e-140-g23b564c

Andy Green agreen at octopus.localdomain
Mon Jun 8 17:29:05 UTC 2009


The following commit has been merged in the andy-tracking branch:
commit 33a321349df772925a696cb454f28e8119d7a554
Author: Werner Almesberger <werner at openmoko.org>
Date:   Thu Mar 5 14:39:51 2009 +0000

    Add Samsung S5K4BA camera driver
    
    This is the original Samsung S5K4BA camera driver code from the 2.6.21
    BSP.  The changes that are needed to make this work in 2.6.29 are in
    the next patch.
    
    Signed-off-by: Werner Almesberger <werner at openmoko.org>

diff --git a/drivers/media/video/samsung/4xa_sensor.c b/drivers/media/video/samsung/4xa_sensor.c
new file mode 100644
index 0000000..de398ed
--- /dev/null
+++ b/drivers/media/video/samsung/4xa_sensor.c
@@ -0,0 +1,349 @@
+/*
+ *  Copyright (C) 2004 Samsung Electronics
+ *             SW.LEE <hitchcar at samsung.com>
+ *            - based on Russell King : pcf8583.c
+ * 	      - added  smdk24a0, smdk2440
+ *            - added  poseidon (s3c24a0+wavecom)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ *  Driver for FIMC2.x Camera Decoder
+ *
+ */
+
+//#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/i2c.h>
+#include <linux/i2c-id.h>
+#include <linux/slab.h>
+#include <linux/string.h>
+#include <linux/init.h>
+#include <linux/delay.h>
+
+//#define CAMIF_DEBUG
+
+#include "../s3c_camif.h"
+#include "4xa_sensor.h"
+
+static struct i2c_driver sensor_driver;
+
+/* This is an abstract CIS sensor for MSDMA input. */
+
+camif_cis_t msdma_input = {
+        itu_fmt:       CAMIF_ITU601,
+	order422:      CAMIF_CBYCRY,	/* another case: YCRYCB */
+	camclk:        44000000,	/* for 20 fps: 44MHz, for 12 fps(more stable): 26MHz */
+	source_x:      800,
+	source_y:      600,
+	win_hor_ofst:  0,
+	win_ver_ofst:  0,
+	win_hor_ofst2: 0,
+	win_ver_ofst2: 0,
+	polarity_pclk: 0,
+	polarity_vsync:1,
+	polarity_href: 0,
+	reset_type:CAMIF_EX_RESET_AL,
+	reset_udelay: 5000,
+};
+
+camif_cis_t interlace_input = {
+        itu_fmt:       CAMIF_ITU601,
+	order422:      CAMIF_CBYCRY,	/* another case: YCRYCB */
+	camclk:        44000000,	/* for 20 fps: 44MHz, for 12 fps(more stable): 26MHz */
+	source_x:      800,
+	source_y:      600,
+	win_hor_ofst:  0,
+	win_ver_ofst:  0,
+	win_hor_ofst2: 0,
+	win_ver_ofst2: 0,
+	polarity_pclk: 0,
+	polarity_vsync:1,
+	polarity_href: 0,
+	reset_type:CAMIF_EX_RESET_AL,
+	reset_udelay: 5000,
+};
+
+#if defined(CONFIG_VIDEO_SAMSUNG_S5K4BA)
+static camif_cis_t data = {
+	itu_fmt:       CAMIF_ITU601,
+	order422:      CAMIF_YCBYCR,
+	camclk:        44000000,	/* for 20 fps: 44MHz, for 12 fps(more stable): 26MHz */
+	source_x:      800,
+	source_y:      600,
+	win_hor_ofst:  0,
+	win_ver_ofst:  0,
+	win_hor_ofst2: 0,
+	win_ver_ofst2: 0,
+	polarity_pclk: 0,
+	polarity_vsync:1,
+	polarity_href: 0,
+	reset_type:CAMIF_EX_RESET_AL,
+	reset_udelay: 5000,
+};
+
+s5k4xa_t s5k4ba_regs_mirror[S5K4BA_REGS];
+#else
+#error No samsung CIS moudule here !
+#endif
+
+camif_cis_t* get_initialized_cis(void)
+{
+	if (data.init_sensor == 0)
+		return NULL;
+
+	return &data;
+}
+
+#define CAM_ID 0x5a
+
+static unsigned short ignore[] = { I2C_CLIENT_END };
+static unsigned short normal_addr[] = { (CAM_ID >> 1), I2C_CLIENT_END };
+static unsigned short *forces[] = { NULL };
+
+static struct i2c_client_address_data addr_data = {
+      normal_i2c:normal_addr,
+      /* normal_i2c_range:ignore, */
+      probe:ignore,
+      /* probe_range:ignore, */
+      ignore:ignore,
+      /* ignore_range:ignore, */
+      forces:forces,
+};
+
+
+unsigned char sensor_read(struct i2c_client *client, unsigned char subaddr)
+{
+	int ret;
+	unsigned char buf[1];
+	struct i2c_msg msg = { client->addr, 0, 1, buf };
+	buf[0] = subaddr;
+
+	ret = i2c_transfer(client->adapter, &msg, 1) == 1 ? 0 : -EIO;
+	if (ret == -EIO) {
+		printk(" I2C write Error \n");
+		return -EIO;
+	}
+
+	msg.flags = I2C_M_RD;
+	ret = i2c_transfer(client->adapter, &msg, 1) == 1 ? 0 : -EIO;
+
+	return buf[0];
+}
+
+static int
+sensor_write(struct i2c_client *client,
+	     unsigned char subaddr, unsigned char val)
+{
+	unsigned char buf[2];
+	struct i2c_msg msg = { client->addr, 0, 2, buf };
+
+	buf[0] = subaddr;
+	buf[1] = val;
+
+	return i2c_transfer(client->adapter, &msg, 1) == 1 ? 0 : -EIO;
+}
+
+#if defined(CONFIG_VIDEO_SAMSUNG_S5K4BA)
+void inline sensor_init(struct i2c_client *sam_client)
+{
+	int i;
+
+	i = (sizeof(s5k4ba_reg)/sizeof(s5k4ba_reg[0]));
+	for (i = 0; i < S5K4BA_INIT_REGS; i++) {
+		sensor_write(sam_client,
+			     s5k4ba_reg[i].subaddr, s5k4ba_reg[i].value);
+	}
+}
+#else
+#error No samsung CIS moudule !
+#endif
+
+static int
+s5k4xa_attach(struct i2c_adapter *adap, int addr, int kind)
+{
+	struct i2c_client *c;
+
+	c = kmalloc(sizeof(*c), GFP_KERNEL);
+	if (!c)
+		return -ENOMEM;
+
+	memset(c, 0, sizeof(struct i2c_client));	
+
+	strcpy(c->name, "S5K4XA");
+	c->addr = addr;
+	c->adapter = adap;
+	c->driver = &sensor_driver;
+	c->data = &data;
+	data.sensor = c;
+
+	s3c_camif_register_sensor(c);
+
+	return i2c_attach_client(c);
+}
+
+static int sensor_attach_adapter(struct i2c_adapter *adap)
+{
+	s3c_camif_open_sensor(&data);
+	return i2c_probe(adap, &addr_data, s5k4xa_attach);
+}
+
+static int sensor_detach(struct i2c_client *client)
+{
+	i2c_detach_client(client);
+	s3c_camif_unregister_sensor(client);
+	return 0;
+}
+
+/* Purpose:
+    This fucntion only for SVGA Camera : 4BA
+*/
+static int change_sensor_size(struct i2c_client *client, int size)
+{
+	int i;
+
+	switch (size) {
+#if defined(CONFIG_VIDEO_SAMSUNG_S5K4BA)
+	case SENSOR_QSVGA:
+		for (i = 0; i < S5K4BA_QSVGA_REGS; i++) {
+			sensor_write(client, s5k4ba_reg_qsvga[i].subaddr,
+				     s5k4ba_reg_qsvga[i].value);
+		}
+		break;
+
+	case SENSOR_SVGA:
+ 		for (i = 0; i < S5K4BA_SVGA_REGS; i++) {
+			sensor_write(client, s5k4ba_reg_svga[i].subaddr,
+				     s5k4ba_reg_svga[i].value);
+		}
+		break;
+#else
+#error No samsung CIS moudule !
+#endif
+	default:
+		panic("4xa_sensor.c: unexpect value \n");
+	}
+
+	return 0;
+}
+
+static int change_sensor_wb(struct i2c_client *client, int type)
+{
+       printk("[ *** Page 0, 4XA Sensor White Balance Mode ***]\n");
+
+#if defined(CONFIG_VIDEO_SAMSUNG_S5K4BA)
+       sensor_write(client, 0xFC, 0x0);
+       sensor_write(client, 0x30, type);
+#endif
+
+       switch(type){
+           case 0:
+           default:
+                printk(" -> AWB auto mode ]\n");
+                break;
+           case 1:
+                printk(" -> Indoor 3100 mode ]\n");
+                break;
+           case 2:
+                printk(" -> Outdoor 5100 mode ]\n");
+                break;
+           case 3:
+                printk(" -> Indoor 2000 mode ]\n");
+                break;
+           case 4:
+                printk(" -> AE/AWB halt ]\n");
+                break;
+           case 5:
+                printk(" -> Cloudy(6000) mode ]\n");
+                break;
+           case 6:
+                printk(" -> Sunny(8000) mode ]\n");
+                break;
+       }
+
+       return 0;
+}
+
+static int
+sensor_command(struct i2c_client *client, unsigned int cmd, void *arg)
+{
+	switch (cmd) {
+	case SENSOR_INIT:
+		sensor_init(client);
+		printk(KERN_INFO "External Camera initialized\n");
+		break;
+
+	case USER_ADD:
+		break;
+
+	case USER_EXIT:
+		break;
+
+	case SENSOR_QSVGA:
+		change_sensor_size(client, SENSOR_QSVGA);
+		break;
+
+	case SENSOR_VGA:
+		change_sensor_size(client, SENSOR_VGA);
+		break;
+
+	case SENSOR_SVGA:
+		change_sensor_size(client, SENSOR_SVGA);
+		break;
+
+	case SENSOR_SXGA:
+		change_sensor_size(client, SENSOR_SXGA);
+		break;
+
+	case SENSOR_UXGA:
+		change_sensor_size(client, SENSOR_UXGA);
+		break;
+/* Todo
+	case SENSOR_BRIGHTNESS:
+		change_sensor_setting();
+		break;
+*/
+	case SENSOR_WB:
+        	printk("[ *** 4XA Sensor White Balance , No mode ***]\n");
+        	change_sensor_wb(client, (int) arg);
+        	break;
+
+	default:
+		panic("4xa_sensor.c : Unexpect Sensor Command \n");
+		break;
+	}
+
+	return 0;
+}
+
+static struct i2c_driver sensor_driver = {
+	.driver = {
+		.name = "s5k4xa",
+	},
+      .id = I2C_DRIVERID_S5K_4XA,
+      .attach_adapter = sensor_attach_adapter,
+      .detach_client = sensor_detach,
+      .command = sensor_command
+};
+
+static __init int camif_sensor_init(void)
+{
+	return i2c_add_driver(&sensor_driver);
+}
+
+
+static __init void camif_sensor_exit(void)
+{
+	i2c_del_driver(&sensor_driver);
+}
+
+module_init(camif_sensor_init)
+module_exit(camif_sensor_exit)
+
+MODULE_AUTHOR("Jinsung, Yang <jsgood.yang at samsung.com>");
+MODULE_DESCRIPTION("I2C Client Driver For FIMC V4L2 Driver");
+MODULE_LICENSE("GPL");
+
diff --git a/drivers/media/video/samsung/4xa_sensor.h b/drivers/media/video/samsung/4xa_sensor.h
new file mode 100644
index 0000000..9880f6c
--- /dev/null
+++ b/drivers/media/video/samsung/4xa_sensor.h
@@ -0,0 +1,2377 @@
+
+#ifndef _SAMSUNG_SXGA_H_
+#define _SAMSUNG_SXGA_H_
+
+/*******************************************************************************************
+ #  Display resolution standards #
+
+	QCIF: 176 x 144
+	CIF: 352 x 288
+	QVGA: 320 x 240
+	VGA: 640 x 480
+	SVGA: 800 x 600
+	XGA: 1024 x 768
+	WXGA: 1280 x 800
+	QVGA: 1280 x 960
+	SXGA: 1280 x 1024
+	SXGA+: 1400 x 1050
+	WSXGA+: 1680 x 1050
+	UXGA: 1600 x 1200
+	WUXGA: 1920 x 1200
+	QXGA: 2048 x 1536
+********************************************************************************************/
+
+//#include "../bits.h"
+
+/* Camera information
+ * FPC Label : Samsung MEGA Pixel Camera : V4220 REV06
+ * Modified by charles -Initial function of '3AA' test routine
+ * Modified and tested by YongHwui.Kim <yonghwui.kim at samsung.com> for S5K3AAEX Camera
+ */
+
+#define CHIP_DELAY 0xFF
+
+typedef struct samsung_t{
+        unsigned char subaddr;
+        unsigned char value;
+        unsigned char page;
+} s5k4xa_t;
+
+#ifdef CONFIG_CPU_S3C24A0A
+#define TRY_HIGH_CLOCK 1
+#endif
+
+				//***************************************************
+				//  name: 	S5K3AAEX EVT2 setfile
+				//  ver:		v2.61
+				//  history:
+				//	v0.0	start from 040908 setfile
+				//	v1.0	arange register
+				//	v1.01	change MCLK(25Mhz) and Frame rate(7fps)
+				//	v2.0	adjust register setting for 3AA EVT2
+				//		- color correction, RGB shding off, hsync start position, Mirror, fps
+				//		- Color Tuning, YGRPDLY
+				//	v2.1	change Frame rate(7.5fps) and Total gain to x4
+				//		(because of reducing visual noise at low illumination)
+				//		- change BPRM AGC Max and FrameAE start
+				//		improve AE speed
+				//	v2.2	modify AWB G gain and solve 50hz flicker detection fail in 25MHz 7.5fps
+				//	v2.3	Adjust gamma, Dark Slice, white point, Hue gain,
+				//		White Balance B control, Y gain On, Digital Clamp On
+				//		lower AWB G gain
+				//	v2.4	Adjust AE window weight, Y Gamma, WhitePoint, Shading and BPR Max Thres.
+				// 	v2.41	Adjust AE/AWB window and AWB internal window boundary to decrease skin color tracking
+				// 	v2.411	special version for PSCDS
+				// 	v2.412	RGB shading off
+				//	v2.5	Lens change STW to Sekonix
+				//		adjust White point and Y shading Coef (RGB shading off)
+				//	v2.6	New Tuning because of Full YC off and YCbCr Coef change
+				//		Gamma, Dark Slice, color matrix (not use), Color suppress
+				//		R Gain and DBPR agc MIN/MAX
+				//	v2.61	VCK inversion(data rising)
+				//***************************************************
+				///////////////////////////////////////////////////
+
+#if defined(CONFIG_VIDEO_SAMSUNG_S5K4BA)
+
+// For SVGA (800 x 600)
+#if 1 // from han
+s5k4xa_t s5k4ba_reg[] =
+{
+	{0xfc,0x07},
+	{0x66,0x01},    // Watch Dog Time On
+	{0xfc,0x00},
+	{0x00,0xAA},	// For EDS Check
+	{0x21,0x03},	// peter0223 Ãß°¡
+	{0xfc,0x01},
+	{0x04,0x01},	// ARM Clock Divider
+
+	{0xfc,0x02},
+	{0x30,0x90},	// Analog offset
+	{0x37,0x0d}, 	// Global Gain
+	{0x2d,0x48},	// Double Shutter
+	{0x60,0x00},	// Blank_Adrs
+
+	{0x45,0x1e},	//0e// CDS Timing for Average Sub_Sampling
+	{0x47,0x2f},
+	{0x02,0x0e},	// ADC Resolution
+	{0x3d,0x06},	// Frame ADLC
+	{0x4d,0x08},	// Doubler Volatage
+	{0x54,0x02},	// Double Shutter
+	{0x55,0x1e},	// Line ADLC
+	{0x56,0x30},	//
+	{0x59,0x00},	// LineADLC offset
+	{0x5b,0x08},	// R_Ref_Ctrl
+	{0x44,0x63},	// CLP_EN
+	{0x4A,0x10},	// Clamp Control
+	{0x42,0x02},	//
+	{0x43,0xef},	//
+
+	//==========================================================
+	//	Table Set for Sub-Sampling
+	//==========================================================
+	{0xfc,0x03},
+	{0x2c,0x00},	// crcb_sel for Sub-Sampling Table
+	{0x05,0x46},	// Output Image Size Set for Capture
+	{0x07,0xb6},
+	{0x0e,0x04},
+	{0x12,0x03},
+
+	{0xfc,0x04},
+	{0x32,0x04},
+	{0x33,0xbc},
+
+	{0xfc,0x04},
+	{0xc5,0x26},	// Output Image Size Set for Preview
+	{0xc7,0x5e},
+	{0xce,0x04},
+	{0xd2,0x04},
+
+	{0xec,0x06},	//CrCb sel = YCBYCR(0x06) by jsgood
+	{0xc0,0x06},
+	{0xc1,0x70},
+	{0xc2,0x02},
+	{0xc3,0x87},
+
+	{0xfc,0x07},
+	{0x05,0x00},
+	{0x06,0x00},
+	{0x07,0x8b},
+	{0x08,0xf5},
+	{0x09,0x00},
+	{0x0a,0xb4},
+	{0x0b,0x00},
+	{0x0c,0xea},
+	{0x0d,0x00},
+	{0x0e,0x40},
+
+	{0xfc,0x00},
+	{0x70,0x02},
+
+	// Jeongyun added still shot cbcr_sel
+	{0xfc,0x03},
+	{0x2c,0x00},
+	{0x5c,0x00},
+	{0x8c,0x00},
+	{0xbc,0x00},
+	{0xfc,0x04},
+	{0x5c,0x00},
+
+
+	//==========================================================
+	//	COMMAND SET
+	//==========================================================
+	{0xfc,0x00},
+	{0x73,0x21},	// Frmae AE Enable peter
+	{0x20,0x02},	// Change AWB Mode
+
+	{0xfc,0x00},
+	{0x6c,0xb0},	// AE target
+	{0x6d,0x00},
+	
+	{0xfc,0x20},
+	{0x16,0x5a},	// for Prevating AE Hunting
+	
+	{0xfc,0x00},
+	{0x78,0x6a},	// AGC Max
+	{0xfc,0x20},
+	{0x16,0x60},	// Frame AE Start
+
+	{0xfc,0x20},
+	{0x57,0x18},	// Stable_Frame_AE
+	{0x2C,0x30},	// For Forbidden Area
+	{0x2E,0x00},	// For Forbidden Area
+	{0x14,0x70},
+	{0x01,0x00},	// Stepless_Off
+
+	{0xfc,0x07},
+	{0x11,0x02},	// AWB G Gain offset
+	
+	{0xfc,0x07},
+	{0x3e,0x0a},	// AWB Cut R max
+	
+	{0xfc,0x01},
+	{0xc8,0xd0},	// AWB Y Max e0  Y°ªÀÌ ¾î´À ÀÌ»óÀ϶§ ±× ÀÌ»ó°ªÀ» ©¶ó³»´Â ¼¼Æðª
+	{0xfc,0x00},
+	{0x3e,0x20},	//30 AWB Y_min
+	{0x3d,0x10},	// AWB Y_min Low
+	{0xfc,0x22},
+	{0x8c,0x04},	// AWB Min Y Weight AWB ÇÒ¶§ Y½ÅÈ£¸¦ ±âÁØÀ¸·Î Çϴµ¥ °¡ÁßÄ¡¸¦ ¹Ù²Ù´Â °Í.
+	{0x8d,0x16},	// AWB Max Y Weight
+
+	{0xfc,0x00},
+	{0x32,0x04},	// AWB moving average 8 frame
+	{0x81,0x10},	// AWB G gain suppress Disable
+	{0xbc,0xf0},
+	
+	{0x29,0x04},	// Y level H
+	{0x2a,0x00},	// Y level L
+	{0x2b,0x03},	// color level H
+	{0x2c,0xc8},	// color level L
+	
+	{0xfc,0x07},
+	{0x37,0x00},	// Flicker Add for 32Mhz
+	{0xfc,0x00},
+	{0x72,0xa0},	// Flicker for 32MHz
+	{0x74,0x08},	// flicker 60Hz Fix
+
+	{0xfc,0x20},
+	{0x02,0x02},	// Flicker Dgain Mode
+	
+	{0xfc,0x00},
+	//{0x23,0x40},  // Mirror Option
+	{0x62,0x0a},	// Mirror Option	 	
+	
+	{0xfc,0x02},
+	{0x4e,0x00},	// IO current 8mA set
+	{0x4e,0x00},	// IO current 8mA set
+	{0x4e,0x00},	// IO current 8mA set
+	{0x4e,0x00},	// IO current 8mA set
+	{0x4f,0x0a},	// 2a IO current 48mA set
+	{0x4f,0x0a},	// IO current 48mA set
+	{0x4f,0x0a},	// IO current 48mA set
+	{0x4f,0x0a},	// IO current 48mA set
+	
+	{0xfc,0x01},
+	{0x0c,0x03},	// Full YC Enable
+	//{0x0c,03},	// Full YC Enable
+	//{0x02,02},	// crcb_sel
+	//{0x02,02},	// crcb_sel  peter0222 Ãß°¡
+	//{0x01,01},	// pclk      peter0222 Ãß°¡
+	//{0x01,01},
+
+	//==========================================================
+	//	COLOR MATRIX
+	//==========================================================
+	{0xfc,0x01},	// color matrix
+	{0x51,0x0A},
+	{0x52,0x42},
+	{0x53,0xF9},
+	{0x54,0x80},
+	{0x55,0x00},
+	{0x56,0x3D},
+
+	{0x57,0xFE},
+	{0x58,0x0B},
+	{0x59,0x06},
+	{0x5A,0x9C},
+	{0x5B,0xFF},
+	{0x5C,0x59},
+
+	{0x5D,0xFF},
+	{0x5E,0xD8},
+	{0x5F,0xFC},
+	{0x60,0x2E},  	
+	{0x61,0x07},
+	{0x62,0xFA},
+
+	//==========================================================
+	//	EDGE ENHANCEMENT
+	//==========================================================
+	{0xfc,0x00},
+	{0x89,0x03},	// Edge Suppress On
+	{0xfc,0x0b},
+	{0x42,0x50},	// Edge AGC MIN
+	{0x43,0x60},	// Edge AGC MAX
+	{0x45,0x18},	// positive gain AGC MIN
+	{0x49,0x0a},	// positive gain AGC MAX
+	{0x4d,0x18},	// negative gain AGC MIN
+	{0x51,0x0a},	// negative gain AGC MAX
+	
+	{0xfc,0x05},
+	{0x34,0x20},	// APTCLP
+	{0x35,0x09},	// APTSC
+	{0x36,0x0b},	// ENHANCE
+	{0x3f,0x00},	// NON-LIN
+	{0x42,0x10},	// EGFALL
+	{0x43,0x00},	// HLFALL
+	{0x45,0xa0},	// EGREF
+	{0x46,0x7a},	// HLREF
+	{0x47,0x40},	// LLREF
+	{0x48,0x0c},
+	{0x49,0x31},	// CSSEL  EGSEL  CS_DLY
+	
+	{0x40,0x41},	// Y delay
+
+	//==========================================================
+	//	GAMMA
+	//==========================================================                                                                                                                                         -
+	{0xfc,0x01},
+
+	{0x6F,0x0A},	// R
+	{0x70,0x1A},
+	{0x71,0x7A},
+	{0x72,0xF8},
+	{0x73,0x00},
+
+	{0x74,0xA0},
+	{0x75,0x18},
+	{0x76,0x65},
+	{0x77,0xAD},
+	{0x78,0x6A},
+
+	{0x79,0xE2},
+	{0x7A,0x12},
+	{0x7B,0x3D},
+	{0x7C,0x5A},
+	{0x7D,0xBF},
+
+	{0x7E,0x72},
+	{0x7F,0x88},
+	{0x80,0x9D},
+	{0x81,0xB0},
+	{0x82,0xFF},
+
+	{0x83,0xC0},
+	{0x84,0xCF}, 		
+	{0x85,0xDA}, 		
+	{0x86,0xFC},
+
+	{0x87,0x08},	//G
+	{0x88,0x12},
+	{0x89,0x42}, 	
+	{0x8A,0xBA}, 	
+	{0x8B,0x00},
+
+	{0x8C,0x75},
+	{0x8D,0xED},
+	{0x8E,0x42},
+	{0x8F,0x80},
+	{0x90,0x5A},
+
+	{0x91,0xB5},
+	{0x92,0xE5},
+	{0x93,0x10},
+	{0x94,0x35},
+	{0x95,0xAF},
+
+	{0x96,0x55},
+	{0x97,0x70},
+	{0x98,0x88},
+	{0x99,0x9D},
+	{0x9A,0xFF},
+
+	{0x9B,0xB1},
+	{0x9C,0xC4},
+	{0x9D,0xD5},
+	{0x9E,0xFC},
+
+	{0x9F,0x05},	//B
+	{0xA0,0x18},
+	{0xA1,0x42},
+	{0xA2,0xd7}, 		
+	{0xA3,0x00},
+
+	{0xA4,0xB6},
+	{0xA5,0x3b},
+	{0xA6,0x88},
+	{0xA7,0xC8},
+	{0xA8,0x6A},
+
+	{0xA9,0x00},
+	{0xAA,0x30},
+	{0xAB,0x58},
+	{0xAC,0x78},
+	{0xAD,0xFF},
+
+	{0xAE,0x90},
+	{0xAF,0xA5},
+	{0xB0,0xB6},
+	{0xB1,0xC5},
+	{0xB2,0xFF},
+
+	{0xB3,0xD0},
+	{0xB4,0xD6},
+	{0xB5,0xDA},
+	{0xB6,0xFC},
+
+	//==========================================================
+	//	HUE CONTROL
+	//==========================================================
+	{0xfc,0x00},
+	{0x48,0x34},	// 2000K
+	{0x49,0x34},
+	{0x4a,0xf4},
+	{0x4b,0x00},
+	{0x4c,0x44},
+	{0x4d,0x3c},
+	{0x4e,0xf0},
+	{0x4f,0x0c},
+	
+	{0x50,0x34},	// 3000K
+	{0x51,0x34},
+	{0x52,0xf4},
+	{0x53,0x00},
+	{0x54,0x44},
+	{0x55,0x3c},
+	{0x56,0xf0},
+	{0x57,0x0c},
+	
+	{0x58,0x34},	// 5100K
+	{0x59,0x30},
+	{0x5a,0x00},
+	{0x5b,0x04},
+	{0x5c,0x40},
+	{0x5d,0x2c},
+	{0x5e,0xfc},
+	{0x5f,0x04},
+	//==========================================================
+	//	UPPRE0x0x FUNCTION
+	//==========================================================
+	{0xfc,0x00},
+	{0x7e,0xf4},
+	
+	//==========================================================
+	//	BPR
+	//==========================================================
+	{0xfc,0x01},
+	{0x3d,0x10},
+	
+	{0xfc,0x0b},
+	{0x0b,0x00},	// ISP BPR On start
+	{0x0c,0x20},	// Th13 AGC Min
+	{0x0d,0x40},	// Th13 AGC Max
+	{0x0e,0x00},	// Th1 Max H for AGCMIN
+	{0x0f,0x20},	// Th1 Max L for AGCMIN
+	{0x10,0x00},	// Th1 Min H for AGCMAX
+	{0x11,0x10},	// Th1 Min L for AGCMAX
+	{0x12,0x00},	// Th3 Max H for AGCMIN
+	{0x13,0x00},	// Th3 Max L for AGCMIN
+	{0x14,0xff},	// Th3 Min H for AGCMAX
+	{0x15,0xff},	// Th3 Min L for AGCMAX
+	{0x16,0x20},	// Th57 AGC Min
+	{0x17,0x40},	// Th57 AGC Max
+	{0x18,0x00},	// Th5 Max H for AGCMIN
+	{0x19,0x00},	// Th5 Max L for AGCMIN
+	{0x1a,0x00},	// Th5 Min H for AGCMAX
+	{0x1b,0x20},	// Th5 Min L for AGCMAX
+	{0x1c,0x00},	// Th7 Max H for AGCMIN
+	{0x1d,0x00},	// Th7 Max L for AGCMIN
+	{0x1e,0x00},	// Th7 Min H for AGCMAX
+	{0x1f,0x20},	// Th7 Min L for AGCMAX
+
+	//==========================================================
+	//	GR/GB CORRECTION
+	//==========================================================
+	{0xfc,0x01},
+	{0x45,0x0c},   	
+	
+	{0xfc,0x0b},
+	{0x21,0x00},	// start AGC
+	{0x22,0x18},	// AGCMIN
+	{0x23,0x58},	// AGCMAX
+	{0x24,0x0d}, 	// G Th AGCMIN
+	{0x25,0x30}, 	// G Th AGCMAX
+	{0x26,0x0d}, 	// RB Th AGCMIN
+	{0x27,0x30}, 	// RB Th AGCMAX
+	
+	//==========================================================
+	//	NR
+	//==========================================================
+	{0xfc,0x01},
+	{0x4C,0x01},	// NR Enable
+	{0x49,0x15},	// Sig_Th Mult
+	{0x4B,0x0A},	// Pre_Th Mult
+	
+	{0xfc,0x0b},
+	{0x28,0x00},	// NR start AGC	
+	{0x29,0x00},	// SIG Th AGCMIN H
+	{0x2a,0x14},	// SIG Th AGCMIN L
+	{0x2b,0x00},	// SIG Th AGCMAX H
+	{0x2c,0x14},	// SIG Th AGCMAX L
+	{0x2d,0x00},	// PRE Th AGCMIN H
+	{0x2e,0x90},	// PRE Th AGCMIN L
+	{0x2f,0x01},	// PRE Th AGCMAX H
+	{0x30,0x00},	// PRE Th AGCMAX L
+	{0x31,0x00},	// POST Th AGCMIN H
+	{0x32,0xa0},	// POST Th AGCMIN L
+	{0x33,0x01},	// POST Th AGCMAX H
+	{0x34,0x10},	// POST Th AGCMAX L
+	
+	//==========================================================
+	//	1D-Y/C-SIGMA-LPF
+	//==========================================================
+	{0xfc,0x01},
+	{0x05,0xc0},   	
+	
+	{0xfc,0x0b},
+	{0x35,0x00},	// YLPF start AGC
+	{0x36,0x40},	// YLPF01 AGCMIN
+	{0x37,0x60},	// YLPF01 AGCMAX
+	{0x38,0x00},	// YLPF SIG01 Th AGCMINH
+	{0x39,0x18},	// YLPF SIG01 Th AGCMINL
+	{0x3a,0x00},	// YLPF SIG01 Th AGCMAXH
+	{0x3b,0x40},	// YLPF SIG01 Th AGCMAXH
+	{0x3c,0x50},	// YLPF02 AGCMIN
+	{0x3d,0x60},	// YLPF02 AGCMAX
+	{0x3e,0x00},	// YLPF SIG02 Th AGCMINH
+	{0x3f,0x30},	// YLPF SIG02 Th AGCMINL
+	{0x40,0x00},	// YLPF SIG02 Th AGCMAXH
+	{0x41,0x40},	// YLPF SIG02 Th AGCMAXH
+	{0xd4,0x40},	// CLPF AGCMIN
+	{0xd5,0x60},	// CLPF AGCMAX
+	{0xd6,0xb0},	// CLPF SIG01 Th AGCMIN
+	{0xd7,0xf0},	// CLPF SIG01 Th AGCMAX
+	{0xd8,0xb0},	// CLPF SIG02 Th AGCMIN
+	{0xd9,0xf0},	// CLPF SIG02 Th AGCMAX
+
+	//==========================================================
+	//	COLOR SUPPRESS
+	//==========================================================
+	{0xfc,0x0b},
+	{0x08,0x58},	// Color suppress AGC MIN
+	{0x09,0x03},	// Color suppress MIN H
+	{0x0a,0x80},	// Color suppress MIN L
+	
+	//==========================================================
+	//	SHADING
+	//==========================================================
+	{0xfc,0x09},
+	 //Shading file for 3BAFX
+	//s90000// shading off
+	// DSP9_SH_WIDTH_H
+	{0x01,0x06},
+	{0x02,0x40},
+	// DSP9_SH_HEIGHT_H
+	{0x03,0x04},
+	{0x04,0xB0},
+	// DSP9_SH_XCH_R
+	{0x05,0x03},
+	{0x06,0x1A},
+	{0x07,0x02},
+	{0x08,0x4E},
+	// DSP9_SH_XCH_G
+	{0x09,0x03},
+	{0x0A,0x27},
+	{0x0B,0x02},
+	{0x0C,0x11},
+	// DSP9_SH_XCH_B
+	{0x0D,0x03},
+	{0x0E,0x15},
+	{0x0F,0x01},
+	{0x10,0xE3},
+	// DSP9_SH_Del_eH_R
+	{0x1D,0x85},
+	{0x1E,0x55},
+	{0x1F,0x77},
+	{0x20,0x9E},
+	{0x23,0x7F},
+	{0x24,0xE6},
+	{0x21,0x7F},
+	{0x22,0xE6},
+	// DSP9_SH_Del_eH_G
+	{0x25,0x82},
+	{0x26,0x9A},
+	{0x27,0x78},
+	{0x28,0xC0},
+	{0x2B,0x76},
+	{0x2C,0x07},
+	{0x29,0x86},
+	{0x2A,0x09},
+	// DSP9_SH_Del_eH_B
+	{0x2D,0x85},
+	{0x2E,0x55},
+	{0x2F,0x75},
+	{0x30,0x6D},
+	{0x33,0x74},
+	{0x34,0xA2},
+	{0x31,0x84},
+	{0x32,0xA2},
+	// DSP9_SH_VAL_R0H
+	{0x35,0x01},
+	{0x36,0x01},
+	{0x37,0x01},
+	{0x38,0x14},
+	{0x39,0x01},
+	{0x3A,0x45},
+	{0x3B,0x01},
+	{0x3C,0x8A},
+	{0x3D,0x01},
+	{0x3E,0xA3},
+	{0x3F,0x01},
+	{0x40,0xB9},
+	{0x41,0x01},
+	{0x42,0xD9},
+	{0x43,0x01},
+	{0x44,0xF6},
+	// DSP9_SH_VAL_G0H
+	{0x45,0x01},
+	{0x46,0x00},
+	{0x47,0x01},
+	{0x48,0x0E},
+	{0x49,0x01},
+	{0x4A,0x34},
+	{0x4B,0x01},
+	{0x4C,0x68},
+	{0x4D,0x01},
+	{0x4E,0x76},
+	{0x4F,0x01},
+	{0x50,0x94},
+	{0x51,0x01},
+	{0x52,0xAB},
+	{0x53,0x01},
+	{0x54,0xC3},
+	// DSP9_SH_VAL_B0H
+	{0x55,0x01},
+	{0x56,0x00},
+	{0x57,0x01},
+	{0x58,0x0C},
+	{0x59,0x01},
+	{0x5A,0x2B},
+	{0x5B,0x01},
+	{0x5C,0x5D},
+	{0x5D,0x01},
+	{0x5E,0x70},
+	{0x5F,0x01},
+	{0x60,0x8A},
+	{0x61,0x01},
+	{0x62,0xA1},
+	{0x63,0x01},
+	{0x64,0xB3},
+	// DSP9_SH_M_R2_R1H
+	{0x65,0x00},
+	{0x66,0x98},
+	{0x67,0x2C},
+	{0x68,0x02},
+	{0x69,0x60},
+	{0x6A,0xB0},
+	{0x6B,0x05},
+	{0x6C,0x59},
+	{0x6D,0x8C},
+	{0x6E,0x07},
+	{0x6F,0x48},
+	{0x70,0x1B},
+	{0x71,0x09},
+	{0x72,0x82},
+	{0x73,0xC0},
+	{0x74,0x0C},
+	{0x75,0x09},
+	{0x76,0x7B},
+	{0x77,0x0E},
+	{0x78,0xDC},
+	{0x79,0x4D},
+	// DSP9_SH_M_R2_G1H
+	{0x7A,0x00},
+	{0x7B,0xAD},
+	{0x7C,0x76},
+	{0x7D,0x02},
+	{0x7E,0xB5},
+	{0x7F,0xD7},
+	{0x80,0x06},
+	{0x81,0x19},
+	{0x82,0x23},
+	{0x83,0x08},
+	{0x84,0x4C},
+	{0x85,0xE2},
+	{0x86,0x0A},
+	{0x87,0xD7},
+	{0x88,0x5C},
+	{0x89,0x0D},
+	{0x8A,0xB8},
+	{0x8B,0x90},
+	{0x8C,0x10},
+	{0x8D,0xF0},
+	{0x8E,0x7F},
+	// DSP9_SH_M_R2_B1H
+	{0x8F,0x00},
+	{0x90,0xC1},
+	{0x91,0xD0},
+	{0x92,0x03},
+	{0x93,0x07},
+	{0x94,0x3F},
+	{0x95,0x06},
+	{0x96,0xD0},
+	{0x97,0x4F},
+	{0x98,0x09},
+	{0x99,0x46},
+	{0x9A,0x32},
+	{0x9B,0x0C},
+	{0x9C,0x1C},
+	{0x9D,0xFE},
+	{0x9E,0x0F},
+	{0x9F,0x54},
+	{0xA0,0xB1},
+	{0xA1,0x12},
+	{0xA2,0xED},
+	{0xA3,0x4C},
+	// DSP9_SH_SUB_RR0H
+	{0xA4,0x6B},
+	{0xA5,0xAA},
+	{0xA6,0x23},
+	{0xA7,0xE3},
+	{0xA8,0x15},
+	{0xA9,0x88},
+	{0xAA,0x21},
+	{0xAB,0x20},
+	{0xAC,0x1C},
+	{0xAD,0xB6},
+	{0xAE,0x19},
+	{0xAF,0x55},
+	{0xB0,0x16},
+	{0xB1,0xAA},
+	// DSP9_SH_SUB_RG0H
+	{0xB2,0x5E},
+	{0xB3,0x74},
+	{0xB4,0x1F},
+	{0xB5,0x7C},
+	{0xB6,0x12},
+	{0xB7,0xE4},
+	{0xB8,0x1D},
+	{0xB9,0x10},
+	{0xBA,0x19},
+	{0xBB,0x30},
+	{0xBC,0x16},
+	{0xBD,0x39},
+	{0xBE,0x13},
+	{0xBF,0xE2},
+	// DSP9_SH_SUB_RB0H
+	{0xC0,0x54},
+	{0xC1,0x89},
+	{0xC2,0x1C},
+	{0xC3,0x2D},
+	{0xC4,0x10},
+	{0xC5,0xE8},
+	{0xC6,0x1A},
+	{0xC7,0x02},
+	{0xC8,0x16},
+	{0xC9,0x8A},
+	{0xCA,0x13},
+	{0xCB,0xE4},
+	{0xCC,0x11},
+	{0xCD,0xCC},
+
+	{0x00,0x02},  // {0xhading on
+
+	//==========================================================
+	//	X-SHADING
+	//==========================================================
+	{0xfc,0x1B},
+	{0x80,0x01},
+	{0x81,0x00},
+	{0x82,0x4C},
+	{0x83,0x00},
+	{0x84,0x86},
+	{0x85,0x03},
+	{0x86,0x5E},
+	{0x87,0x00},
+	{0x88,0x07},
+	{0x89,0xA4},
+	{0x90,0x00},
+	{0x91,0x12},
+	{0x92,0x00},
+	{0x93,0x12},
+	{0x94,0x00},
+	{0x95,0x12},
+	{0x96,0x00},
+	{0x97,0x12},
+	{0x98,0x00},
+	{0x99,0x12},
+	{0x9A,0x00},
+	{0x9B,0x12},
+	{0x9C,0x00},
+	{0x9D,0x12},
+	{0x9E,0x00},
+	{0x9F,0x12},
+	{0xA0,0x00},
+	{0xA1,0x12},
+	{0xA2,0x00},
+	{0xA3,0x12},
+	{0xA4,0x00},
+	{0xA5,0x12},
+	{0xA6,0x00},
+	{0xA7,0x12},
+	{0xA8,0x00},
+	{0xA9,0x12},
+	{0xAA,0x00},
+	{0xAB,0x12},
+	{0xAC,0x00},
+	{0xAD,0x12},
+	{0xAE,0x00},
+	{0xAF,0x12},
+	{0xB0,0x00},
+	{0xB1,0x12},
+	{0xB2,0x00},
+	{0xB3,0x12},
+	{0xB4,0x00},
+	{0xB5,0x12},
+	{0xB6,0x00},
+	{0xB7,0x15},
+	{0xB8,0x00},
+	{0xB9,0x12},
+	{0xBA,0x00},
+	{0xBB,0x12},
+	{0xBC,0x00},
+	{0xBD,0x12},
+	{0xBE,0x00},
+	{0xBF,0x12},
+	{0xC0,0x00},
+	{0xC1,0x12},
+	{0xC2,0x00},
+	{0xC3,0x12},
+	{0xC4,0x00},
+	{0xC5,0x12},
+	{0xC6,0x00},
+	{0xC7,0x12},
+	{0xC8,0x00},
+	{0xC9,0x12},
+	{0xCA,0x00},
+	{0xCB,0x12},
+	{0xCC,0x00},
+	{0xCD,0x12},
+	{0xCE,0x00},
+	{0xCF,0x12},
+	{0xD0,0x00},
+	{0xD1,0x12},
+	{0xD2,0x00},
+	{0xD3,0x12},
+	{0xD4,0x00},
+	{0xD5,0x12},
+		 // x-shading temp. correlation factor
+	{0xfc,0x0b},
+	{0xda,0x00},	// t0(3100K)
+	{0xdb,0xac},
+	{0xdc,0x01},	// tc(5100K)
+	{0xdd,0x30},	// default eeh
+	
+	{0xfc,0x00},
+	{0x81,0x10}, 	// xshading tem
+	
+	{0xfc,0x1b},
+	{0x80,0x01},	// X-Shading On
+
+	//==========================================================
+	//	AE WINDOW WEIGHT
+	//==========================================================
+	{0xfc,0x00},
+	{0x03,0x4b},	// AE Suppress On
+	
+	{0xfc,0x06},
+	{0x01,0x35},	// UXGA AE Window
+	{0x03,0xc2},
+	{0x05,0x48},
+	{0x07,0xb8},
+	{0x31,0x2a},	// Subsampling AE Window
+	{0x33,0x61},
+	{0x35,0x28},
+	{0x37,0x5c},
+	{0x39,0x28},
+	{0x3B,0x5A},
+	{0x3D,0x10},	// 1c
+	{0x3F,0x44},
+	
+	{0xfc,0x20},
+	{0x60,0x11},
+	{0x61,0x11},
+	{0x62,0x11},
+	{0x63,0x11},
+	{0x64,0x11},
+	{0x65,0x22},
+	{0x66,0x22},
+	{0x67,0x11},
+	{0x68,0x11},
+	{0x69,0x33},
+	{0x6a,0x33},
+	{0x6b,0x11},
+	{0x6c,0x12},
+	{0x6d,0x55},
+	{0x6e,0x55},
+	{0x6f,0x21},
+	{0x70,0x13},
+	{0x71,0x55},
+	{0x72,0x55},
+	{0x73,0x31},
+	{0x74,0x33},
+	{0x75,0x33},
+	{0x76,0x33},
+	{0x77,0x33},
+
+	//==========================================================
+	//	SAIT AWB
+	//==========================================================
+	//=================================
+	// White Point
+	//=================================
+	{0xfc,0x22},	// White Point (For Hue Control & MWB)
+	{0x01,0xD0},	// D65
+	{0x03,0x9B},
+	{0x05,0xC0},	// 5000K
+	{0x07,0xB8},
+	{0x09,0xA7},	// CWF
+	{0x0b,0xDC},
+	{0x0d,0x98},	// 3000K
+	{0x0f,0xE0},
+	{0x11,0x85},	// A
+	{0x12,0x00},
+	{0x13,0xF6},
+	{0x15,0x80},	// 2000K
+	{0x16,0x01},
+	{0x17,0x00},
+
+	//=================================
+	// Basic Setting
+	//=================================
+	{0xfc,0x22},
+	{0xA0,0x01},
+	{0xA1,0x3F},
+	{0xA2,0x0E},
+	{0xA3,0x65},
+	{0xA4,0x07},
+	{0xA5,0xF4},
+	{0xA6,0x11},
+	{0xA7,0xC8},
+	{0xA9,0x02},
+	{0xAA,0x43},
+	{0xAB,0x26},
+	{0xAC,0x1F},
+	{0xAD,0x02},
+	{0xAE,0x2C},
+	{0xAF,0x19},
+	{0xB0,0x0F},
+	
+	{0x94,0x3C},
+	{0x95,0xCC},
+	{0x96,0x5C},
+	{0x97,0x4D},
+	{0xD0,0xA8},
+	{0xD1,0x29},
+	{0xD2,0x39},
+	{0xD3,0x22},
+	{0xD4,0x30},
+	{0xDB,0x29},
+	{0xDC,0x7E},
+	{0xDD,0x22},
+
+	{0xE7,0x00},
+	{0xE8,0xca},
+	{0xE9,0x00},
+	{0xEA,0x62},
+	{0xEB,0x00},
+	{0xEC,0x00},
+	{0xEE,0x97},
+	
+	//=================================
+	// Pixel Filter Setting
+	//=================================
+	{0xFC,0x07},
+	{0x95,0x8F},
+	
+	{0xfc,0x01},
+	{0xD3,0x4B},
+	{0xD4,0x00},
+	{0xD5,0x38},
+	{0xD6,0x00},
+	{0xD7,0x60},
+	{0xD8,0x00},
+	{0xD9,0x4E},
+	{0xDA,0x00},
+	{0xDB,0x27},
+	{0xDC,0x15},
+	{0xDD,0x23},
+	{0xDE,0xAD},
+	{0xDF,0x24},
+	{0xE0,0x01},
+	{0xE1,0x17},
+	{0xE2,0x4A},
+	{0xE3,0x36},
+	{0xE4,0x40},
+	{0xE5,0x40},
+	{0xE6,0x40},
+	{0xE7,0x40},
+	{0xE8,0x30},
+	{0xE9,0x3D},
+	{0xEA,0x17},
+	{0xEB,0x01},
+
+	//=================================
+	// Polygon AWB Region Tune
+	//=================================
+	{0xfc,0x22},
+	{0x18,0x00},	// 1
+	{0x19,0x5a},
+	{0x1a,0xf8},
+	{0x1b,0x00},	// 2
+	{0x1c,0x59},
+	{0x1d,0xCC},
+	{0x1e,0x00},	// 3
+	{0x1f,0x74},
+	{0x20,0xB3},
+	{0x21,0x00},	// 4
+	{0x22,0x86},
+	{0x23,0xA2},
+	{0x24,0x00},	// 5
+	{0x25,0x94},
+	{0x26,0x89},
+	{0x27,0x00},	// 6
+	{0x28,0xA6},
+	{0x29,0x76},
+	{0x2A,0x00},	// 7
+	{0x2B,0xd0},
+	{0x2C,0x5e},
+	{0x2D,0x00},	// 8
+	{0x2E,0xfa},
+	{0x2F,0x47},
+	{0x30,0x00},	// 9
+	{0x31,0xfD},
+	{0x32,0x5D},
+	{0x33,0x00},	// 10
+	{0x34,0xBB},
+	{0x35,0x7c},
+	{0x36,0x00},	// 11
+	{0x37,0xAD},
+	{0x38,0x88},
+	{0x39,0x00},	// 12
+	{0x3A,0x9A},
+	{0x3B,0xA3},
+	{0x3C,0x00},	// 13
+	{0x3D,0x7C},
+	{0x3E,0xDD},
+	{0x3F,0x00},	// 14
+	{0x40,0x00},
+	{0x41,0x00},
+
+	//=================================
+	// Moving Equation Weight
+	//=================================
+	{0xfc,0x22},
+	{0x98,0x07},
+
+	//=================================
+	// EIT Threshold
+	//=================================
+	{0xfc,0x22},
+	{0xb1,0x00},  	// {0xunny
+	{0xb2,0x03},
+	{0xb3,0x00},
+	{0xb4,0xc1},
+	
+	{0xb5,0x00},	// Cloudy
+	{0xb6,0x05},
+	{0xb7,0xc9},
+	{0xb9,0x81},
+	
+	{0xd7,0x00},	// Shade
+	{0xd8,0x35},
+	{0xd9,0x20},
+	{0xda,0x81},
+
+	//=================================
+	// Gain Offset
+	//=================================
+	{0xfc,0x00},
+	{0x79,0xF9},
+	{0x7A,0x02},	// Global AWB gain off{0xet
+	
+	{0xfc,0x22},
+	{0x58,0xf6}, 	// D65 R Off{0xet
+	{0x59,0xff}, 	// D65 B Off{0xet
+	{0x5A,0xfa}, 	// 5000K R Off{0xet
+	{0x5B,0xFe}, 	// 5000K B Off{0xet
+	{0x5C,0xfb}, 	// CWF R Off{0xet
+	{0x5D,0xFe}, 	// CWF B Off{0xet
+	{0x5E,0xfb},	// 3000K R Off{0xet
+	{0x5F,0xFb},	// 3000K B Off{0xet
+	{0x60,0xfb},	// A R Off0xet
+	{0x61,0xfb},	// A B Off0xet
+	{0x62,0xfb}, 	// 2000K R Off0xet
+	{0x63,0xfb}, 	// 2000K B Off0xet
+	
+	{0xde,0x00},	// LARGE OBJECT BUG FIX
+	{0xf0,0x6a},	// RB Ratio
+	//=================================
+	// Green Stablity Enhance
+	//=================================
+	{0xfc,0x22},
+	{0xb9,0x00},
+	{0xba,0x00},
+	{0xbb,0x00},
+	{0xbc,0x00},
+	{0xe5,0x01},
+	{0xe6,0xff},
+
+	{0xbd,0x90},
+
+	//==========================================================
+	//	Special Effect
+	//==========================================================
+	{0xfc,0x07},	// Special Effect
+	{0x30,0xc0},
+	{0x31,0x20},
+	{0x32,0x40},
+	{0x33,0xc0},
+	{0x34,0x00},
+	{0x35,0xb0},
+
+	{0xfc,0x00},
+	{0x73,0x21},	// Frmae AE Enable}, peter0223 À§Ä¡ º¯°æ
+
+	{0xfc,0x04},
+	{0xc0,0x06},
+	{0xc1,0x70},
+	{0xFF,0xFF}	// REGISTER END
+};
+#else
+s5k4xa_t s5k4ba_reg[] =
+{
+//==========================================================
+//	CAMERA INITIAL (Analog & Clock Setting)
+//==========================================================
+	{0xfc, 0x07},
+	{0x66, 0x01},// WDT
+	{0xfc, 0x00},
+	{0x00, 0xaa},// For EDS Check
+	{0x21, 0x03},// peter0223 added
+
+	{0xfc, 0x01},
+	{0x04, 0x01},// ARM Clock Divider
+
+	{0xfc, 0x02},// Analog setting
+	{0x55, 0x1e},// LineADLC on(s551a), off(s550a)
+	{0x56, 0x10},// BPR 16code
+	{0x30, 0x82},// Analog offset (capture =?h)
+	{0x37, 0x25},// Global Gain (default:31)
+
+	{0x57, 0x80},// // LineADLC Roffset
+	{0x58, 0x80},//89	//90  // LineADLC Goffset
+	{0x59, 0x80},//90  // LineADLC offset don't care
+
+	{0x44, 0x64},//clamp en[6]=1 on
+	{0x4a, 0x30},//clamp level 0011h [7]~[4]
+
+	{0x2d, 0x48},// double shutter (default:00)
+	{0x4d, 0x08},// Voltage doubler (default:04)
+	{0x4e, 0x00},// IO current 8mA set
+	{0x4f, 0x8a},// IO current 48mA set
+
+	{0x66, 0x41},// 1st comp current 2uA
+	{0x43, 0xef},// ec_comp
+	{0x62, 0x60},// LD control , CFPN_EN off
+
+//==========================================================
+//	Table Set for Sub-Sampling
+//==========================================================
+	{0xfc, 0x03},
+	{0x01, 0x60},
+	//{0x2e, 0x00},
+	{0x2e, 0x03},//DHL
+	{0x05, 0x46},// Output Image Size Set for Capture
+	{0x07, 0xb6},
+	{0x0e, 0x04},
+	{0x12, 0x03},
+
+	{0xfc, 0x04},
+	{0xc5, 0x26},// Output Image Size Set for Preview
+	{0xc7, 0x5e},
+	{0xce, 0x04},
+	{0xd2, 0x04},
+	//{0xee, 0x00},//DHL
+	{0xee, 0x01},
+	{0xc0, 0x06},
+	{0xc1, 0x60},//frame_H
+	{0xc2, 0x02},
+	{0xc3, 0x8d},//frame_V
+
+	{0xfc, 0x07},
+	{0x05, 0x00},
+	{0x06, 0x00},
+	{0x07, 0x8b},
+	{0x08, 0xf5},
+	{0x09, 0x00},
+	{0x0a, 0xb4},
+	{0x0b, 0x00},
+	{0x0c, 0xea},
+	{0x0d, 0x00},
+	{0x0e, 0x40},
+
+#if 1
+//==========================================================
+//	COMMAND SET
+//==========================================================
+	{0xfc, 0x00},
+	{0x70, 0x02},
+
+	{0xfc, 0x00},
+	{0x73, 0x11},//21 Frmae AE Enable, peter0223
+	{0x20, 0x02},// Change AWB Mode
+
+	{0xfc, 0x00},
+	{0x78, 0x6a},// AGC Max
+
+	{0xfc, 0x00},
+	{0x6c, 0xa0},// AE target
+	{0x6d, 0x00},
+
+	{0xfc, 0x20},
+	{0x16, 0x5a},// AGC frame AE start _for Prevating AE Hunting
+	{0x57, 0x18},// Stable_Frame_AE
+
+	{0xfc, 0x00},
+	{0x83, 0x06},//low condition shutter off // Double shutter off
+
+	{0xfc, 0x0b},
+	{0x5c, 0x69},//70	//AGC value to start shutter on/off suppress
+	{0x5d, 0x65},//60   //AGC value to start double shutter on/off suppress
+
+	{0xfc, 0x20},
+	{0x25, 0x00},// CINTR Min
+	{0x2a, 0x01},// forbidden
+	{0x2b, 0x02},// For Forbidden Area
+	{0x2c, 0x0a},
+	{0x2d, 0x00},// For Forbidden Area
+	{0x2e, 0x00},
+	{0x2f, 0x05},// forbidden
+	{0x14, 0x78},//70
+	{0x01, 0x00},// Stepless_Off
+
+	{0xfc, 0x00},
+	{0x29, 0x04},// Y level
+	{0x2a, 0x00},
+	{0x2b, 0x03},// C level
+	{0x2c, 0x80},//60
+
+	{0xfc, 0x07},
+	{0x37, 0x00},// Flicker
+
+	{0xfc, 0x00},
+	{0x72, 0xa0},// Flicker for 32MHz
+	{0x74, 0x08},// flicker 60Hz fix
+	{0xfc, 0x20},
+	{0x02, 0x12},//02 Flicker Dgain Mode
+	{0xfc, 0x00},
+	{0x62, 0x02},// Hue Control Enable
+
+	{0xfc, 0x01},
+	//{0x0c, 0x02},// Full YC Enable
+	{0x0C, 0x03},//Donghoon
+
+
+//==========================================================
+//	COLOR MATRIX
+//==========================================================
+	{0xfc, 0x01},	//DL gain 60
+	{0x51, 0x08},	//06	//08  07
+	{0x52, 0xe8},	//df	//9B  E7
+	{0x53, 0xfc},	//fd	//FC  FB
+	{0x54, 0x33},	//09	//07  B9
+	{0x55, 0xfe},	//00	//FF  00
+	{0x56, 0xe6},	//17	//5E  5F
+	{0x57, 0xfe},	//fe	//FD  FD
+	{0x58, 0x3d},	//4f	//0E  46
+	{0x59, 0x08},	//06	//07  05
+	{0x5a, 0x21},	//9b	//EE  E6
+	{0x5b, 0xfd},	//ff	//FF  00
+	{0x5c, 0xa3},	//17	//05  D3
+	{0x5d, 0xff},	//ff	//FF  FF
+	{0x5e, 0xbc},	//81	//7A  53
+	{0x5f, 0xfc},	//fd	//FC  FB
+	{0x60, 0x96},	//5b	//23  B1
+	{0x61, 0x07},	//07	//08  08
+	{0x62, 0xaf},	//24	//64  FD	
+
+//==========================================================
+//	EDGE ENHANCEMENT
+//==========================================================
+	{0xfc, 0x05},
+	{0x12, 0x3d},
+	{0x13, 0x3b},
+	{0x14, 0x38},
+	{0x15, 0x3b},
+	{0x16, 0x3d},
+
+	{0x17, 0x3b},
+	{0x18, 0x05},
+	{0x19, 0x09},
+	{0x1a, 0x05},
+	{0x1b, 0x3b},
+
+	{0x1c, 0x38},
+	{0x1d, 0x09},
+	{0x1e, 0x1c},
+	{0x1f, 0x09},
+	{0x20, 0x38},
+
+	{0x21, 0x3b},
+	{0x22, 0x05},
+	{0x23, 0x09},
+	{0x24, 0x05},
+	{0x25, 0x3b},
+
+	{0x26, 0x3d},
+	{0x27, 0x3b},
+	{0x28, 0x38},
+	{0x29, 0x3b},
+	{0x2a, 0x3d},
+
+	{0xfc, 0x00},
+	{0x89, 0x00},// Edge Suppress On
+	{0xfc, 0x0b},
+	{0x42, 0x50},// Edge AGC MIN
+	{0x43, 0x60},// Edge AGC MAX
+	{0x45, 0x18},// positive gain AGC MIN
+	{0x49, 0x06},// positive gain AGC MAX
+	{0x4d, 0x18},// negative gain AGC MIN
+	{0x51, 0x06},// negative gain AGC MAX
+
+	{0xfc, 0x05},
+	{0x34, 0x28},// APTCLP
+	{0x35, 0x03},// APTSC
+	{0x36, 0x0b},// ENHANCE
+	{0x3f, 0x00},// NON-LIN
+	{0x42, 0x10},// EGFALL
+	{0x43, 0x00},// HLFALL
+	{0x45, 0xa0},// EGREF
+	{0x46, 0x7a},// HLREF
+	{0x47, 0x40},// LLREF
+	{0x48, 0x0c},
+	{0x49, 0x31},// CSSEL  EGSEL  CS_DLY
+
+	{0x40, 0x41},// Y delay
+
+	// New Wide Luma Edge
+	{0xfc, 0x1d},
+	{0x86, 0x00},
+	{0x87, 0x60},
+	{0x88, 0x01},
+	{0x89, 0x20},
+	{0x8a, 0x00},
+	{0x8b, 0x00},
+	{0x8c, 0x00},
+	{0x8d, 0x00},
+	{0x8e, 0x00},
+	{0x8f, 0x20},
+	{0x90, 0x00},
+	{0x91, 0x00},
+	{0x92, 0x00},
+	{0x93, 0x0a},
+	{0x94, 0x00},
+	{0x95, 0x00},
+	{0x96, 0x00},
+	{0x97, 0x20},
+	{0x98, 0x00},
+	{0x99, 0x00},
+	{0x9a, 0xff},
+	{0x9b, 0xea},
+	{0x9c, 0xaa},
+	{0x9d, 0xab},
+	{0x9e, 0xff},
+	{0x9f, 0xf1},
+	{0xa0, 0x55},
+	{0xa1, 0x56},
+	{0xa2, 0x07},
+
+	{0x85, 0x01},
+
+//==========================================================
+//	GAMMA
+//==========================================================
+	{0xfc, 0x1d},
+	{0x00, 0x0b},
+	{0x01, 0x18},
+	{0x02, 0x3d},
+	{0x03, 0x9c},
+	{0x04, 0x00},
+	{0x05, 0x0c},
+	{0x06, 0x76},
+	{0x07, 0xc2},
+	{0x08, 0x00},
+	{0x09, 0x56},
+	{0x0a, 0x34},
+	{0x0b, 0x60},
+	{0x0c, 0x85},
+	{0x0d, 0xa7},
+	{0x0e, 0xaa},
+	{0x0f, 0xc6},
+	{0x10, 0xe2},
+	{0x11, 0xfc},
+	{0x12, 0x13},
+	{0x13, 0xab},
+	{0x14, 0x29},
+	{0x15, 0x3c},
+	{0x16, 0x4b},
+	{0x17, 0x5a},
+	{0x18, 0xff},
+	{0x19, 0x69},
+	{0x1a, 0x78},
+	{0x1b, 0x84},
+	{0x1c, 0x91},
+	{0x1d, 0xff},
+	{0x1e, 0x9c},
+	{0x1f, 0xa7},
+	{0x20, 0xb2},
+	{0x21, 0xbd},
+	{0x22, 0xff},
+	{0x23, 0xc7},
+	{0x24, 0xd2},
+	{0x25, 0xdb},
+	{0x26, 0xe4},
+	{0x27, 0xff},
+	{0x28, 0xec},
+	{0x29, 0xf5},
+	{0x2a, 0xf0},
+	{0x2b, 0x0b},
+	{0x2c, 0x18},
+	{0x2d, 0x3d},
+	{0x2e, 0x9c},
+	{0x2f, 0x00},
+	{0x30, 0x0c},
+	{0x31, 0x76},
+	{0x32, 0xc2},
+	{0x33, 0x00},
+	{0x34, 0x56},
+	{0x35, 0x34},
+	{0x36, 0x60},
+	{0x37, 0x85},
+	{0x38, 0xa7},
+	{0x39, 0xaa},
+	{0x3a, 0xc6},
+	{0x3b, 0xe2},
+	{0x3c, 0xfc},
+	{0x3d, 0x13},
+	{0x3e, 0xab},
+	{0x3f, 0x29},
+	{0x40, 0x3c},
+	{0x41, 0x4b},
+	{0x42, 0x5a},
+	{0x43, 0xff},
+	{0x44, 0x69},
+	{0x45, 0x78},
+	{0x46, 0x84},
+	{0x47, 0x91},
+	{0x48, 0xff},
+	{0x49, 0x9c},
+	{0x4a, 0xa7},
+	{0x4b, 0xb2},
+	{0x4c, 0xbd},
+	{0x4d, 0xff},
+	{0x4e, 0xc7},
+	{0x4f, 0xd2},
+	{0x50, 0xdb},
+	{0x51, 0xe4},
+	{0x52, 0xff},
+	{0x53, 0xec},
+	{0x54, 0xf5},
+	{0x55, 0xf0},
+	{0x56, 0x0b},
+	{0x57, 0x18},
+	{0x58, 0x3d},
+	{0x59, 0x9c},
+	{0x5a, 0x00},
+	{0x5b, 0x0c},
+	{0x5c, 0x76},
+	{0x5d, 0xc2},
+	{0x5e, 0x00},
+	{0x5f, 0x56},
+	{0x60, 0x34},
+	{0x61, 0x60},
+	{0x62, 0x85},
+	{0x63, 0xa7},
+	{0x64, 0xaa},
+	{0x65, 0xc6},
+	{0x66, 0xe2},
+	{0x67, 0xfc},
+	{0x68, 0x13},
+	{0x69, 0xab},
+	{0x6a, 0x29},
+	{0x6b, 0x3c},
+	{0x6c, 0x4b},
+	{0x6d, 0x5a},
+	{0x6e, 0xff},
+	{0x6f, 0x69},
+	{0x70, 0x78},
+	{0x71, 0x84},
+	{0x72, 0x91},
+	{0x73, 0xff},
+	{0x74, 0x9c},
+	{0x75, 0xa7},
+	{0x76, 0xb2},
+	{0x77, 0xbd},
+	{0x78, 0xff},
+	{0x79, 0xc7},
+	{0x7a, 0xd2},
+	{0x7b, 0xdb},
+	{0x7c, 0xe4},
+	{0x7d, 0xff},
+	{0x7e, 0xec},
+	{0x7f, 0xf5},
+	{0x80, 0xf0},
+
+//==========================================================
+//	HUE CONTROL
+//==========================================================
+	{0xfc, 0x00},
+	{0x48, 0x40},// 2000K
+	{0x49, 0x30},
+	{0x4a, 0x00},
+	{0x4b, 0x00},
+	{0x4c, 0x30},
+	{0x4d, 0x38},
+	{0x4e, 0x00},
+	{0x4f, 0x00},
+
+	{0x50, 0x40},// 3000K
+	{0x51, 0x30},
+	{0x52, 0x00},
+	{0x53, 0x00},
+	{0x54, 0x30},
+	{0x55, 0x38},
+	{0x56, 0x00},
+	{0x57, 0x00},
+
+	{0x58, 0x3c},//40	              // 5100K
+	{0x59, 0x30},//4a                   //40
+	{0x5a, 0x00},//0c                   //00
+	{0x5b, 0x00},//00
+	{0x5c, 0x30},//4a
+	{0x5d, 0x38},//40
+	{0x5e, 0x00},//f6                   //15
+	{0x5f, 0xfc},//00
+
+//==========================================================
+//	SUPPRESS FUNCTION
+//==========================================================
+	{0xfc, 0x00},
+	{0x7e, 0xf4},
+
+//==========================================================
+//	BPR
+//==========================================================
+	{0xfc, 0x0b},
+	{0x3d, 0x10},
+
+	{0xfc, 0x0b},
+	{0x0b, 0x00},
+	{0x0c, 0x40},
+	{0x0d, 0x5a},
+	{0x0e, 0x00},
+	{0x0f, 0x20},
+	{0x10, 0x00},
+	{0x11, 0x10},
+	{0x12, 0x00},
+	{0x13, 0x7f},
+	{0x14, 0x03},
+	{0x15, 0xff},
+	{0x16, 0x48},
+	{0x17, 0x60},
+	{0x18, 0x00},
+	{0x19, 0x00},
+	{0x1a, 0x00},
+	{0x1b, 0x20},
+	{0x1c, 0x00},
+	{0x1d, 0x00},
+	{0x1e, 0x00},
+	{0x1f, 0x20},
+
+//==========================================================  	
+//	GR/GB CORRECTION
+//==========================================================
+	{0xfc, 0x01},
+	{0x45, 0x0c},
+	{0xfc, 0x0b},
+	{0x21, 0x00},
+	{0x22, 0x40},
+	{0x23, 0x60},
+	{0x24, 0x0d},
+	{0x25, 0x20},
+	{0x26, 0x0d},
+	{0x27, 0x20},
+
+//==========================================================
+//	NR
+//==========================================================
+	{0xfc, 0x01},
+	{0x4c, 0x01},
+	{0x49, 0x15},
+	{0x4b, 0x0a},
+
+	{0xfc, 0x0b},
+	{0x28, 0x00},
+	{0x29, 0x00},
+	{0x2a, 0x14},
+	{0x2b, 0x00},
+	{0x2c, 0x14},
+	{0x2d, 0x00},
+	{0x2e, 0xD0},
+	{0x2f, 0x02},
+	{0x30, 0x00},
+	{0x31, 0x00},
+	{0x32, 0xa0},
+	{0x33, 0x00},
+	{0x34, 0xe0},
+
+//==========================================================
+//	1D-Y/C-SIGMA-LPF
+//==========================================================
+	{0xfc, 0x01},
+	{0x05, 0xC0},
+	
+	{0xfc, 0x0b},
+	{0x35, 0x00},
+	{0x36, 0x40},
+	{0x37, 0x60},
+	{0x38, 0x00},
+	{0x39, 0x18},
+	{0x3a, 0x00},
+	{0x3b, 0x40},
+	{0x3c, 0x50},
+	{0x3d, 0x60},
+	{0x3e, 0x00},
+	{0x3f, 0x30},
+	{0x40, 0x00},
+	{0x41, 0x40},
+	{0xd4, 0x40},
+	{0xd5, 0x60},
+	{0xd6, 0xb0},
+	{0xd7, 0xf0},
+	{0xd8, 0xb0},
+	{0xd9, 0xf0},
+
+//==========================================================
+//	COLOR SUPPRESS
+//==========================================================
+	{0xfc, 0x0b},
+	{0x08, 0x58},
+	{0x09, 0x03},
+	{0x0a, 0x00},
+
+//==========================================================
+//	SHADING
+//==========================================================
+	{0xfc, 0x09},
+
+	{0x01, 0x06},
+	{0x02, 0x40},
+
+	{0x03, 0x04},
+	{0x04, 0xB0},
+	
+	{0x05, 0x03},
+	{0x06, 0x20},
+	{0x07, 0x02},
+	{0x08, 0x91},
+	
+	{0x09, 0x03},
+	{0x0A, 0x25},
+	{0x0B, 0x02},
+	{0x0C, 0x64},
+	
+	{0x0D, 0x03},
+	{0x0E, 0x0F},
+	{0x0F, 0x02},
+	{0x10, 0x4E},
+	
+	{0x1D, 0x80},
+	{0x1E, 0x00},
+	{0x1F, 0x80},
+	{0x20, 0x00},
+	{0x23, 0x85},
+	{0x24, 0x52},
+	{0x21, 0x79},
+	{0x22, 0xE6},
+	
+	{0x25, 0x80},
+	{0x26, 0x00},
+	{0x27, 0x80},
+	{0x28, 0x00},
+	{0x2B, 0x81},
+	{0x2C, 0x48},
+	{0x29, 0x81},
+	{0x2A, 0x48},
+	
+	{0x2D, 0x80},
+	{0x2E, 0x00},
+	{0x2F, 0x80},
+	{0x30, 0x00},
+	{0x33, 0x7C},
+	{0x34, 0x45},
+	{0x31, 0x7D},
+	{0x32, 0x7D},
+
+	{0x35, 0x01},
+	{0x36, 0x00},
+	{0x37, 0x01},
+	{0x38, 0x11},
+	{0x39, 0x01},
+	{0x3A, 0x4E},
+	{0x3B, 0x01},
+	{0x3C, 0xAB},
+	{0x3D, 0x01},
+	{0x3E, 0xDC},
+	{0x3F, 0x02},
+	{0x40, 0x1A},
+	{0x41, 0x02},
+	{0x42, 0x6A},
+	{0x43, 0x02},
+	{0x44, 0xD3},
+	
+	{0x45, 0x01},
+	{0x46, 0x00},
+	{0x47, 0x01},
+	{0x48, 0x0E},
+	{0x49, 0x01},
+	{0x4A, 0x40},
+	{0x4B, 0x01},
+	{0x4C, 0x8A},
+	{0x4D, 0x01},
+	{0x4E, 0xB5},
+	{0x4F, 0x01},
+	{0x50, 0xE8},
+	{0x51, 0x02},
+	{0x52, 0x27},
+	{0x53, 0x02},
+	{0x54, 0x84},
+
+	{0x55, 0x01},
+	{0x56, 0x00},
+	{0x57, 0x01},
+	{0x58, 0x0C},
+	{0x59, 0x01},
+	{0x5A, 0x37},
+	{0x5B, 0x01},
+	{0x5C, 0x74},
+	{0x5D, 0x01},
+	{0x5E, 0x96},
+	{0x5F, 0x01},
+	{0x60, 0xC9},
+	{0x61, 0x02},
+	{0x62, 0x04},
+	{0x63, 0x02},
+	{0x64, 0x4B},
+
+	{0x65, 0x00},
+	{0x66, 0x9A},
+	{0x67, 0x2D},
+	{0x68, 0x02},
+	{0x69, 0x68},
+	{0x6A, 0xB6},
+	{0x6B, 0x05},
+	{0x6C, 0x6B},
+	{0x6D, 0x99},
+	{0x6E, 0x07},
+	{0x6F, 0x60},
+	{0x70, 0xAD},
+	{0x71, 0x09},
+	{0x72, 0xA2},
+	{0x73, 0xD7},
+	{0x74, 0x0C},
+	{0x75, 0x32},
+	{0x76, 0x19},
+	{0x77, 0x0F},
+	{0x78, 0x0E},
+	{0x79, 0x70},
+
+	{0x7A, 0x00},
+	{0x7B, 0x9C},
+	{0x7C, 0x9F},
+	{0x7D, 0x02},
+	{0x7E, 0x72},
+	{0x7F, 0x7A},
+	{0x80, 0x05},
+	{0x81, 0x81},
+	{0x82, 0x94},
+	{0x83, 0x07},
+	{0x84, 0x7E},
+	{0x85, 0x97},
+	{0x86, 0x09},
+	{0x87, 0xC9},
+	{0x88, 0xEA},
+	{0x89, 0x0C},
+	{0x8A, 0x63},
+	{0x8B, 0x8C},
+	{0x8C, 0x0F},
+	{0x8D, 0x4B},
+	{0x8E, 0x7E},
+
+	{0x8F, 0x00},
+	{0x90, 0x9E},
+	{0x91, 0xBD},
+	{0x92, 0x02},
+	{0x93, 0x7A},
+	{0x94, 0xF5},
+	{0x95, 0x05},
+	{0x96, 0x94},
+	{0x97, 0xA8},
+	{0x98, 0x07},
+	{0x99, 0x98},
+	{0x9A, 0x8F},
+	{0x9B, 0x09},
+	{0x9C, 0xEB},
+	{0x9D, 0xD5},
+	{0x9E, 0x0C},
+	{0x9F, 0x8E},
+	{0xA0, 0x7A},
+	{0xA1, 0x0F},
+	{0xA2, 0x80},
+	{0xA3, 0x7D},
+
+	{0xA4, 0x6A},
+	{0xA5, 0x44},
+	{0xA6, 0x23},
+	{0xA7, 0x6C},
+	{0xA8, 0x15},
+	{0xA9, 0x40},
+	{0xAA, 0x20},
+	{0xAB, 0xB2},
+	{0xAC, 0x1C},
+	{0xAD, 0x56},
+	{0xAE, 0x19},
+	{0xAF, 0x01},
+	{0xB0, 0x16},
+	{0xB1, 0x5F},
+
+	{0xB2, 0x68},
+	{0xB3, 0x9C},
+	{0xB4, 0x22},
+	{0xB5, 0xDE},
+	{0xB6, 0x14},
+	{0xB7, 0xEC},
+	{0xB8, 0x20},
+	{0xB9, 0x30},
+	{0xBA, 0x1B},
+	{0xBB, 0xE5},
+	{0xBC, 0x18},
+	{0xBD, 0x9D},
+	{0xBE, 0x16},
+	{0xBF, 0x05},
+
+	{0xC0, 0x67},
+	{0xC1, 0x36},
+	{0xC2, 0x22},
+	{0xC3, 0x67},
+	{0xC4, 0x14},
+	{0xC5, 0xA4},
+	{0xC6, 0x1F},
+	{0xC7, 0xC2},
+	{0xC8, 0x1B},
+	{0xC9, 0x86},
+	{0xCA, 0x18},
+	{0xCB, 0x49},
+	{0xCC, 0x15},
+	{0xCD, 0xBA},
+	
+	{0x00, 0x02},// shading on
+
+//==========================================================
+//	X-SHADING
+//==========================================================
+	{0xfc, 0x1B},
+	{0x80, 0x01},
+	{0x81, 0x00},
+	{0x82, 0x4C},
+	{0x83, 0x00},
+	{0x84, 0x86},
+	{0x85, 0x03},
+	{0x86, 0x5E},
+	{0x87, 0x00},
+	{0x88, 0x07},
+	{0x89, 0xA4},
+	{0x90, 0x00},
+	{0x91, 0x88},
+	{0x92, 0x00},
+	{0x93, 0xC1},
+	{0x94, 0x00},
+	{0x95, 0xF7},
+	{0x96, 0x01},
+	{0x97, 0x21},
+	{0x98, 0x01},
+	{0x99, 0x37},
+	{0x9A, 0x01},
+	{0x9B, 0x0C},
+	{0x9C, 0x00},
+	{0x9D, 0xCE},
+	{0x9E, 0x00},
+	{0x9F, 0x3B},
+	{0xA0, 0x00},
+	{0xA1, 0x5B},
+	{0xA2, 0x00},
+	{0xA3, 0x7A},
+	{0xA4, 0x00},
+	{0xA5, 0x92},
+	{0xA6, 0x00},
+	{0xA7, 0x91},
+	{0xA8, 0x00},
+	{0xA9, 0x81},
+	{0xAA, 0x00},
+	{0xAB, 0x60},
+	{0xAC, 0x07},
+	{0xAD, 0xCB},
+	{0xAE, 0x07},
+	{0xAF, 0xC5},
+	{0xB0, 0x07},
+	{0xB1, 0xBB},
+	{0xB2, 0x07},
+	{0xB3, 0xAA},
+	{0xB4, 0x07},
+	{0xB5, 0xA9},
+	{0xB6, 0x07},
+	{0xB7, 0xB2},
+	{0xB8, 0x07},
+	{0xB9, 0xBF},
+	{0xBA, 0x07},
+	{0xBB, 0x5E},
+	{0xBC, 0x07},
+	{0xBD, 0x3C},
+	{0xBE, 0x06},
+	{0xBF, 0xF9},
+	{0xC0, 0x06},
+	{0xC1, 0xBD},
+	{0xC2, 0x06},
+	{0xC3, 0xB8},
+	{0xC4, 0x06},
+	{0xC5, 0xE2},
+	{0xC6, 0x07},
+	{0xC7, 0x1A},
+	{0xC8, 0x07},
+	{0xC9, 0x15},
+	{0xCA, 0x06},
+	{0xCB, 0xDE},
+	{0xCC, 0x06},
+	{0xCD, 0x9C},
+	{0xCE, 0x06},
+	{0xCF, 0x6F},
+	{0xD0, 0x06},
+	{0xD1, 0x5E},
+	{0xD2, 0x06},
+	{0xD3, 0x84},
+	{0xD4, 0x06},
+	{0xD5, 0xCA},
+	
+	{0xfc, 0x0b},
+	{0xda, 0x00},
+	{0xdb, 0x9c},
+	{0xdc, 0x00},
+	{0xdd, 0xd1},
+	
+	{0xfc, 0x1b},
+	{0x80, 0x01},
+
+//==========================================================
+//	AE WINDOW WEIGHT
+//==========================================================
+	{0xfc, 0x00},
+	{0x03, 0x4b},
+	{0xfc, 0x06},
+	{0x01, 0x35},
+	{0x03, 0xc2},
+	{0x05, 0x48},
+	{0x07, 0xb8},
+	{0x31, 0x2a},
+	{0x33, 0x61},
+	{0x35, 0x28},
+	{0x37, 0x5c},
+	
+	{0xfc, 0x20},
+	{0x60, 0x11},
+	{0x61, 0x11},
+	{0x62, 0x11},
+	{0x63, 0x11},
+	{0x64, 0x11},
+	{0x65, 0x22},
+	{0x66, 0x22},
+	{0x67, 0x11},
+	{0x68, 0x11},
+	{0x69, 0x33},
+	{0x6a, 0x33},
+	{0x6b, 0x11},
+	{0x6c, 0x12},
+	{0x6d, 0x55},
+	{0x6e, 0x55},
+	{0x6f, 0x21},
+	{0x70, 0x13},
+	{0x71, 0x55},
+	{0x72, 0x55},
+	{0x73, 0x31},
+	{0x74, 0x33},
+	{0x75, 0x33},
+	{0x76, 0x33},
+	{0x77, 0x33},
+
+//==========================================================
+//	SAIT AWB
+//==========================================================
+	{0xfc, 0x00},
+	{0x7b, 0x00},
+	
+	{0xfc, 0x07},
+	{0x3c, 0x10},
+	{0x3d, 0x10},
+	{0x3e, 0x10},
+	{0x3f, 0x10},
+	
+	{0xfc, 0x01},
+	{0xc8, 0xe0},
+	{0xfc, 0x00},
+	{0x3e, 0x10},
+	
+	{0xfc, 0x00},
+	{0x3e, 0x10},
+	{0x3d, 0x04},
+	{0x32, 0x02},
+	{0x81, 0x10},
+	{0xbc, 0xf0},
+	{0xfc, 0x22},
+	{0x8c, 0x04},
+	{0x8d, 0x06},
+	
+	{0xfc, 0x07},
+	{0x97, 0x00},
+
+//=================================
+// White Point
+//=================================
+	{0xfc, 0x22},
+	{0x01, 0xD8},
+	{0x03, 0xA1},
+	{0x05, 0xCA},
+	{0x07, 0xC8},
+	{0x09, 0xB3},
+	{0x0b, 0xE2},
+	{0x0d, 0xA0},
+	{0x0f, 0xF0},
+	{0x11, 0x94},
+	{0x12, 0x00},
+	{0x13, 0xFD},
+	{0x15, 0x88},
+	{0x16, 0x01},
+	{0x17, 0x10},
+
+//=================================
+// Basic Setting
+//=================================
+	{0xfc, 0x22},
+	{0xA8, 0xFF},
+	
+	{0xA0, 0x01},
+	{0xA1, 0x38},
+	{0xA2, 0x0E},
+	{0xA3, 0x6D},
+	{0xA4, 0x07},
+	{0xA5, 0xF5},
+	{0xA6, 0x11},
+	{0xA7, 0xBE},
+	{0xA9, 0x02},
+	{0xAA, 0xD2},
+	{0xAB, 0x00},
+	{0xAC, 0x00},
+	{0xAD, 0x02},
+	{0xAE, 0x3F},
+	{0xAF, 0x19},
+	{0xB0, 0x91},
+	{0x94, 0x3D},
+	{0x95, 0x00},
+	{0x96, 0x58},
+	{0x97, 0x80},
+	{0xD0, 0xA2},
+	{0xD1, 0x2E},
+	{0xD2, 0x4D},
+	{0xD3, 0x28},
+	{0xD4, 0x90},
+	{0xDB, 0x2E},
+	{0xDC, 0x7A},
+	{0xDD, 0x28},
+	{0xE7, 0x00},
+	{0xE8, 0xc7},
+	{0xE9, 0x00},
+	{0xEA, 0x62},
+	{0xEB, 0xD2},
+	{0xEC, 0xD9},
+	{0xEE, 0xA6},
+	
+	{0xfc, 0x00},
+	{0x8a, 0x02},
+
+//=================================
+// Pixel Filter Setting
+//=================================
+	{0xFC, 0x07},
+	{0x95, 0xCF},
+	
+	{0xfc, 0x01},
+	{0xd3, 0x4f},
+	{0xd4, 0x00},
+	{0xd5, 0x3c},
+	{0xd6, 0x80},
+	{0xd7, 0x61},
+	{0xd8, 0x00},
+	{0xd9, 0x49},
+	{0xda, 0x00},
+	{0xdb, 0x24},
+	{0xdc, 0x4b},
+	{0xdd, 0x23},
+	{0xde, 0xf2},
+	{0xdf, 0x20},
+	{0xe0, 0x73},
+	{0xe1, 0x18},
+	{0xe2, 0x69},
+	{0xe3, 0x31},
+	{0xe4, 0x40},
+	{0xe5, 0x34},
+	{0xe6, 0x40},
+	{0xe7, 0x40},
+	{0xe8, 0x32},
+	{0xe9, 0x40},
+	{0xea, 0x1c},
+	{0xeb, 0x00},
+
+//=================================
+// Polygon AWB Region Tune
+//=================================
+
+	// AWB3 - Polygon Region
+	{0xfc, 0x22},
+	{0x18, 0x00},
+	{0x19, 0x4b},
+	{0x1a, 0xfd},
+	{0x1b, 0x00},
+	{0x1c, 0x41},
+	{0x1d, 0xd9},
+	{0x1e, 0x00},
+	{0x1f, 0x66},
+	{0x20, 0xa9},
+	{0x21, 0x00},
+	{0x22, 0x8b},
+	{0x23, 0x82},
+	{0x24, 0x00},
+	{0x25, 0xa4},
+	{0x26, 0x6c},
+	{0x27, 0x00},
+	{0x28, 0xbd},
+	{0x29, 0x5d},
+	{0x2a, 0x00},
+	{0x2b, 0xdc},
+	{0x2c, 0x4d},
+	{0x2d, 0x00},
+	{0x2e, 0xdc},
+	{0x2f, 0x63},
+	{0x30, 0x00},
+	{0x31, 0xc1},
+	{0x32, 0x72},
+	{0x33, 0x00},
+	{0x34, 0xab},
+	{0x35, 0x84},
+	{0x36, 0x00},
+	{0x37, 0x99},
+	{0x38, 0xa0},
+	{0x39, 0x00},
+	{0x3a, 0x81},
+	{0x3b, 0xe9},
+	{0x3c, 0x00},
+	{0x3d, 0x00},
+	{0x3e, 0x00},
+	{0x3f, 0x00},
+	{0x40, 0x00},
+	{0x41, 0x00},
+
+//=================================
+// Moving Equation Weight
+//=================================
+	{0xfc, 0x22},
+	{0x98, 0x07},
+
+//=================================
+// EIT Threshold
+//=================================
+	{0xfc, 0x22},
+	{0xb1, 0x00},
+	{0xb2, 0x02},
+	{0xb3, 0x00},
+	{0xb4, 0xC1},
+	
+	{0xb5, 0x00},
+	{0xb6, 0x02},
+	{0xb7, 0x00},
+	{0xb9, 0xc2},
+	
+	{0xd7, 0x00},
+	{0xd8, 0x35},
+	{0xd9, 0x20},
+	{0xda, 0x81},
+
+//=================================
+// Gain Offset
+//=================================
+	{0xfc, 0x00},
+	{0x79, 0xf8},
+	{0x7a, 0x08},
+	
+	{0xfc, 0x07},
+	{0x11, 0x01},
+	
+	{0xfc, 0x22},
+	{0x58, 0xf8},
+	{0x59, 0x00},
+	{0x5A, 0xfc},
+	{0x5B, 0x00},
+	{0x5C, 0x00},
+	{0x5D, 0x00},
+	{0x5E, 0x00},
+	{0x5F, 0x00},
+	{0x60, 0x00},
+	{0x61, 0xf8},
+	{0x62, 0x00},
+	{0x63, 0xf0},
+	
+	{0xde, 0x00},
+	{0xf0, 0x6a},
+
+//=================================
+// Green Stablity Enhance
+//=================================
+	{0xfc, 0x22},
+	{0xb9, 0x00},
+	{0xba, 0x00},
+	{0xbb, 0x00},
+	{0xbc, 0x00},
+	{0xe5, 0x01},
+	{0xe6, 0xff},
+	{0xbd, 0x8c},
+
+//==========================================================
+//	Special Effect
+//==========================================================
+	{0xfc, 0x07},
+	{0x30, 0xc0},
+	{0x31, 0x20},
+	{0x32, 0x40},
+	{0x33, 0xc0},
+	{0x34, 0x00},
+	{0x35, 0xb0},
+#endif
+//==========================================================
+//	ETC
+//==========================================================
+	{0xfc, 0x01},
+	{0x01, 0x01},
+	{0x00, 0x90},
+	{0xfc, 0x02},
+	{0x03, 0x20},
+	
+	{0xfc, 0x20},
+	{0x0f, 0x00},
+	
+	{0xfc, 0x00},
+	{0x02, 0x09},
+	
+	{0xfc, 0x01},
+	//{0x02, 0x00},
+	{0x02, 0x02},//Donghoon
+};
+#endif
+#else
+#error No samsung CIS moudule !
+#endif
+
+
+// For VGA ( 640 x 480) on 4BA module
+s5k4xa_t s5k4ba_reg_vga[] =
+{
+	// To do.
+};
+
+// For SVGA ( 800 x 600) on 4BA module
+s5k4xa_t s5k4ba_reg_svga[] =
+{
+	{0xfc,0x02},
+	{0x2d,0x48},
+	{0x44,0x63},
+
+	{0xfc,0x03},
+	{0x02,0x04},
+	{0xfc,0x20},
+	{0x14,0x70},
+
+	{0xfc,0x00},
+	{0x03,0x4b},		// AE/AWB On
+	{0x7e,0xf4},		// Suppress On
+	{0x89,0x03},		// Edge Suppress On
+
+	{0xfc,0x02},
+	{0x02,0x0e},//sensor BPRoff
+
+	{0xfc,0x20},
+	{0x16,0x60},		// Frame AE Start
+
+	{0xfc,0x02},
+	{0x30,0x90},		// Analog offset
+	{0x37,0x0d},		// Global Gain
+	{0x60,0x00},		// Blank_Adrs
+	{0x45,0x0e},		// CDS Timing for Average Sub_Sampling
+	{0x47,0x2f},
+
+	{0xfc,0x01},
+	{0x9F,0x05},		//B
+	{0xA0,0x18},
+	{0xA1,0x42},
+	{0xA2,0xd7}, 		
+	{0xA3,0x00},
+	
+	{0xA4,0xB6},
+	{0xA5,0x3b},
+	{0xA6,0x88},
+	{0xA7,0xC8},
+	{0xA8,0x6A},
+
+	{0xfc,0x05},
+	{0x34,0x20},	// APTCLP
+	{0x35,0x08},	//9 //APTSC
+
+	{0xfc,0x00},  // flash 0821
+	{0x32,0x04},  // AWB moving average 8 frame
+
+	{0xfc,0x01},
+	{0x01,0x01}, // Pclk inversion
+
+	{0xfc,0x00},
+	{0x02,0x09},		// 800 x 600
+
+
+	{0xFF,0xFF} // REGISTER END
+};
+
+// For SXGA (1280 x 1024 = 1.3M) on 4BA module
+s5k4xa_t s5k4ba_reg_sxga[] =
+{
+	// To do.
+};
+
+
+// For UXGA (1600 x 1200 = 2M) on 4BA module
+s5k4xa_t s5k4ba_reg_uxga[] =
+{
+	// To do.
+};
+
+
+// For SQVGA on 4BA module
+s5k4xa_t s5k4ba_reg_qsvga[] =
+{
+	// Pclk inversion
+	{0xfc,0x01},
+	{0x01,0x01},
+
+	// To setting CbCr selection on Table 14h
+	{0xfc, 0x14},
+	{0x5c, 0x00},
+
+	// To load table_11 H4V4
+	{0xfc, 0x00},
+	{0x02, 0x0B}
+};
+
+#define S5K4BA_INIT_REGS (sizeof(s5k4ba_reg)/sizeof(s5k4ba_reg[0]))
+#define S5K4BA_UXGA_REGS (sizeof(s5k4ba_reg_uxga)/sizeof(s5k4ba_reg_uxga[0]))
+#define S5K4BA_SVGA_REGS (sizeof(s5k4ba_reg_svga)/sizeof(s5k4ba_reg_svga[0]))
+#define S5K4BA_VGA_REGS (sizeof(s5k4ba_reg_vga)/sizeof(s5k4ba_reg_vga[0]))
+#define S5K4BA_QSVGA_REGS (sizeof(s5k4ba_reg_qsvga)/sizeof(s5k4ba_reg_qsvga[0]))
+
+
+
+#define S5K4BA_RISC_REGS 0xEB
+#define S5K4BA_ISP_REGS 0xFB /* S5C7323X */
+#define S5K4BA_CIS_REGS 0x2F /* S5K437LA03 */
+
+
+#define S5K4BA_REGS (0x1000)
+
+
+
+#endif
+
diff --git a/drivers/media/video/samsung/Makefile b/drivers/media/video/samsung/Makefile
new file mode 100644
index 0000000..800fcef
--- /dev/null
+++ b/drivers/media/video/samsung/Makefile
@@ -0,0 +1,8 @@
+#
+# Samsung CIS camera module
+
+obj-$(CONFIG_VIDEO_SAMSUNG_S5K3AA) += 3xa_sensor.o
+obj-$(CONFIG_VIDEO_SAMSUNG_S5K3BA) += 3xa_sensor.o
+obj-$(CONFIG_VIDEO_SAMSUNG_S5K4BA) += 4xa_sensor.o
+obj-$(CONFIG_VIDEO_SAMSUNG_S5K53BA) += 53bea_sensor.o
+obj-$(CONFIG_VIDEO_ADV7180) += adv7180.o

-- 
linux-2.6-openmoko, the Linux 2.6 kernel tree from Openmoko



More information about the pkg-fso-commits mailing list