mt9e013: cleanup settings and add requested resolutions
authorRobert Jong-A-Lock <robert.jong-a-lock@intel.com>
Fri, 18 May 2012 13:13:36 +0000 (15:13 +0200)
committerbuildbot <buildbot@intel.com>
Fri, 25 May 2012 16:25:57 +0000 (09:25 -0700)
BZ: 37208 22615 24210

After the Kconfig change was made to the driver some settings
splilled into the new files. the blackbay and enzo headers have
been cleared of these settings.
3rd party apps need a 1024x576 mode in video which they use as
preview, this mode has been added.
WVGA now has better FoV.
Skipping settings were corrected in the blackbay and enzo headers.

Change-Id: I352c0c93b9f1be6c95dd702b7912008c065107ea
Reviewed-on: http://android.intel.com:8080/49411
Reviewed-by: Jong-a-lock, Robert <robert.jong-a-lock@intel.com>
Reviewed-by: Hu, Gang A <gang.a.hu@intel.com>
Reviewed-by: Cohen, David A <david.a.cohen@intel.com>
Reviewed-by: Toivonen, Tuukka <tuukka.toivonen@intel.com>
Tested-by: Hu, Gang A <gang.a.hu@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/media/video/mt9e013/mt9e013_blackbay.h
drivers/media/video/mt9e013/mt9e013_enzo.h

