// Sony Ericsson CamDriver Version v4.20_Vivre Couleurs™ by BrAzzUkA´s for w580
// Version v4.20_Vivre Couleurs™ BrAzzUkA´s
// Optimized for the Sony Ericsson W580 ** Works w580/s500 **
//************************************************** ***************************
// OmniVision 2640 camera driver setup file for ONLY_LINDSAY
//************************************************** ***************************
//
// Release history:
// 2008-xx-xx Rev 4.20 - Vivre Couleurs™ Stable
// - Color Correction Stable by BrAzzUkA´s
// - Levels Color Correction Normal/High/Low
// - More Brightness
// - New JPEG compression buffer size based Qtable by Raiderski
// - Fix White Balance WB
// - Implemented unlock the property clock 24mhz with Master Clock™ 24mhz
// - New Lens correction
// - FRAME_RATE_30_FPS/FRAME_RATE_15_FPS/FRAME_RATE_14_FPS/FRAME_RATE_12_FPS
// - New White balance and Color Correction RGB
// - SENSOR_30FPS_SVGA_MODE
// - SENSOR_15FPS_UXGA_MODE
//
// 2008-02-16 Rev 4.17 - Vivre Couleurs™ by BrAzzUkA´s
// - Added properties Image stabilization/Photo metering/Mirroring Macros
// - Color_CC Color Correction by Raiderski
//
// 2008-01-21 Rev 4.0 - Master Clock™ w580 by BrAzzUkA´s
// - New Macros for JPEG new sequence buffer sizes by BrAzzUkA´s
// - New JPEG compression (Q scaling factor) tables for JPEG retry by Number1 and others modders
// - New White balance fixed (W910),exposure fix for w580 by BrAzUkA´s
// - Implemented property for work with 24mhz by BrAzUkA´s
//
// 2008-01-21 Rev 3.9 - New Sequence Power on/off by BrAzzUkA´s
// 2008-01-12 Rev 3.8 - Set ExposureTime for Xenon: MAX 1360 by BrAzUkA´s
// 2007-09-27 Rev 3.7 - Minimal JPEG scaling 97% to 100%
// 2007-09-27 Rev xxx - 100% compression for all resolutions under fine mode
// 2007-09-27 Rev xxx - Reduced ISO to 50 before GAIN calculations
// 2007-09-27 Rev xxx - Increased exposure time for all framerates
// 2007-09-27 Rev xxx - Corrected buffer for all resolutions
// 2007-04-30 Rev 3.6 - Release for Lindsay ITP and signaling build
// 2007-04-30 Rev xxx - Final settings for Lindsay second source optics
// 2007-04-18 Rev 3.5 - Release for Lindsay ITP and signaling build
// 2007-04-18 Rev xxx - Corrected typo in seq_get_prop_0
// 2007-04-17 Rev xxx - Dual source detection and settings variation for Lindsay (only)
// 2006-11-07 Rev 3.4 - Release for Lindsay ITP and signaling build
// 2006-11-07 Rev xxx - Added sup_size 15[140,F0,5DC] VF 240 x 180
// 2006-10-05 Rev xxx - Release for Cyndi/Ella ITP and signaling build
// 2006-09-29 Rev 3.3 - Release for Ai signaling build
// Corrected Wait Time for 13.89fps mode
// 2006-09-18 Rev xxx - Release for Lindsay ITP and signaling build
// 2006-07-27 Rev xxx - Release for Ella ITP and signaling build
// 2006-07-20 Rev xxx - Release for Ai signaling build (no changes)
// 2006-07-19 Rev 3.2 - Release for Cyndi signaling build
// Changed power on/off sequence to fix power consumption problems
// 2006-07-19 Rev xxx - Corrected Exposure Time of Xenon for 13.89fps of Cyndi/Ai
// 2006-07-13 Rev 3.1 - Release for Ai signaling build
// Changed frame rate of ID 0x14 to max 13.89fps
// 2006-07-07 Rev xxx - Release for Charlotte ITP and signaling build
// 2006-07-07 Rev 3.0 - Release for Thelma/Miyu/Ai signaling build
// Added sup_properties = b[0,0,0] and c[0,0,0]
// 2006-05-30 Rev 2.9 - Release for Cyndi ITP and signaling build
// All the changes are made to fix Broken Image
// Changed seq_set_prop_6
// Added sup_sizes = 14[140,F0,5DC] VF 320 x 240
// Added cam_post_processing_14=01
// Added seq_vf_config_14
// 2006-05-03 Rev xxx - Release for Cyndi ITP and signaling build (no changes)
// 2006-05-02 Rev xxx - Release for Charlotte ITP and signaling build (no changes)
// 2006-04-21 Rev 2.8 - Release for Thelma/Miyu signaling build
// Changed EV settings to lower AE target level
// 2006-04-11 Rev xxx - Release for Ai ITP build (no changes)
// 2006-04-05 Rev xxx - Release for Cyndi signaling build
// Changed power off sequence for Cyndi
// 2006-03-27 Rev xxx - Release for Charlotte ITP and signaling build (no changes)
// 2006-03-27 Rev xxx - Release for Thelma/Miyu signaling build (no changes)
// 2006-03-23 Rev 2.7 - Release for Thelma/Miyu ITP build
// Changed 13MHz input clock setting for green noise issue
// 2006-03-22 Rev xxx - Release for Charlotte ITP and signaling build
// 2006-03-20 Rev 2.6 - Release for Thelma/Miyu ITP and signaling build
// 2006-03-20 Rev xxx - Changed AWB settings
// Changed max gain of AGC to x8
// Changed clock divider setting at seq_init to reduce high frequency
// Changed stop/start AE sequence
// Disabled contrast/brightness
// Restore Rev1A settings
// 2006-03-17 Rev xxx - Removed all conditions on 2x capability, since applies to all products now.
// 2006-03-17 Rev 2.5 - Release for Cyndi ITP and signaling build
// Changed output drive select to "2x capability" for Cyndi
// Changed Cyndi power off sequence
// 2006-03-15 Rev 2.4 - Re-release 2.4 for Charlotte signaling build
// 2006-03-15 Rev xxx - Changed output drive select to "2x capability" for Charlotte for Rev2B
// 2006-03-14 Rev 2.4 - Release for Charlotte signaling build
// 2006-03-13 Rev xxx - Changed output drive select to "2x capability" for Charlotte
// 2006-03-13 Rev 2.3 - Release for Thelma/Miyu signaling build (no changes)
// 2006-03-11 Rev xxx - incorporate OmniVision Settings 0.22 (2006-02-28)
// Changed clock settings for reduce noise
// Changed flicker settings
// Changed Gamma settings
// Changed Sharpness and UV adjust setting
// Changed WB minimum gain
// then base value of ISO was aslo Changed to ISO110
// Changed WB settings
// Changed ISO and MWB settings for Xenon flash
// Corrected zoom settings of VGA
// Changed AE settings of normal light mode,
// Changed wait time of switching to VT
// 2006-03-06 Rev xxx - Release for Charlotte signaling build (no changes)
// 2006-03-01 Rev xxx - Release for Miyu signaling build (no changes)
// 2006-02-26 Rev 2.2 - Release for Thelma ITP and signaling build
// Changed AE target and Gamma settings
// 2006-02-25 Rev xxx - Changed 13MHz input clock setting for Rev2B
// Added flicker base setting for Rev2B
// Added manually AGC setting at seq_init to re-do BLC calibration
// Changed low light setting for AE freeze issue
// Changed AWB setting for Rev2B
// Changed AWB minimum gain setting to reduce noise for Rev2B
// Changed lens shading correction settings for Rev2B
// Replaced Rev2A to Rev2B (their settings are equal)
// Reserved REG_6 to save sensor version
// 2006-02-23 Rev xxx - Release for Thelma signaling build (no changes)
// 2006-02-22 Rev xxx - Release for Charlotte signaling build (no changes)
// 2006-02-22 Rev 2.1 - Release for Cyndi ITP and signaling build
// Changed CHECK_FLASHED (0=not flashed 1=flashed)
// 2006-02-14 Rev xxx - Release for Cyndi signaling build (no changes)
// 2006-02-13 Rev xxx - Release for Charlotte signaling build (no changes)
// 2006-02-13 Rev xxx - Release for Thelma signaling build (no changes)
// 2006-02-10 Rev xxx - Release for Miyu ITP build
// 2006-02-10 Rev 2.0 - incorporate OmniVision Settings 0.21 (2006-01-26)
// Added Rev2A sensor settings
// Select appropriate settings by using sensor version
// Changed flicker base settings for 13MHz input
// Added YUV setting at seq_ss_stop/seq_init for power save
// 2006-02-09 Rev xxx - Release for Cyndi signaling build (no changes)
// 2006-02-07 Rev xxx - Release for Charlotte signaling build (no changes)
// 2006-02-03 Rev 1.3 - Release for Thelma/Miyu signaling build
// Changed Thelma/Miyu power off sequence
// Changed AWB settings at seq_init for [DMS00012668]
// 2006-02-02 Rev 1.2 - Release for Cyndi ITP and Signaling build
// Changed Cyndi power on/off sequence
// 2006-01-31 Rev xxx - Release for Charlotte signaling build (no changes)
// 2006-01-31 Rev xxx - Release for Miyu signaling build (no changes)
// 2006-01-31 Rev 1.01 - Added resolution ID of VT (max 15fps) for only Miyu
// 2006-01-29 Rev xxx - Release for Thelma signaling build (no changes)
// 2006-01-29 Rev 1.0 - Changed frame rate of VT to max 15fps for Cyndi/Thelma
// Changed VF_CONFIG_SET for Xenon
// Changed criterion of auto Xenon flash
// Changed WB and gamma settings
// Corrected JPEG Quality of Xenon
// 2006-01-25 Rev xxx - Release for Charlotte signaling build (no changes)
// 2006-01-21 Rev 0.13 - Release for Thelma signaling build
// 2006-01-21 Rev xxx - Added new resolution ID and settings for VT of Cyndi/Thelma
// Changed color reproduction setting
// Changed JPEG quality, it was raised because it was too low.
// Changed lens shading correction settings
// Changed WB settings
// 2006-01-14 Rev 0.12 - Release for Thelma signaling build
// 2006-01-14 Rev xxx - incorporate OmniVision Settings 0.20 (2006-01-06)
// Changed zoom settings for reducing the center move
// Changed JPEG quality
// Changed EV settings to change luminance by 2dB
// Changed weights of average-based AEC/AGC
// Changed color of sepia to equalize Clara's sepia
// Changed fixed frame rate setting
// Changed WB settings
// Changed GET_ISOVALUE, GET_FRAME_RATE for Auto Pixel Clock
// Added set properties at the end of seq_init for ITP
// Changed AEC/AGC settings for Xenon flash
// 2006-01-04 Rev 0.11 - Release for Charlotte ITP and signaling build
// 2006-01-04 Rev xxx - Changed clock off setting for inverting signal in Charlotte
// 2005-12-26 Rev xxx - Changed parameters related to Image Quality for sensor Rev1A
// Changed gamma settings
// Added lens correction settings for only sensor Rev1A
// Changed EV range only from -2.0EV to +2.0EV
// Changed mode of AEC/AGC to Average mode
// Added 16-zone average weight settings of AEC/AGC
// Changed output drive select to "2x capability" for Thelma
// 2005-12-17 Rev 0.10 - Release for Thelma phone software build
// 2005-12-17 Rev xxx - [DMS00012668] Changed seq_vf_config, it is added wait time
// Reserved REG_7 to save resolution ID
// [DMS00023646] Added 144x176, 96x128 for VT in Thelma/Cyndi
// But they are not available yet
// 2005-12-16 Rev xxx - Changed clock off setting for inverting signal in Thelma
// 2005-12-14 Rev 0.9 - Release for Charlotte ITP build
// 2005-12-14 Rev xxx - Changed all phones to use 13MHz clock
// 2005-12-10 Rev 0.8 - Release for Thelma phone software build
// 2005-12-10 Rev xxx - incorporate OmniVision Settings 0.18 (2005-12-10)
// Changed init settings of AWB and Black Level Adjust
// Changed Zoom sequence to mask an invalid frame except for SS
// Changed YUV SS sequence for Xenon as well as one shot JPEG SS
// 2005-12-06 Rev xxx - Moved $f commands to the end of each I2C sequence
// 2005-12-04 Rev 0.7 - Release for Thelma phone software build
// 2005-12-02 Rev xxx - Corrected seq_get_prop_b, reversed ISO and ShutterSpeed
// Changed how to handle JPEG retry counter, default is 0
// Corrected GET_SHUTTERSPEED macro for low frame rate
// Changed wait time at JPEG snap shot
// 2005-12-01 Rev xxx - Corrected frame rate settings of VF config
// Corrected GET_ISOVALUE macro
// Changed Xenon flash sequence
// 2005-11-28 Rev 0.6 - Release for Thelma first adaptation of phone software
// 2005-11-26 Rev xxx - Added Xenon flash sequence
// Reserved REG_8 for auto Xenon flash
// Smartened up macros of JPEG snap shot sequence
// 2005-11-25 Rev xxx - Changed Property 12 - get EXIF Information 2
// Byte 3 is changed to Qscale factor from Quality
// 2005-11-25 Rev xxx - Changed Property 11,12 - get EXIF Information 1,2
// Reserved REG_9 REG_A for save EXIF information
// Changed frame rate of video recode
// Changed JPEG retry sequence
// Reserved REG_B REG_C REG_D REG_E REG_F for JPEG retry
// Changed Thelma power on/off sequence
// 2005-11-23 Rev xxx - Changed JPEG without header mode of OV2640,
// because OV2640's header is incompatible with EXIF standard
// Added JPEG header sequence for OV2640
// Added JPEG OneShot/Retry sequence
// 2005-11-15 Rev 0.5 - Update release for Thelma EP2.1 ITP
// Changed resolutions ID which values are mentioned in HEX
// Deleted 90deg rotation of Thelma VF 220x168
// 2005-11-14 Rev 0.4 - Update release for Thelma EP2.1 ITP
// Changed Power Off sequence for Thelma EP1.0
// 2005-11-12 Rev 0.3 - Release for Thelma EP2.1 ITP
// 2005-11-12 Rev xxx - Changed Test Pattern property
// 2005-11-12 Rev xxx - Update Thelma VGA camera control
// Changed Xenon flash property
// 2005-11-11 Rev xxx - Add additional zoom configs, also simplify them a bit
// update Charlotte I2C power control
// make test pattern property shared
// explictly set registers for FLICKER_BASE_SETTINGS
// 2005-11-12 Rev xxx - incorporate OmniVision Settings 0.16 (2005-11-10)
// Changed color bar test pattern setting for Thelma ITP
// 2005-11-11 Rev xxx - Corrected mistake of macro for Thelma VGA camera
// 2005-11-10 Rev xxx - incorporate OmniVision Settings 0.15 (2005-11-08)
// Added VF 320 x 240 configs for Cyndi
// Changed Thelma power on/off sequence for twin camera
// Added 90deg rotation of VF for Thelma ITP
// Added Test pattern property (30) for Thelma ITP
// 2005-11-07 Rev xxx - incorporate OmniVision resolutions for zoom
// 2005-11-07 Rev xxx - incorporate OmniVision Settings 0.14 (2005-11-03)
// Added input clock settings: 13MHz/24MHz
// 2005-11-04 Rev 0.2 - Release for Charlotte EP1.5 build
// 2005-11-04 Rev xxx - Basic snapshot
// Added VR 176 x 144 configs
// 2005-11-04 Rev xxx - Corrected EV(0) and WB(1) properties
// Changed a color of Sepia
// Changed power on/off sequence for Thelma Wing-Board2
// Changed resolution 0xC to 220x168 instead of 220x165
// 2005-11-03 Rev xxx - Charlotte will attempt to run with 24MHz clock
// Corrected Charlotte power_on sequence and VF size
// Fixed vertical mirror property
// Fixed typos in size configs
// 2005-11-02 Rev xxx - incorporate OmniVision Settings 0.13 (2005-11-01)
// change I2C address 0x60 -> 0x30
// change power on/off sequence for Thelma Wing-Board1
// change CLK setting to 13MHz
// add vsync/hsync settings are same as OVT settings
// 2005-11-01 Rev xxx - incorporate OmniVision Settings 0.11 (2005-10-28)
// use REG_BANK_0x macros whenever possible
// 2005-10-28 Rev xxx - incorporate OmniVision Settings 0.10 (2005-10-27)
// 2005-11-01 Rev 0.1 - Skeleton driver:
// all properties and resolutions present, but empty