#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/input.h>
#include "gspca.h"
#include "jpeg.h"
MODULE_AUTHOR("Jean-Francois Moine <http://moinejf.free.fr>, Serge A. Suchkov <Serge.A.S@tochka.ru>");
MODULE_DESCRIPTION("GSPCA ZC03xx/VC3xx USB Camera Driver");
MODULE_LICENSE("GPL");
static int force_sensor = -1;
#define REG08_DEF 3 /* default JPEG compression (75%) */
#include "zc3xx-reg.h"
struct sd {
struct gspca_dev gspca_dev;
struct {
struct v4l2_ctrl *gamma;
struct v4l2_ctrl *brightness;
struct v4l2_ctrl *contrast;
};
struct {
struct v4l2_ctrl *autogain;
struct v4l2_ctrl *exposure;
};
struct v4l2_ctrl *plfreq;
struct v4l2_ctrl *sharpness;
struct v4l2_ctrl *jpegqual;
struct work_struct work;
u8 reg08;
u8 bridge;
u8 sensor;
u16 chip_revision;
u8 jpeg_hdr[JPEG_HDR_SZ];
};
enum bridges {
BRIDGE_ZC301,
BRIDGE_ZC303,
};
enum sensors {
SENSOR_ADCM2700,
SENSOR_CS2102,
SENSOR_CS2102K,
SENSOR_GC0303,
SENSOR_GC0305,
SENSOR_HDCS2020,
SENSOR_HV7131B,
SENSOR_HV7131R,
SENSOR_ICM105A,
SENSOR_MC501CB,
SENSOR_MT9V111_1,
SENSOR_MT9V111_3,
SENSOR_OV7620,
SENSOR_OV7630C,
SENSOR_PAS106,
SENSOR_PAS202B,
SENSOR_PB0330,
SENSOR_PO2030,
SENSOR_TAS5130C,
SENSOR_MAX
};
static const struct v4l2_pix_format vga_mode[] = {
{320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 320,
.sizeimage = 320 * 240 * 3 / 8 + 590,
.colorspace = V4L2_COLORSPACE_JPEG,
.priv = 1},
{640, 480, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 640,
.sizeimage = 640 * 480 * 3 / 8 + 590,
.colorspace = V4L2_COLORSPACE_JPEG,
.priv = 0},
};
static const struct v4l2_pix_format broken_vga_mode[] = {
{320, 232, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 320,
.sizeimage = 320 * 232 * 4 / 8 + 590,
.colorspace = V4L2_COLORSPACE_JPEG,
.priv = 1},
{640, 472, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 640,
.sizeimage = 640 * 472 * 3 / 8 + 590,
.colorspace = V4L2_COLORSPACE_JPEG,
.priv = 0},
};
static const struct v4l2_pix_format sif_mode[] = {
{176, 144, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 176,
.sizeimage = 176 * 144 * 3 / 8 + 590,
.colorspace = V4L2_COLORSPACE_JPEG,
.priv = 1},
{352, 288, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 352,
.sizeimage = 352 * 288 * 3 / 8 + 590,
.colorspace = V4L2_COLORSPACE_JPEG,
.priv = 0},
};
static u8 jpeg_qual[] = {50, 75, 87, };
struct usb_action {
u8 req;
u8 val;
u16 idx;
};
static const struct usb_action adcm2700_Initial[] = {
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x04, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x00, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0xd3, ZC3XX_R08B_I2CDEVICEADDR},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xd8, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
{0xa0, 0xde, ZC3XX_R09C_WINHEIGHTLOW},
{0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW},
{0xbb, 0x00, 0x0400},
{0xdd, 0x00, 0x0010},
{0xbb, 0x0f, 0x140f},
{0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xa0, 0x58, ZC3XX_R116_RGAIN},
{0xa0, 0x5a, ZC3XX_R118_BGAIN},
{0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0xd3, ZC3XX_R08B_I2CDEVICEADDR},
{0xbb, 0x00, 0x0408},
{0xdd, 0x00, 0x0200},
{0xbb, 0x00, 0x0400},
{0xdd, 0x00, 0x0010},
{0xbb, 0x0f, 0x140f},
{0xbb, 0xe0, 0x0c2e},
{0xbb, 0x01, 0x2000},
{0xbb, 0x96, 0x2400},
{0xbb, 0x06, 0x1006},
{0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},
{0xdd, 0x00, 0x0010},
{0xaa, 0xfe, 0x0002},
{0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},
{0xdd, 0x00, 0x0010},
{0xbb, 0x5f, 0x2090},
{0xbb, 0x01, 0x8000},
{0xbb, 0x09, 0x8400},
{0xbb, 0x86, 0x0002},
{0xbb, 0xe6, 0x0401},
{0xbb, 0x86, 0x0802},
{0xbb, 0xe6, 0x0c01},
{0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},
{0xdd, 0x00, 0x0010},
{0xaa, 0xfe, 0x0000},
{0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},
{0xdd, 0x00, 0x0010},
{0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},
{0xaa, 0xfe, 0x0020},
{0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},
{0xaa, 0xfe, 0x0002},
{0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},
{0xaa, 0xb4, 0xcd37},
{0xaa, 0xa4, 0x0004},
{0xaa, 0xa8, 0x0007},
{0xaa, 0xac, 0x0004},
{0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},
{0xdd, 0x00, 0x0010},
{0xaa, 0xfe, 0x0000},
{0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},
{0xdd, 0x00, 0x0010},
{0xbb, 0x04, 0x0400},
{0xdd, 0x00, 0x0100},
{0xbb, 0x01, 0x0400},
{0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},
{0xaa, 0xfe, 0x0002},
{0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},
{0xbb, 0x41, 0x2803},
{0xbb, 0x40, 0x2c03},
{0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},
{0xaa, 0xfe, 0x0010},
{}
};
static const struct usb_action adcm2700_InitialScale[] = {
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x10, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x00, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0xd3, ZC3XX_R08B_I2CDEVICEADDR},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xd0, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
{0xa0, 0xd8, ZC3XX_R09C_WINHEIGHTLOW},
{0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW},
{0xbb, 0x00, 0x0400},
{0xdd, 0x00, 0x0010},
{0xbb, 0x0f, 0x140f},
{0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xa0, 0x58, ZC3XX_R116_RGAIN},
{0xa0, 0x5a, ZC3XX_R118_BGAIN},
{0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0xd3, ZC3XX_R08B_I2CDEVICEADDR},
{0xbb, 0x00, 0x0408},
{0xdd, 0x00, 0x0200},
{0xbb, 0x00, 0x0400},
{0xdd, 0x00, 0x0050},
{0xbb, 0x0f, 0x140f},
{0xbb, 0xe0, 0x0c2e},
{0xbb, 0x01, 0x2000},
{0xbb, 0x96, 0x2400},
{0xbb, 0x06, 0x1006},
{0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},
{0xdd, 0x00, 0x0010},
{0xaa, 0xfe, 0x0002},
{0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},
{0xdd, 0x00, 0x0010},
{0xbb, 0x5f, 0x2090},
{0xbb, 0x01, 0x8000},
{0xbb, 0x09, 0x8400},
{0xbb, 0x86, 0x0002},
{0xbb, 0xe6, 0x0401},
{0xbb, 0x86, 0x0802},
{0xbb, 0xe6, 0x0c01},
{0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},
{0xdd, 0x00, 0x0010},
{0xaa, 0xfe, 0x0000},
{0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},
{0xdd, 0x00, 0x0010},
{0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},
{0xaa, 0xfe, 0x0020},
{0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},
{0xdd, 0x00, 0x0010},
{0xaa, 0xfe, 0x0000},
{0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},
{0xdd, 0x00, 0x0010},
{0xbb, 0x04, 0x0400},
{0xdd, 0x00, 0x0100},
{0xbb, 0x01, 0x0400},
{0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},
{0xaa, 0xfe, 0x0002},
{0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},
{0xbb, 0x41, 0x2803},
{0xbb, 0x40, 0x2c03},
{0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},
{0xaa, 0xfe, 0x0010},
{}
};
static const struct usb_action adcm2700_50HZ[] = {
{0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},
{0xaa, 0xfe, 0x0002},
{0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},
{0xbb, 0x05, 0x8400},
{0xbb, 0xd0, 0xb007},
{0xbb, 0xa0, 0xb80f},
{0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},
{0xaa, 0xfe, 0x0010},
{0xaa, 0x26, 0x00d0},
{0xaa, 0x28, 0x0002},
{}
};
static const struct usb_action adcm2700_60HZ[] = {
{0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},
{0xaa, 0xfe, 0x0002},
{0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},
{0xbb, 0x07, 0x8400},
{0xbb, 0x82, 0xb006},
{0xbb, 0x04, 0xb80d},
{0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},
{0xaa, 0xfe, 0x0010},
{0xaa, 0x26, 0x0057},
{0xaa, 0x28, 0x0002},
{}
};
static const struct usb_action adcm2700_NoFlicker[] = {
{0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},
{0xaa, 0xfe, 0x0002},
{0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},
{0xbb, 0x07, 0x8400},
{0xbb, 0x05, 0xb000},
{0xbb, 0xa0, 0xb801},
{0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},
{0xaa, 0xfe, 0x0010},
{}
};
static const struct usb_action cs2102_InitialScale[] = {
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x10, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x00, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x20, ZC3XX_R080_HBLANKHIGH},
{0xa0, 0x21, ZC3XX_R081_HBLANKLOW},
{0xa0, 0x30, ZC3XX_R083_RGAINADDR},
{0xa0, 0x31, ZC3XX_R084_GGAINADDR},
{0xa0, 0x32, ZC3XX_R085_BGAINADDR},
{0xa0, 0x23, ZC3XX_R086_EXPTIMEHIGH},
{0xa0, 0x24, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0x25, ZC3XX_R088_EXPTIMELOW},
{0xa0, 0xb3, ZC3XX_R08B_I2CDEVICEADDR},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
{0xaa, 0x02, 0x0008},
{0xaa, 0x03, 0x0000},
{0xaa, 0x11, 0x0000},
{0xaa, 0x12, 0x0089},
{0xaa, 0x13, 0x0000},
{0xaa, 0x14, 0x00e9},
{0xaa, 0x20, 0x0000},
{0xaa, 0x22, 0x0000},
{0xaa, 0x0b, 0x0004},
{0xaa, 0x30, 0x0030},
{0xaa, 0x31, 0x0030},
{0xaa, 0x32, 0x0030},
{0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x10, 0x01ae},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xa0, 0x68, ZC3XX_R18D_YTARGET},
{0xa0, 0x00, 0x01ad},
{}
};
static const struct usb_action cs2102_Initial[] = {
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x00, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x00, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x20, ZC3XX_R080_HBLANKHIGH},
{0xa0, 0x21, ZC3XX_R081_HBLANKLOW},
{0xa0, 0x30, ZC3XX_R083_RGAINADDR},
{0xa0, 0x31, ZC3XX_R084_GGAINADDR},
{0xa0, 0x32, ZC3XX_R085_BGAINADDR},
{0xa0, 0x23, ZC3XX_R086_EXPTIMEHIGH},
{0xa0, 0x24, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0x25, ZC3XX_R088_EXPTIMELOW},
{0xa0, 0xb3, ZC3XX_R08B_I2CDEVICEADDR},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
{0xaa, 0x02, 0x0008},
{0xaa, 0x03, 0x0000},
{0xaa, 0x11, 0x0001},
{0xaa, 0x12, 0x0087},
{0xaa, 0x13, 0x0001},
{0xaa, 0x14, 0x00e7},
{0xaa, 0x20, 0x0000},
{0xaa, 0x22, 0x0000},
{0xaa, 0x0b, 0x0004},
{0xaa, 0x30, 0x0030},
{0xaa, 0x31, 0x0030},
{0xaa, 0x32, 0x0030},
{0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x15, 0x01ae},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xa0, 0x68, ZC3XX_R18D_YTARGET},
{0xa0, 0x00, 0x01ad},
{}
};
static const struct usb_action cs2102_50HZScale[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0x23, 0x0001},
{0xaa, 0x24, 0x005f},
{0xaa, 0x25, 0x0090},
{0xaa, 0x21, 0x00dd},
{0xa0, 0x02, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0xbf, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x20, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x3a, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x98, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0xdd, ZC3XX_R01D_HSYNC_0},
{0xa0, 0xe4, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xf0, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{}
};
static const struct usb_action cs2102_50HZ[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0x23, 0x0000},
{0xaa, 0x24, 0x00af},
{0xaa, 0x25, 0x00c8},
{0xaa, 0x21, 0x0068},
{0xa0, 0x01, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x5f, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x90, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x1d, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x4c, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x68, ZC3XX_R01D_HSYNC_0},
{0xa0, 0xe3, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xf0, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{}
};
static const struct usb_action cs2102_60HZScale[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0x23, 0x0001},
{0xaa, 0x24, 0x0055},
{0xaa, 0x25, 0x00cc},
{0xaa, 0x21, 0x003f},
{0xa0, 0x02, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0xab, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x98, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x30, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0xd4, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x39, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x70, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xb0, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{}
};
static const struct usb_action cs2102_60HZ[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0x23, 0x0000},
{0xaa, 0x24, 0x00aa},
{0xaa, 0x25, 0x00e6},
{0xaa, 0x21, 0x003f},
{0xa0, 0x01, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x55, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0xcc, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x18, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x6a, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x3f, ZC3XX_R01D_HSYNC_0},
{0xa0, 0xa5, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xf0, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{}
};
static const struct usb_action cs2102_NoFlickerScale[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0x23, 0x0001},
{0xaa, 0x24, 0x005f},
{0xaa, 0x25, 0x0000},
{0xaa, 0x21, 0x0001},
{0xa0, 0x02, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0xbf, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x80, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x01, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x40, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xa0, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{}
};
static const struct usb_action cs2102_NoFlicker[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0x23, 0x0000},
{0xaa, 0x24, 0x00af},
{0xaa, 0x25, 0x0080},
{0xaa, 0x21, 0x0001},
{0xa0, 0x01, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x5f, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x80, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x80, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x01, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x40, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xa0, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{}
};
static const struct usb_action cs2102K_InitialScale[] = {
{0xa0, 0x11, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x08, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
{0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW},
{0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW},
{0xa0, 0x55, ZC3XX_R08B_I2CDEVICEADDR},
{0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x0a, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x02, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x0b, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x02, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x0c, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x7c, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x0d, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0xa3, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x03, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0xfb, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x05, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x06, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x03, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x09, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x08, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x0e, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x04, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x0f, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x18, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x10, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x18, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x11, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x18, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x12, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x18, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x15, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x16, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x0c, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x17, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x0c, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x04, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x78, ZC3XX_R18D_YTARGET},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x20, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0x21, ZC3XX_R088_EXPTIMELOW},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xa0, 0x00, 0x01ad},
{0xa0, 0x01, 0x01b1},
{0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x60, ZC3XX_R116_RGAIN},
{0xa0, 0x40, ZC3XX_R117_GGAIN},
{0xa0, 0x4c, ZC3XX_R118_BGAIN},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00},
{0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x13, ZC3XX_R120_GAMMA00},
{0xa0, 0x38, ZC3XX_R121_GAMMA01},
{0xa0, 0x59, ZC3XX_R122_GAMMA02},
{0xa0, 0x79, ZC3XX_R123_GAMMA03},
{0xa0, 0x92, ZC3XX_R124_GAMMA04},
{0xa0, 0xa7, ZC3XX_R125_GAMMA05},
{0xa0, 0xb9, ZC3XX_R126_GAMMA06},
{0xa0, 0xc8, ZC3XX_R127_GAMMA07},
{0xa0, 0xd4, ZC3XX_R128_GAMMA08},
{0xa0, 0xdf, ZC3XX_R129_GAMMA09},
{0xa0, 0xe7, ZC3XX_R12A_GAMMA0A},
{0xa0, 0xee, ZC3XX_R12B_GAMMA0B},
{0xa0, 0xf4, ZC3XX_R12C_GAMMA0C},
{0xa0, 0xf9, ZC3XX_R12D_GAMMA0D},
{0xa0, 0xfc, ZC3XX_R12E_GAMMA0E},
{0xa0, 0xff, ZC3XX_R12F_GAMMA0F},
{0xa0, 0x26, ZC3XX_R130_GAMMA10},
{0xa0, 0x22, ZC3XX_R131_GAMMA11},
{0xa0, 0x20, ZC3XX_R132_GAMMA12},
{0xa0, 0x1c, ZC3XX_R133_GAMMA13},
{0xa0, 0x16, ZC3XX_R134_GAMMA14},
{0xa0, 0x13, ZC3XX_R135_GAMMA15},
{0xa0, 0x10, ZC3XX_R136_GAMMA16},
{0xa0, 0x0d, ZC3XX_R137_GAMMA17},
{0xa0, 0x0b, ZC3XX_R138_GAMMA18},
{0xa0, 0x09, ZC3XX_R139_GAMMA19},
{0xa0, 0x07, ZC3XX_R13A_GAMMA1A},
{0xa0, 0x06, ZC3XX_R13B_GAMMA1B},
{0xa0, 0x05, ZC3XX_R13C_GAMMA1C},
{0xa0, 0x04, ZC3XX_R13D_GAMMA1D},
{0xa0, 0x03, ZC3XX_R13E_GAMMA1E},
{0xa0, 0x02, ZC3XX_R13F_GAMMA1F},
{0xa0, 0x58, ZC3XX_R10A_RGB00},
{0xa0, 0xf4, ZC3XX_R10B_RGB01},
{0xa0, 0xf4, ZC3XX_R10C_RGB02},
{0xa0, 0xf4, ZC3XX_R10D_RGB10},
{0xa0, 0x58, ZC3XX_R10E_RGB11},
{0xa0, 0xf4, ZC3XX_R10F_RGB12},
{0xa0, 0xf4, ZC3XX_R110_RGB20},
{0xa0, 0xf4, ZC3XX_R111_RGB21},
{0xa0, 0x58, ZC3XX_R112_RGB22},
{0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x22, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x01, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x01, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x22, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x04, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH},
{0xa0, 0x22, ZC3XX_R0A4_EXPOSURETIMELOW},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0xee, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x3a, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x04, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x0f, ZC3XX_R01E_HSYNC_1},
{0xa0, 0x19, ZC3XX_R01F_HSYNC_2},
{0xa0, 0x1f, ZC3XX_R020_HSYNC_3},
{0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x60, ZC3XX_R116_RGAIN},
{0xa0, 0x40, ZC3XX_R117_GGAIN},
{0xa0, 0x4c, ZC3XX_R118_BGAIN},
{0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x01, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x5c, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x5c, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x01, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x04, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x01, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x96, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x96, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x01, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x04, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
{}
};
static const struct usb_action cs2102K_Initial[] = {
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x00, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x08, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
{0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW},
{0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW},
{0xa0, 0x55, ZC3XX_R08B_I2CDEVICEADDR},
{0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x0a, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x02, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x0b, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x02, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x0c, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x7b, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x0d, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0xa3, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x03, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0xfb, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x05, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x06, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x03, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x09, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x08, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x0e, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x04, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x0f, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x18, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x10, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x18, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x11, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x18, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x12, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x18, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x15, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x16, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x0c, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x17, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x0c, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x04, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0xf7, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x78, ZC3XX_R18D_YTARGET},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x20, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0x21, ZC3XX_R088_EXPTIMELOW},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xa0, 0x00, 0x01ad},
{0xa0, 0x01, 0x01b1},
{0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x60, ZC3XX_R116_RGAIN},
{0xa0, 0x40, ZC3XX_R117_GGAIN},
{0xa0, 0x4c, ZC3XX_R118_BGAIN},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00},
{0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x13, ZC3XX_R120_GAMMA00},
{0xa0, 0x38, ZC3XX_R121_GAMMA01},
{0xa0, 0x59, ZC3XX_R122_GAMMA02},
{0xa0, 0x79, ZC3XX_R123_GAMMA03},
{0xa0, 0x92, ZC3XX_R124_GAMMA04},
{0xa0, 0xa7, ZC3XX_R125_GAMMA05},
{0xa0, 0xb9, ZC3XX_R126_GAMMA06},
{0xa0, 0xc8, ZC3XX_R127_GAMMA07},
{0xa0, 0xd4, ZC3XX_R128_GAMMA08},
{0xa0, 0xdf, ZC3XX_R129_GAMMA09},
{0xa0, 0xe7, ZC3XX_R12A_GAMMA0A},
{0xa0, 0xee, ZC3XX_R12B_GAMMA0B},
{0xa0, 0xf4, ZC3XX_R12C_GAMMA0C},
{0xa0, 0xf9, ZC3XX_R12D_GAMMA0D},
{0xa0, 0xfc, ZC3XX_R12E_GAMMA0E},
{0xa0, 0xff, ZC3XX_R12F_GAMMA0F},
{0xa0, 0x26, ZC3XX_R130_GAMMA10},
{0xa0, 0x22, ZC3XX_R131_GAMMA11},
{0xa0, 0x20, ZC3XX_R132_GAMMA12},
{0xa0, 0x1c, ZC3XX_R133_GAMMA13},
{0xa0, 0x16, ZC3XX_R134_GAMMA14},
{0xa0, 0x13, ZC3XX_R135_GAMMA15},
{0xa0, 0x10, ZC3XX_R136_GAMMA16},
{0xa0, 0x0d, ZC3XX_R137_GAMMA17},
{0xa0, 0x0b, ZC3XX_R138_GAMMA18},
{0xa0, 0x09, ZC3XX_R139_GAMMA19},
{0xa0, 0x07, ZC3XX_R13A_GAMMA1A},
{0xa0, 0x06, ZC3XX_R13B_GAMMA1B},
{0xa0, 0x05, ZC3XX_R13C_GAMMA1C},
{0xa0, 0x04, ZC3XX_R13D_GAMMA1D},
{0xa0, 0x03, ZC3XX_R13E_GAMMA1E},
{0xa0, 0x02, ZC3XX_R13F_GAMMA1F},
{0xa0, 0x58, ZC3XX_R10A_RGB00},
{0xa0, 0xf4, ZC3XX_R10B_RGB01},
{0xa0, 0xf4, ZC3XX_R10C_RGB02},
{0xa0, 0xf4, ZC3XX_R10D_RGB10},
{0xa0, 0x58, ZC3XX_R10E_RGB11},
{0xa0, 0xf4, ZC3XX_R10F_RGB12},
{0xa0, 0xf4, ZC3XX_R110_RGB20},
{0xa0, 0xf4, ZC3XX_R111_RGB21},
{0xa0, 0x58, ZC3XX_R112_RGB22},
{0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x22, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x01, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x01, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x22, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x04, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH},
{0xa0, 0x22, ZC3XX_R0A4_EXPOSURETIMELOW},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0xee, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x3a, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x04, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x0f, ZC3XX_R01E_HSYNC_1},
{0xa0, 0x19, ZC3XX_R01F_HSYNC_2},
{0xa0, 0x1f, ZC3XX_R020_HSYNC_3},
{0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x60, ZC3XX_R116_RGAIN},
{0xa0, 0x40, ZC3XX_R117_GGAIN},
{0xa0, 0x4c, ZC3XX_R118_BGAIN},
{0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x01, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x5c, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x5c, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x01, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x04, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x01, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x96, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x96, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x01, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x04, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x01, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0xd0, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0xd0, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x01, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x04, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x02, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x02, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x0a, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x0a, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x02, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x04, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x02, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x44, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x44, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x02, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x04, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x02, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x7e, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x7e, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x02, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x04, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
{}
};
static const struct usb_action gc0305_Initial[] = {
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x04, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
{0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW},
{0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW},
{0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR},
{0xaa, 0x13, 0x0002},
{0xaa, 0x15, 0x0003},
{0xaa, 0x01, 0x0000},
{0xaa, 0x02, 0x0000},
{0xaa, 0x1a, 0x0000},
{0xaa, 0x1c, 0x0017},
{0xaa, 0x1d, 0x0080},
{0xaa, 0x1f, 0x0008},
{0xaa, 0x21, 0x0012},
{0xa0, 0x82, ZC3XX_R086_EXPTIMEHIGH},
{0xa0, 0x83, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0x84, ZC3XX_R088_EXPTIMELOW},
{0xaa, 0x05, 0x0000},
{0xaa, 0x0a, 0x0000},
{0xaa, 0x0b, 0x00b0},
{0xaa, 0x0c, 0x0000},
{0xaa, 0x0d, 0x00b0},
{0xaa, 0x0e, 0x0000},
{0xaa, 0x0f, 0x00b0},
{0xaa, 0x10, 0x0000},
{0xaa, 0x11, 0x00b0},
{0xaa, 0x16, 0x0001},
{0xaa, 0x17, 0x00e6},
{0xaa, 0x18, 0x0002},
{0xaa, 0x19, 0x0086},
{0xaa, 0x20, 0x0000},
{0xaa, 0x1b, 0x0020},
{0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x76, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x09, 0x01ad},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN},
{0xa0, 0x85, ZC3XX_R18D_YTARGET},
{0xa0, 0x00, 0x011e},
{0xa0, 0x52, ZC3XX_R116_RGAIN},
{0xa0, 0x40, ZC3XX_R117_GGAIN},
{0xa0, 0x52, ZC3XX_R118_BGAIN},
{0xa0, 0x03, ZC3XX_R113_RGB03},
{}
};
static const struct usb_action gc0305_InitialScale[] = {
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x10, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
{0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW},
{0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW},
{0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR},
{0xaa, 0x13, 0x0000},
{0xaa, 0x15, 0x0001},
{0xaa, 0x01, 0x0000},
{0xaa, 0x02, 0x0000},
{0xaa, 0x1a, 0x0000},
{0xaa, 0x1c, 0x0017},
{0xaa, 0x1d, 0x0080},
{0xaa, 0x1f, 0x0008},
{0xaa, 0x21, 0x0012},
{0xa0, 0x82, ZC3XX_R086_EXPTIMEHIGH},
{0xa0, 0x83, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0x84, ZC3XX_R088_EXPTIMELOW},
{0xaa, 0x05, 0x0000},
{0xaa, 0x0a, 0x0000},
{0xaa, 0x0b, 0x00b0},
{0xaa, 0x0c, 0x0000},
{0xaa, 0x0d, 0x00b0},
{0xaa, 0x0e, 0x0000},
{0xaa, 0x0f, 0x00b0},
{0xaa, 0x10, 0x0000},
{0xaa, 0x11, 0x00b0},
{0xaa, 0x16, 0x0001},
{0xaa, 0x17, 0x00e8},
{0xaa, 0x18, 0x0002},
{0xaa, 0x19, 0x0088},
{0xaa, 0x20, 0x0000},
{0xaa, 0x1b, 0x0020},
{0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x76, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x09, 0x01ad},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN},
{0xa0, 0x00, 0x011e},
{0xa0, 0x52, ZC3XX_R116_RGAIN},
{0xa0, 0x40, ZC3XX_R117_GGAIN},
{0xa0, 0x52, ZC3XX_R118_BGAIN},
{0xa0, 0x03, ZC3XX_R113_RGB03},
{}
};
static const struct usb_action gc0305_50HZ[] = {
{0xaa, 0x82, 0x0000},
{0xaa, 0x83, 0x0002},
{0xaa, 0x84, 0x0038},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x0b, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x18, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x8e, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x62, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x90, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xc8, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{}
};
static const struct usb_action gc0305_60HZ[] = {
{0xaa, 0x82, 0x0000},
{0xaa, 0x83, 0x0000},
{0xaa, 0x84, 0x00ec},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x0b, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x10, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0xec, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x62, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x90, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xc8, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x80, ZC3XX_R18D_YTARGET},
{}
};
static const struct usb_action gc0305_NoFlicker[] = {
{0xa0, 0x0c, ZC3XX_R100_OPERATIONMODE},
{0xaa, 0x82, 0x0000},
{0xaa, 0x83, 0x0000},
{0xaa, 0x84, 0x0020},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x00, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x48, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x62, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x90, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xc8, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x03, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x80, ZC3XX_R18D_YTARGET},
{}
};
static const struct usb_action hdcs2020_InitialScale[] = {
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x11, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x08, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
{0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW},
{0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW},
{0xaa, 0x1c, 0x0000},
{0xaa, 0x0a, 0x0001},
{0xaa, 0x0b, 0x0006},
{0xaa, 0x0c, 0x007b},
{0xaa, 0x0d, 0x00a7},
{0xaa, 0x03, 0x00fb},
{0xaa, 0x05, 0x0000},
{0xaa, 0x06, 0x0003},
{0xaa, 0x09, 0x0008},
{0xaa, 0x0f, 0x0018},
{0xaa, 0x10, 0x0018},
{0xaa, 0x11, 0x0018},
{0xaa, 0x12, 0x0018},
{0xaa, 0x15, 0x004e},
{0xaa, 0x1c, 0x0004},
{0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x70, ZC3XX_R18D_YTARGET},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xa1, 0x01, 0x0002},
{0xa1, 0x01, 0x0008},
{0xa1, 0x01, 0x0180},
{0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x40, ZC3XX_R116_RGAIN},
{0xa0, 0x40, ZC3XX_R117_GGAIN},
{0xa0, 0x40, ZC3XX_R118_BGAIN},
{0xa1, 0x01, 0x0008},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00},
{0xa1, 0x01, 0x01c8},
{0xa1, 0x01, 0x01c9},
{0xa1, 0x01, 0x01ca},
{0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x13, ZC3XX_R120_GAMMA00},
{0xa0, 0x38, ZC3XX_R121_GAMMA01},
{0xa0, 0x59, ZC3XX_R122_GAMMA02},
{0xa0, 0x79, ZC3XX_R123_GAMMA03},
{0xa0, 0x92, ZC3XX_R124_GAMMA04},
{0xa0, 0xa7, ZC3XX_R125_GAMMA05},
{0xa0, 0xb9, ZC3XX_R126_GAMMA06},
{0xa0, 0xc8, ZC3XX_R127_GAMMA07},
{0xa0, 0xd4, ZC3XX_R128_GAMMA08},
{0xa0, 0xdf, ZC3XX_R129_GAMMA09},
{0xa0, 0xe7, ZC3XX_R12A_GAMMA0A},
{0xa0, 0xee, ZC3XX_R12B_GAMMA0B},
{0xa0, 0xf4, ZC3XX_R12C_GAMMA0C},
{0xa0, 0xf9, ZC3XX_R12D_GAMMA0D},
{0xa0, 0xfc, ZC3XX_R12E_GAMMA0E},
{0xa0, 0xff, ZC3XX_R12F_GAMMA0F},
{0xa0, 0x26, ZC3XX_R130_GAMMA10},
{0xa0, 0x22, ZC3XX_R131_GAMMA11},
{0xa0, 0x20, ZC3XX_R132_GAMMA12},
{0xa0, 0x1c, ZC3XX_R133_GAMMA13},
{0xa0, 0x16, ZC3XX_R134_GAMMA14},
{0xa0, 0x13, ZC3XX_R135_GAMMA15},
{0xa0, 0x10, ZC3XX_R136_GAMMA16},
{0xa0, 0x0d, ZC3XX_R137_GAMMA17},
{0xa0, 0x0b, ZC3XX_R138_GAMMA18},
{0xa0, 0x09, ZC3XX_R139_GAMMA19},
{0xa0, 0x07, ZC3XX_R13A_GAMMA1A},
{0xa0, 0x06, ZC3XX_R13B_GAMMA1B},
{0xa0, 0x05, ZC3XX_R13C_GAMMA1C},
{0xa0, 0x04, ZC3XX_R13D_GAMMA1D},
{0xa0, 0x03, ZC3XX_R13E_GAMMA1E},
{0xa0, 0x02, ZC3XX_R13F_GAMMA1F},
{0xa0, 0x66, ZC3XX_R10A_RGB00},
{0xa0, 0xed, ZC3XX_R10B_RGB01},
{0xa0, 0xed, ZC3XX_R10C_RGB02},
{0xa0, 0xed, ZC3XX_R10D_RGB10},
{0xa0, 0x66, ZC3XX_R10E_RGB11},
{0xa0, 0xed, ZC3XX_R10F_RGB12},
{0xa0, 0xed, ZC3XX_R110_RGB20},
{0xa0, 0xed, ZC3XX_R111_RGB21},
{0xa0, 0x66, ZC3XX_R112_RGB22},
{0xa1, 0x01, 0x0180},
{0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0x13, 0x0031},
{0xaa, 0x14, 0x0001},
{0xaa, 0x0e, 0x0004},
{0xaa, 0x19, 0x00cd},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x62, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x3d, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x04, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x18, ZC3XX_R01E_HSYNC_1},
{0xa0, 0x2c, ZC3XX_R01F_HSYNC_2},
{0xa0, 0x41, ZC3XX_R020_HSYNC_3},
{0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa1, 0x01, 0x0180},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x40, ZC3XX_R116_RGAIN},
{0xa0, 0x40, ZC3XX_R117_GGAIN},
{0xa0, 0x40, ZC3XX_R118_BGAIN},
{}
};
static const struct usb_action hdcs2020_Initial[] = {
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x00, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x08, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
{0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW},
{0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW},
{0xaa, 0x1c, 0x0000},
{0xaa, 0x0a, 0x0001},
{0xaa, 0x0b, 0x0006},
{0xaa, 0x0c, 0x007a},
{0xaa, 0x0d, 0x00a7},
{0xaa, 0x03, 0x00fb},
{0xaa, 0x05, 0x0000},
{0xaa, 0x06, 0x0003},
{0xaa, 0x09, 0x0008},
{0xaa, 0x0f, 0x0018},
{0xaa, 0x10, 0x0018},
{0xaa, 0x11, 0x0018},
{0xaa, 0x12, 0x0018},
{0xaa, 0x15, 0x004e},
{0xaa, 0x1c, 0x0004},
{0xa0, 0xf7, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x70, ZC3XX_R18D_YTARGET},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xa1, 0x01, 0x0002},
{0xa1, 0x01, 0x0008},
{0xa1, 0x01, 0x0180},
{0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x40, ZC3XX_R116_RGAIN},
{0xa0, 0x40, ZC3XX_R117_GGAIN},
{0xa0, 0x40, ZC3XX_R118_BGAIN},
{0xa1, 0x01, 0x0008},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00},
{0xa1, 0x01, 0x01c8},
{0xa1, 0x01, 0x01c9},
{0xa1, 0x01, 0x01ca},
{0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x13, ZC3XX_R120_GAMMA00},
{0xa0, 0x38, ZC3XX_R121_GAMMA01},
{0xa0, 0x59, ZC3XX_R122_GAMMA02},
{0xa0, 0x79, ZC3XX_R123_GAMMA03},
{0xa0, 0x92, ZC3XX_R124_GAMMA04},
{0xa0, 0xa7, ZC3XX_R125_GAMMA05},
{0xa0, 0xb9, ZC3XX_R126_GAMMA06},
{0xa0, 0xc8, ZC3XX_R127_GAMMA07},
{0xa0, 0xd4, ZC3XX_R128_GAMMA08},
{0xa0, 0xdf, ZC3XX_R129_GAMMA09},
{0xa0, 0xe7, ZC3XX_R12A_GAMMA0A},
{0xa0, 0xee, ZC3XX_R12B_GAMMA0B},
{0xa0, 0xf4, ZC3XX_R12C_GAMMA0C},
{0xa0, 0xf9, ZC3XX_R12D_GAMMA0D},
{0xa0, 0xfc, ZC3XX_R12E_GAMMA0E},
{0xa0, 0xff, ZC3XX_R12F_GAMMA0F},
{0xa0, 0x26, ZC3XX_R130_GAMMA10},
{0xa0, 0x22, ZC3XX_R131_GAMMA11},
{0xa0, 0x20, ZC3XX_R132_GAMMA12},
{0xa0, 0x1c, ZC3XX_R133_GAMMA13},
{0xa0, 0x16, ZC3XX_R134_GAMMA14},
{0xa0, 0x13, ZC3XX_R135_GAMMA15},
{0xa0, 0x10, ZC3XX_R136_GAMMA16},
{0xa0, 0x0d, ZC3XX_R137_GAMMA17},
{0xa0, 0x0b, ZC3XX_R138_GAMMA18},
{0xa0, 0x09, ZC3XX_R139_GAMMA19},
{0xa0, 0x07, ZC3XX_R13A_GAMMA1A},
{0xa0, 0x06, ZC3XX_R13B_GAMMA1B},
{0xa0, 0x05, ZC3XX_R13C_GAMMA1C},
{0xa0, 0x04, ZC3XX_R13D_GAMMA1D},
{0xa0, 0x03, ZC3XX_R13E_GAMMA1E},
{0xa0, 0x02, ZC3XX_R13F_GAMMA1F},
{0xa0, 0x66, ZC3XX_R10A_RGB00},
{0xa0, 0xed, ZC3XX_R10B_RGB01},
{0xa0, 0xed, ZC3XX_R10C_RGB02},
{0xa0, 0xed, ZC3XX_R10D_RGB10},
{0xa0, 0x66, ZC3XX_R10E_RGB11},
{0xa0, 0xed, ZC3XX_R10F_RGB12},
{0xa0, 0xed, ZC3XX_R110_RGB20},
{0xa0, 0xed, ZC3XX_R111_RGB21},
{0xa0, 0x66, ZC3XX_R112_RGB22},
{0xa1, 0x01, 0x0180},
{0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0x13, 0x0031},
{0xaa, 0x14, 0x0001},
{0xaa, 0x0e, 0x0004},
{0xaa, 0x19, 0x00cd},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x62, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x3d, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x04, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x18, ZC3XX_R01E_HSYNC_1},
{0xa0, 0x2c, ZC3XX_R01F_HSYNC_2},
{0xa0, 0x41, ZC3XX_R020_HSYNC_3},
{0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa1, 0x01, 0x0180},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x40, ZC3XX_R116_RGAIN},
{0xa0, 0x40, ZC3XX_R117_GGAIN},
{0xa0, 0x40, ZC3XX_R118_BGAIN},
{}
};
static const struct usb_action hdcs2020_50HZ[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0x13, 0x0018},
{0xaa, 0x14, 0x0001},
{0xaa, 0x0e, 0x0005},
{0xaa, 0x19, 0x001f},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x76, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x46, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x05, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x1a, ZC3XX_R01E_HSYNC_1},
{0xa0, 0x2f, ZC3XX_R01F_HSYNC_2},
{}
};
static const struct usb_action hdcs2020_60HZ[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0x13, 0x0031},
{0xaa, 0x14, 0x0001},
{0xaa, 0x0e, 0x0004},
{0xaa, 0x19, 0x00cd},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x62, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x3d, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x04, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x18, ZC3XX_R01E_HSYNC_1},
{0xa0, 0x2c, ZC3XX_R01F_HSYNC_2},
{}
};
static const struct usb_action hdcs2020_NoFlicker[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0x13, 0x0010},
{0xaa, 0x14, 0x0001},
{0xaa, 0x0e, 0x0004},
{0xaa, 0x19, 0x0000},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x70, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x04, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x17, ZC3XX_R01E_HSYNC_1},
{0xa0, 0x2a, ZC3XX_R01F_HSYNC_2},
{}
};
static const struct usb_action hv7131b_InitialScale[] = {
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x10, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x00, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
{0xaa, 0x30, 0x002d},
{0xaa, 0x01, 0x0005},
{0xaa, 0x11, 0x0000},
{0xaa, 0x13, 0x0001},
{0xaa, 0x14, 0x0001},
{0xaa, 0x15, 0x00e8},
{0xaa, 0x16, 0x0002},
{0xaa, 0x17, 0x0086},
{0xaa, 0x31, 0x0038},
{0xaa, 0x32, 0x0038},
{0xaa, 0x33, 0x0038},
{0xaa, 0x5b, 0x0001},
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x68, ZC3XX_R18D_YTARGET},
{0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN},
{0xa0, 0x00, 0x01ad},
{0xa0, 0xc0, 0x019b},
{0xa0, 0xa0, 0x019c},
{0xa0, 0x02, ZC3XX_R188_MINGAIN},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xaa, 0x02, 0x0090},
{}
};
static const struct usb_action hv7131b_Initial[] = {
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x00, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x00, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
{0xaa, 0x30, 0x002d},
{0xaa, 0x01, 0x0005},
{0xaa, 0x11, 0x0001},
{0xaa, 0x13, 0x0000},
{0xaa, 0x14, 0x0001},
{0xaa, 0x15, 0x00e6},
{0xaa, 0x16, 0x0002},
{0xaa, 0x17, 0x0086},
{0xaa, 0x31, 0x0038},
{0xaa, 0x32, 0x0038},
{0xaa, 0x33, 0x0038},
{0xaa, 0x5b, 0x0001},
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x70, ZC3XX_R18D_YTARGET},
{0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN},
{0xa0, 0x00, 0x01ad},
{0xa0, 0xc0, 0x019b},
{0xa0, 0xa0, 0x019c},
{0xa0, 0x02, ZC3XX_R188_MINGAIN},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xaa, 0x02, 0x0090},
{}
};
static const struct usb_action hv7131b_50HZ[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0x25, 0x0007},
{0xaa, 0x26, 0x0053},
{0xaa, 0x27, 0x0000},
{0xaa, 0x20, 0x0000},
{0xaa, 0x21, 0x0050},
{0xaa, 0x22, 0x001b},
{0xaa, 0x23, 0x00fc},
{0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x9b, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x80, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0xea, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x60, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0c, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x18, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x00, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x50, ZC3XX_R01E_HSYNC_1},
{0xa0, 0x1b, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xfc, ZC3XX_R020_HSYNC_3},
{}
};
static const struct usb_action hv7131b_50HZScale[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0x25, 0x0007},
{0xaa, 0x26, 0x0053},
{0xaa, 0x27, 0x0000},
{0xaa, 0x20, 0x0000},
{0xaa, 0x21, 0x0050},
{0xaa, 0x22, 0x0012},
{0xaa, 0x23, 0x0080},
{0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x9b, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x80, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x01, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0xd4, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0xc0, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x07, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x0f, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x18, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x00, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x50, ZC3XX_R01E_HSYNC_1},
{0xa0, 0x12, ZC3XX_R01F_HSYNC_2},
{0xa0, 0x80, ZC3XX_R020_HSYNC_3},
{}
};
static const struct usb_action hv7131b_60HZ[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0x25, 0x0007},
{0xaa, 0x26, 0x00a1},
{0xaa, 0x27, 0x0020},
{0xaa, 0x20, 0x0000},
{0xaa, 0x21, 0x0040},
{0xaa, 0x22, 0x0013},
{0xaa, 0x23, 0x004c},
{0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x4d, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x60, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0xc3, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x50, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0c, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x18, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x00, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x40, ZC3XX_R01E_HSYNC_1},
{0xa0, 0x13, ZC3XX_R01F_HSYNC_2},
{0xa0, 0x4c, ZC3XX_R020_HSYNC_3},
{}
};
static const struct usb_action hv7131b_60HZScale[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0x25, 0x0007},
{0xaa, 0x26, 0x00a1},
{0xaa, 0x27, 0x0020},
{0xaa, 0x20, 0x0000},
{0xaa, 0x21, 0x00a0},
{0xaa, 0x22, 0x0016},
{0xaa, 0x23, 0x0040},
{0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x4d, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x60, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x01, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x86, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0xa0, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x07, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x0f, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x18, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x00, ZC3XX_R01D_HSYNC_0},
{0xa0, 0xa0, ZC3XX_R01E_HSYNC_1},
{0xa0, 0x16, ZC3XX_R01F_HSYNC_2},
{0xa0, 0x40, ZC3XX_R020_HSYNC_3},
{}
};
static const struct usb_action hv7131b_NoFlicker[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0x25, 0x0003},
{0xaa, 0x26, 0x0000},
{0xaa, 0x27, 0x0000},
{0xaa, 0x20, 0x0000},
{0xaa, 0x21, 0x0010},
{0xaa, 0x22, 0x0000},
{0xaa, 0x23, 0x0003},
{0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0xf8, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x02, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x00, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x00, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x10, ZC3XX_R01E_HSYNC_1},
{0xa0, 0x00, ZC3XX_R01F_HSYNC_2},
{0xa0, 0x03, ZC3XX_R020_HSYNC_3},
{}
};
static const struct usb_action hv7131b_NoFlickerScale[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0x25, 0x0003},
{0xaa, 0x26, 0x0000},
{0xaa, 0x27, 0x0000},
{0xaa, 0x20, 0x0000},
{0xaa, 0x21, 0x00a0},
{0xaa, 0x22, 0x0016},
{0xaa, 0x23, 0x0040},
{0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0xf8, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x02, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x00, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x00, ZC3XX_R01D_HSYNC_0},
{0xa0, 0xa0, ZC3XX_R01E_HSYNC_1},
{0xa0, 0x16, ZC3XX_R01F_HSYNC_2},
{0xa0, 0x40, ZC3XX_R020_HSYNC_3},
{}
};
static const struct usb_action hv7131r_InitialScale[] = {
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x10, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH},
{0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW},
{0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH},
{0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW},
{0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
{0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xdd, 0x00, 0x0200},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xaa, 0x01, 0x000c},
{0xaa, 0x11, 0x0000},
{0xaa, 0x13, 0x0000},
{0xaa, 0x14, 0x0001},
{0xaa, 0x15, 0x00e8},
{0xaa, 0x16, 0x0002},
{0xaa, 0x17, 0x0088},
{0xaa, 0x30, 0x000b},
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x78, ZC3XX_R18D_YTARGET},
{0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN},
{0xa0, 0x00, 0x01ad},
{0xa0, 0xc0, 0x019b},
{0xa0, 0xa0, 0x019c},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{}
};
static const struct usb_action hv7131r_Initial[] = {
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x00, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH},
{0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW},
{0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH},
{0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW},
{0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
{0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xdd, 0x00, 0x0200},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xaa, 0x01, 0x000c},
{0xaa, 0x11, 0x0000},
{0xaa, 0x13, 0x0000},
{0xaa, 0x14, 0x0001},
{0xaa, 0x15, 0x00e6},
{0xaa, 0x16, 0x0002},
{0xaa, 0x17, 0x0086},
{0xaa, 0x30, 0x000b},
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x78, ZC3XX_R18D_YTARGET},
{0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN},
{0xa0, 0x00, 0x01ad},
{0xa0, 0xc0, 0x019b},
{0xa0, 0xa0, 0x019c},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{}
};
static const struct usb_action hv7131r_50HZ[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xa0, 0x06, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x68, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0xa0, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0xea, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x60, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x18, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x00, ZC3XX_R01D_HSYNC_0},
{0xa0, 0xd0, ZC3XX_R01E_HSYNC_1},
{0xa0, 0x00, ZC3XX_R01F_HSYNC_2},
{0xa0, 0x08, ZC3XX_R020_HSYNC_3},
{}
};
static const struct usb_action hv7131r_50HZScale[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xa0, 0x0c, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0xd1, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x40, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x01, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0xd4, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0xc0, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x18, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x00, ZC3XX_R01D_HSYNC_0},
{0xa0, 0xd0, ZC3XX_R01E_HSYNC_1},
{0xa0, 0x00, ZC3XX_R01F_HSYNC_2},
{0xa0, 0x08, ZC3XX_R020_HSYNC_3},
{}
};
static const struct usb_action hv7131r_60HZ[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xa0, 0x06, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x1a, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x80, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0xc3, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x50, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x18, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x00, ZC3XX_R01D_HSYNC_0},
{0xa0, 0xd0, ZC3XX_R01E_HSYNC_1},
{0xa0, 0x00, ZC3XX_R01F_HSYNC_2},
{0xa0, 0x08, ZC3XX_R020_HSYNC_3},
{}
};
static const struct usb_action hv7131r_60HZScale[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xa0, 0x0c, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x35, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x01, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x86, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0xa0, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x18, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x00, ZC3XX_R01D_HSYNC_0},
{0xa0, 0xd0, ZC3XX_R01E_HSYNC_1},
{0xa0, 0x00, ZC3XX_R01F_HSYNC_2},
{0xa0, 0x08, ZC3XX_R020_HSYNC_3},
{}
};
static const struct usb_action hv7131r_NoFlicker[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0xf8, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x02, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x58, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0c, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x00, ZC3XX_R01D_HSYNC_0},
{0xa0, 0xd0, ZC3XX_R01E_HSYNC_1},
{0xa0, 0x00, ZC3XX_R01F_HSYNC_2},
{0xa0, 0x08, ZC3XX_R020_HSYNC_3},
{}
};
static const struct usb_action hv7131r_NoFlickerScale[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0xf8, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x04, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0xb0, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0c, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x00, ZC3XX_R01D_HSYNC_0},
{0xa0, 0xd0, ZC3XX_R01E_HSYNC_1},
{0xa0, 0x00, ZC3XX_R01F_HSYNC_2},
{0xa0, 0x08, ZC3XX_R020_HSYNC_3},
{}
};
static const struct usb_action icm105a_InitialScale[] = {
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x10, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x0c, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0xa1, ZC3XX_R08B_I2CDEVICEADDR},
{0xa0, 0x00, ZC3XX_R097_WINYSTARTHIGH},
{0xa0, 0x01, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x00, ZC3XX_R099_WINXSTARTHIGH},
{0xa0, 0x01, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x01, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x01, ZC3XX_R11C_FIRSTXLOW},
{0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH},
{0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW},
{0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH},
{0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW},
{0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xaa, 0x01, 0x0010},
{0xaa, 0x03, 0x0000},
{0xaa, 0x04, 0x0001},
{0xaa, 0x05, 0x0020},
{0xaa, 0x06, 0x0001},
{0xaa, 0x08, 0x0000},
{0xaa, 0x03, 0x0001},
{0xaa, 0x04, 0x0011},
{0xaa, 0x05, 0x00a0},
{0xaa, 0x06, 0x0001},
{0xaa, 0x08, 0x0000},
{0xaa, 0x03, 0x0002},
{0xaa, 0x04, 0x0013},
{0xaa, 0x05, 0x0020},
{0xaa, 0x06, 0x0001},
{0xaa, 0x08, 0x0000},
{0xaa, 0x03, 0x0003},
{0xaa, 0x04, 0x0015},
{0xaa, 0x05, 0x0020},
{0xaa, 0x06, 0x0005},
{0xaa, 0x08, 0x0000},
{0xaa, 0x03, 0x0004},
{0xaa, 0x04, 0x0017},
{0xaa, 0x05, 0x0020},
{0xaa, 0x06, 0x000d},
{0xaa, 0x08, 0x0000},
{0xaa, 0x03, 0x0005},
{0xaa, 0x04, 0x0019},
{0xaa, 0x05, 0x0020},
{0xaa, 0x06, 0x0005},
{0xaa, 0x08, 0x0000},
{0xaa, 0x03, 0x0006},
{0xaa, 0x04, 0x0017},
{0xaa, 0x05, 0x0026},
{0xaa, 0x06, 0x0005},
{0xaa, 0x08, 0x0000},
{0xaa, 0x03, 0x0007},
{0xaa, 0x04, 0x0019},
{0xaa, 0x05, 0x0022},
{0xaa, 0x06, 0x0005},
{0xaa, 0x08, 0x0000},
{0xaa, 0x03, 0x0008},
{0xaa, 0x04, 0x0021},
{0xaa, 0x05, 0x00aa},
{0xaa, 0x06, 0x0005},
{0xaa, 0x08, 0x0000},
{0xaa, 0x03, 0x0009},
{0xaa, 0x04, 0x0023},
{0xaa, 0x05, 0x00aa},
{0xaa, 0x06, 0x000d},
{0xaa, 0x08, 0x0000},
{0xaa, 0x03, 0x000a},
{0xaa, 0x04, 0x0025},
{0xaa, 0x05, 0x00aa},
{0xaa, 0x06, 0x0005},
{0xaa, 0x08, 0x0000},
{0xaa, 0x03, 0x000b},
{0xaa, 0x04, 0x00ec},
{0xaa, 0x05, 0x002e},
{0xaa, 0x06, 0x0005},
{0xaa, 0x08, 0x0000},
{0xaa, 0x03, 0x000c},
{0xaa, 0x04, 0x00fa},
{0xaa, 0x05, 0x002a},
{0xaa, 0x06, 0x0005},
{0xaa, 0x08, 0x0000},
{0xaa, 0x07, 0x000d},
{0xaa, 0x01, 0x0005},
{0xaa, 0x94, 0x0002},
{0xaa, 0x90, 0x0000},
{0xaa, 0x91, 0x001f},
{0xaa, 0x10, 0x0064},
{0xaa, 0x9b, 0x00f0},
{0xaa, 0x9c, 0x0002},
{0xaa, 0x14, 0x001a},
{0xaa, 0x20, 0x0080},
{0xaa, 0x22, 0x0080},
{0xaa, 0x24, 0x0080},
{0xaa, 0x26, 0x0080},
{0xaa, 0x00, 0x0084},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xaa, 0xa8, 0x00c0},
{0xa1, 0x01, 0x0002},
{0xa1, 0x01, 0x0008},
{0xa1, 0x01, 0x0180},
{0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x40, ZC3XX_R116_RGAIN},
{0xa0, 0x40, ZC3XX_R117_GGAIN},
{0xa0, 0x40, ZC3XX_R118_BGAIN},
{0xa1, 0x01, 0x0008},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00},
{0xa1, 0x01, 0x01c8},
{0xa1, 0x01, 0x01c9},
{0xa1, 0x01, 0x01ca},
{0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x52, ZC3XX_R10A_RGB00},
{0xa0, 0xf7, ZC3XX_R10B_RGB01},
{0xa0, 0xf7, ZC3XX_R10C_RGB02},
{0xa0, 0xf7, ZC3XX_R10D_RGB10},
{0xa0, 0x52, ZC3XX_R10E_RGB11},
{0xa0, 0xf7, ZC3XX_R10F_RGB12},
{0xa0, 0xf7, ZC3XX_R110_RGB20},
{0xa0, 0xf7, ZC3XX_R111_RGB21},
{0xa0, 0x52, ZC3XX_R112_RGB22},
{0xa1, 0x01, 0x0180},
{0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0x0d, 0x0003},
{0xaa, 0x0c, 0x008c},
{0xaa, 0x0e, 0x0095},
{0xaa, 0x0f, 0x0002},
{0xaa, 0x1c, 0x0094},
{0xaa, 0x1d, 0x0002},
{0xaa, 0x20, 0x0080},
{0xaa, 0x22, 0x0080},
{0xaa, 0x24, 0x0080},
{0xaa, 0x26, 0x0080},
{0xaa, 0x00, 0x0084},
{0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH},
{0xa0, 0x94, ZC3XX_R0A4_EXPOSURETIMELOW},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x20, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x84, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x12, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0xe3, ZC3XX_R01D_HSYNC_0},
{0xa0, 0xec, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xf5, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0xc0, ZC3XX_R1A8_DIGITALGAIN},
{0xa0, 0xc0, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa1, 0x01, 0x0180},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x40, ZC3XX_R116_RGAIN},
{0xa0, 0x40, ZC3XX_R117_GGAIN},
{0xa0, 0x40, ZC3XX_R118_BGAIN},
{}
};
static const struct usb_action icm105a_Initial[] = {
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x00, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x0c, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0xa1, ZC3XX_R08B_I2CDEVICEADDR},
{0xa0, 0x00, ZC3XX_R097_WINYSTARTHIGH},
{0xa0, 0x02, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x00, ZC3XX_R099_WINXSTARTHIGH},
{0xa0, 0x02, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x02, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x02, ZC3XX_R11C_FIRSTXLOW},
{0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH},
{0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW},
{0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH},
{0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW},
{0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xaa, 0x01, 0x0010},
{0xaa, 0x03, 0x0000},
{0xaa, 0x04, 0x0001},
{0xaa, 0x05, 0x0020},
{0xaa, 0x06, 0x0001},
{0xaa, 0x08, 0x0000},
{0xaa, 0x03, 0x0001},
{0xaa, 0x04, 0x0011},
{0xaa, 0x05, 0x00a0},
{0xaa, 0x06, 0x0001},
{0xaa, 0x08, 0x0000},
{0xaa, 0x03, 0x0002},
{0xaa, 0x04, 0x0013},
{0xaa, 0x05, 0x0020},
{0xaa, 0x06, 0x0001},
{0xaa, 0x08, 0x0000},
{0xaa, 0x03, 0x0003},
{0xaa, 0x04, 0x0015},
{0xaa, 0x05, 0x0020},
{0xaa, 0x06, 0x0005},
{0xaa, 0x08, 0x0000},
{0xaa, 0x03, 0x0004},
{0xaa, 0x04, 0x0017},
{0xaa, 0x05, 0x0020},
{0xaa, 0x06, 0x000d},
{0xaa, 0x08, 0x0000},
{0xaa, 0x03, 0x0005},
{0xa0, 0x04, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x19, ZC3XX_R093_I2CSETVALUE},
{0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
{0xa1, 0x01, 0x0091},
{0xaa, 0x05, 0x0020},
{0xaa, 0x06, 0x0005},
{0xaa, 0x08, 0x0000},
{0xaa, 0x03, 0x0006},
{0xaa, 0x04, 0x0017},
{0xaa, 0x05, 0x0026},
{0xaa, 0x06, 0x0005},
{0xaa, 0x08, 0x0000},
{0xaa, 0x03, 0x0007},
{0xaa, 0x04, 0x0019},
{0xaa, 0x05, 0x0022},
{0xaa, 0x06, 0x0005},
{0xaa, 0x08, 0x0000},
{0xaa, 0x03, 0x0008},
{0xaa, 0x04, 0x0021},
{0xaa, 0x05, 0x00aa},
{0xaa, 0x06, 0x0005},
{0xaa, 0x08, 0x0000},
{0xaa, 0x03, 0x0009},
{0xaa, 0x04, 0x0023},
{0xaa, 0x05, 0x00aa},
{0xaa, 0x06, 0x000d},
{0xaa, 0x08, 0x0000},
{0xaa, 0x03, 0x000a},
{0xaa, 0x04, 0x0025},
{0xaa, 0x05, 0x00aa},
{0xaa, 0x06, 0x0005},
{0xaa, 0x08, 0x0000},
{0xaa, 0x03, 0x000b},
{0xaa, 0x04, 0x00ec},
{0xaa, 0x05, 0x002e},
{0xaa, 0x06, 0x0005},
{0xaa, 0x08, 0x0000},
{0xaa, 0x03, 0x000c},
{0xaa, 0x04, 0x00fa},
{0xaa, 0x05, 0x002a},
{0xaa, 0x06, 0x0005},
{0xaa, 0x08, 0x0000},
{0xaa, 0x07, 0x000d},
{0xaa, 0x01, 0x0005},
{0xaa, 0x94, 0x0002},
{0xaa, 0x90, 0x0000},
{0xaa, 0x91, 0x0010},
{0xaa, 0x10, 0x0064},
{0xaa, 0x9b, 0x00f0},
{0xaa, 0x9c, 0x0002},
{0xaa, 0x14, 0x001a},
{0xaa, 0x20, 0x0080},
{0xaa, 0x22, 0x0080},
{0xaa, 0x24, 0x0080},
{0xaa, 0x26, 0x0080},
{0xaa, 0x00, 0x0084},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xaa, 0xa8, 0x0080},
{0xa0, 0x78, ZC3XX_R18D_YTARGET},
{0xa1, 0x01, 0x0002},
{0xa1, 0x01, 0x0008},
{0xa1, 0x01, 0x0180},
{0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x40, ZC3XX_R116_RGAIN},
{0xa0, 0x40, ZC3XX_R117_GGAIN},
{0xa0, 0x40, ZC3XX_R118_BGAIN},
{0xa1, 0x01, 0x0008},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00},
{0xa1, 0x01, 0x01c8},
{0xa1, 0x01, 0x01c9},
{0xa1, 0x01, 0x01ca},
{0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x52, ZC3XX_R10A_RGB00},
{0xa0, 0xf7, ZC3XX_R10B_RGB01},
{0xa0, 0xf7, ZC3XX_R10C_RGB02},
{0xa0, 0xf7, ZC3XX_R10D_RGB10},
{0xa0, 0x52, ZC3XX_R10E_RGB11},
{0xa0, 0xf7, ZC3XX_R10F_RGB12},
{0xa0, 0xf7, ZC3XX_R110_RGB20},
{0xa0, 0xf7, ZC3XX_R111_RGB21},
{0xa0, 0x52, ZC3XX_R112_RGB22},
{0xa1, 0x01, 0x0180},
{0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0x0d, 0x0003},
{0xaa, 0x0c, 0x0020},
{0xaa, 0x0e, 0x000e},
{0xaa, 0x0f, 0x0002},
{0xaa, 0x1c, 0x000d},
{0xaa, 0x1d, 0x0002},
{0xaa, 0x20, 0x0080},
{0xaa, 0x22, 0x0080},
{0xaa, 0x24, 0x0080},
{0xaa, 0x26, 0x0080},
{0xaa, 0x00, 0x0084},
{0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH},
{0xa0, 0x0d, ZC3XX_R0A4_EXPOSURETIMELOW},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x1a, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x4b, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x12, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0xc8, ZC3XX_R01D_HSYNC_0},
{0xa0, 0xd8, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xea, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa1, 0x01, 0x0180},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x40, ZC3XX_R116_RGAIN},
{0xa0, 0x40, ZC3XX_R117_GGAIN},
{0xa0, 0x40, ZC3XX_R118_BGAIN},
{}
};
static const struct usb_action icm105a_50HZScale[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0x0d, 0x0003},
{0xaa, 0x0c, 0x0020},
{0xaa, 0x0e, 0x000e},
{0xaa, 0x0f, 0x0002},
{0xaa, 0x1c, 0x000d},
{0xaa, 0x1d, 0x0002},
{0xaa, 0x20, 0x0080},
{0xaa, 0x22, 0x0080},
{0xaa, 0x24, 0x0080},
{0xaa, 0x26, 0x0080},
{0xaa, 0x00, 0x0084},
{0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH},
{0xa0, 0x0d, ZC3XX_R0A4_EXPOSURETIMELOW},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x1a, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x4b, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x12, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0xc8, ZC3XX_R01D_HSYNC_0},
{0xa0, 0xd8, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xea, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{}
};
static const struct usb_action icm105a_50HZ[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0x0d, 0x0003},
{0xaa, 0x0c, 0x008c},
{0xaa, 0x0e, 0x0095},
{0xaa, 0x0f, 0x0002},
{0xaa, 0x1c, 0x0094},
{0xaa, 0x1d, 0x0002},
{0xaa, 0x20, 0x0080},
{0xaa, 0x22, 0x0080},
{0xaa, 0x24, 0x0080},
{0xaa, 0x26, 0x0080},
{0xaa, 0x00, 0x0084},
{0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH},
{0xa0, 0x94, ZC3XX_R0A4_EXPOSURETIMELOW},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x20, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x84, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x12, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0xe3, ZC3XX_R01D_HSYNC_0},
{0xa0, 0xec, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xf5, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0xc0, ZC3XX_R1A8_DIGITALGAIN},
{}
};
static const struct usb_action icm105a_60HZScale[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0x0d, 0x0003},
{0xaa, 0x0c, 0x0004},
{0xaa, 0x0e, 0x000d},
{0xaa, 0x0f, 0x0002},
{0xaa, 0x1c, 0x0008},
{0xaa, 0x1d, 0x0002},
{0xaa, 0x20, 0x0080},
{0xaa, 0x22, 0x0080},
{0xaa, 0x24, 0x0080},
{0xaa, 0x26, 0x0080},
{0xaa, 0x00, 0x0084},
{0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH},
{0xa0, 0x08, ZC3XX_R0A4_EXPOSURETIMELOW},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x10, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x41, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x12, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0xc1, ZC3XX_R01D_HSYNC_0},
{0xa0, 0xd4, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xe8, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{}
};
static const struct usb_action icm105a_60HZ[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0x0d, 0x0003},
{0xaa, 0x0c, 0x0008},
{0xaa, 0x0e, 0x0086},
{0xaa, 0x0f, 0x0002},
{0xaa, 0x1c, 0x0085},
{0xaa, 0x1d, 0x0002},
{0xaa, 0x20, 0x0080},
{0xaa, 0x22, 0x0080},
{0xaa, 0x24, 0x0080},
{0xaa, 0x26, 0x0080},
{0xaa, 0x00, 0x0084},
{0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH},
{0xa0, 0x85, ZC3XX_R0A4_EXPOSURETIMELOW},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x08, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x81, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x12, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0xc2, ZC3XX_R01D_HSYNC_0},
{0xa0, 0xd6, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xea, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0xc0, ZC3XX_R1A8_DIGITALGAIN},
{}
};
static const struct usb_action icm105a_NoFlickerScale[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0x0d, 0x0003},
{0xaa, 0x0c, 0x0004},
{0xaa, 0x0e, 0x000d},
{0xaa, 0x0f, 0x0002},
{0xaa, 0x1c, 0x0000},
{0xaa, 0x1d, 0x0002},
{0xaa, 0x20, 0x0080},
{0xaa, 0x22, 0x0080},
{0xaa, 0x24, 0x0080},
{0xaa, 0x26, 0x0080},
{0xaa, 0x00, 0x0084},
{0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH},
{0xa0, 0x00, ZC3XX_R0A4_EXPOSURETIMELOW},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x20, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0xc1, ZC3XX_R01D_HSYNC_0},
{0xa0, 0xd4, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xe8, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{}
};
static const struct usb_action icm105a_NoFlicker[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0x0d, 0x0003},
{0xaa, 0x0c, 0x0004},
{0xaa, 0x0e, 0x0081},
{0xaa, 0x0f, 0x0002},
{0xaa, 0x1c, 0x0080},
{0xaa, 0x1d, 0x0002},
{0xaa, 0x20, 0x0080},
{0xaa, 0x22, 0x0080},
{0xaa, 0x24, 0x0080},
{0xaa, 0x26, 0x0080},
{0xaa, 0x00, 0x0084},
{0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH},
{0xa0, 0x80, ZC3XX_R0A4_EXPOSURETIMELOW},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x20, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0xc1, ZC3XX_R01D_HSYNC_0},
{0xa0, 0xd4, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xe8, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0xc0, ZC3XX_R1A8_DIGITALGAIN},
{}
};
static const struct usb_action mc501cb_Initial[] = {
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x00, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xd8, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
{0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH},
{0xa0, 0xde, ZC3XX_R09C_WINHEIGHTLOW},
{0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH},
{0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW},
{0xa0, 0x33, ZC3XX_R086_EXPTIMEHIGH},
{0xa0, 0x34, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0x35, ZC3XX_R088_EXPTIMELOW},
{0xa0, 0xb0, ZC3XX_R08B_I2CDEVICEADDR},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xaa, 0x01, 0x0001},
{0xaa, 0x01, 0x0003},
{0xaa, 0x01, 0x0001},
{0xaa, 0x03, 0x0000},
{0xaa, 0x10, 0x0000},
{0xaa, 0x11, 0x0080},
{0xaa, 0x12, 0x0000},
{0xaa, 0x13, 0x0000},
{0xaa, 0x14, 0x0000},
{0xaa, 0x15, 0x0000},
{0xaa, 0x16, 0x0000},
{0xaa, 0x17, 0x0001},
{0xaa, 0x18, 0x00de},
{0xaa, 0x19, 0x0002},
{0xaa, 0x1a, 0x0086},
{0xaa, 0x20, 0x00a8},
{0xaa, 0x22, 0x0000},
{0xaa, 0x23, 0x0000},
{0xaa, 0x24, 0x0000},
{0xaa, 0x40, 0x0033},
{0xaa, 0x41, 0x0077},
{0xaa, 0x42, 0x0053},
{0xaa, 0x43, 0x00b0},
{0xaa, 0x4b, 0x0001},
{0xaa, 0x72, 0x0020},
{0xaa, 0x73, 0x0000},
{0xaa, 0x80, 0x0000},
{0xaa, 0x85, 0x0050},
{0xaa, 0x91, 0x0070},
{0xaa, 0x92, 0x0072},
{0xaa, 0x03, 0x0001},
{0xaa, 0x10, 0x00a0},
{0xaa, 0x11, 0x0001},
{0xaa, 0x30, 0x0000},
{0xaa, 0x60, 0x0000},
{0xaa, 0xa0, 0x001a},
{0xaa, 0xa1, 0x0000},
{0xaa, 0xa2, 0x003f},
{0xaa, 0xa3, 0x0028},
{0xaa, 0xa4, 0x0010},
{0xaa, 0xa5, 0x0020},
{0xaa, 0xb1, 0x0044},
{0xaa, 0xd0, 0x0001},
{0xaa, 0xd1, 0x0085},
{0xaa, 0xd2, 0x0080},
{0xaa, 0xd3, 0x0080},
{0xaa, 0xd4, 0x0080},
{0xaa, 0xd5, 0x0080},
{0xaa, 0xc0, 0x00c3},
{0xaa, 0xc2, 0x0044},
{0xaa, 0xc4, 0x0040},
{0xaa, 0xc5, 0x0020},
{0xaa, 0xc6, 0x0008},
{0xaa, 0x03, 0x0004},
{0xaa, 0x10, 0x0000},
{0xaa, 0x40, 0x0030},
{0xaa, 0x41, 0x0020},
{0xaa, 0x42, 0x002d},
{0xaa, 0x03, 0x0003},
{0xaa, 0x1c, 0x0050},
{0xaa, 0x11, 0x0081},
{0xaa, 0x3b, 0x001d},
{0xaa, 0x3c, 0x004c},
{0xaa, 0x3d, 0x0018},
{0xaa, 0x3e, 0x006a},
{0xaa, 0x01, 0x0000},
{0xaa, 0x52, 0x00ff},
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE},
{0xaa, 0x03, 0x0002},
{0xaa, 0x51, 0x0027},
{0xaa, 0x52, 0x0020},
{0xaa, 0x03, 0x0003},
{0xaa, 0x50, 0x0010},
{0xaa, 0x51, 0x0010},
{0xaa, 0x54, 0x0010},
{0xaa, 0x55, 0x0010},
{0xa0, 0xf0, 0x0199},
{0xa0, 0x80, 0x019a},
{0xaa, 0x03, 0x0003},
{0xaa, 0x10, 0x00fc},
{0xaa, 0x36, 0x001d},
{0xaa, 0x37, 0x004c},
{0xaa, 0x3b, 0x001d},
{}
};
static const struct usb_action mc501cb_InitialScale[] = {
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x10, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xd0, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
{0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH},
{0xa0, 0xd8, ZC3XX_R09C_WINHEIGHTLOW},
{0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH},
{0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW},
{0xa0, 0x33, ZC3XX_R086_EXPTIMEHIGH},
{0xa0, 0x34, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0x35, ZC3XX_R088_EXPTIMELOW},
{0xa0, 0xb0, ZC3XX_R08B_I2CDEVICEADDR},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xaa, 0x01, 0x0001},
{0xaa, 0x01, 0x0003},
{0xaa, 0x01, 0x0001},
{0xaa, 0x03, 0x0000},
{0xaa, 0x10, 0x0000},
{0xaa, 0x11, 0x0080},
{0xaa, 0x12, 0x0000},
{0xaa, 0x13, 0x0000},
{0xaa, 0x14, 0x0000},
{0xaa, 0x15, 0x0000},
{0xaa, 0x16, 0x0000},
{0xaa, 0x17, 0x0001},
{0xaa, 0x18, 0x00d8},
{0xaa, 0x19, 0x0002},
{0xaa, 0x1a, 0x0088},
{0xaa, 0x20, 0x00a8},
{0xaa, 0x22, 0x0000},
{0xaa, 0x23, 0x0000},
{0xaa, 0x24, 0x0000},
{0xaa, 0x40, 0x0033},
{0xaa, 0x41, 0x0077},
{0xaa, 0x42, 0x0053},
{0xaa, 0x43, 0x00b0},
{0xaa, 0x4b, 0x0001},
{0xaa, 0x72, 0x0020},
{0xaa, 0x73, 0x0000},
{0xaa, 0x80, 0x0000},
{0xaa, 0x85, 0x0050},
{0xaa, 0x91, 0x0070},
{0xaa, 0x92, 0x0072},
{0xaa, 0x03, 0x0001},
{0xaa, 0x10, 0x00a0},
{0xaa, 0x11, 0x0001},
{0xaa, 0x30, 0x0000},
{0xaa, 0x60, 0x0000},
{0xaa, 0xa0, 0x001a},
{0xaa, 0xa1, 0x0000},
{0xaa, 0xa2, 0x003f},
{0xaa, 0xa3, 0x0028},
{0xaa, 0xa4, 0x0010},
{0xaa, 0xa5, 0x0020},
{0xaa, 0xb1, 0x0044},
{0xaa, 0xd0, 0x0001},
{0xaa, 0xd1, 0x0085},
{0xaa, 0xd2, 0x0080},
{0xaa, 0xd3, 0x0080},
{0xaa, 0xd4, 0x0080},
{0xaa, 0xd5, 0x0080},
{0xaa, 0xc0, 0x00c3},
{0xaa, 0xc2, 0x0044},
{0xaa, 0xc4, 0x0040},
{0xaa, 0xc5, 0x0020},
{0xaa, 0xc6, 0x0008},
{0xaa, 0x03, 0x0004},
{0xaa, 0x10, 0x0000},
{0xaa, 0x40, 0x0030},
{0xaa, 0x41, 0x0020},
{0xaa, 0x42, 0x002d},
{0xaa, 0x03, 0x0003},
{0xaa, 0x1c, 0x0050},
{0xaa, 0x11, 0x0081},
{0xaa, 0x3b, 0x003a},
{0xaa, 0x3c, 0x0098},
{0xaa, 0x3d, 0x0030},
{0xaa, 0x3e, 0x00d4},
{0xaa, 0x01, 0x0000},
{0xaa, 0x52, 0x00ff},
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE},
{0xaa, 0x03, 0x0002},
{0xaa, 0x51, 0x004e},
{0xaa, 0x52, 0x0041},
{0xaa, 0x03, 0x0003},
{0xaa, 0x50, 0x0010},
{0xaa, 0x51, 0x0010},
{0xaa, 0x54, 0x0010},
{0xaa, 0x55, 0x0010},
{0xa0, 0xf0, 0x0199},
{0xa0, 0x80, 0x019a},
{}
};
static const struct usb_action mc501cb_50HZ[] = {
{0xaa, 0x03, 0x0003},
{0xaa, 0x10, 0x00fc},
{0xaa, 0x36, 0x001d},
{0xaa, 0x37, 0x004c},
{0xaa, 0x3b, 0x001d},
{0xaa, 0x3c, 0x004c},
{0xaa, 0x3d, 0x001d},
{0xaa, 0x3e, 0x004c},
{}
};
static const struct usb_action mc501cb_50HZScale[] = {
{0xaa, 0x03, 0x0003},
{0xaa, 0x10, 0x00fc},
{0xaa, 0x36, 0x003a},
{0xaa, 0x37, 0x0098},
{0xaa, 0x3b, 0x003a},
{0xaa, 0x3c, 0x0098},
{0xaa, 0x3d, 0x003a},
{0xaa, 0x3e, 0x0098},
{}
};
static const struct usb_action mc501cb_60HZ[] = {
{0xaa, 0x03, 0x0003},
{0xaa, 0x10, 0x00fc},
{0xaa, 0x36, 0x0018},
{0xaa, 0x37, 0x006a},
{0xaa, 0x3d, 0x0018},
{0xaa, 0x3e, 0x006a},
{0xaa, 0x3b, 0x0018},
{0xaa, 0x3c, 0x006a},
{}
};
static const struct usb_action mc501cb_60HZScale[] = {
{0xaa, 0x03, 0x0003},
{0xaa, 0x10, 0x00fc},
{0xaa, 0x36, 0x0030},
{0xaa, 0x37, 0x00d4},
{0xaa, 0x3d, 0x0030},
{0xaa, 0x3e, 0x00d4},
{0xaa, 0x3b, 0x0030},
{0xaa, 0x3c, 0x00d4},
{}
};
static const struct usb_action mc501cb_NoFlicker[] = {
{0xaa, 0x03, 0x0003},
{0xaa, 0x10, 0x00fc},
{0xaa, 0x36, 0x0018},
{0xaa, 0x37, 0x006a},
{0xaa, 0x3d, 0x0018},
{0xaa, 0x3e, 0x006a},
{0xaa, 0x3b, 0x0018},
{0xaa, 0x3c, 0x006a},
{}
};
static const struct usb_action mc501cb_NoFlickerScale[] = {
{0xaa, 0x03, 0x0003},
{0xaa, 0x10, 0x00fc},
{0xaa, 0x36, 0x0030},
{0xaa, 0x37, 0x00d4},
{0xaa, 0x3d, 0x0030},
{0xaa, 0x3e, 0x00d4},
{0xaa, 0x3b, 0x0030},
{0xaa, 0x3c, 0x00d4},
{}
};
static const struct usb_action ov7620_Initial[] = {
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x40, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x00, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x06, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x02, ZC3XX_R083_RGAINADDR},
{0xa0, 0x01, ZC3XX_R085_BGAINADDR},
{0xa0, 0x80, ZC3XX_R086_EXPTIMEHIGH},
{0xa0, 0x81, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0x10, ZC3XX_R088_EXPTIMELOW},
{0xa0, 0xa1, ZC3XX_R08B_I2CDEVICEADDR},
{0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xd8, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
{0xa0, 0xde, ZC3XX_R09C_WINHEIGHTLOW},
{0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW},
{0xaa, 0x12, 0x0088},
{0xaa, 0x12, 0x0048},
{0xaa, 0x75, 0x008a},
{0xaa, 0x13, 0x00a3},
{0xaa, 0x04, 0x0000},
{0xaa, 0x05, 0x0000},
{0xaa, 0x14, 0x0000},
{0xaa, 0x15, 0x0004},
{0xaa, 0x17, 0x0018},
{0xaa, 0x18, 0x00ba},
{0xaa, 0x19, 0x0002},
{0xaa, 0x1a, 0x00f1},
{0xaa, 0x20, 0x0040},
{0xaa, 0x24, 0x0088},
{0xaa, 0x25, 0x0078},
{0xaa, 0x27, 0x00f6},
{0xaa, 0x28, 0x00a0},
{0xaa, 0x21, 0x0000},
{0xaa, 0x2a, 0x0083},
{0xaa, 0x2b, 0x0096},
{0xaa, 0x2d, 0x0005},
{0xaa, 0x74, 0x0020},
{0xaa, 0x61, 0x0068},
{0xaa, 0x64, 0x0088},
{0xaa, 0x00, 0x0000},
{0xaa, 0x06, 0x0080},
{0xaa, 0x01, 0x0090},
{0xaa, 0x02, 0x0030},
{0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x00, 0x01ad},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xa0, 0x68, ZC3XX_R116_RGAIN},
{0xa0, 0x52, ZC3XX_R118_BGAIN},
{0xa0, 0x40, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN},
{}
};
static const struct usb_action ov7620_InitialScale[] = {
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x50, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x06, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x02, ZC3XX_R083_RGAINADDR},
{0xa0, 0x01, ZC3XX_R085_BGAINADDR},
{0xa0, 0x80, ZC3XX_R086_EXPTIMEHIGH},
{0xa0, 0x81, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0x10, ZC3XX_R088_EXPTIMELOW},
{0xa0, 0xa1, ZC3XX_R08B_I2CDEVICEADDR},
{0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xd0, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
{0xa0, 0xd6, ZC3XX_R09C_WINHEIGHTLOW},
{0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW},
{0xaa, 0x12, 0x0088},
{0xaa, 0x12, 0x0048},
{0xaa, 0x75, 0x008a},
{0xaa, 0x13, 0x00a3},
{0xaa, 0x04, 0x0000},
{0xaa, 0x05, 0x0000},
{0xaa, 0x14, 0x0000},
{0xaa, 0x15, 0x0004},
{0xaa, 0x24, 0x0088},
{0xaa, 0x25, 0x0078},
{0xaa, 0x17, 0x0018},
{0xaa, 0x18, 0x00ba},
{0xaa, 0x19, 0x0002},
{0xaa, 0x1a, 0x00f2},
{0xaa, 0x20, 0x0040},
{0xaa, 0x27, 0x00f6},
{0xaa, 0x28, 0x00a0},
{0xaa, 0x21, 0x0000},
{0xaa, 0x2a, 0x0083},
{0xaa, 0x2b, 0x0096},
{0xaa, 0x2d, 0x0005},
{0xaa, 0x74, 0x0020},
{0xaa, 0x61, 0x0068},
{0xaa, 0x64, 0x0088},
{0xaa, 0x00, 0x0000},
{0xaa, 0x06, 0x0080},
{0xaa, 0x01, 0x0090},
{0xaa, 0x02, 0x0030},
{0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x00, 0x01ad},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xa0, 0x68, ZC3XX_R116_RGAIN},
{0xa0, 0x52, ZC3XX_R118_BGAIN},
{0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN},
{}
};
static const struct usb_action ov7620_50HZ[] = {
{0xdd, 0x00, 0x0100},
{0xaa, 0x2b, 0x0096},
{0xaa, 0x75, 0x008e},
{0xaa, 0x2d, 0x0005},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x18, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x83, ZC3XX_R197_ANTIFLICKERLOW},
{0xaa, 0x76, 0x0003},
{}
};
static const struct usb_action ov7620_60HZ[] = {
{0xdd, 0x00, 0x0100},
{0xaa, 0x2b, 0x0000},
{0xaa, 0x75, 0x008e},
{0xaa, 0x2d, 0x0005},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x18, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x83, ZC3XX_R197_ANTIFLICKERLOW},
{0xaa, 0x76, 0x0003},
{}
};
static const struct usb_action ov7620_NoFlicker[] = {
{0xdd, 0x00, 0x0100},
{0xaa, 0x2b, 0x0000},
{0xaa, 0x75, 0x008a},
{0xaa, 0x2d, 0x0001},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x18, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x01, ZC3XX_R197_ANTIFLICKERLOW},
{}
};
static const struct usb_action ov7630c_InitialScale[] = {
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x10, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x10, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x06, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0xa1, ZC3XX_R08B_I2CDEVICEADDR},
{0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xaa, 0x12, 0x0080},
{0xa0, 0x02, ZC3XX_R083_RGAINADDR},
{0xa0, 0x01, ZC3XX_R085_BGAINADDR},
{0xa0, 0x90, ZC3XX_R086_EXPTIMEHIGH},
{0xa0, 0x91, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0x10, ZC3XX_R088_EXPTIMELOW},
{0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
{0xa0, 0xd8, ZC3XX_R09C_WINHEIGHTLOW},
{0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW},
{0xaa, 0x12, 0x0069},
{0xaa, 0x04, 0x0020},
{0xaa, 0x06, 0x0050},
{0xaa, 0x13, 0x0083},
{0xaa, 0x14, 0x0000},
{0xaa, 0x15, 0x0024},
{0xaa, 0x17, 0x0018},
{0xaa, 0x18, 0x00ba},
{0xaa, 0x19, 0x0002},
{0xaa, 0x1a, 0x00f6},
{0xaa, 0x1b, 0x0002},
{0xaa, 0x20, 0x00c2},
{0xaa, 0x24, 0x0060},
{0xaa, 0x25, 0x0040},
{0xaa, 0x26, 0x0030},
{0xaa, 0x27, 0x00ea},
{0xaa, 0x28, 0x00a0},
{0xaa, 0x21, 0x0000},
{0xaa, 0x2a, 0x0081},
{0xaa, 0x2b, 0x0096},
{0xaa, 0x2d, 0x0094},
{0xaa, 0x2f, 0x003d},
{0xaa, 0x30, 0x0024},
{0xaa, 0x60, 0x0000},
{0xaa, 0x61, 0x0040},
{0xaa, 0x68, 0x007c},
{0xaa, 0x6f, 0x0015},
{0xaa, 0x75, 0x0088},
{0xaa, 0x77, 0x00b5},
{0xaa, 0x01, 0x0060},
{0xaa, 0x02, 0x0060},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x00, 0x01ad},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xa0, 0x60, ZC3XX_R116_RGAIN},
{0xa0, 0x46, ZC3XX_R118_BGAIN},
{0xa0, 0x04, ZC3XX_R113_RGB03},
{0xa1, 0x01, 0x0002},
{0xa0, 0x50, ZC3XX_R10A_RGB00},
{0xa0, 0xf8, ZC3XX_R10B_RGB01},
{0xa0, 0xf8, ZC3XX_R10C_RGB02},
{0xa0, 0xf8, ZC3XX_R10D_RGB10},
{0xa0, 0x50, ZC3XX_R10E_RGB11},
{0xa0, 0xf8, ZC3XX_R10F_RGB12},
{0xa0, 0xf8, ZC3XX_R110_RGB20},
{0xa0, 0xf8, ZC3XX_R111_RGB21},
{0xa0, 0x50, ZC3XX_R112_RGB22},
{0xa1, 0x01, 0x0008},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00},
{0xa1, 0x01, 0x01c8},
{0xa1, 0x01, 0x01c9},
{0xa1, 0x01, 0x01ca},
{0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x01, ZC3XX_R120_GAMMA00},
{0xa0, 0x0c, ZC3XX_R121_GAMMA01},
{0xa0, 0x1f, ZC3XX_R122_GAMMA02},
{0xa0, 0x3a, ZC3XX_R123_GAMMA03},
{0xa0, 0x53, ZC3XX_R124_GAMMA04},
{0xa0, 0x6d, ZC3XX_R125_GAMMA05},
{0xa0, 0x85, ZC3XX_R126_GAMMA06},
{0xa0, 0x9c, ZC3XX_R127_GAMMA07},
{0xa0, 0xb0, ZC3XX_R128_GAMMA08},
{0xa0, 0xc2, ZC3XX_R129_GAMMA09},
{0xa0, 0xd1, ZC3XX_R12A_GAMMA0A},
{0xa0, 0xde, ZC3XX_R12B_GAMMA0B},
{0xa0, 0xe9, ZC3XX_R12C_GAMMA0C},
{0xa0, 0xf2, ZC3XX_R12D_GAMMA0D},
{0xa0, 0xf9, ZC3XX_R12E_GAMMA0E},
{0xa0, 0xff, ZC3XX_R12F_GAMMA0F},
{0xa0, 0x05, ZC3XX_R130_GAMMA10},
{0xa0, 0x0f, ZC3XX_R131_GAMMA11},
{0xa0, 0x16, ZC3XX_R132_GAMMA12},
{0xa0, 0x1a, ZC3XX_R133_GAMMA13},
{0xa0, 0x19, ZC3XX_R134_GAMMA14},
{0xa0, 0x19, ZC3XX_R135_GAMMA15},
{0xa0, 0x17, ZC3XX_R136_GAMMA16},
{0xa0, 0x15, ZC3XX_R137_GAMMA17},
{0xa0, 0x12, ZC3XX_R138_GAMMA18},
{0xa0, 0x10, ZC3XX_R139_GAMMA19},
{0xa0, 0x0e, ZC3XX_R13A_GAMMA1A},
{0xa0, 0x0b, ZC3XX_R13B_GAMMA1B},
{0xa0, 0x09, ZC3XX_R13C_GAMMA1C},
{0xa0, 0x08, ZC3XX_R13D_GAMMA1D},
{0xa0, 0x06, ZC3XX_R13E_GAMMA1E},
{0xa0, 0x03, ZC3XX_R13F_GAMMA1F},
{0xa0, 0x50, ZC3XX_R10A_RGB00},
{0xa0, 0xf8, ZC3XX_R10B_RGB01},
{0xa0, 0xf8, ZC3XX_R10C_RGB02},
{0xa0, 0xf8, ZC3XX_R10D_RGB10},
{0xa0, 0x50, ZC3XX_R10E_RGB11},
{0xa0, 0xf8, ZC3XX_R10F_RGB12},
{0xa0, 0xf8, ZC3XX_R110_RGB20},
{0xa0, 0xf8, ZC3XX_R111_RGB21},
{0xa0, 0x50, ZC3XX_R112_RGB22},
{0xa1, 0x01, 0x0180},
{0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
{0xaa, 0x10, 0x001b},
{0xaa, 0x76, 0x0002},
{0xaa, 0x2a, 0x0081},
{0xaa, 0x2b, 0x0000},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x01, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0xb8, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x37, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x26, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE},
{0xaa, 0x13, 0x0083},
{0xa1, 0x01, 0x0180},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{}
};
static const struct usb_action ov7630c_Initial[] = {
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x00, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x06, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0xa1, ZC3XX_R08B_I2CDEVICEADDR},
{0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xaa, 0x12, 0x0080},
{0xa0, 0x02, ZC3XX_R083_RGAINADDR},
{0xa0, 0x01, ZC3XX_R085_BGAINADDR},
{0xa0, 0x90, ZC3XX_R086_EXPTIMEHIGH},
{0xa0, 0x91, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0x10, ZC3XX_R088_EXPTIMELOW},
{0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
{0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW},
{0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW},
{0xaa, 0x12, 0x0069},
{0xaa, 0x04, 0x0020},
{0xaa, 0x06, 0x0050},
{0xaa, 0x13, 0x00c3},
{0xaa, 0x14, 0x0000},
{0xaa, 0x15, 0x0024},
{0xaa, 0x19, 0x0003},
{0xaa, 0x1a, 0x00f6},
{0xaa, 0x1b, 0x0002},
{0xaa, 0x20, 0x00c2},
{0xaa, 0x24, 0x0060},
{0xaa, 0x25, 0x0040},
{0xaa, 0x26, 0x0030},
{0xaa, 0x27, 0x00ea},
{0xaa, 0x28, 0x00a0},
{0xaa, 0x21, 0x0000},
{0xaa, 0x2a, 0x0081},
{0xaa, 0x2b, 0x0096},
{0xaa, 0x2d, 0x0084},
{0xaa, 0x2f, 0x003d},
{0xaa, 0x30, 0x0024},
{0xaa, 0x60, 0x0000},
{0xaa, 0x61, 0x0040},
{0xaa, 0x68, 0x007c},
{0xaa, 0x6f, 0x0015},
{0xaa, 0x75, 0x0088},
{0xaa, 0x77, 0x00b5},
{0xaa, 0x01, 0x0060},
{0xaa, 0x02, 0x0060},
{0xaa, 0x17, 0x0018},
{0xaa, 0x18, 0x00ba},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
{0xa0, 0x00, 0x01ad},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xa0, 0x60, ZC3XX_R116_RGAIN},
{0xa0, 0x46, ZC3XX_R118_BGAIN},
{0xa0, 0x04, ZC3XX_R113_RGB03},
{0xa1, 0x01, 0x0002},
{0xa0, 0x4e, ZC3XX_R10A_RGB00},
{0xa0, 0xfe, ZC3XX_R10B_RGB01},
{0xa0, 0xf4, ZC3XX_R10C_RGB02},
{0xa0, 0xf7, ZC3XX_R10D_RGB10},
{0xa0, 0x4d, ZC3XX_R10E_RGB11},
{0xa0, 0xfc, ZC3XX_R10F_RGB12},
{0xa0, 0x00, ZC3XX_R110_RGB20},
{0xa0, 0xf6, ZC3XX_R111_RGB21},
{0xa0, 0x4a, ZC3XX_R112_RGB22},
{0xa1, 0x01, 0x0008},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00},
{0xa1, 0x01, 0x01c8},
{0xa1, 0x01, 0x01c9},
{0xa1, 0x01, 0x01ca},
{0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x16, ZC3XX_R120_GAMMA00},
{0xa0, 0x3a, ZC3XX_R121_GAMMA01},
{0xa0, 0x5b, ZC3XX_R122_GAMMA02},
{0xa0, 0x7c, ZC3XX_R123_GAMMA03},
{0xa0, 0x94, ZC3XX_R124_GAMMA04},
{0xa0, 0xa9, ZC3XX_R125_GAMMA05},
{0xa0, 0xbb, ZC3XX_R126_GAMMA06},
{0xa0, 0xca, ZC3XX_R127_GAMMA07},
{0xa0, 0xd7, ZC3XX_R128_GAMMA08},
{0xa0, 0xe1, ZC3XX_R129_GAMMA09},
{0xa0, 0xea, ZC3XX_R12A_GAMMA0A},
{0xa0, 0xf1, ZC3XX_R12B_GAMMA0B},
{0xa0, 0xf7, ZC3XX_R12C_GAMMA0C},
{0xa0, 0xfc, ZC3XX_R12D_GAMMA0D},
{0xa0, 0xff, ZC3XX_R12E_GAMMA0E},
{0xa0, 0xff, ZC3XX_R12F_GAMMA0F},
{0xa0, 0x20, ZC3XX_R130_GAMMA10},
{0xa0, 0x22, ZC3XX_R131_GAMMA11},
{0xa0, 0x20, ZC3XX_R132_GAMMA12},
{0xa0, 0x1c, ZC3XX_R133_GAMMA13},
{0xa0, 0x16, ZC3XX_R134_GAMMA14},
{0xa0, 0x13, ZC3XX_R135_GAMMA15},
{0xa0, 0x10, ZC3XX_R136_GAMMA16},
{0xa0, 0x0d, ZC3XX_R137_GAMMA17},
{0xa0, 0x0b, ZC3XX_R138_GAMMA18},
{0xa0, 0x09, ZC3XX_R139_GAMMA19},
{0xa0, 0x07, ZC3XX_R13A_GAMMA1A},
{0xa0, 0x06, ZC3XX_R13B_GAMMA1B},
{0xa0, 0x05, ZC3XX_R13C_GAMMA1C},
{0xa0, 0x04, ZC3XX_R13D_GAMMA1D},
{0xa0, 0x00, ZC3XX_R13E_GAMMA1E},
{0xa0, 0x01, ZC3XX_R13F_GAMMA1F},
{0xa0, 0x4e, ZC3XX_R10A_RGB00},
{0xa0, 0xfe, ZC3XX_R10B_RGB01},
{0xa0, 0xf4, ZC3XX_R10C_RGB02},
{0xa0, 0xf7, ZC3XX_R10D_RGB10},
{0xa0, 0x4d, ZC3XX_R10E_RGB11},
{0xa0, 0xfc, ZC3XX_R10F_RGB12},
{0xa0, 0x00, ZC3XX_R110_RGB20},
{0xa0, 0xf6, ZC3XX_R111_RGB21},
{0xa0, 0x4a, ZC3XX_R112_RGB22},
{0xa1, 0x01, 0x0180},
{0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
{0xaa, 0x10, 0x000d},
{0xaa, 0x76, 0x0002},
{0xaa, 0x2a, 0x0081},
{0xaa, 0x2b, 0x0000},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x00, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0xd8, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x1b, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x26, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE},
{0xaa, 0x13, 0x00c3},
{0xa1, 0x01, 0x0180},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{}
};
static const struct usb_action pas106b_Initial_com[] = {
{0xa1, 0x01, 0x0010},
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x00, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x03, 0x003a},
{0xa0, 0x0c, 0x003b},
{0xa0, 0x04, 0x0038},
{}
};
static const struct usb_action pas106b_InitialScale[] = {
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x0f, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x00, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0xb0, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x00, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0x90, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE},
{0xa0, 0x03, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x03, ZC3XX_R11C_FIRSTXLOW},
{0xa0, 0x28, ZC3XX_R09C_WINHEIGHTLOW},
{0xa0, 0x68, ZC3XX_R09E_WINWIDTHLOW},
{0xaa, 0x02, 0x0004},
{0xaa, 0x08, 0x0000},
{0xaa, 0x09, 0x0005},
{0xaa, 0x0a, 0x0002},
{0xaa, 0x0b, 0x0002},
{0xaa, 0x0c, 0x0005},
{0xaa, 0x0d, 0x0000},
{0xaa, 0x0e, 0x0002},
{0xaa, 0x14, 0x0081},
{0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xa0, 0xa0, ZC3XX_R1A8_DIGITALGAIN},
{0xa0, 0x00, 0x01ad},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00},
{0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00},
{0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x58, ZC3XX_R10A_RGB00},
{0xa0, 0xf4, ZC3XX_R10B_RGB01},
{0xa0, 0xf4, ZC3XX_R10C_RGB02},
{0xa0, 0xf4, ZC3XX_R10D_RGB10},
{0xa0, 0x58, ZC3XX_R10E_RGB11},
{0xa0, 0xf4, ZC3XX_R10F_RGB12},
{0xa0, 0xf4, ZC3XX_R110_RGB20},
{0xa0, 0xf4, ZC3XX_R111_RGB21},
{0xa0, 0x58, ZC3XX_R112_RGB22},
{0xa0, 0x03, ZC3XX_R181_WINXSTART},
{0xa0, 0x08, ZC3XX_R182_WINXWIDTH},
{0xa0, 0x16, ZC3XX_R183_WINXCENTER},
{0xa0, 0x03, ZC3XX_R184_WINYSTART},
{0xa0, 0x05, ZC3XX_R185_WINYWIDTH},
{0xa0, 0x14, ZC3XX_R186_WINYCENTER},
{0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x03, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0xb1, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x87, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0c, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE},
{0xaa, 0x07, 0x00b1},
{0xaa, 0x05, 0x0003},
{0xaa, 0x04, 0x0001},
{0xaa, 0x03, 0x003b},
{0xa0, 0x20, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x26, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0xa0, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa1, 0x01, 0x0180},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x40, ZC3XX_R116_RGAIN},
{0xa0, 0x40, ZC3XX_R117_GGAIN},
{0xa0, 0x40, ZC3XX_R118_BGAIN},
{}
};
static const struct usb_action pas106b_Initial[] = {
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x0f, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x01, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x60, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0x20, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE},
{0xa0, 0x03, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x03, ZC3XX_R11C_FIRSTXLOW},
{0xa0, 0x28, ZC3XX_R09C_WINHEIGHTLOW},
{0xa0, 0x68, ZC3XX_R09E_WINWIDTHLOW},
{0xaa, 0x02, 0x0004},
{0xaa, 0x08, 0x0000},
{0xaa, 0x09, 0x0005},
{0xaa, 0x0a, 0x0002},
{0xaa, 0x0b, 0x0002},
{0xaa, 0x0c, 0x0005},
{0xaa, 0x0d, 0x0000},
{0xaa, 0x0e, 0x0002},
{0xaa, 0x14, 0x0081},
{0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xa0, 0xa0, ZC3XX_R1A8_DIGITALGAIN},
{0xa0, 0x00, 0x01ad},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x80, ZC3XX_R18D_YTARGET},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00},
{0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00},
{0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x58, ZC3XX_R10A_RGB00},
{0xa0, 0xf4, ZC3XX_R10B_RGB01},
{0xa0, 0xf4, ZC3XX_R10C_RGB02},
{0xa0, 0xf4, ZC3XX_R10D_RGB10},
{0xa0, 0x58, ZC3XX_R10E_RGB11},
{0xa0, 0xf4, ZC3XX_R10F_RGB12},
{0xa0, 0xf4, ZC3XX_R110_RGB20},
{0xa0, 0xf4, ZC3XX_R111_RGB21},
{0xa0, 0x58, ZC3XX_R112_RGB22},
{0xa0, 0x03, ZC3XX_R181_WINXSTART},
{0xa0, 0x08, ZC3XX_R182_WINXWIDTH},
{0xa0, 0x16, ZC3XX_R183_WINXCENTER},
{0xa0, 0x03, ZC3XX_R184_WINYSTART},
{0xa0, 0x05, ZC3XX_R185_WINYWIDTH},
{0xa0, 0x14, ZC3XX_R186_WINYCENTER},
{0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x03, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0xb1, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x87, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
{0xaa, 0x07, 0x00b1},
{0xaa, 0x05, 0x0003},
{0xaa, 0x04, 0x0001},
{0xaa, 0x03, 0x003b},
{0xa0, 0x20, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x26, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa1, 0x01, 0x0180},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x40, ZC3XX_R116_RGAIN},
{0xa0, 0x40, ZC3XX_R117_GGAIN},
{0xa0, 0x40, ZC3XX_R118_BGAIN},
{0xa0, 0x00, 0x0007},
{0xa0, 0xff, ZC3XX_R018_FRAMELOST},
{}
};
static const struct usb_action pas106b_50HZ[] = {
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x06, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x54, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x87, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x30, ZC3XX_R18F_AEUNFREEZE},
{0xaa, 0x03, 0x0021},
{0xaa, 0x04, 0x000c},
{0xaa, 0x05, 0x0002},
{0xaa, 0x07, 0x001c},
{0xa0, 0x04, ZC3XX_R1A9_DIGITALLIMITDIFF},
{}
};
static const struct usb_action pas106b_60HZ[] = {
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x06, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x2e, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x71, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x30, ZC3XX_R18F_AEUNFREEZE},
{0xaa, 0x03, 0x001c},
{0xaa, 0x04, 0x0004},
{0xaa, 0x05, 0x0001},
{0xaa, 0x07, 0x00c4},
{0xa0, 0x04, ZC3XX_R1A9_DIGITALLIMITDIFF},
{}
};
static const struct usb_action pas106b_NoFlicker[] = {
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x06, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x50, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
{0xaa, 0x03, 0x0013},
{0xaa, 0x04, 0x0000},
{0xaa, 0x05, 0x0001},
{0xaa, 0x07, 0x0030},
{0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF},
{}
};
static const struct usb_action pas202b_Initial[] = {
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x0e, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x00, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE},
{0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x03, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x03, ZC3XX_R11C_FIRSTXLOW},
{0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH},
{0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW},
{0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH},
{0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW},
{0xaa, 0x02, 0x0002},
{0xaa, 0x07, 0x0006},
{0xaa, 0x08, 0x0002},
{0xaa, 0x09, 0x0006},
{0xaa, 0x0a, 0x0001},
{0xaa, 0x0b, 0x0001},
{0xaa, 0x0c, 0x0006},
{0xaa, 0x0d, 0x0000},
{0xaa, 0x10, 0x0000},
{0xaa, 0x12, 0x0005},
{0xaa, 0x13, 0x0063},
{0xaa, 0x15, 0x0070},
{0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x00, 0x01ad},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xa0, 0x70, ZC3XX_R18D_YTARGET},
{}
};
static const struct usb_action pas202b_InitialScale[] = {
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x0e, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x10, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE},
{0xa0, 0x08, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x02, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x08, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x02, ZC3XX_R11C_FIRSTXLOW},
{0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH},
{0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW},
{0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH},
{0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW},
{0xaa, 0x02, 0x0002},
{0xaa, 0x07, 0x0006},
{0xaa, 0x08, 0x0002},
{0xaa, 0x09, 0x0006},
{0xaa, 0x0a, 0x0001},
{0xaa, 0x0b, 0x0001},
{0xaa, 0x0c, 0x0006},
{0xaa, 0x0d, 0x0000},
{0xaa, 0x10, 0x0000},
{0xaa, 0x12, 0x0005},
{0xaa, 0x13, 0x0063},
{0xaa, 0x15, 0x0070},
{0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x00, 0x01ad},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xa0, 0x70, ZC3XX_R18D_YTARGET},
{0xa0, 0xff, ZC3XX_R097_WINYSTARTHIGH},
{0xa0, 0xfe, ZC3XX_R098_WINYSTARTLOW},
{}
};
static const struct usb_action pas202b_50HZ[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xa0, 0x20, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0x21, ZC3XX_R088_EXPTIMELOW},
{0xaa, 0x20, 0x0002},
{0xaa, 0x21, 0x001b},
{0xaa, 0x03, 0x0044},
{0xaa, 0x04, 0x0008},
{0xaa, 0x05, 0x001b},
{0xaa, 0x0e, 0x0001},
{0xaa, 0x0f, 0x0000},
{0xa0, 0x1c, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x1b, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x4d, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x1b, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x44, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x6f, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xad, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xeb, ZC3XX_R020_HSYNC_3},
{0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW},
{}
};
static const struct usb_action pas202b_50HZScale[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xa0, 0x20, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0x21, ZC3XX_R088_EXPTIMELOW},
{0xaa, 0x20, 0x0004},
{0xaa, 0x21, 0x003d},
{0xaa, 0x03, 0x0041},
{0xaa, 0x04, 0x0010},
{0xaa, 0x05, 0x003d},
{0xaa, 0x0e, 0x0001},
{0xaa, 0x0f, 0x0000},
{0xa0, 0x1c, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x3d, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x9b, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x1b, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x41, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x6f, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xad, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW},
{}
};
static const struct usb_action pas202b_60HZ[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xa0, 0x20, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0x21, ZC3XX_R088_EXPTIMELOW},
{0xaa, 0x20, 0x0002},
{0xaa, 0x21, 0x0000},
{0xaa, 0x03, 0x0045},
{0xaa, 0x04, 0x0008},
{0xaa, 0x05, 0x0000},
{0xaa, 0x0e, 0x0001},
{0xaa, 0x0f, 0x0000},
{0xa0, 0x1c, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x40, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x1b, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x45, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x8e, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xc1, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xf5, ZC3XX_R020_HSYNC_3},
{0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW},
{}
};
static const struct usb_action pas202b_60HZScale[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xa0, 0x20, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0x21, ZC3XX_R088_EXPTIMELOW},
{0xaa, 0x20, 0x0004},
{0xaa, 0x21, 0x0008},
{0xaa, 0x03, 0x0042},
{0xaa, 0x04, 0x0010},
{0xaa, 0x05, 0x0008},
{0xaa, 0x0e, 0x0001},
{0xaa, 0x0f, 0x0000},
{0xa0, 0x1c, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x08, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x81, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x1b, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x42, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x6f, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xaf, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW},
{}
};
static const struct usb_action pas202b_NoFlicker[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xa0, 0x20, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0x21, ZC3XX_R088_EXPTIMELOW},
{0xaa, 0x20, 0x0002},
{0xaa, 0x21, 0x0006},
{0xaa, 0x03, 0x0040},
{0xaa, 0x04, 0x0008},
{0xaa, 0x05, 0x0006},
{0xaa, 0x0e, 0x0001},
{0xaa, 0x0f, 0x0000},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x06, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x01, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x40, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x60, ZC3XX_R01E_HSYNC_1},
{0xa0, 0x90, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW},
{}
};
static const struct usb_action pas202b_NoFlickerScale[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xa0, 0x20, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0x21, ZC3XX_R088_EXPTIMELOW},
{0xaa, 0x20, 0x0004},
{0xaa, 0x21, 0x000c},
{0xaa, 0x03, 0x0040},
{0xaa, 0x04, 0x0010},
{0xaa, 0x05, 0x000c},
{0xaa, 0x0e, 0x0001},
{0xaa, 0x0f, 0x0000},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x0c, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x02, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x40, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x60, ZC3XX_R01E_HSYNC_1},
{0xa0, 0x90, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW},
{}
};
static const struct usb_action mt9v111_1_Initial[] = {
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x00, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
{0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR},
{0xdd, 0x00, 0x0200},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xaa, 0x01, 0x0001},
{0xaa, 0x06, 0x0000},
{0xaa, 0x08, 0x0483},
{0xaa, 0x01, 0x0004},
{0xaa, 0x08, 0x0006},
{0xaa, 0x02, 0x0011},
{0xaa, 0x03, 0x01e5},
{0xaa, 0x04, 0x0285},
{0xaa, 0x07, 0x3002},
{0xaa, 0x20, 0x5100},
{0xaa, 0x35, 0x507f},
{0xaa, 0x30, 0x0005},
{0xaa, 0x31, 0x0000},
{0xaa, 0x58, 0x0078},
{0xaa, 0x62, 0x0411},
{0xaa, 0x2b, 0x007f},
{0xaa, 0x2c, 0x007f},
{0xaa, 0x2d, 0x007f},
{0xaa, 0x2e, 0x007f},
{0xa0, 0x10, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x09, 0x01ad},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN},
{0xa0, 0x6c, ZC3XX_R18D_YTARGET},
{0xa0, 0x61, ZC3XX_R116_RGAIN},
{0xa0, 0x65, ZC3XX_R118_BGAIN},
{}
};
static const struct usb_action mt9v111_1_InitialScale[] = {
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x10, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
{0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR},
{0xdd, 0x00, 0x0200},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xaa, 0x01, 0x0001},
{0xaa, 0x06, 0x0000},
{0xaa, 0x08, 0x0483},
{0xaa, 0x01, 0x0004},
{0xaa, 0x08, 0x0006},
{0xaa, 0x02, 0x0011},
{0xaa, 0x03, 0x01e7},
{0xaa, 0x04, 0x0287},
{0xaa, 0x07, 0x3002},
{0xaa, 0x20, 0x5100},
{0xaa, 0x35, 0x007f},
{0xaa, 0x30, 0x0005},
{0xaa, 0x31, 0x0000},
{0xaa, 0x58, 0x0078},
{0xaa, 0x62, 0x0411},
{0xaa, 0x2b, 0x007f},
{0xaa, 0x2c, 0x007f},
{0xaa, 0x2d, 0x007f},
{0xaa, 0x2e, 0x007f},
{0xa0, 0x10, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x09, 0x01ad},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN},
{0xa0, 0x6c, ZC3XX_R18D_YTARGET},
{0xa0, 0x61, ZC3XX_R116_RGAIN},
{0xa0, 0x65, ZC3XX_R118_BGAIN},
{}
};
static const struct usb_action mt9v111_1_AE50HZ[] = {
{0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xbb, 0x00, 0x0562},
{0xbb, 0x01, 0x09aa},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x03, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x9b, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x47, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x62, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x90, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xc8, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{}
};
static const struct usb_action mt9v111_1_AE50HZScale[] = {
{0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xbb, 0x00, 0x0509},
{0xbb, 0x01, 0x0934},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0xd2, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x9a, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0xd7, ZC3XX_R01D_HSYNC_0},
{0xa0, 0xf4, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xf9, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{}
};
static const struct usb_action mt9v111_1_AE60HZ[] = {
{0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0x05, 0x003d},
{0xaa, 0x09, 0x016e},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0xdd, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x3d, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x62, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x90, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xc8, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{}
};
static const struct usb_action mt9v111_1_AE60HZScale[] = {
{0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xbb, 0x00, 0x0509},
{0xbb, 0x01, 0x0983},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x8f, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x81, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0xd7, ZC3XX_R01D_HSYNC_0},
{0xa0, 0xf4, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xf9, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{}
};
static const struct usb_action mt9v111_1_AENoFlicker[] = {
{0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xbb, 0x00, 0x0509},
{0xbb, 0x01, 0x0960},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0xf0, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x04, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x09, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x40, ZC3XX_R01E_HSYNC_1},
{0xa0, 0x90, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xe0, ZC3XX_R020_HSYNC_3},
{0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{}
};
static const struct usb_action mt9v111_1_AENoFlickerScale[] = {
{0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xbb, 0x00, 0x0534},
{0xbb, 0x02, 0x0960},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0xf0, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x04, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x34, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x60, ZC3XX_R01E_HSYNC_1},
{0xa0, 0x90, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xe0, ZC3XX_R020_HSYNC_3},
{0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{}
};
static const struct usb_action mt9v111_3_Initial[] = {
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x00, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
{0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR},
{0xdd, 0x00, 0x0200},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xaa, 0x01, 0x0001},
{0xaa, 0x06, 0x0000},
{0xaa, 0x08, 0x0483},
{0xaa, 0x01, 0x0004},
{0xaa, 0x08, 0x0006},
{0xaa, 0x02, 0x0011},
{0xaa, 0x03, 0x01e5},
{0xaa, 0x04, 0x0285},
{0xaa, 0x07, 0x3002},
{0xaa, 0x20, 0x1100},
{0xaa, 0x35, 0x007f},
{0xaa, 0x30, 0x0005},
{0xaa, 0x31, 0x0000},
{0xaa, 0x58, 0x0078},
{0xaa, 0x62, 0x0411},
{0xaa, 0x2b, 0x007f},
{0xaa, 0x2c, 0x007f},
{0xaa, 0x2d, 0x007f},
{0xaa, 0x2e, 0x007f},
{0xa0, 0x10, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x00, 0x01ad},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN},
{0xa0, 0x80, ZC3XX_R18D_YTARGET},
{0xa0, 0x61, ZC3XX_R116_RGAIN},
{0xa0, 0x65, ZC3XX_R118_BGAIN},
{}
};
static const struct usb_action mt9v111_3_InitialScale[] = {
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x10, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
{0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR},
{0xdd, 0x00, 0x0200},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xaa, 0x01, 0x0001},
{0xaa, 0x06, 0x0000},
{0xaa, 0x08, 0x0483},
{0xaa, 0x01, 0x0004},
{0xaa, 0x08, 0x0006},
{0xaa, 0x02, 0x0011},
{0xaa, 0x03, 0x01e7},
{0xaa, 0x04, 0x0287},
{0xaa, 0x07, 0x3002},
{0xaa, 0x20, 0x1100},
{0xaa, 0x35, 0x007f},
{0xaa, 0x30, 0x0005},
{0xaa, 0x31, 0x0000},
{0xaa, 0x58, 0x0078},
{0xaa, 0x62, 0x0411},
{0xaa, 0x2b, 0x007f},
{0xaa, 0x2c, 0x007f},
{0xaa, 0x2d, 0x007f},
{0xaa, 0x2e, 0x007f},
{0xa0, 0x10, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x00, 0x01ad},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN},
{0xa0, 0x80, ZC3XX_R18D_YTARGET},
{0xa0, 0x61, ZC3XX_R116_RGAIN},
{0xa0, 0x65, ZC3XX_R118_BGAIN},
{}
};
static const struct usb_action mt9v111_3_AE50HZ[] = {
{0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0x05, 0x0009},
{0xaa, 0x09, 0x01ce},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0xd2, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x9a, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0xd7, ZC3XX_R01D_HSYNC_0},
{0xa0, 0xf4, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xf9, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{}
};
static const struct usb_action mt9v111_3_AE50HZScale[] = {
{0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0x05, 0x0009},
{0xaa, 0x09, 0x01ce},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0xd2, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x9a, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0xd7, ZC3XX_R01D_HSYNC_0},
{0xa0, 0xf4, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xf9, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{}
};
static const struct usb_action mt9v111_3_AE60HZ[] = {
{0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0x05, 0x0009},
{0xaa, 0x09, 0x0083},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x8f, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x81, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0xd7, ZC3XX_R01D_HSYNC_0},
{0xa0, 0xf4, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xf9, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{}
};
static const struct usb_action mt9v111_3_AE60HZScale[] = {
{0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0x05, 0x0009},
{0xaa, 0x09, 0x0083},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x8f, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x81, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0xd7, ZC3XX_R01D_HSYNC_0},
{0xa0, 0xf4, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xf9, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{}
};
static const struct usb_action mt9v111_3_AENoFlicker[] = {
{0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0x05, 0x0034},
{0xaa, 0x09, 0x0260},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0xf0, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x04, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x34, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x60, ZC3XX_R01E_HSYNC_1},
{0xa0, 0x90, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xe0, ZC3XX_R020_HSYNC_3},
{0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{}
};
static const struct usb_action mt9v111_3_AENoFlickerScale[] = {
{0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0x05, 0x0034},
{0xaa, 0x09, 0x0260},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0xf0, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x04, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x34, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x60, ZC3XX_R01E_HSYNC_1},
{0xa0, 0x90, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xe0, ZC3XX_R020_HSYNC_3},
{0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{}
};
static const struct usb_action pb0330_Initial[] = {
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x00, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
{0xdd, 0x00, 0x0200},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xaa, 0x01, 0x0006},
{0xaa, 0x02, 0x0011},
{0xaa, 0x03, 0x01e5},
{0xaa, 0x04, 0x0285},
{0xaa, 0x06, 0x0003},
{0xaa, 0x07, 0x3002},
{0xaa, 0x20, 0x1100},
{0xaa, 0x2f, 0xf7b0},
{0xaa, 0x30, 0x0005},
{0xaa, 0x31, 0x0000},
{0xaa, 0x34, 0x0100},
{0xaa, 0x35, 0x0060},
{0xaa, 0x3d, 0x068f},
{0xaa, 0x40, 0x01e0},
{0xaa, 0x58, 0x0078},
{0xaa, 0x62, 0x0411},
{0xa0, 0x10, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x09, 0x01ad},
{0xa0, 0x15, 0x01ae},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN},
{0xa0, 0x78, ZC3XX_R18D_YTARGET},
{}
};
static const struct usb_action pb0330_InitialScale[] = {
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x10, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
{0xdd, 0x00, 0x0200},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xaa, 0x01, 0x0006},
{0xaa, 0x02, 0x0011},
{0xaa, 0x03, 0x01e7},
{0xaa, 0x04, 0x0287},
{0xaa, 0x06, 0x0003},
{0xaa, 0x07, 0x3002},
{0xaa, 0x20, 0x1100},
{0xaa, 0x2f, 0xf7b0},
{0xaa, 0x30, 0x0005},
{0xaa, 0x31, 0x0000},
{0xaa, 0x34, 0x0100},
{0xaa, 0x35, 0x0060},
{0xaa, 0x3d, 0x068f},
{0xaa, 0x40, 0x01e0},
{0xaa, 0x58, 0x0078},
{0xaa, 0x62, 0x0411},
{0xa0, 0x10, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x09, 0x01ad},
{0xa0, 0x15, 0x01ae},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN},
{0xa0, 0x78, ZC3XX_R18D_YTARGET},
{}
};
static const struct usb_action pb0330_50HZ[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xbb, 0x00, 0x055c},
{0xbb, 0x01, 0x09aa},
{0xbb, 0x00, 0x1001},
{0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0xc4, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x47, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x1a, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x5c, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x90, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xc8, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{}
};
static const struct usb_action pb0330_50HZScale[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xbb, 0x00, 0x0566},
{0xbb, 0x02, 0x09b2},
{0xbb, 0x00, 0x1002},
{0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x8c, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x8a, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x1a, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0xd7, ZC3XX_R01D_HSYNC_0},
{0xa0, 0xf0, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xf8, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{}
};
static const struct usb_action pb0330_60HZ[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xbb, 0x00, 0x0535},
{0xbb, 0x01, 0x0974},
{0xbb, 0x00, 0x1001},
{0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0xfe, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x3e, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x1a, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x35, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x50, ZC3XX_R01E_HSYNC_1},
{0xa0, 0x90, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xd0, ZC3XX_R020_HSYNC_3},
{}
};
static const struct usb_action pb0330_60HZScale[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xbb, 0x00, 0x0535},
{0xbb, 0x02, 0x096c},
{0xbb, 0x00, 0x1002},
{0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0xc0, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x7c, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x1a, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x35, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x50, ZC3XX_R01E_HSYNC_1},
{0xa0, 0x90, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xd0, ZC3XX_R020_HSYNC_3},
{}
};
static const struct usb_action pb0330_NoFlicker[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xbb, 0x00, 0x0509},
{0xbb, 0x02, 0x0940},
{0xbb, 0x00, 0x1002},
{0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0xf0, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x01, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x09, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x40, ZC3XX_R01E_HSYNC_1},
{0xa0, 0x90, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xe0, ZC3XX_R020_HSYNC_3},
{}
};
static const struct usb_action pb0330_NoFlickerScale[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xbb, 0x00, 0x0535},
{0xbb, 0x01, 0x0980},
{0xbb, 0x00, 0x1001},
{0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0xf0, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x01, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x35, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x60, ZC3XX_R01E_HSYNC_1},
{0xa0, 0x90, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xe0, ZC3XX_R020_HSYNC_3},
{}
};
static const struct usb_action po2030_Initial[] = {
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x04, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x04, ZC3XX_R080_HBLANKHIGH},
{0xa0, 0x05, ZC3XX_R081_HBLANKLOW},
{0xa0, 0x16, ZC3XX_R083_RGAINADDR},
{0xa0, 0x18, ZC3XX_R085_BGAINADDR},
{0xa0, 0x1a, ZC3XX_R086_EXPTIMEHIGH},
{0xa0, 0x1b, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0x1c, ZC3XX_R088_EXPTIMELOW},
{0xa0, 0xee, ZC3XX_R08B_I2CDEVICEADDR},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{0xaa, 0x8d, 0x0008},
{0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
{0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW},
{0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW},
{0xaa, 0x09, 0x00ce},
{0xaa, 0x0b, 0x0005},
{0xaa, 0x0d, 0x0054},
{0xaa, 0x0f, 0x00eb},
{0xaa, 0x87, 0x0000},
{0xaa, 0x88, 0x0004},
{0xaa, 0x89, 0x0000},
{0xaa, 0x8a, 0x0005},
{0xaa, 0x13, 0x0003},
{0xaa, 0x16, 0x0040},
{0xaa, 0x18, 0x0040},
{0xaa, 0x1d, 0x0002},
{0xaa, 0x29, 0x00e8},
{0xaa, 0x45, 0x0045},
{0xaa, 0x50, 0x00ed},
{0xaa, 0x51, 0x0025},
{0xaa, 0x52, 0x0042},
{0xaa, 0x53, 0x002f},
{0xaa, 0x79, 0x0025},
{0xaa, 0x7b, 0x0000},
{0xaa, 0x7e, 0x0025},
{0xaa, 0x7f, 0x0025},
{0xaa, 0x21, 0x0000},
{0xaa, 0x33, 0x0036},
{0xaa, 0x36, 0x0060},
{0xaa, 0x37, 0x0008},
{0xaa, 0x3b, 0x0031},
{0xaa, 0x44, 0x000f},
{0xaa, 0x58, 0x0002},
{0xaa, 0x66, 0x00c0},
{0xaa, 0x67, 0x0044},
{0xaa, 0x6b, 0x00a0},
{0xaa, 0x6c, 0x0054},
{0xaa, 0xd6, 0x0007},
{0xa0, 0xf7, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x00, 0x01ad},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xa0, 0x7a, ZC3XX_R116_RGAIN},
{0xa0, 0x4a, ZC3XX_R118_BGAIN},
{}
};
static const struct usb_action po2030_InitialScale[] = {
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x10, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x04, ZC3XX_R080_HBLANKHIGH},
{0xa0, 0x05, ZC3XX_R081_HBLANKLOW},
{0xa0, 0x16, ZC3XX_R083_RGAINADDR},
{0xa0, 0x18, ZC3XX_R085_BGAINADDR},
{0xa0, 0x1a, ZC3XX_R086_EXPTIMEHIGH},
{0xa0, 0x1b, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0x1c, ZC3XX_R088_EXPTIMELOW},
{0xa0, 0xee, ZC3XX_R08B_I2CDEVICEADDR},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{0xaa, 0x8d, 0x0008},
{0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
{0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW},
{0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW},
{0xaa, 0x09, 0x00cc},
{0xaa, 0x0b, 0x0005},
{0xaa, 0x0d, 0x0058},
{0xaa, 0x0f, 0x00ed},
{0xaa, 0x87, 0x0000},
{0xaa, 0x88, 0x0004},
{0xaa, 0x89, 0x0000},
{0xaa, 0x8a, 0x0005},
{0xaa, 0x13, 0x0003},
{0xaa, 0x16, 0x0040},
{0xaa, 0x18, 0x0040},
{0xaa, 0x1d, 0x0002},
{0xaa, 0x29, 0x00e8},
{0xaa, 0x45, 0x0045},
{0xaa, 0x50, 0x00ed},
{0xaa, 0x51, 0x0025},
{0xaa, 0x52, 0x0042},
{0xaa, 0x53, 0x002f},
{0xaa, 0x79, 0x0025},
{0xaa, 0x7b, 0x0000},
{0xaa, 0x7e, 0x0025},
{0xaa, 0x7f, 0x0025},
{0xaa, 0x21, 0x0000},
{0xaa, 0x33, 0x0036},
{0xaa, 0x36, 0x0060},
{0xaa, 0x37, 0x0008},
{0xaa, 0x3b, 0x0031},
{0xaa, 0x44, 0x000f},
{0xaa, 0x58, 0x0002},
{0xaa, 0x66, 0x00c0},
{0xaa, 0x67, 0x0044},
{0xaa, 0x6b, 0x00a0},
{0xaa, 0x6c, 0x0054},
{0xaa, 0xd6, 0x0007},
{0xa0, 0xf7, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x00, 0x01ad},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xa0, 0x7a, ZC3XX_R116_RGAIN},
{0xa0, 0x4a, ZC3XX_R118_BGAIN},
{}
};
static const struct usb_action po2030_50HZ[] = {
{0xaa, 0x8d, 0x0008},
{0xaa, 0x1a, 0x0001},
{0xaa, 0x1b, 0x000a},
{0xaa, 0x1c, 0x00b0},
{0xa0, 0x05, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x35, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x70, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x85, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x58, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0c, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN},
{0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x22, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x88, ZC3XX_R18D_YTARGET},
{0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{}
};
static const struct usb_action po2030_60HZ[] = {
{0xaa, 0x8d, 0x0008},
{0xaa, 0x1a, 0x0000},
{0xaa, 0x1b, 0x00de},
{0xaa, 0x1c, 0x0040},
{0xa0, 0x08, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0xae, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x80, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x6f, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x20, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0c, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN},
{0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x22, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x88, ZC3XX_R18D_YTARGET},
{0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{}
};
static const struct usb_action po2030_NoFlicker[] = {
{0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE},
{0xaa, 0x8d, 0x000d},
{0xaa, 0x1a, 0x0000},
{0xaa, 0x1b, 0x0002},
{0xaa, 0x1c, 0x0078},
{0xaa, 0x46, 0x0000},
{0xaa, 0x15, 0x0000},
{}
};
static const struct usb_action tas5130c_InitialScale[] = {
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x50, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x02, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x00, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0x04, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x0f, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x04, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x0f, ZC3XX_R11C_FIRSTXLOW},
{0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW},
{0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH},
{0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW},
{0xa0, 0x06, ZC3XX_R08D_COMPABILITYMODE},
{0xa0, 0xf7, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x70, ZC3XX_R18D_YTARGET},
{0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN},
{0xa0, 0x00, 0x01ad},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xa0, 0x07, ZC3XX_R0A5_EXPOSUREGAIN},
{0xa0, 0x02, ZC3XX_R0A6_EXPOSUREBLACKLVL},
{}
};
static const struct usb_action tas5130c_Initial[] = {
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x40, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x00, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x02, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x00, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0x05, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x0f, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x05, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x0f, ZC3XX_R11C_FIRSTXLOW},
{0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW},
{0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH},
{0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW},
{0xa0, 0x06, ZC3XX_R08D_COMPABILITYMODE},
{0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x70, ZC3XX_R18D_YTARGET},
{0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN},
{0xa0, 0x00, 0x01ad},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xa0, 0x07, ZC3XX_R0A5_EXPOSUREGAIN},
{0xa0, 0x02, ZC3XX_R0A6_EXPOSUREBLACKLVL},
{}
};
static const struct usb_action tas5130c_50HZ[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0xa3, 0x0001},
{0xaa, 0xa4, 0x0063},
{0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH},
{0xa0, 0x63, ZC3XX_R0A4_EXPOSURETIMELOW},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0xfe, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x47, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0c, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x08, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0xd3, ZC3XX_R01D_HSYNC_0},
{0xa0, 0xda, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xea, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{0xa0, 0x03, ZC3XX_R09F_MAXXHIGH},
{0xa0, 0x4c, ZC3XX_R0A0_MAXXLOW},
{0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN},
{}
};
static const struct usb_action tas5130c_50HZScale[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0xa3, 0x0001},
{0xaa, 0xa4, 0x0077},
{0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH},
{0xa0, 0x77, ZC3XX_R0A4_EXPOSURETIMELOW},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0xd0, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x7d, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0c, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x08, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0xf0, ZC3XX_R01D_HSYNC_0},
{0xa0, 0xf4, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xf8, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{0xa0, 0x03, ZC3XX_R09F_MAXXHIGH},
{0xa0, 0xc0, ZC3XX_R0A0_MAXXLOW},
{0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN},
{}
};
static const struct usb_action tas5130c_60HZ[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0xa3, 0x0001},
{0xaa, 0xa4, 0x0036},
{0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH},
{0xa0, 0x36, ZC3XX_R0A4_EXPOSURETIMELOW},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x05, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x54, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x3e, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0c, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x08, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0xca, ZC3XX_R01D_HSYNC_0},
{0xa0, 0xd0, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xe0, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{0xa0, 0x03, ZC3XX_R09F_MAXXHIGH},
{0xa0, 0x28, ZC3XX_R0A0_MAXXLOW},
{0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN},
{}
};
static const struct usb_action tas5130c_60HZScale[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0xa3, 0x0001},
{0xaa, 0xa4, 0x0077},
{0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH},
{0xa0, 0x77, ZC3XX_R0A4_EXPOSURETIMELOW},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x09, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x47, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x7d, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0c, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x08, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0xc8, ZC3XX_R01D_HSYNC_0},
{0xa0, 0xd0, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xe0, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{0xa0, 0x03, ZC3XX_R09F_MAXXHIGH},
{0xa0, 0x20, ZC3XX_R0A0_MAXXLOW},
{0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN},
{}
};
static const struct usb_action tas5130c_NoFlicker[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0xa3, 0x0001},
{0xaa, 0xa4, 0x0040},
{0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH},
{0xa0, 0x40, ZC3XX_R0A4_EXPOSURETIMELOW},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x05, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0xa0, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x04, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0c, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0xbc, ZC3XX_R01D_HSYNC_0},
{0xa0, 0xd0, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xe0, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{0xa0, 0x02, ZC3XX_R09F_MAXXHIGH},
{0xa0, 0xf0, ZC3XX_R0A0_MAXXLOW},
{0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN},
{}
};
static const struct usb_action tas5130c_NoFlickerScale[] = {
{0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
{0xaa, 0xa3, 0x0001},
{0xaa, 0xa4, 0x0090},
{0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH},
{0xa0, 0x90, ZC3XX_R0A4_EXPOSURETIMELOW},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x0a, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x04, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0c, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0xbc, ZC3XX_R01D_HSYNC_0},
{0xa0, 0xd0, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xe0, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{0xa0, 0x02, ZC3XX_R09F_MAXXHIGH},
{0xa0, 0xf0, ZC3XX_R0A0_MAXXLOW},
{0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN},
{}
};
static const struct usb_action gc0303_Initial[] = {
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x02, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x00, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
{0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW},
{0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW},
{0xa0, 0x10, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR},
{0xaa, 0x01, 0x0000},
{0xaa, 0x1a, 0x0000},
{0xaa, 0x1c, 0x0017},
{0xaa, 0x1b, 0x0000},
{0xa0, 0x82, ZC3XX_R086_EXPTIMEHIGH},
{0xa0, 0x83, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0x84, ZC3XX_R088_EXPTIMELOW},
{0xaa, 0x05, 0x0010},
{0xaa, 0x0a, 0x0002},
{0xaa, 0x0b, 0x0000},
{0xaa, 0x0c, 0x0002},
{0xaa, 0x0d, 0x0000},
{0xaa, 0x0e, 0x0002},
{0xaa, 0x0f, 0x0000},
{0xaa, 0x10, 0x0002},
{0xaa, 0x11, 0x0000},
{0xaa, 0x16, 0x0001},
{0xaa, 0x17, 0x00e8},
{0xaa, 0x18, 0x0002},
{0xaa, 0x19, 0x0088},
{0xaa, 0x20, 0x0020},
{0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x76, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x09, 0x01ad},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xa0, 0x58, ZC3XX_R1A8_DIGITALGAIN},
{0xa0, 0x61, ZC3XX_R116_RGAIN},
{0xa0, 0x65, ZC3XX_R118_BGAIN},
{0xaa, 0x1b, 0x0000},
{}
};
static const struct usb_action gc0303_InitialScale[] = {
{0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
{0xa0, 0x02, ZC3XX_R008_CLOCKSETTING},
{0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},
{0xa0, 0x10, ZC3XX_R002_CLOCKSELECT},
{0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
{0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
{0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
{0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
{0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR},
{0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
{0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
{0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
{0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
{0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
{0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW},
{0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW},
{0xa0, 0x10, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR},
{0xaa, 0x01, 0x0000},
{0xaa, 0x1a, 0x0000},
{0xaa, 0x1c, 0x0017},
{0xaa, 0x1b, 0x0000},
{0xa0, 0x82, ZC3XX_R086_EXPTIMEHIGH},
{0xa0, 0x83, ZC3XX_R087_EXPTIMEMID},
{0xa0, 0x84, ZC3XX_R088_EXPTIMELOW},
{0xaa, 0x05, 0x0010},
{0xaa, 0x0a, 0x0001},
{0xaa, 0x0b, 0x0000},
{0xaa, 0x0c, 0x0001},
{0xaa, 0x0d, 0x0000},
{0xaa, 0x0e, 0x0001},
{0xaa, 0x0f, 0x0000},
{0xaa, 0x10, 0x0001},
{0xaa, 0x11, 0x0000},
{0xaa, 0x16, 0x0001},
{0xaa, 0x17, 0x00e8},
{0xaa, 0x18, 0x0002},
{0xaa, 0x19, 0x0088},
{0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION},
{0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
{0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
{0xa0, 0x76, ZC3XX_R189_AWBSTATUS},
{0xa0, 0x09, 0x01ad},
{0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xa0, 0x58, ZC3XX_R1A8_DIGITALGAIN},
{0xa0, 0x61, ZC3XX_R116_RGAIN},
{0xa0, 0x65, ZC3XX_R118_BGAIN},
{0xaa, 0x1b, 0x0000},
{}
};
static const struct usb_action gc0303_50HZ[] = {
{0xaa, 0x82, 0x0000},
{0xaa, 0x83, 0x0001},
{0xaa, 0x84, 0x0063},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x06, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0xa8, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x47, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x48, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x62, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x90, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xc8, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x7f, ZC3XX_R18D_YTARGET},
{}
};
static const struct usb_action gc0303_50HZScale[] = {
{0xaa, 0x82, 0x0000},
{0xaa, 0x83, 0x0003},
{0xaa, 0x84, 0x0054},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x0d, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x50, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x8e, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x48, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x62, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x90, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xc8, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x7f, ZC3XX_R18D_YTARGET},
{}
};
static const struct usb_action gc0303_60HZ[] = {
{0xaa, 0x82, 0x0000},
{0xaa, 0x83, 0x0000},
{0xaa, 0x84, 0x003b},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x05, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x88, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x3b, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x62, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x90, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xc8, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x80, ZC3XX_R18D_YTARGET},
{}
};
static const struct usb_action gc0303_60HZScale[] = {
{0xaa, 0x82, 0x0000},
{0xaa, 0x83, 0x0000},
{0xaa, 0x84, 0x0076},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x0b, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x10, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x76, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},
{0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
{0xa0, 0x62, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x90, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xc8, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
{0xa0, 0x80, ZC3XX_R18D_YTARGET},
{}
};
static const struct usb_action gc0303_NoFlicker[] = {
{0xa0, 0x0c, ZC3XX_R100_OPERATIONMODE},
{0xaa, 0x82, 0x0000},
{0xaa, 0x83, 0x0000},
{0xaa, 0x84, 0x0020},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x00, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x48, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x62, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x90, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xc8, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x03, ZC3XX_R180_AUTOCORRECTENABLE},
{}
};
static const struct usb_action gc0303_NoFlickerScale[] = {
{0xa0, 0x0c, ZC3XX_R100_OPERATIONMODE},
{0xaa, 0x82, 0x0000},
{0xaa, 0x83, 0x0000},
{0xaa, 0x84, 0x0020},
{0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
{0xa0, 0x00, ZC3XX_R191_EXPOSURELIMITMID},
{0xa0, 0x48, ZC3XX_R192_EXPOSURELIMITLOW},
{0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
{0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
{0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW},
{0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
{0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE},
{0xa0, 0x62, ZC3XX_R01D_HSYNC_0},
{0xa0, 0x90, ZC3XX_R01E_HSYNC_1},
{0xa0, 0xc8, ZC3XX_R01F_HSYNC_2},
{0xa0, 0xff, ZC3XX_R020_HSYNC_3},
{0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN},
{0xa0, 0x03, ZC3XX_R180_AUTOCORRECTENABLE},
{}
};
static u8 reg_r(struct gspca_dev *gspca_dev,
u16 index)
{
int ret;
if (gspca_dev->usb_err < 0)
return 0;
ret = usb_control_msg(gspca_dev->dev,
usb_rcvctrlpipe(gspca_dev->dev, 0),
0xa1,
USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
0x01,
index, gspca_dev->usb_buf, 1,
500);
if (ret < 0) {
pr_err("reg_r err %d\n", ret);
gspca_dev->usb_err = ret;
return 0;
}
return gspca_dev->usb_buf[0];
}
static void reg_w(struct gspca_dev *gspca_dev,
u8 value,
u16 index)
{
int ret;
if (gspca_dev->usb_err < 0)
return;
ret = usb_control_msg(gspca_dev->dev,
usb_sndctrlpipe(gspca_dev->dev, 0),
0xa0,
USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
value, index, NULL, 0,
500);
if (ret < 0) {
pr_err("reg_w_i err %d\n", ret);
gspca_dev->usb_err = ret;
}
}
static u16 i2c_read(struct gspca_dev *gspca_dev,
u8 reg)
{
u8 retbyte;
u16 retval;
if (gspca_dev->usb_err < 0)
return 0;
reg_w(gspca_dev, reg, 0x0092);
reg_w(gspca_dev, 0x02, 0x0090);
msleep(20);
retbyte = reg_r(gspca_dev, 0x0091);
if (retbyte != 0x00)
pr_err("i2c_r status error %02x\n", retbyte);
retval = reg_r(gspca_dev, 0x0095);
retval |= reg_r(gspca_dev, 0x0096) << 8;
return retval;
}
static u8 i2c_write(struct gspca_dev *gspca_dev,
u8 reg,
u8 valL,
u8 valH)
{
u8 retbyte;
if (gspca_dev->usb_err < 0)
return 0;
reg_w(gspca_dev, reg, 0x92);
reg_w(gspca_dev, valL, 0x93);
reg_w(gspca_dev, valH, 0x94);
reg_w(gspca_dev, 0x01, 0x90);
msleep(1);
retbyte = reg_r(gspca_dev, 0x0091);
if (retbyte != 0x00)
pr_err("i2c_w status error %02x\n", retbyte);
return retbyte;
}
static void usb_exchange(struct gspca_dev *gspca_dev,
const struct usb_action *action)
{
while (action->req) {
switch (action->req) {
case 0xa0:
reg_w(gspca_dev, action->val, action->idx);
break;
case 0xa1:
reg_r(gspca_dev, action->idx);
break;
case 0xaa:
i2c_write(gspca_dev,
action->val,
action->idx & 0xff,
action->idx >> 8);
break;
case 0xbb:
i2c_write(gspca_dev,
action->idx >> 8,
action->idx & 0xff,
action->val);
break;
default:
msleep(action->idx);
break;
}
action++;
msleep(1);
}
}
static void setmatrix(struct gspca_dev *gspca_dev)
{
struct sd *sd = (struct sd *) gspca_dev;
int i;
const u8 *matrix;
static const u8 adcm2700_matrix[9] =
{0x74, 0xed, 0xed, 0xed, 0x74, 0xed, 0xed, 0xed, 0x74};
static const u8 gc0305_matrix[9] =
{0x50, 0xf8, 0xf8, 0xf8, 0x50, 0xf8, 0xf8, 0xf8, 0x50};
static const u8 ov7620_matrix[9] =
{0x58, 0xf4, 0xf4, 0xf4, 0x58, 0xf4, 0xf4, 0xf4, 0x58};
static const u8 pas202b_matrix[9] =
{0x4c, 0xf5, 0xff, 0xf9, 0x51, 0xf5, 0xfb, 0xed, 0x5f};
static const u8 po2030_matrix[9] =
{0x60, 0xf0, 0xf0, 0xf0, 0x60, 0xf0, 0xf0, 0xf0, 0x60};
static const u8 tas5130c_matrix[9] =
{0x68, 0xec, 0xec, 0xec, 0x68, 0xec, 0xec, 0xec, 0x68};
static const u8 gc0303_matrix[9] =
{0x6c, 0xea, 0xea, 0xea, 0x6c, 0xea, 0xea, 0xea, 0x6c};
static const u8 *matrix_tb[SENSOR_MAX] = {
[SENSOR_ADCM2700] = adcm2700_matrix,
[SENSOR_CS2102] = ov7620_matrix,
[SENSOR_CS2102K] = NULL,
[SENSOR_GC0303] = gc0303_matrix,
[SENSOR_GC0305] = gc0305_matrix,
[SENSOR_HDCS2020] = NULL,
[SENSOR_HV7131B] = NULL,
[SENSOR_HV7131R] = po2030_matrix,
[SENSOR_ICM105A] = po2030_matrix,
[SENSOR_MC501CB] = NULL,
[SENSOR_MT9V111_1] = gc0305_matrix,
[SENSOR_MT9V111_3] = gc0305_matrix,
[SENSOR_OV7620] = ov7620_matrix,
[SENSOR_OV7630C] = NULL,
[SENSOR_PAS106] = NULL,
[SENSOR_PAS202B] = pas202b_matrix,
[SENSOR_PB0330] = gc0305_matrix,
[SENSOR_PO2030] = po2030_matrix,
[SENSOR_TAS5130C] = tas5130c_matrix,
};
matrix = matrix_tb[sd->sensor];
if (matrix == NULL)
return;
for (i = 0; i < ARRAY_SIZE(ov7620_matrix); i++)
reg_w(gspca_dev, matrix[i], 0x010a + i);
}
static void setsharpness(struct gspca_dev *gspca_dev, s32 val)
{
static const u8 sharpness_tb[][2] = {
{0x02, 0x03},
{0x04, 0x07},
{0x08, 0x0f},
{0x10, 0x1e}
};
reg_w(gspca_dev, sharpness_tb[val][0], 0x01c6);
reg_r(gspca_dev, 0x01c8);
reg_r(gspca_dev, 0x01c9);
reg_r(gspca_dev, 0x01ca);
reg_w(gspca_dev, sharpness_tb[val][1], 0x01cb);
}
static void setcontrast(struct gspca_dev *gspca_dev,
s32 gamma, s32 brightness, s32 contrast)
{
const u8 *Tgamma;
int g, i, adj, gp1, gp2;
u8 gr[16];
static const u8 delta_b[16] =
{0x50, 0x38, 0x2d, 0x28, 0x24, 0x21, 0x1e, 0x1d,
0x1d, 0x1b, 0x1b, 0x1b, 0x19, 0x18, 0x18, 0x18};
static const u8 delta_c[16] =
{0x2c, 0x1a, 0x12, 0x0c, 0x0a, 0x06, 0x06, 0x06,
0x04, 0x06, 0x04, 0x04, 0x03, 0x03, 0x02, 0x02};
static const u8 gamma_tb[6][16] = {
{0x00, 0x00, 0x03, 0x0d, 0x1b, 0x2e, 0x45, 0x5f,
0x79, 0x93, 0xab, 0xc1, 0xd4, 0xe5, 0xf3, 0xff},
{0x01, 0x0c, 0x1f, 0x3a, 0x53, 0x6d, 0x85, 0x9c,
0xb0, 0xc2, 0xd1, 0xde, 0xe9, 0xf2, 0xf9, 0xff},
{0x04, 0x16, 0x30, 0x4e, 0x68, 0x81, 0x98, 0xac,
0xbe, 0xcd, 0xda, 0xe4, 0xed, 0xf5, 0xfb, 0xff},
{0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8,
0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff},
{0x20, 0x4b, 0x6e, 0x8d, 0xa3, 0xb5, 0xc5, 0xd2,
0xdc, 0xe5, 0xec, 0xf2, 0xf6, 0xfa, 0xfd, 0xff},
{0x24, 0x44, 0x64, 0x84, 0x9d, 0xb2, 0xc4, 0xd3,
0xe0, 0xeb, 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff},
};
Tgamma = gamma_tb[gamma - 1];
contrast -= 128;
brightness -= 128;
adj = 0;
gp1 = gp2 = 0;
for (i = 0; i < 16; i++) {
g = Tgamma[i] + delta_b[i] * brightness / 256
- delta_c[i] * contrast / 256 - adj / 2;
if (g > 0xff)
g = 0xff;
else if (g < 0)
g = 0;
reg_w(gspca_dev, g, 0x0120 + i);
if (contrast > 0)
adj--;
else if (contrast < 0)
adj++;
if (i > 1)
gr[i - 1] = (g - gp2) / 2;
else if (i != 0)
gr[0] = gp1 == 0 ? 0 : (g - gp1);
gp2 = gp1;
gp1 = g;
}
gr[15] = (0xff - gp2) / 2;
for (i = 0; i < 16; i++)
reg_w(gspca_dev, gr[i], 0x0130 + i);
}
static s32 getexposure(struct gspca_dev *gspca_dev)
{
struct sd *sd = (struct sd *) gspca_dev;
switch (sd->sensor) {
case SENSOR_HV7131R:
return (i2c_read(gspca_dev, 0x25) << 9)
| (i2c_read(gspca_dev, 0x26) << 1)
| (i2c_read(gspca_dev, 0x27) >> 7);
case SENSOR_OV7620:
return i2c_read(gspca_dev, 0x10);
default:
return -1;
}
}
static void setexposure(struct gspca_dev *gspca_dev, s32 val)
{
struct sd *sd = (struct sd *) gspca_dev;
switch (sd->sensor) {
case SENSOR_HV7131R:
i2c_write(gspca_dev, 0x25, val >> 9, 0x00);
i2c_write(gspca_dev, 0x26, val >> 1, 0x00);
i2c_write(gspca_dev, 0x27, val << 7, 0x00);
break;
case SENSOR_OV7620:
i2c_write(gspca_dev, 0x10, val, 0x00);
break;
}
}
static void setquality(struct gspca_dev *gspca_dev)
{
struct sd *sd = (struct sd *) gspca_dev;
jpeg_set_qual(sd->jpeg_hdr, jpeg_qual[sd->reg08 >> 1]);
reg_w(gspca_dev, sd->reg08, ZC3XX_R008_CLOCKSETTING);
}
static void setlightfreq(struct gspca_dev *gspca_dev, s32 val)
{
struct sd *sd = (struct sd *) gspca_dev;
int i, mode;
const struct usb_action *zc3_freq;
static const struct usb_action *freq_tb[SENSOR_MAX][6] = {
[SENSOR_ADCM2700] = {
adcm2700_NoFlicker, adcm2700_NoFlicker,
adcm2700_50HZ, adcm2700_50HZ,
adcm2700_60HZ, adcm2700_60HZ},
[SENSOR_CS2102] = {
cs2102_NoFlicker, cs2102_NoFlickerScale,
cs2102_50HZ, cs2102_50HZScale,
cs2102_60HZ, cs2102_60HZScale},
[SENSOR_CS2102K] = {
cs2102_NoFlicker, cs2102_NoFlickerScale,
NULL, NULL,
NULL, NULL},
[SENSOR_GC0303] = {
gc0303_NoFlicker, gc0303_NoFlickerScale,
gc0303_50HZ, gc0303_50HZScale,
gc0303_60HZ, gc0303_60HZScale},
[SENSOR_GC0305] = {
gc0305_NoFlicker, gc0305_NoFlicker,
gc0305_50HZ, gc0305_50HZ,
gc0305_60HZ, gc0305_60HZ},
[SENSOR_HDCS2020] = {
hdcs2020_NoFlicker, hdcs2020_NoFlicker,
hdcs2020_50HZ, hdcs2020_50HZ,
hdcs2020_60HZ, hdcs2020_60HZ},
[SENSOR_HV7131B] = {
hv7131b_NoFlicker, hv7131b_NoFlickerScale,
hv7131b_50HZ, hv7131b_50HZScale,
hv7131b_60HZ, hv7131b_60HZScale},
[SENSOR_HV7131R] = {
hv7131r_NoFlicker, hv7131r_NoFlickerScale,
hv7131r_50HZ, hv7131r_50HZScale,
hv7131r_60HZ, hv7131r_60HZScale},
[SENSOR_ICM105A] = {
icm105a_NoFlicker, icm105a_NoFlickerScale,
icm105a_50HZ, icm105a_50HZScale,
icm105a_60HZ, icm105a_60HZScale},
[SENSOR_MC501CB] = {
mc501cb_NoFlicker, mc501cb_NoFlickerScale,
mc501cb_50HZ, mc501cb_50HZScale,
mc501cb_60HZ, mc501cb_60HZScale},
[SENSOR_MT9V111_1] = {
mt9v111_1_AENoFlicker, mt9v111_1_AENoFlickerScale,
mt9v111_1_AE50HZ, mt9v111_1_AE50HZScale,
mt9v111_1_AE60HZ, mt9v111_1_AE60HZScale},
[SENSOR_MT9V111_3] = {
mt9v111_3_AENoFlicker, mt9v111_3_AENoFlickerScale,
mt9v111_3_AE50HZ, mt9v111_3_AE50HZScale,
mt9v111_3_AE60HZ, mt9v111_3_AE60HZScale},
[SENSOR_OV7620] = {
ov7620_NoFlicker, ov7620_NoFlicker,
ov7620_50HZ, ov7620_50HZ,
ov7620_60HZ, ov7620_60HZ},
[SENSOR_OV7630C] = {
NULL, NULL,
NULL, NULL,
NULL, NULL},
[SENSOR_PAS106] = {
pas106b_NoFlicker, pas106b_NoFlicker,
pas106b_50HZ, pas106b_50HZ,
pas106b_60HZ, pas106b_60HZ},
[SENSOR_PAS202B] = {
pas202b_NoFlicker, pas202b_NoFlickerScale,
pas202b_50HZ, pas202b_50HZScale,
pas202b_60HZ, pas202b_60HZScale},
[SENSOR_PB0330] = {
pb0330_NoFlicker, pb0330_NoFlickerScale,
pb0330_50HZ, pb0330_50HZScale,
pb0330_60HZ, pb0330_60HZScale},
[SENSOR_PO2030] = {
po2030_NoFlicker, po2030_NoFlicker,
po2030_50HZ, po2030_50HZ,
po2030_60HZ, po2030_60HZ},
[SENSOR_TAS5130C] = {
tas5130c_NoFlicker, tas5130c_NoFlickerScale,
tas5130c_50HZ, tas5130c_50HZScale,
tas5130c_60HZ, tas5130c_60HZScale},
};
i = val * 2;
mode = gspca_dev->cam.cam_mode[gspca_dev->curr_mode].priv;
if (mode)
i++;
zc3_freq = freq_tb[sd->sensor][i];
if (zc3_freq == NULL)
return;
usb_exchange(gspca_dev, zc3_freq);
switch (sd->sensor) {
case SENSOR_GC0305:
if (mode
&& val == 1)
reg_w(gspca_dev, 0x85, 0x018d);
break;
case SENSOR_OV7620:
if (!mode) {
if (val != 0)
reg_w(gspca_dev, 0x40, 0x0002);
else
reg_w(gspca_dev, 0x44, 0x0002);
}
break;
case SENSOR_PAS202B:
reg_w(gspca_dev, 0x00, 0x01a7);
break;
}
}
static void setautogain(struct gspca_dev *gspca_dev, s32 val)
{
struct sd *sd = (struct sd *) gspca_dev;
if (sd->sensor == SENSOR_OV7620)
i2c_write(gspca_dev, 0x13, val ? 0xa3 : 0x80, 0x00);
else
reg_w(gspca_dev, val ? 0x42 : 0x02, 0x0180);
}
static void transfer_update(struct work_struct *work)
{
struct sd *sd = container_of(work, struct sd, work);
struct gspca_dev *gspca_dev = &sd->gspca_dev;
int change, good;
u8 reg07, reg11;
reg07 = 0;
good = 0;
while (1) {
msleep(100);
mutex_lock(&gspca_dev->usb_lock);
#ifdef CONFIG_PM
if (gspca_dev->frozen)
break;
#endif
if (!gspca_dev->present || !gspca_dev->streaming)
break;
gspca_dev->usb_err = 0;
reg11 = reg_r(gspca_dev, 0x0011);
if (gspca_dev->usb_err)
break;
change = reg11 & 0x01;
if (change) {
good = 0;
if (reg07 == 0)
reg07 = 0x32;
else if (reg07 > 2)
reg07 -= 2;
else
change = 0;
} else {
good++;
if (good >= 10) {
good = 0;
if (reg07) {
change = 1;
if (reg07 < 0x32)
reg07 += 2;
else
reg07 = 0;
}
}
}
if (change) {
gspca_dev->usb_err = 0;
reg_w(gspca_dev, reg07, 0x0007);
if (gspca_dev->usb_err)
break;
}
mutex_unlock(&gspca_dev->usb_lock);
}
mutex_unlock(&gspca_dev->usb_lock);
}
static void send_unknown(struct gspca_dev *gspca_dev, int sensor)
{
reg_w(gspca_dev, 0x01, 0x0000);
switch (sensor) {
case SENSOR_PAS106:
reg_w(gspca_dev, 0x03, 0x003a);
reg_w(gspca_dev, 0x0c, 0x003b);
reg_w(gspca_dev, 0x08, 0x0038);
break;
case SENSOR_ADCM2700:
case SENSOR_GC0305:
case SENSOR_OV7620:
case SENSOR_MT9V111_1:
case SENSOR_MT9V111_3:
case SENSOR_PB0330:
case SENSOR_PO2030:
reg_w(gspca_dev, 0x0d, 0x003a);
reg_w(gspca_dev, 0x02, 0x003b);
reg_w(gspca_dev, 0x00, 0x0038);
break;
case SENSOR_HV7131R:
case SENSOR_PAS202B:
reg_w(gspca_dev, 0x03, 0x003b);
reg_w(gspca_dev, 0x0c, 0x003a);
reg_w(gspca_dev, 0x0b, 0x0039);
if (sensor == SENSOR_PAS202B)
reg_w(gspca_dev, 0x0b, 0x0038);
break;
}
}
static void start_2wr_probe(struct gspca_dev *gspca_dev, int sensor)
{
reg_w(gspca_dev, 0x01, 0x0000);
reg_w(gspca_dev, sensor, 0x0010);
reg_w(gspca_dev, 0x01, 0x0001);
reg_w(gspca_dev, 0x03, 0x0012);
reg_w(gspca_dev, 0x01, 0x0012);
}
static int sif_probe(struct gspca_dev *gspca_dev)
{
u16 checkword;
start_2wr_probe(gspca_dev, 0x0f);
reg_w(gspca_dev, 0x08, 0x008d);
msleep(150);
checkword = ((i2c_read(gspca_dev, 0x00) & 0x0f) << 4)
| ((i2c_read(gspca_dev, 0x01) & 0xf0) >> 4);
gspca_dbg(gspca_dev, D_PROBE, "probe sif 0x%04x\n", checkword);
if (checkword == 0x0007) {
send_unknown(gspca_dev, SENSOR_PAS106);
return 0x0f;
}
return -1;
}
static int vga_2wr_probe(struct gspca_dev *gspca_dev)
{
u16 retword;
start_2wr_probe(gspca_dev, 0x00);
i2c_write(gspca_dev, 0x01, 0xaa, 0x00);
retword = i2c_read(gspca_dev, 0x01);
if (retword != 0)
return 0x00;
start_2wr_probe(gspca_dev, 0x04);
i2c_write(gspca_dev, 0x01, 0xaa, 0x00);
retword = i2c_read(gspca_dev, 0x01);
if (retword != 0)
return 0x04;
start_2wr_probe(gspca_dev, 0x06);
reg_w(gspca_dev, 0x08, 0x008d);
i2c_write(gspca_dev, 0x11, 0xaa, 0x00);
retword = i2c_read(gspca_dev, 0x11);
if (retword != 0) {
goto ov_check;
}
start_2wr_probe(gspca_dev, 0x08);
i2c_write(gspca_dev, 0x1c, 0x00, 0x00);
i2c_write(gspca_dev, 0x15, 0xaa, 0x00);
retword = i2c_read(gspca_dev, 0x15);
if (retword != 0)
return 0x08;
start_2wr_probe(gspca_dev, 0x0a);
i2c_write(gspca_dev, 0x07, 0xaa, 0xaa);
retword = i2c_read(gspca_dev, 0x07);
if (retword != 0)
return 0x0a;
retword = i2c_read(gspca_dev, 0x03);
if (retword != 0)
return 0x0a;
retword = i2c_read(gspca_dev, 0x04);
if (retword != 0)
return 0x0a;
start_2wr_probe(gspca_dev, 0x0c);
i2c_write(gspca_dev, 0x01, 0x11, 0x00);
retword = i2c_read(gspca_dev, 0x01);
if (retword != 0)
return 0x0c;
start_2wr_probe(gspca_dev, 0x0e);
reg_w(gspca_dev, 0x08, 0x008d);
i2c_write(gspca_dev, 0x03, 0xaa, 0x00);
msleep(50);
retword = i2c_read(gspca_dev, 0x03);
if (retword != 0) {
send_unknown(gspca_dev, SENSOR_PAS202B);
return 0x0e;
}
start_2wr_probe(gspca_dev, 0x02);
i2c_write(gspca_dev, 0x01, 0xaa, 0x00);
retword = i2c_read(gspca_dev, 0x01);
if (retword != 0)
return 0x02;
ov_check:
reg_r(gspca_dev, 0x0010);
reg_r(gspca_dev, 0x0010);
reg_w(gspca_dev, 0x01, 0x0000);
reg_w(gspca_dev, 0x01, 0x0001);
reg_w(gspca_dev, 0x06, 0x0010);
reg_w(gspca_dev, 0xa1, 0x008b);
reg_w(gspca_dev, 0x08, 0x008d);
msleep(500);
reg_w(gspca_dev, 0x01, 0x0012);
i2c_write(gspca_dev, 0x12, 0x80, 0x00);
retword = i2c_read(gspca_dev, 0x0a) << 8;
retword |= i2c_read(gspca_dev, 0x0b);
gspca_dbg(gspca_dev, D_PROBE, "probe 2wr ov vga 0x%04x\n", retword);
switch (retword) {
case 0x7631:
reg_w(gspca_dev, 0x06, 0x0010);
break;
case 0x7620:
case 0x7648:
break;
default:
return -1;
}
return retword;
}
struct sensor_by_chipset_revision {
u16 revision;
u8 internal_sensor_id;
};
static const struct sensor_by_chipset_revision chipset_revision_sensor[] = {
{0xc000, 0x12},
{0xc001, 0x13},
{0xe001, 0x13},
{0x8001, 0x13},
{0x8000, 0x14},
{0x8400, 0x15},
{0xe400, 0x15},
};
static int vga_3wr_probe(struct gspca_dev *gspca_dev)
{
struct sd *sd = (struct sd *) gspca_dev;
int i;
u16 retword;
reg_w(gspca_dev, 0x02, 0x0010);
reg_r(gspca_dev, 0x0010);
reg_w(gspca_dev, 0x01, 0x0000);
reg_w(gspca_dev, 0x00, 0x0010);
reg_w(gspca_dev, 0x01, 0x0001);
reg_w(gspca_dev, 0x91, 0x008b);
reg_w(gspca_dev, 0x03, 0x0012);
reg_w(gspca_dev, 0x01, 0x0012);
reg_w(gspca_dev, 0x05, 0x0012);
retword = i2c_read(gspca_dev, 0x14);
if (retword != 0)
return 0x11;
retword = i2c_read(gspca_dev, 0x15);
if (retword != 0)
return 0x11;
retword = i2c_read(gspca_dev, 0x16);
if (retword != 0)
return 0x11;
reg_w(gspca_dev, 0x02, 0x0010);
retword = reg_r(gspca_dev, 0x000b) << 8;
retword |= reg_r(gspca_dev, 0x000a);
gspca_dbg(gspca_dev, D_PROBE, "probe 3wr vga 1 0x%04x\n", retword);
reg_r(gspca_dev, 0x0010);
if ((retword & 0xff00) == 0x6400)
return 0x02;
for (i = 0; i < ARRAY_SIZE(chipset_revision_sensor); i++) {
if (chipset_revision_sensor[i].revision == retword) {
sd->chip_revision = retword;
send_unknown(gspca_dev, SENSOR_PB0330);
return chipset_revision_sensor[i].internal_sensor_id;
}
}
reg_w(gspca_dev, 0x01, 0x0000);
reg_w(gspca_dev, 0x01, 0x0001);
reg_w(gspca_dev, 0xdd, 0x008b);
reg_w(gspca_dev, 0x0a, 0x0010);
reg_w(gspca_dev, 0x03, 0x0012);
reg_w(gspca_dev, 0x01, 0x0012);
retword = i2c_read(gspca_dev, 0x00);
if (retword != 0) {
gspca_dbg(gspca_dev, D_PROBE, "probe 3wr vga type 0a\n");
return 0x0a;
}
reg_w(gspca_dev, 0x01, 0x0000);
reg_w(gspca_dev, 0x01, 0x0001);
reg_w(gspca_dev, 0x98, 0x008b);
reg_w(gspca_dev, 0x01, 0x0010);
reg_w(gspca_dev, 0x03, 0x0012);
msleep(2);
reg_w(gspca_dev, 0x01, 0x0012);
retword = i2c_read(gspca_dev, 0x00);
if (retword != 0) {
gspca_dbg(gspca_dev, D_PROBE, "probe 3wr vga type %02x\n",
retword);
if (retword == 0x0011)
return 0x0303;
if (retword == 0x0029)
send_unknown(gspca_dev, SENSOR_GC0305);
return retword;
}
reg_w(gspca_dev, 0x01, 0x0000);
reg_w(gspca_dev, 0x01, 0x0001);
reg_w(gspca_dev, 0xa1, 0x008b);
reg_w(gspca_dev, 0x08, 0x008d);
reg_w(gspca_dev, 0x06, 0x0010);
reg_w(gspca_dev, 0x01, 0x0012);
reg_w(gspca_dev, 0x05, 0x0012);
if (i2c_read(gspca_dev, 0x1c) == 0x007f
&& i2c_read(gspca_dev, 0x1d) == 0x00a2) {
send_unknown(gspca_dev, SENSOR_OV7620);
return 0x06;
}
reg_w(gspca_dev, 0x01, 0x0000);
reg_w(gspca_dev, 0x00, 0x0002);
reg_w(gspca_dev, 0x01, 0x0010);
reg_w(gspca_dev, 0x01, 0x0001);
reg_w(gspca_dev, 0xee, 0x008b);
reg_w(gspca_dev, 0x03, 0x0012);
reg_w(gspca_dev, 0x01, 0x0012);
reg_w(gspca_dev, 0x05, 0x0012);
retword = i2c_read(gspca_dev, 0x00) << 8;
retword |= i2c_read(gspca_dev, 0x01);
gspca_dbg(gspca_dev, D_PROBE, "probe 3wr vga 2 0x%04x\n", retword);
if (retword == 0x2030) {
u8 retbyte;
retbyte = i2c_read(gspca_dev, 0x02);
gspca_dbg(gspca_dev, D_PROBE, "sensor PO2030 rev 0x%02x\n",
retbyte);
send_unknown(gspca_dev, SENSOR_PO2030);
return retword;
}
reg_w(gspca_dev, 0x01, 0x0000);
reg_w(gspca_dev, 0x0a, 0x0010);
reg_w(gspca_dev, 0xd3, 0x008b);
reg_w(gspca_dev, 0x01, 0x0001);
reg_w(gspca_dev, 0x03, 0x0012);
reg_w(gspca_dev, 0x01, 0x0012);
reg_w(gspca_dev, 0x05, 0x0012);
reg_w(gspca_dev, 0xd3, 0x008b);
retword = i2c_read(gspca_dev, 0x01);
if (retword != 0) {
gspca_dbg(gspca_dev, D_PROBE, "probe 3wr vga type 0a ? ret: %04x\n",
retword);
return 0x16;
}
return -1;
}
static int zcxx_probeSensor(struct gspca_dev *gspca_dev)
{
struct sd *sd = (struct sd *) gspca_dev;
int sensor;
switch (sd->sensor) {
case SENSOR_MC501CB:
return -1;
case SENSOR_GC0303:
return -1;
case SENSOR_PAS106:
sensor = sif_probe(gspca_dev);
if (sensor >= 0)
return sensor;
break;
}
sensor = vga_2wr_probe(gspca_dev);
if (sensor >= 0)
return sensor;
return vga_3wr_probe(gspca_dev);
}
static int sd_config(struct gspca_dev *gspca_dev,
const struct usb_device_id *id)
{
struct sd *sd = (struct sd *) gspca_dev;
if (id->idProduct == 0x301b)
sd->bridge = BRIDGE_ZC301;
else
sd->bridge = BRIDGE_ZC303;
sd->sensor = id->driver_info;
sd->reg08 = REG08_DEF;
INIT_WORK(&sd->work, transfer_update);
return 0;
}
static int zcxx_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
{
struct gspca_dev *gspca_dev =
container_of(ctrl->handler, struct gspca_dev, ctrl_handler);
struct sd *sd = (struct sd *)gspca_dev;
switch (ctrl->id) {
case V4L2_CID_AUTOGAIN:
gspca_dev->usb_err = 0;
if (ctrl->val && sd->exposure && gspca_dev->streaming)
sd->exposure->val = getexposure(gspca_dev);
return gspca_dev->usb_err;
}
return -EINVAL;
}
static int zcxx_s_ctrl(struct v4l2_ctrl *ctrl)
{
struct gspca_dev *gspca_dev =
container_of(ctrl->handler, struct gspca_dev, ctrl_handler);
struct sd *sd = (struct sd *)gspca_dev;
int i, qual;
gspca_dev->usb_err = 0;
if (ctrl->id == V4L2_CID_JPEG_COMPRESSION_QUALITY) {
qual = sd->reg08 >> 1;
for (i = 0; i < ARRAY_SIZE(jpeg_qual); i++) {
if (ctrl->val <= jpeg_qual[i])
break;
}
if (i == ARRAY_SIZE(jpeg_qual) || (i > 0 && i == qual && ctrl->val < jpeg_qual[i]))
i--;
if (i >= 2 && gspca_dev->streaming &&
!gspca_dev->cam.needs_full_bandwidth)
return -EBUSY;
sd->reg08 = (i << 1) | 1;
ctrl->val = jpeg_qual[i];
}
if (!gspca_dev->streaming)
return 0;
switch (ctrl->id) {
case V4L2_CID_GAMMA:
setcontrast(gspca_dev, sd->gamma->val,
sd->brightness->val, sd->contrast->val);
break;
case V4L2_CID_AUTOGAIN:
setautogain(gspca_dev, ctrl->val);
if (!gspca_dev->usb_err && !ctrl->val && sd->exposure)
setexposure(gspca_dev, sd->exposure->val);
break;
case V4L2_CID_POWER_LINE_FREQUENCY:
setlightfreq(gspca_dev, ctrl->val);
break;
case V4L2_CID_SHARPNESS:
setsharpness(gspca_dev, ctrl->val);
break;
case V4L2_CID_JPEG_COMPRESSION_QUALITY:
setquality(gspca_dev);
break;
}
return gspca_dev->usb_err;
}
static const struct v4l2_ctrl_ops zcxx_ctrl_ops = {
.g_volatile_ctrl = zcxx_g_volatile_ctrl,
.s_ctrl = zcxx_s_ctrl,
};
static int sd_init_controls(struct gspca_dev *gspca_dev)
{
struct sd *sd = (struct sd *)gspca_dev;
struct v4l2_ctrl_handler *hdl = &gspca_dev->ctrl_handler;
static const u8 gamma[SENSOR_MAX] = {
[SENSOR_ADCM2700] = 4,
[SENSOR_CS2102] = 4,
[SENSOR_CS2102K] = 5,
[SENSOR_GC0303] = 3,
[SENSOR_GC0305] = 4,
[SENSOR_HDCS2020] = 4,
[SENSOR_HV7131B] = 4,
[SENSOR_HV7131R] = 4,
[SENSOR_ICM105A] = 4,
[SENSOR_MC501CB] = 4,
[SENSOR_MT9V111_1] = 4,
[SENSOR_MT9V111_3] = 4,
[SENSOR_OV7620] = 3,
[SENSOR_OV7630C] = 4,
[SENSOR_PAS106] = 4,
[SENSOR_PAS202B] = 4,
[SENSOR_PB0330] = 4,
[SENSOR_PO2030] = 4,
[SENSOR_TAS5130C] = 3,
};
gspca_dev->vdev.ctrl_handler = hdl;
v4l2_ctrl_handler_init(hdl, 8);
sd->brightness = v4l2_ctrl_new_std(hdl, &zcxx_ctrl_ops,
V4L2_CID_BRIGHTNESS, 0, 255, 1, 128);
sd->contrast = v4l2_ctrl_new_std(hdl, &zcxx_ctrl_ops,
V4L2_CID_CONTRAST, 0, 255, 1, 128);
sd->gamma = v4l2_ctrl_new_std(hdl, &zcxx_ctrl_ops,
V4L2_CID_GAMMA, 1, 6, 1, gamma[sd->sensor]);
if (sd->sensor == SENSOR_HV7131R)
sd->exposure = v4l2_ctrl_new_std(hdl, &zcxx_ctrl_ops,
V4L2_CID_EXPOSURE, 0x30d, 0x493e, 1, 0x927);
else if (sd->sensor == SENSOR_OV7620)
sd->exposure = v4l2_ctrl_new_std(hdl, &zcxx_ctrl_ops,
V4L2_CID_EXPOSURE, 0, 255, 1, 0x41);
sd->autogain = v4l2_ctrl_new_std(hdl, &zcxx_ctrl_ops,
V4L2_CID_AUTOGAIN, 0, 1, 1, 1);
if (sd->sensor != SENSOR_OV7630C)
sd->plfreq = v4l2_ctrl_new_std_menu(hdl, &zcxx_ctrl_ops,
V4L2_CID_POWER_LINE_FREQUENCY,
V4L2_CID_POWER_LINE_FREQUENCY_60HZ, 0,
V4L2_CID_POWER_LINE_FREQUENCY_DISABLED);
sd->sharpness = v4l2_ctrl_new_std(hdl, &zcxx_ctrl_ops,
V4L2_CID_SHARPNESS, 0, 3, 1,
sd->sensor == SENSOR_PO2030 ? 0 : 2);
sd->jpegqual = v4l2_ctrl_new_std(hdl, &zcxx_ctrl_ops,
V4L2_CID_JPEG_COMPRESSION_QUALITY,
jpeg_qual[0], jpeg_qual[ARRAY_SIZE(jpeg_qual) - 1], 1,
jpeg_qual[REG08_DEF >> 1]);
if (hdl->error) {
pr_err("Could not initialize controls\n");
return hdl->error;
}
v4l2_ctrl_cluster(3, &sd->gamma);
if (sd->sensor == SENSOR_HV7131R || sd->sensor == SENSOR_OV7620)
v4l2_ctrl_auto_cluster(2, &sd->autogain, 0, true);
return 0;
}
static int sd_init(struct gspca_dev *gspca_dev)
{
struct sd *sd = (struct sd *) gspca_dev;
struct cam *cam;
int sensor;
static const u8 mode_tb[SENSOR_MAX] = {
[SENSOR_ADCM2700] = 2,
[SENSOR_CS2102] = 1,
[SENSOR_CS2102K] = 1,
[SENSOR_GC0303] = 1,
[SENSOR_GC0305] = 1,
[SENSOR_HDCS2020] = 1,
[SENSOR_HV7131B] = 1,
[SENSOR_HV7131R] = 1,
[SENSOR_ICM105A] = 1,
[SENSOR_MC501CB] = 2,
[SENSOR_MT9V111_1] = 1,
[SENSOR_MT9V111_3] = 1,
[SENSOR_OV7620] = 2,
[SENSOR_OV7630C] = 1,
[SENSOR_PAS106] = 0,
[SENSOR_PAS202B] = 1,
[SENSOR_PB0330] = 1,
[SENSOR_PO2030] = 1,
[SENSOR_TAS5130C] = 1,
};
sensor = zcxx_probeSensor(gspca_dev);
if (sensor >= 0)
gspca_dbg(gspca_dev, D_PROBE, "probe sensor -> %04x\n", sensor);
if ((unsigned) force_sensor < SENSOR_MAX) {
sd->sensor = force_sensor;
gspca_dbg(gspca_dev, D_PROBE, "sensor forced to %d\n",
force_sensor);
} else {
switch (sensor) {
case -1:
switch (sd->sensor) {
case SENSOR_MC501CB:
gspca_dbg(gspca_dev, D_PROBE, "Sensor MC501CB\n");
break;
case SENSOR_GC0303:
gspca_dbg(gspca_dev, D_PROBE, "Sensor GC0303\n");
break;
default:
pr_warn("Unknown sensor - set to TAS5130C\n");
sd->sensor = SENSOR_TAS5130C;
}
break;
case 0:
sensor = i2c_read(gspca_dev, 0x00);
gspca_dbg(gspca_dev, D_PROBE, "Sensor hv7131 type %d\n",
sensor);
switch (sensor) {
case 0:
case 1:
gspca_dbg(gspca_dev, D_PROBE, "Find Sensor HV7131B\n");
sd->sensor = SENSOR_HV7131B;
break;
default:
gspca_dbg(gspca_dev, D_PROBE, "Find Sensor HV7131R\n");
sd->sensor = SENSOR_HV7131R;
break;
}
break;
case 0x02:
gspca_dbg(gspca_dev, D_PROBE, "Sensor TAS5130C\n");
sd->sensor = SENSOR_TAS5130C;
break;
case 0x04:
gspca_dbg(gspca_dev, D_PROBE, "Find Sensor CS2102\n");
sd->sensor = SENSOR_CS2102;
break;
case 0x08:
gspca_dbg(gspca_dev, D_PROBE, "Find Sensor HDCS2020\n");
sd->sensor = SENSOR_HDCS2020;
break;
case 0x0a:
gspca_dbg(gspca_dev, D_PROBE,
"Find Sensor PB0330. Chip revision %x\n",
sd->chip_revision);
sd->sensor = SENSOR_PB0330;
break;
case 0x0c:
gspca_dbg(gspca_dev, D_PROBE, "Find Sensor ICM105A\n");
sd->sensor = SENSOR_ICM105A;
break;
case 0x0e:
gspca_dbg(gspca_dev, D_PROBE, "Find Sensor PAS202B\n");
sd->sensor = SENSOR_PAS202B;
break;
case 0x0f:
gspca_dbg(gspca_dev, D_PROBE, "Find Sensor PAS106\n");
sd->sensor = SENSOR_PAS106;
break;
case 0x10:
case 0x12:
gspca_dbg(gspca_dev, D_PROBE, "Find Sensor TAS5130C\n");
sd->sensor = SENSOR_TAS5130C;
break;
case 0x11:
gspca_dbg(gspca_dev, D_PROBE, "Find Sensor HV7131R\n");
sd->sensor = SENSOR_HV7131R;
break;
case 0x13:
case 0x15:
gspca_dbg(gspca_dev, D_PROBE,
"Sensor MT9V111. Chip revision %04x\n",
sd->chip_revision);
sd->sensor = sd->bridge == BRIDGE_ZC301
? SENSOR_MT9V111_1
: SENSOR_MT9V111_3;
break;
case 0x14:
gspca_dbg(gspca_dev, D_PROBE,
"Find Sensor CS2102K?. Chip revision %x\n",
sd->chip_revision);
sd->sensor = SENSOR_CS2102K;
break;
case 0x16:
gspca_dbg(gspca_dev, D_PROBE, "Find Sensor ADCM2700\n");
sd->sensor = SENSOR_ADCM2700;
break;
case 0x29:
gspca_dbg(gspca_dev, D_PROBE, "Find Sensor GC0305\n");
sd->sensor = SENSOR_GC0305;
break;
case 0x0303:
gspca_dbg(gspca_dev, D_PROBE, "Sensor GC0303\n");
sd->sensor = SENSOR_GC0303;
break;
case 0x2030:
gspca_dbg(gspca_dev, D_PROBE, "Find Sensor PO2030\n");
sd->sensor = SENSOR_PO2030;
break;
case 0x7620:
gspca_dbg(gspca_dev, D_PROBE, "Find Sensor OV7620\n");
sd->sensor = SENSOR_OV7620;
break;
case 0x7631:
gspca_dbg(gspca_dev, D_PROBE, "Find Sensor OV7630C\n");
sd->sensor = SENSOR_OV7630C;
break;
case 0x7648:
gspca_dbg(gspca_dev, D_PROBE, "Find Sensor OV7648\n");
sd->sensor = SENSOR_OV7620;
break;
default:
pr_err("Unknown sensor %04x\n", sensor);
return -EINVAL;
}
}
if (sensor < 0x20) {
if (sensor == -1 || sensor == 0x10 || sensor == 0x12)
reg_w(gspca_dev, 0x02, 0x0010);
reg_r(gspca_dev, 0x0010);
}
cam = &gspca_dev->cam;
switch (mode_tb[sd->sensor]) {
case 0:
cam->cam_mode = sif_mode;
cam->nmodes = ARRAY_SIZE(sif_mode);
break;
case 1:
cam->cam_mode = vga_mode;
cam->nmodes = ARRAY_SIZE(vga_mode);
break;
default:
cam->cam_mode = broken_vga_mode;
cam->nmodes = ARRAY_SIZE(broken_vga_mode);
break;
}
reg_w(gspca_dev, 0x01, 0x0000);
return gspca_dev->usb_err;
}
static int sd_pre_start(struct gspca_dev *gspca_dev)
{
struct sd *sd = (struct sd *) gspca_dev;
gspca_dev->cam.needs_full_bandwidth = (sd->reg08 >= 4) ? 1 : 0;
return 0;
}
static int sd_start(struct gspca_dev *gspca_dev)
{
struct sd *sd = (struct sd *) gspca_dev;
int mode;
static const struct usb_action *init_tb[SENSOR_MAX][2] = {
[SENSOR_ADCM2700] =
{adcm2700_Initial, adcm2700_InitialScale},
[SENSOR_CS2102] =
{cs2102_Initial, cs2102_InitialScale},
[SENSOR_CS2102K] =
{cs2102K_Initial, cs2102K_InitialScale},
[SENSOR_GC0303] =
{gc0303_Initial, gc0303_InitialScale},
[SENSOR_GC0305] =
{gc0305_Initial, gc0305_InitialScale},
[SENSOR_HDCS2020] =
{hdcs2020_Initial, hdcs2020_InitialScale},
[SENSOR_HV7131B] =
{hv7131b_Initial, hv7131b_InitialScale},
[SENSOR_HV7131R] =
{hv7131r_Initial, hv7131r_InitialScale},
[SENSOR_ICM105A] =
{icm105a_Initial, icm105a_InitialScale},
[SENSOR_MC501CB] =
{mc501cb_Initial, mc501cb_InitialScale},
[SENSOR_MT9V111_1] =
{mt9v111_1_Initial, mt9v111_1_InitialScale},
[SENSOR_MT9V111_3] =
{mt9v111_3_Initial, mt9v111_3_InitialScale},
[SENSOR_OV7620] =
{ov7620_Initial, ov7620_InitialScale},
[SENSOR_OV7630C] =
{ov7630c_Initial, ov7630c_InitialScale},
[SENSOR_PAS106] =
{pas106b_Initial, pas106b_InitialScale},
[SENSOR_PAS202B] =
{pas202b_Initial, pas202b_InitialScale},
[SENSOR_PB0330] =
{pb0330_Initial, pb0330_InitialScale},
[SENSOR_PO2030] =
{po2030_Initial, po2030_InitialScale},
[SENSOR_TAS5130C] =
{tas5130c_Initial, tas5130c_InitialScale},
};
jpeg_define(sd->jpeg_hdr, gspca_dev->pixfmt.height,
gspca_dev->pixfmt.width,
0x21);
mode = gspca_dev->cam.cam_mode[gspca_dev->curr_mode].priv;
switch (sd->sensor) {
case SENSOR_HV7131R:
zcxx_probeSensor(gspca_dev);
break;
case SENSOR_PAS106:
usb_exchange(gspca_dev, pas106b_Initial_com);
break;
}
usb_exchange(gspca_dev, init_tb[sd->sensor][mode]);
switch (sd->sensor) {
case SENSOR_ADCM2700:
case SENSOR_GC0305:
case SENSOR_OV7620:
case SENSOR_PO2030:
case SENSOR_TAS5130C:
case SENSOR_GC0303:
reg_r(gspca_dev, 0x0002);
reg_w(gspca_dev, 0x09, 0x01ad);
reg_w(gspca_dev, 0x15, 0x01ae);
if (sd->sensor == SENSOR_TAS5130C)
break;
reg_w(gspca_dev, 0x0d, 0x003a);
reg_w(gspca_dev, 0x02, 0x003b);
reg_w(gspca_dev, 0x00, 0x0038);
break;
case SENSOR_HV7131R:
case SENSOR_PAS202B:
reg_w(gspca_dev, 0x03, 0x003b);
reg_w(gspca_dev, 0x0c, 0x003a);
reg_w(gspca_dev, 0x0b, 0x0039);
if (sd->sensor == SENSOR_HV7131R)
reg_w(gspca_dev, 0x50, ZC3XX_R11D_GLOBALGAIN);
break;
}
setmatrix(gspca_dev);
switch (sd->sensor) {
case SENSOR_ADCM2700:
case SENSOR_OV7620:
reg_r(gspca_dev, 0x0008);
reg_w(gspca_dev, 0x00, 0x0008);
break;
case SENSOR_PAS202B:
case SENSOR_GC0305:
case SENSOR_HV7131R:
case SENSOR_TAS5130C:
reg_r(gspca_dev, 0x0008);
fallthrough;
case SENSOR_PO2030:
reg_w(gspca_dev, 0x03, 0x0008);
break;
}
setsharpness(gspca_dev, v4l2_ctrl_g_ctrl(sd->sharpness));
switch (sd->sensor) {
case SENSOR_CS2102K:
case SENSOR_HDCS2020:
case SENSOR_OV7630C:
break;
default:
setcontrast(gspca_dev, v4l2_ctrl_g_ctrl(sd->gamma),
v4l2_ctrl_g_ctrl(sd->brightness),
v4l2_ctrl_g_ctrl(sd->contrast));
break;
}
setmatrix(gspca_dev);
switch (sd->sensor) {
case SENSOR_OV7620:
case SENSOR_PAS202B:
reg_r(gspca_dev, 0x0180);
reg_w(gspca_dev, 0x00, 0x0180);
break;
}
setquality(gspca_dev);
reg_w(gspca_dev, 0x00, 0x0007);
if (sd->plfreq)
setlightfreq(gspca_dev, v4l2_ctrl_g_ctrl(sd->plfreq));
switch (sd->sensor) {
case SENSOR_ADCM2700:
reg_w(gspca_dev, 0x09, 0x01ad);
reg_w(gspca_dev, 0x15, 0x01ae);
reg_w(gspca_dev, 0x02, 0x0180);
reg_w(gspca_dev, 0x40, 0x0117);
break;
case SENSOR_HV7131R:
setexposure(gspca_dev, v4l2_ctrl_g_ctrl(sd->exposure));
reg_w(gspca_dev, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN);
break;
case SENSOR_GC0305:
case SENSOR_TAS5130C:
reg_w(gspca_dev, 0x09, 0x01ad);
reg_w(gspca_dev, 0x15, 0x01ae);
fallthrough;
case SENSOR_PAS202B:
case SENSOR_PO2030:
reg_r(gspca_dev, 0x0180);
break;
case SENSOR_OV7620:
reg_w(gspca_dev, 0x09, 0x01ad);
reg_w(gspca_dev, 0x15, 0x01ae);
i2c_read(gspca_dev, 0x13);
i2c_write(gspca_dev, 0x13, 0xa3, 0x00);
reg_w(gspca_dev, 0x40, 0x0117);
reg_r(gspca_dev, 0x0180);
break;
}
setautogain(gspca_dev, v4l2_ctrl_g_ctrl(sd->autogain));
if (gspca_dev->usb_err < 0)
return gspca_dev->usb_err;
schedule_work(&sd->work);
return 0;
}
static void sd_stop0(struct gspca_dev *gspca_dev)
{
struct sd *sd = (struct sd *) gspca_dev;
mutex_unlock(&gspca_dev->usb_lock);
flush_work(&sd->work);
mutex_lock(&gspca_dev->usb_lock);
if (!gspca_dev->present)
return;
send_unknown(gspca_dev, sd->sensor);
}
static void sd_pkt_scan(struct gspca_dev *gspca_dev,
u8 *data,
int len)
{
struct sd *sd = (struct sd *) gspca_dev;
if (len >= 3
&& data[len - 3] == 0xff && data[len - 2] == 0xd9) {
gspca_frame_add(gspca_dev, LAST_PACKET,
data, len - 1);
return;
}
if (data[0] == 0xff && data[1] == 0xd8) {
gspca_frame_add(gspca_dev, FIRST_PACKET,
sd->jpeg_hdr, JPEG_HDR_SZ);
data += 18;
len -= 18;
}
gspca_frame_add(gspca_dev, INTER_PACKET, data, len);
}
static int sd_set_jcomp(struct gspca_dev *gspca_dev,
const struct v4l2_jpegcompression *jcomp)
{
struct sd *sd = (struct sd *) gspca_dev;
return v4l2_ctrl_s_ctrl(sd->jpegqual, jcomp->quality);
}
static int sd_get_jcomp(struct gspca_dev *gspca_dev,
struct v4l2_jpegcompression *jcomp)
{
struct sd *sd = (struct sd *) gspca_dev;
memset(jcomp, 0, sizeof *jcomp);
jcomp->quality = v4l2_ctrl_g_ctrl(sd->jpegqual);
jcomp->jpeg_markers = V4L2_JPEG_MARKER_DHT
| V4L2_JPEG_MARKER_DQT;
return 0;
}
#if IS_ENABLED(CONFIG_INPUT)
static int sd_int_pkt_scan(struct gspca_dev *gspca_dev,
u8 *data,
int len)
{
if (len == 8 && data[4] == 1) {
input_report_key(gspca_dev->input_dev, KEY_CAMERA, 1);
input_sync(gspca_dev->input_dev);
input_report_key(gspca_dev->input_dev, KEY_CAMERA, 0);
input_sync(gspca_dev->input_dev);
}
return 0;
}
#endif
static const struct sd_desc sd_desc = {
.name = KBUILD_MODNAME,
.config = sd_config,
.init = sd_init,
.init_controls = sd_init_controls,
.isoc_init = sd_pre_start,
.start = sd_start,
.stop0 = sd_stop0,
.pkt_scan = sd_pkt_scan,
.get_jcomp = sd_get_jcomp,
.set_jcomp = sd_set_jcomp,
#if IS_ENABLED(CONFIG_INPUT)
.int_pkt_scan = sd_int_pkt_scan,
#endif
};
static const struct usb_device_id device_table[] = {
{USB_DEVICE(0x03f0, 0x1b07)},
{USB_DEVICE(0x041e, 0x041e)},
{USB_DEVICE(0x041e, 0x4017)},
{USB_DEVICE(0x041e, 0x401c), .driver_info = SENSOR_PAS106},
{USB_DEVICE(0x041e, 0x401e)},
{USB_DEVICE(0x041e, 0x401f)},
{USB_DEVICE(0x041e, 0x4022)},
{USB_DEVICE(0x041e, 0x4029)},
{USB_DEVICE(0x041e, 0x4034), .driver_info = SENSOR_PAS106},
{USB_DEVICE(0x041e, 0x4035), .driver_info = SENSOR_PAS106},
{USB_DEVICE(0x041e, 0x4036)},
{USB_DEVICE(0x041e, 0x403a)},
{USB_DEVICE(0x041e, 0x4051), .driver_info = SENSOR_GC0303},
{USB_DEVICE(0x041e, 0x4053), .driver_info = SENSOR_GC0303},
{USB_DEVICE(0x0458, 0x7007)},
{USB_DEVICE(0x0458, 0x700c)},
{USB_DEVICE(0x0458, 0x700f)},
{USB_DEVICE(0x0461, 0x0a00)},
{USB_DEVICE(0x046d, 0x089d), .driver_info = SENSOR_MC501CB},
{USB_DEVICE(0x046d, 0x08a0)},
{USB_DEVICE(0x046d, 0x08a1)},
{USB_DEVICE(0x046d, 0x08a2)},
{USB_DEVICE(0x046d, 0x08a3)},
{USB_DEVICE(0x046d, 0x08a6)},
{USB_DEVICE(0x046d, 0x08a7)},
{USB_DEVICE(0x046d, 0x08a9)},
{USB_DEVICE(0x046d, 0x08aa)},
{USB_DEVICE(0x046d, 0x08ac)},
{USB_DEVICE(0x046d, 0x08ad)},
{USB_DEVICE(0x046d, 0x08ae)},
{USB_DEVICE(0x046d, 0x08af)},
{USB_DEVICE(0x046d, 0x08b9)},
{USB_DEVICE(0x046d, 0x08d7)},
{USB_DEVICE(0x046d, 0x08d8)},
{USB_DEVICE(0x046d, 0x08d9)},
{USB_DEVICE(0x046d, 0x08da)},
{USB_DEVICE(0x046d, 0x08dd), .driver_info = SENSOR_MC501CB},
{USB_DEVICE(0x0471, 0x0325), .driver_info = SENSOR_PAS106},
{USB_DEVICE(0x0471, 0x0326), .driver_info = SENSOR_PAS106},
{USB_DEVICE(0x0471, 0x032d), .driver_info = SENSOR_PAS106},
{USB_DEVICE(0x0471, 0x032e), .driver_info = SENSOR_PAS106},
{USB_DEVICE(0x055f, 0xc005)},
{USB_DEVICE(0x055f, 0xd003)},
{USB_DEVICE(0x055f, 0xd004)},
{USB_DEVICE(0x0698, 0x2003)},
{USB_DEVICE(0x0ac8, 0x0301), .driver_info = SENSOR_PAS106},
{USB_DEVICE(0x0ac8, 0x0302), .driver_info = SENSOR_PAS106},
{USB_DEVICE(0x0ac8, 0x301b)},
{USB_DEVICE(0x0ac8, 0x303b)},
{USB_DEVICE(0x0ac8, 0x305b)},
{USB_DEVICE(0x0ac8, 0x307b)},
{USB_DEVICE(0x10fd, 0x0128)},
{USB_DEVICE(0x10fd, 0x804d)},
{USB_DEVICE(0x10fd, 0x8050)},
{}
};
MODULE_DEVICE_TABLE(usb, device_table);
static int sd_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
THIS_MODULE);
}
static struct usb_driver sd_driver = {
.name = KBUILD_MODNAME,
.id_table = device_table,
.probe = sd_probe,
.disconnect = gspca_disconnect,
#ifdef CONFIG_PM
.suspend = gspca_suspend,
.resume = gspca_resume,
.reset_resume = gspca_resume,
#endif
};
module_usb_driver(sd_driver);
module_param(force_sensor, int, 0644);
MODULE_PARM_DESC(force_sensor,
"Force sensor. Only for experts!!!"