index a16e377..79eb5c7 100644 (file)
@@ -114,21 +114,13 @@ static const struct mt9e013_reg mt9e013_recommended_settings[] = {
 
 static const struct mt9e013_reg mt9e013_pll_timing[] = {
        /* pixelrate into the isp = 153.600.000 Hz */
-       {MT9E013_16BIT, {0x0300}, 0x0004}, /* vt_pix_clk_div = 4, internal
-                                           * pixel clk freq = 192.000MHz
-                                           */
+       {MT9E013_16BIT, {0x0300}, 0x0004}, /* vt_pix_clk_div = 4, internal pixel clk freq = 192.000MHz */
        {MT9E013_16BIT, {0x0302}, 0x0001}, /* vt_sys_clk_div = 1 */
-       {MT9E013_16BIT, {0x0304}, 0x0001}, /* pre_pll_clk_div = 1
-                                           * PLL input clock freq = 19.200MHz
-                                           */
-       {MT9E013_16BIT, {0x0306}, 0x0028}, /* pll_multiplier = 40
-                                           * mipi bus speed = 768.000MHz
-                                           */
-       {MT9E013_16BIT, {0x0308}, 0x000A}, /* op_pix_clk_div = 10, output
-                                           * pixel clk freq = 76.800MHz
-                                           */
+       {MT9E013_16BIT, {0x0304}, 0x0001}, /* pre_pll_clk_div = 1 PLL input clock freq = 19.200MHz */
+       {MT9E013_16BIT, {0x0306}, 0x0028}, /* pll_multiplier = 40 mipi bus speed = 768.000MHz */
+       {MT9E013_16BIT, {0x0308}, 0x000A}, /* op_pix_clk_div = 10, output pixel clk freq = 76.800MHz */
        {MT9E013_16BIT, {0x030A}, 0x0001}, /* op_sys_clk_div = 1 */
-       {MT9E013_16BIT, {0x3016}, 0x111}, /* row_speed = 273 */
+       {MT9E013_16BIT, {0x3016}, 0x0111}, /* row_speed = 273 */
        {MT9E013_TOK_DELAY, {0}, 1},
        {MT9E013_TOK_TERM, {0}, 0}
 };
@@ -157,81 +149,6 @@ static const struct mt9e013_reg mt9e013_mipi_timing[] = {
        {MT9E013_TOK_TERM, {0}, 0}
 };
 
-/**********************still 3fps for Lexington*********************/
-static struct mt9e013_reg const mt9e013_STILL_8M_3fps[] = {
-       /* STILL 8M */
-       GROUPED_PARAMETER_HOLD_ENABLE,
-       /* Frame size & Timing Configuration*/
-       {MT9E013_16BIT, {0x0340}, 0x1F40}, /* FRAME_LENGTH_LINES 8000 */
-       {MT9E013_16BIT, {0x0342}, 0x1F40}, /* LINE_LENGTH_PCK 8000 */
-       {MT9E013_16BIT, {0x0344}, 0x0000}, /* X_ADDR_START 0 */
-       {MT9E013_16BIT, {0x0346}, 0x0000}, /* Y_ADDR_START 0 */
-       {MT9E013_16BIT, {0x0348}, 0x0CCF}, /* X_ADDR_END 3279 */
-       {MT9E013_16BIT, {0x034A}, 0x099F}, /* Y_ADDR_END 2463 */
-       {MT9E013_16BIT, {0x034C}, 0x0CD0}, /* X_OUTPUT_SIZE 3280 */
-       {MT9E013_16BIT, {0x034E}, 0x09A0}, /* Y_OUTPUT_SIZE 2464 */
-       {MT9E013_16BIT, {0x3040}, 0x0041}, /* READ_MODE 0 0 0 0 0 0 0 1 1 */
-       /* DATAPATH_SELECT_TRUE_BAYER */
-       {MT9E013_16BIT | MT9E013_RMW, {0x306E}, 0x0010, 0x0},
-       /* Initial integration time */
-       {MT9E013_16BIT, {0x3010}, 0x0078}, /* FINE_CORRECTION 120 */
-       {MT9E013_16BIT, {0X3012}, 0x1F40}, /* COARSE_INTEGRATION_TIME 8000 */
-       {MT9E013_16BIT, {0X3014}, 0x03F6}, /* FINE_INTEGRATION_TIME 1014 */
-       /* Scaler configuration */
-       {MT9E013_16BIT, {0x0400}, 0x0000}, /* SCALE_MODE 0 */
-       {MT9E013_16BIT, {0x0404}, 0x0010}, /* SCALE_M 16 */
-       {MT9E013_TOK_TERM, {0}, 0}
-};
-
-static struct mt9e013_reg const mt9e013_STILL_6M_3fps[] = {
-       /* STILL 6M */
-       GROUPED_PARAMETER_HOLD_ENABLE,
-       /* Frame size & Timing Configuration*/
-       {MT9E013_16BIT, {0x0340}, 0x1F40}, /* FRAME_LENGTH_LINES 8000 */
-       {MT9E013_16BIT, {0x0342}, 0x1F40}, /* LINE_LENGTH_PCK 8000 */
-       {MT9E013_16BIT, {0x0344}, 0x0000}, /* X_ADDR_START 0 */
-       {MT9E013_16BIT, {0x0346}, 0x0134}, /* Y_ADDR_START 308 */
-       {MT9E013_16BIT, {0x0348}, 0x0CCF}, /* X_ADDR_END 3279 */
-       {MT9E013_16BIT, {0x034A}, 0x086D}, /* Y_ADDR_END 2157 */
-       {MT9E013_16BIT, {0x034C}, 0x0CD0}, /* X_OUTPUT_SIZE 3280 */
-       {MT9E013_16BIT, {0x034E}, 0x0738}, /* Y_OUTPUT_SIZE 1848 */
-       {MT9E013_16BIT, {0x3040}, 0x0041}, /* READ_MODE 0 0 0 0 0 0 0 1 1 */
-       /* DATAPATH_SELECT_TRUE_BAYER */
-       {MT9E013_16BIT | MT9E013_RMW, {0x306E}, 0x0010, 0x0},
-       /* Initial integration time */
-       {MT9E013_16BIT, {0x3010}, 0x0078}, /* FINE_CORRECTION 120 */
-       {MT9E013_16BIT, {0X3012}, 0x1F40}, /* COARSE_INTEGRATION_TIME 8000 */
-       {MT9E013_16BIT, {0X3014}, 0x03F6}, /* FINE_INTEGRATION_TIME 1014 */
-       /* Scaler configuration */
-       {MT9E013_16BIT, {0x0400}, 0x0000}, /* SCALE_MODE 0 */
-       {MT9E013_16BIT, {0x0404}, 0x0010}, /* SCALE_M 16 */
-       {MT9E013_TOK_TERM, {0}, 0}
-};
-
-static struct mt9e013_reg const mt9e013_STILL_2M_3fps[] = {
-       /* STILL 2M */
-       GROUPED_PARAMETER_HOLD_ENABLE,
-       /* Frame size & Timing Configuration */
-       {MT9E013_16BIT, {0x0340}, 0x1F40}, /* FRAME_LENGTH_LINES 8000 */
-       {MT9E013_16BIT, {0x0342}, 0x1F40}, /* LINE_LENGTH_PCK 8000 */
-       {MT9E013_16BIT, {0x0344}, 0x0000}, /* X_ADDR_START 0 */
-       {MT9E013_16BIT, {0x0346}, 0x0000}, /* Y_ADDR_START 0 */
-       {MT9E013_16BIT, {0x0348}, 0x0CD1}, /* X_ADDR_END 3281 */
-       {MT9E013_16BIT, {0x034A}, 0x09A1}, /* Y_ADDR_END 2465 */
-       {MT9E013_16BIT, {0x034C}, 0x0668}, /* X_OUTPUT_SIZE 1640 */
-       {MT9E013_16BIT, {0x034E}, 0x04D0}, /* Y_OUTPUT_SIZE 1232 */
-       {MT9E013_16BIT, {0x3040}, 0x04C3}, /* READ_MODE 0 0 0 0 0 1 0 3 3 */
-       /* DATAPATH_SELECT_TRUE_BAYER */
-       {MT9E013_16BIT | MT9E013_RMW, {0x306E}, 0x0010, 0x1},
-       /* Initial integration time */
-       {MT9E013_16BIT, {0x3010}, 0x0130}, /* FINE_CORRECTION 304 */
-       {MT9E013_16BIT, {0X3012}, 0x1F40}, /* COARSE_INTEGRATION_TIME 8000 */
-       {MT9E013_16BIT, {0X3014}, 0x0846}, /* FINE_INTEGRATION_TIME 2118 */
-       /* Scaler configuration */
-       {MT9E013_16BIT, {0x0400}, 0x0000}, /* SCALE_MODE 0 */
-       {MT9E013_16BIT, {0x0404}, 0x0010}, /* SCALE_M 16 */
-       {MT9E013_TOK_TERM, {0}, 0}
-};
 /*****************************still15ok*****************************/
 static struct mt9e013_reg const mt9e013_STILL_8M_15fps[] = {
        /*      STILL 8M */
@@ -354,6 +271,30 @@ static struct mt9e013_reg const mt9e013_WIDE_PREVIEW_30fps[] = {
        {MT9E013_TOK_TERM, {0}, 0}
 };
 
+static struct mt9e013_reg const mt9e013_PREVIEW1640_30fps[] = {
+       /*      PREVIEW 1640x1232 */
+       GROUPED_PARAMETER_HOLD_ENABLE,
+       /* Frame size & Timing Configuration*/
+       {MT9E013_16BIT, {0x0340},       0x0C1C  }, /*   FRAME_LENGTH_LINES      3100 */
+       {MT9E013_16BIT, {0x0342},       0x1020  }, /*   LINE_LENGTH_PCK 4128 */
+       {MT9E013_16BIT, {0x0344},       0x0000  }, /*   X_ADDR_START    0 */
+       {MT9E013_16BIT, {0x0346},       0x0000  }, /*   Y_ADDR_START    0 */
+       {MT9E013_16BIT, {0x0348},       0x0CD1  }, /*   X_ADDR_END      3281 */
+       {MT9E013_16BIT, {0x034A},       0x09A1  }, /*   Y_ADDR_END      2465 */
+       {MT9E013_16BIT, {0x034C},       0x0668  }, /*   X_OUTPUT_SIZE   1640 */
+       {MT9E013_16BIT, {0x034E},       0x04D0  }, /*   Y_OUTPUT_SIZE   1232 */
+       {MT9E013_16BIT, {0x3040},       0x04C3  }, /*   READ_MODE       0 0 0 0 0 1 0 3 3 */
+       {MT9E013_16BIT | MT9E013_RMW, {0x306E}, 0x0010, 0x1}, /* DATAPATH_SELECT_TRUE_BAYER */
+       /* Initial integration time */
+       {MT9E013_16BIT, {0x3010},       0x0130  }, /*   FINE_CORRECTION 304 */
+       {MT9E013_16BIT, {0X3012},       0x0573  }, /*   COARSE_INTEGRATION_TIME 1395 */
+       {MT9E013_16BIT, {0X3014},       0x0846  }, /*   FINE_INTEGRATION_TIME   2118 */
+       /* Scaler configuration */
+       {MT9E013_16BIT, {0x0400},       0x0000  }, /*   SCALE_MODE      0 */
+       {MT9E013_16BIT, {0x0404},       0x0010  }, /*   SCALE_M 16 */
+       {MT9E013_TOK_TERM, {0}, 0}
+};
+
 /*****************************video************************/
 static struct mt9e013_reg const mt9e013_1080p_strong_dvs_30fps[] = {
        /*      1080p strong dvs */
@@ -379,28 +320,6 @@ static struct mt9e013_reg const mt9e013_1080p_strong_dvs_30fps[] = {
        {MT9E013_TOK_TERM, {0}, 0}
 };
 
-static struct mt9e013_reg const mt9e013_720p_strong_dvs_30fps_low_fps[] = {
-       /* 720p strong dvs */
-       GROUPED_PARAMETER_HOLD_ENABLE,
-       {MT9E013_16BIT, {0x0340}, 0x408}, /* FRAME_LENGTH_LINES 1032 */
-       {MT9E013_16BIT, {0x0342}, 0x1838}, /* LINE_LENGTH_PCK 6200 */
-       {MT9E013_16BIT, {0x0344}, 0x0048}, /* X_ADDR_START 72 */
-       {MT9E013_16BIT, {0x0346}, 0x0160}, /* Y_ADDR_START 352 */
-       {MT9E013_16BIT, {0x0348}, 0x0C89}, /* X_ADDR_END 3209 */
-       {MT9E013_16BIT, {0x034A}, 0x083F}, /* Y_ADDR_END 2111 */
-       {MT9E013_16BIT, {0x034C}, 0x0620}, /* X_OUTPUT_SIZE 1568 */
-       {MT9E013_16BIT, {0x034E}, 0x0370}, /* Y_OUTPUT_SIZE 880 */
-       {MT9E013_16BIT, {0x3040}, 0x04C3}, /* READ_MODE 0 0 0 0 0 1 0 3 3 */
-       /* DATAPATH_SELECT_TRUE_BAYER */
-       {MT9E013_16BIT | MT9E013_RMW, {0x306E}, 0x0010, 0x1},
-       {MT9E013_16BIT, {0x3010}, 0x0130}, /* FINE_CORRECTION 304 */
-       {MT9E013_16BIT, {0x3012}, 0x0384}, /* COARSE_INTEGRATION_TIME 1395 */
-       {MT9E013_16BIT, {0X3014}, 0x0846}, /* FINE_INTEGRATION_TIME 2118 */
-       {MT9E013_16BIT, {0x0400}, 0x0002}, /* SCALE_MODE 2 */
-       {MT9E013_16BIT, {0x0404}, 0x0010}, /* SCALE_M 16 */
-       {MT9E013_TOK_TERM, {0}, 0}
-};
-
 static struct mt9e013_reg const mt9e013_720p_strong_dvs_30fps[] = {
        /*      720p strong dvs */
        GROUPED_PARAMETER_HOLD_ENABLE,
@@ -425,6 +344,30 @@ static struct mt9e013_reg const mt9e013_720p_strong_dvs_30fps[] = {
        {MT9E013_TOK_TERM, {0}, 0}
 };
 
+static struct mt9e013_reg const mt9e013_3RD_PARTY_PREVIEW1024_30fps[] = {
+       /*      PREVIEW 1024x576 special 'preview' mode to support 3rd party apps*/
+       GROUPED_PARAMETER_HOLD_ENABLE,
+       /* Frame size & Timing Configuration*/
+       {MT9E013_16BIT, {0x0340},       0x060E  }, /*   FRAME_LENGTH_LINES      1550 */
+       {MT9E013_16BIT, {0x0342},       0x1020  }, /*   LINE_LENGTH_PCK 4128 */
+       {MT9E013_16BIT, {0x0344},       0x0000  }, /*   X_ADDR_START    0 */
+       {MT9E013_16BIT, {0x0346},       0x0000  }, /*   Y_ADDR_START    0 */
+       {MT9E013_16BIT, {0x0348},       0x0CCF  }, /*   X_ADDR_END      3279 */
+       {MT9E013_16BIT, {0x034A},       0x099F  }, /*   Y_ADDR_END      2463 */
+       {MT9E013_16BIT, {0x034C},       0x0668  }, /*   X_OUTPUT_SIZE   1050 */
+       {MT9E013_16BIT, {0x034E},       0x0400  }, /*   Y_OUTPUT_SIZE   778 */
+       {MT9E013_16BIT, {0x3040},       0x44C3  }, /*   READ_MODE       0 1 1 0 0 1 0 3 3 */
+       {MT9E013_16BIT | MT9E013_RMW, {0x306E}, 0x0010, 0x1}, /* DATAPATH_SELECT_TRUE_BAYER */
+       /* Initial integration time */
+       {MT9E013_16BIT, {0x3010},       0x0130  }, /*   FINE_CORRECTION 304 */
+       {MT9E013_16BIT, {0X3012},       0x0573  }, /*   COARSE_INTEGRATION_TIME 1395 */
+       {MT9E013_16BIT, {0X3014},       0x0846  }, /*   FINE_INTEGRATION_TIME   2118 */
+       /* Scaler configuration */
+       {MT9E013_16BIT, {0x0400},       0x0000  }, /*   SCALE_MODE      2 */
+       {MT9E013_16BIT, {0x0404},       0x0010  }, /*   SCALE_M 25 */
+       {MT9E013_TOK_TERM, {0}, 0}
+};
+
 static struct mt9e013_reg const mt9e013_WVGA_strong_dvs_30fps[] = {
        /*      WVGA strong dvs */
        GROUPED_PARAMETER_HOLD_ENABLE,
@@ -435,8 +378,8 @@ static struct mt9e013_reg const mt9e013_WVGA_strong_dvs_30fps[] = {
        {MT9E013_16BIT, {0x0346},       0x00D0  }, /*   Y_ADDR_START    208 */
        {MT9E013_16BIT, {0x0348},       0x0CCD  }, /*   X_ADDR_END      3277 */
        {MT9E013_16BIT, {0x034A},       0x08CD  }, /*   Y_ADDR_END      2253 */
-       {MT9E013_16BIT, {0x034C},       0x0668  }, /*   X_OUTPUT_SIZE   1640 */
-       {MT9E013_16BIT, {0x034E},       0x0400  }, /*   Y_OUTPUT_SIZE   1024 */
+       {MT9E013_16BIT, {0x034C},       0x03F0  }, /*   X_OUTPUT_SIZE   1008 */
+       {MT9E013_16BIT, {0x034E},       0x0276  }, /*   Y_OUTPUT_SIZE   630 */
        {MT9E013_16BIT, {0x3040},       0x04C3  }, /*   READ_MODE       0 0 0 0 0 1 0 3 3 */
        {MT9E013_16BIT | MT9E013_RMW, {0x306E}, 0x0010, 0x1}, /* DATAPATH_SELECT_TRUE_BAYER */
        /* Initial integration time */
@@ -444,8 +387,8 @@ static struct mt9e013_reg const mt9e013_WVGA_strong_dvs_30fps[] = {
        {MT9E013_16BIT, {0X3012},       0x0573  }, /*   COARSE_INTEGRATION_TIME 1395 */
        {MT9E013_16BIT, {0X3014},       0x0846  }, /*   FINE_INTEGRATION_TIME   2118 */
        /* Scaler configuration */
-       {MT9E013_16BIT, {0x0400},       0x0000  }, /*   SCALE_MODE      0 */
-       {MT9E013_16BIT, {0x0404},       0x0010  }, /*   SCALE_M 16 */
+       {MT9E013_16BIT, {0x0400},       0x0002  }, /*   SCALE_MODE      2 */
+       {MT9E013_16BIT, {0x0404},       0x001A  }, /*   SCALE_M 26 */
        {MT9E013_TOK_TERM, {0}, 0}
 };
 
@@ -665,9 +608,21 @@ static struct mt9e013_resolution mt9e013_res_preview[] = {
                 .regs =        mt9e013_WIDE_PREVIEW_30fps      ,
                 .bin_factor_x =        1,
                 .bin_factor_y =        1,
-                .skip_frames = 1,
+                .skip_frames = 0,
+       },
+       {
+                .desc =        "PREVIEW1640_30fps"     ,
+                .width =       1640    ,
+                .height =      1232    ,
+                .fps =         30      ,
+                .used =        0       ,
+                .pixels_per_line = 0x1020, /* consistent with regs arrays */
+                .lines_per_frame = 0x060E, /* consistent with regs arrays */
+                .regs =        mt9e013_PREVIEW1640_30fps       ,
+                .bin_factor_x =        1,
+                .bin_factor_y =        1,
+                .skip_frames = 0,
        },
-
 };
 
 #define N_RES_PREVIEW (ARRAY_SIZE(mt9e013_res_preview))
@@ -728,7 +683,7 @@ static struct mt9e013_resolution mt9e013_res_video[] = {
                 .regs =        mt9e013_QCIF_strong_dvs_30fps   ,
                 .bin_factor_x =        2,
                 .bin_factor_y =        2,
-                .skip_frames = 1,
+                .skip_frames = 0,
        },
        {
                 .desc =        "QVGA_strong_dvs_30fps" ,
@@ -741,7 +696,7 @@ static struct mt9e013_resolution mt9e013_res_video[] = {
                 .regs =        mt9e013_QVGA_strong_dvs_30fps   ,
                 .bin_factor_x =        2,
                 .bin_factor_y =        2,
-                .skip_frames = 1,
+                .skip_frames = 0,
        },
        {
                 .desc =        "VGA_strong_dvs_30fps"  ,
@@ -754,12 +709,12 @@ static struct mt9e013_resolution mt9e013_res_video[] = {
                 .regs =        mt9e013_VGA_strong_dvs_30fps    ,
                 .bin_factor_x =        2,
                 .bin_factor_y =        2,
-                .skip_frames = 1,
+                .skip_frames = 0,
        },
        {
                 .desc =        "WVGA_strong_dvs_30fps" ,
-                .width =       1640    ,
-                .height =      1024    ,
+                .width =       1008    ,
+                .height =      630     ,
                 .fps =         30      ,
                 .used =        0       ,
                 .pixels_per_line = 0x1020, /* consistent with regs arrays */
@@ -767,7 +722,20 @@ static struct mt9e013_resolution mt9e013_res_video[] = {
                 .regs =        mt9e013_WVGA_strong_dvs_30fps   ,
                 .bin_factor_x =        1,
                 .bin_factor_y =        1,
-                .skip_frames = 1,
+                .skip_frames = 0,
+       },
+       {
+                .desc =        "3RD_PARTY_PREVIEW1024_30fps"   ,
+                .width =       1050    ,
+                .height =      778     ,
+                .fps =         30      ,
+                .used =        0       ,
+                .pixels_per_line = 0x1020, /* consistent with regs arrays */
+                .lines_per_frame = 0x060E, /* consistent with regs arrays */
+                .regs =        mt9e013_3RD_PARTY_PREVIEW1024_30fps     ,
+                .bin_factor_x =        2,
+                .bin_factor_y =        2,
+                .skip_frames = 0,
        },
        {
                 .desc =        "720p_strong_dvs_30fps" ,
@@ -780,7 +748,7 @@ static struct mt9e013_resolution mt9e013_res_video[] = {
                 .regs =        mt9e013_720p_strong_dvs_30fps   ,
                 .bin_factor_x =        1,
                 .bin_factor_y =        1,
-                .skip_frames = 1,
+                .skip_frames = 0,
        },
        {
                 .desc =        "1080p_strong_dvs_30fps",
@@ -793,7 +761,7 @@ static struct mt9e013_resolution mt9e013_res_video[] = {
                 .regs =        mt9e013_1080p_strong_dvs_30fps,
                 .bin_factor_x =        0,
                 .bin_factor_y =        0,
-                .skip_frames = 1,
+                .skip_frames = 0,
        },
 };
 
index 8e38a56..da42bd0 100644 (file)
@@ -278,30 +278,6 @@ static struct mt9e013_reg const mt9e013_WIDE_PREVIEW_30fps[] = {
        {MT9E013_TOK_TERM, {0}, 0}
 };
 
-static struct mt9e013_reg const mt9e013_PREVIEW1640_30fps[] = {
-       /*      PREVIEW 1640 */
-       GROUPED_PARAMETER_HOLD_ENABLE,
-       /* Frame size & Timing Configuration*/
-       {MT9E013_16BIT, {0x0340},       0x060E  }, /*   FRAME_LENGTH_LINES      1550 */
-       {MT9E013_16BIT, {0x0342},       0x1020  }, /*   LINE_LENGTH_PCK 4128 */
-       {MT9E013_16BIT, {0x0344},       0x0000  }, /*   X_ADDR_START    0 */
-       {MT9E013_16BIT, {0x0346},       0x00D0  }, /*   Y_ADDR_START    208 */
-       {MT9E013_16BIT, {0x0348},       0x0CCD  }, /*   X_ADDR_END      3277 */
-       {MT9E013_16BIT, {0x034A},       0x08CD  }, /*   Y_ADDR_END      2253 */
-       {MT9E013_16BIT, {0x034C},       0x0668  }, /*   X_OUTPUT_SIZE   1640 */
-       {MT9E013_16BIT, {0x034E},       0x0400  }, /*   Y_OUTPUT_SIZE   1024 */
-       {MT9E013_16BIT, {0x3040},       0x44C3  }, /*   READ_MODE       0 1 1 0 0 1 0 3 3 */
-       {MT9E013_16BIT | MT9E013_RMW, {0x306E}, 0x0010, 0x1}, /* DATAPATH_SELECT_TRUE_BAYER */
-       /* Initial integration time */
-       {MT9E013_16BIT, {0x3010},       0x0130  }, /*   FINE_CORRECTION 304 */
-       {MT9E013_16BIT, {0X3012},       0x0573  }, /*   COARSE_INTEGRATION_TIME 1395 */
-       {MT9E013_16BIT, {0X3014},       0x0846  }, /*   FINE_INTEGRATION_TIME   2118 */
-       /* Scaler configuration */
-       {MT9E013_16BIT, {0x0400},       0x0000  }, /*   SCALE_MODE      0 */
-       {MT9E013_16BIT, {0x0404},       0x0010  }, /*   SCALE_M 16 */
-       {MT9E013_TOK_TERM, {0}, 0}
-};
-
 /*****************************video************************/
 static struct mt9e013_reg const mt9e013_1080p_strong_dvs_30fps[] = {
        /*      1080p strong dvs */
@@ -351,6 +327,30 @@ static struct mt9e013_reg const mt9e013_720p_strong_dvs_30fps[] = {
        {MT9E013_TOK_TERM, {0}, 0}
 };
 
+static struct mt9e013_reg const mt9e013_3RD_PARTY_PREVIEW1024_30fps[] = {
+       /*      PREVIEW 1024x576 special 'preview' mode to support 3rd party apps*/
+       GROUPED_PARAMETER_HOLD_ENABLE,
+       /* Frame size & Timing Configuration*/
+       {MT9E013_16BIT, {0x0340},       0x060E  }, /*   FRAME_LENGTH_LINES      1550 */
+       {MT9E013_16BIT, {0x0342},       0x1020  }, /*   LINE_LENGTH_PCK 4128 */
+       {MT9E013_16BIT, {0x0344},       0x0000  }, /*   X_ADDR_START    0 */
+       {MT9E013_16BIT, {0x0346},       0x0000  }, /*   Y_ADDR_START    0 */
+       {MT9E013_16BIT, {0x0348},       0x0CCF  }, /*   X_ADDR_END      3279 */
+       {MT9E013_16BIT, {0x034A},       0x099F  }, /*   Y_ADDR_END      2463 */
+       {MT9E013_16BIT, {0x034C},       0x0668  }, /*   X_OUTPUT_SIZE   1050 */
+       {MT9E013_16BIT, {0x034E},       0x0400  }, /*   Y_OUTPUT_SIZE   778 */
+       {MT9E013_16BIT, {0x3040},       0x44C3  }, /*   READ_MODE       0 1 1 0 0 1 0 3 3 */
+       {MT9E013_16BIT | MT9E013_RMW, {0x306E}, 0x0010, 0x1}, /* DATAPATH_SELECT_TRUE_BAYER */
+       /* Initial integration time */
+       {MT9E013_16BIT, {0x3010},       0x0130  }, /*   FINE_CORRECTION 304 */
+       {MT9E013_16BIT, {0X3012},       0x0573  }, /*   COARSE_INTEGRATION_TIME 1395 */
+       {MT9E013_16BIT, {0X3014},       0x0846  }, /*   FINE_INTEGRATION_TIME   2118 */
+       /* Scaler configuration */
+       {MT9E013_16BIT, {0x0400},       0x0000  }, /*   SCALE_MODE      2 */
+       {MT9E013_16BIT, {0x0404},       0x0010  }, /*   SCALE_M 25 */
+       {MT9E013_TOK_TERM, {0}, 0}
+};
+
 static struct mt9e013_reg const mt9e013_WVGA_strong_dvs_30fps[] = {
        /*      WVGA strong dvs */
        GROUPED_PARAMETER_HOLD_ENABLE,
@@ -361,17 +361,17 @@ static struct mt9e013_reg const mt9e013_WVGA_strong_dvs_30fps[] = {
        {MT9E013_16BIT, {0x0346},       0x00D0  }, /*   Y_ADDR_START    208 */
        {MT9E013_16BIT, {0x0348},       0x0CCD  }, /*   X_ADDR_END      3277 */
        {MT9E013_16BIT, {0x034A},       0x08CD  }, /*   Y_ADDR_END      2253 */
-       {MT9E013_16BIT, {0x034C},       0x0668  }, /*   X_OUTPUT_SIZE   1640 */
-       {MT9E013_16BIT, {0x034E},       0x0400  }, /*   Y_OUTPUT_SIZE   1024 */
-       {MT9E013_16BIT, {0x3040},       0x44C3  }, /*   READ_MODE       0 1 1 0 0 1 0 3 3 */
+       {MT9E013_16BIT, {0x034C},       0x03F0  }, /*   X_OUTPUT_SIZE   1008 */
+       {MT9E013_16BIT, {0x034E},       0x0276  }, /*   Y_OUTPUT_SIZE   630 */
+       {MT9E013_16BIT, {0x3040},       0x04C3  }, /*   READ_MODE       0 0 0 0 0 1 0 3 3 */
        {MT9E013_16BIT | MT9E013_RMW, {0x306E}, 0x0010, 0x1}, /* DATAPATH_SELECT_TRUE_BAYER */
        /* Initial integration time */
        {MT9E013_16BIT, {0x3010},       0x0130  }, /*   FINE_CORRECTION 304 */
        {MT9E013_16BIT, {0X3012},       0x0573  }, /*   COARSE_INTEGRATION_TIME 1395 */
        {MT9E013_16BIT, {0X3014},       0x0846  }, /*   FINE_INTEGRATION_TIME   2118 */
        /* Scaler configuration */
-       {MT9E013_16BIT, {0x0400},       0x0000  }, /*   SCALE_MODE      0 */
-       {MT9E013_16BIT, {0x0404},       0x0010  }, /*   SCALE_M 16 */
+       {MT9E013_16BIT, {0x0400},       0x0002  }, /*   SCALE_MODE      2 */
+       {MT9E013_16BIT, {0x0404},       0x001A  }, /*   SCALE_M 26 */
        {MT9E013_TOK_TERM, {0}, 0}
 };
 
@@ -601,7 +601,7 @@ static struct mt9e013_resolution mt9e013_res_preview[] = {
                 .regs =        mt9e013_PREVIEW_30fps   ,
                 .bin_factor_x =        2,
                 .bin_factor_y =        2,
-                .skip_frames = 1,
+                .skip_frames = 0,
        },
        {
                 .desc =        "WIDE_PREVIEW_30fps"    ,
@@ -614,21 +614,8 @@ static struct mt9e013_resolution mt9e013_res_preview[] = {
                 .regs =        mt9e013_WIDE_PREVIEW_30fps      ,
                 .bin_factor_x =        2,
                 .bin_factor_y =        2,
-                .skip_frames = 1,
+                .skip_frames = 0
        },
-       {
-                .desc =        "mt9e013_PREVIEW1640_30fps"     ,
-                .width =       1640    ,
-                .height =      1232    ,
-                .fps =         30      ,
-                .used =        0       ,
-                .pixels_per_line = 0x1020, /* consistent with regs arrays */
-                .lines_per_frame = 0x060E, /* consistent with regs arrays */
-                .regs =        mt9e013_PREVIEW_30fps   ,
-                .bin_factor_x =        2,
-                .bin_factor_y =        2,
-                .skip_frames = 1,
-       }
 };
 
 #define N_RES_PREVIEW (ARRAY_SIZE(mt9e013_res_preview))
@@ -689,7 +676,7 @@ static struct mt9e013_resolution mt9e013_res_video[] = {
                 .regs =        mt9e013_QCIF_strong_dvs_30fps   ,
                 .bin_factor_x =        2,
                 .bin_factor_y =        2,
-                .skip_frames = 1,
+                .skip_frames = 0,
        },
        {
                 .desc =        "QVGA_strong_dvs_30fps" ,
@@ -702,7 +689,7 @@ static struct mt9e013_resolution mt9e013_res_video[] = {
                 .regs =        mt9e013_QVGA_strong_dvs_30fps   ,
                 .bin_factor_x =        2,
                 .bin_factor_y =        2,
-                .skip_frames = 1,
+                .skip_frames = 0,
        },
        {
                 .desc =        "VGA_strong_dvs_30fps"  ,
@@ -715,12 +702,12 @@ static struct mt9e013_resolution mt9e013_res_video[] = {
                 .regs =        mt9e013_VGA_strong_dvs_30fps    ,
                 .bin_factor_x =        2,
                 .bin_factor_y =        2,
-                .skip_frames = 1,
+                .skip_frames = 0,
        },
        {
                 .desc =        "WVGA_strong_dvs_30fps" ,
-                .width =       1640    ,
-                .height =      1024    ,
+                .width =       1008    ,
+                .height =      630     ,
                 .fps =         30      ,
                 .used =        0       ,
                 .pixels_per_line = 0x1020, /* consistent with regs arrays */
@@ -728,7 +715,20 @@ static struct mt9e013_resolution mt9e013_res_video[] = {
                 .regs =        mt9e013_WVGA_strong_dvs_30fps   ,
                 .bin_factor_x =        1,
                 .bin_factor_y =        1,
-                .skip_frames = 1,
+                .skip_frames = 0,
+       },
+       {
+                .desc =        "3RD_PARTY_PREVIEW1024_30fps"   ,
+                .width =       1050    ,
+                .height =      778     ,
+                .fps =         30      ,
+                .used =        0       ,
+                .pixels_per_line = 0x1020, /* consistent with regs arrays */
+                .lines_per_frame = 0x060E, /* consistent with regs arrays */
+                .regs =        mt9e013_3RD_PARTY_PREVIEW1024_30fps     ,
+                .bin_factor_x =        2,
+                .bin_factor_y =        2,
+                .skip_frames = 0,
        },
        {
                 .desc =        "720p_strong_dvs_30fps" ,
@@ -741,7 +741,7 @@ static struct mt9e013_resolution mt9e013_res_video[] = {
                 .regs =        mt9e013_720p_strong_dvs_30fps   ,
                 .bin_factor_x =        1,
                 .bin_factor_y =        1,
-                .skip_frames = 1,
+                .skip_frames = 0,
        },
        {
                 .desc =        "1080p_strong_dvs_30fps",
@@ -754,7 +754,7 @@ static struct mt9e013_resolution mt9e013_res_video[] = {
                 .regs =        mt9e013_1080p_strong_dvs_30fps,
                 .bin_factor_x =        0,
                 .bin_factor_y =        0,
-                .skip_frames = 1,
+                .skip_frames = 0,
        },
        {
                 .desc =        "enzofullhd_strong_dvs_30fps",
@@ -767,7 +767,7 @@ static struct mt9e013_resolution mt9e013_res_video[] = {
                 .regs =        enzofullhd_strong_dvs_30fps     ,
                 .bin_factor_x =        1,
                 .bin_factor_y =        1,
-                .skip_frames = 1,
+                .skip_frames = 0,
        },
 };