aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorJean-François Moine <moinejf@free.fr>2010-08-04 06:25:12 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-08-08 22:43:02 -0400
commita484dd9b77fbbda2a79bf1b371c6d31f90e15504 (patch)
tree44e6e7cd420c7b3df32cf2e57c30c6e29271d844 /drivers/media
parent2af0b4c60cc0daf0a3abbaa159380fd729dcf729 (diff)
V4L/DVB: gspca - zc3xx: Redefine the exchanges of sensor mt9v111 (mi0360soc)
The exchanges for sensor mt9v111 are different with bridges zc301 and zc303. The exchanges for the bridge zc303 were those of the bad named tas5130ck. These mt9v111 exchanges have been adjusted from the ms-Windows public files vm30x.inf (for 0ac8:301b) and usbvm303.inf (for 0ac8:303b). Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/gspca/zc3xx.c774
1 files changed, 307 insertions, 467 deletions
diff --git a/drivers/media/video/gspca/zc3xx.c b/drivers/media/video/gspca/zc3xx.c
index 5c9113098e7f..0666038a51b0 100644
--- a/drivers/media/video/gspca/zc3xx.c
+++ b/drivers/media/video/gspca/zc3xx.c
@@ -52,11 +52,16 @@ struct sd {
52#define QUALITY_MAX 80 52#define QUALITY_MAX 80
53#define QUALITY_DEF 70 53#define QUALITY_DEF 70
54 54
55 u8 bridge;
55 u8 sensor; /* Type of image sensor chip */ 56 u8 sensor; /* Type of image sensor chip */
56 u16 chip_revision; 57 u16 chip_revision;
57 58
58 u8 jpeg_hdr[JPEG_HDR_SZ]; 59 u8 jpeg_hdr[JPEG_HDR_SZ];
59}; 60};
61enum bridges {
62 BRIDGE_ZC301,
63 BRIDGE_ZC303,
64};
60enum sensors { 65enum sensors {
61 SENSOR_ADCM2700, 66 SENSOR_ADCM2700,
62 SENSOR_CS2102, 67 SENSOR_CS2102,
@@ -67,14 +72,14 @@ enum sensors {
67 SENSOR_HV7131R, 72 SENSOR_HV7131R,
68 SENSOR_ICM105A, 73 SENSOR_ICM105A,
69 SENSOR_MC501CB, 74 SENSOR_MC501CB,
70 SENSOR_MI0360SOC, /* = MT9V111 */ 75 SENSOR_MT9V111_1, /* (mi360soc) zc301 */
76 SENSOR_MT9V111_3, /* (mi360soc) zc303 */
71 SENSOR_OV7620, /* OV7648 - same values */ 77 SENSOR_OV7620, /* OV7648 - same values */
72 SENSOR_OV7630C, 78 SENSOR_OV7630C,
73 SENSOR_PAS106, 79 SENSOR_PAS106,
74 SENSOR_PAS202B, 80 SENSOR_PAS202B,
75 SENSOR_PB0330, 81 SENSOR_PB0330,
76 SENSOR_PO2030, 82 SENSOR_PO2030,
77 SENSOR_TAS5130CK,
78 SENSOR_TAS5130C, 83 SENSOR_TAS5130C,
79 SENSOR_TAS5130C_VF0250, 84 SENSOR_TAS5130C_VF0250,
80 SENSOR_MAX 85 SENSOR_MAX
@@ -4249,8 +4254,8 @@ static const struct usb_action pas202b_NoFlikerScale[] = {
4249 {} 4254 {}
4250}; 4255};
4251 4256
4252/* mi0360soc and pb0330 from vm30x.inf for 0ac8:301b and 0ac8:303b 07/02/13 */ 4257/* mt9v111 (mi0360soc) and pb0330 from vm30x.inf 0ac8:301b 07/02/13 */
4253static const struct usb_action mi0360soc_Initial[] = { /* 640x480 */ 4258static const struct usb_action mt9v111_1_Initial[] = { /* 640x480 */
4254 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, 4259 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
4255 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, 4260 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
4256 {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, 4261 {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},
@@ -4261,14 +4266,14 @@ static const struct usb_action mi0360soc_Initial[] = { /* 640x480 */
4261 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, 4266 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
4262 {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR}, 4267 {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR},
4263 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, 4268 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
4264 {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, /*jfm: was 03*/ 4269 {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC},
4265/* {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, */
4266 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, 4270 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
4267 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, 4271 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
4268 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, 4272 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
4269 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, 4273 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
4270 {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR}, 4274 {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR},
4271 {0xdd, 0x00, 0x0200}, 4275 {0xdd, 0x00, 0x0200},
4276 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
4272 {0xaa, 0x01, 0x0001}, 4277 {0xaa, 0x01, 0x0001},
4273 {0xaa, 0x06, 0x0000}, 4278 {0xaa, 0x06, 0x0000},
4274 {0xaa, 0x08, 0x0483}, 4279 {0xaa, 0x08, 0x0483},
@@ -4278,18 +4283,18 @@ static const struct usb_action mi0360soc_Initial[] = { /* 640x480 */
4278 {0xaa, 0x03, 0x01e5}, /*jfm: was 01e7*/ 4283 {0xaa, 0x03, 0x01e5}, /*jfm: was 01e7*/
4279 {0xaa, 0x04, 0x0285}, /*jfm: was 0287*/ 4284 {0xaa, 0x04, 0x0285}, /*jfm: was 0287*/
4280 {0xaa, 0x07, 0x3002}, 4285 {0xaa, 0x07, 0x3002},
4281 {0xaa, 0x20, 0x5100}, /*jfm: was 1100*/ 4286 {0xaa, 0x20, 0x5100},
4282 {0xaa, 0x35, 0x507f}, /*jfm: was 0050*/ 4287 {0xaa, 0x35, 0x507f},
4283 {0xaa, 0x30, 0x0005}, 4288 {0xaa, 0x30, 0x0005},
4284 {0xaa, 0x31, 0x0000}, 4289 {0xaa, 0x31, 0x0000},
4285 {0xaa, 0x58, 0x0078}, 4290 {0xaa, 0x58, 0x0078},
4286 {0xaa, 0x62, 0x0411}, 4291 {0xaa, 0x62, 0x0411},
4287 {0xaa, 0x2b, 0x0028}, 4292 {0xaa, 0x2b, 0x007f},
4288 {0xaa, 0x2c, 0x007f}, /*jfm: was 0030*/ 4293 {0xaa, 0x2c, 0x007f}, /*jfm: was 0030*/
4289 {0xaa, 0x2d, 0x007f}, /*jfm: was 0030*/ 4294 {0xaa, 0x2d, 0x007f}, /*jfm: was 0030*/
4290 {0xaa, 0x2e, 0x007f}, /*jfm: was 0030*/ 4295 {0xaa, 0x2e, 0x007f}, /*jfm: was 0030*/
4291 {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID}, 4296 {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID},
4292 {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, /*jfm: was 37*/ 4297 {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION},
4293 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, 4298 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
4294 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, 4299 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
4295 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, 4300 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
@@ -4299,12 +4304,12 @@ static const struct usb_action mi0360soc_Initial[] = { /* 640x480 */
4299 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, 4304 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
4300 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, 4305 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
4301 {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, 4306 {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN},
4302 {0xa0, 0x6c, ZC3XX_R18D_YTARGET}, /* jfm: was 78 */ 4307 {0xa0, 0x6c, ZC3XX_R18D_YTARGET},
4303 {0xa0, 0x61, ZC3XX_R116_RGAIN}, 4308 {0xa0, 0x61, ZC3XX_R116_RGAIN},
4304 {0xa0, 0x65, ZC3XX_R118_BGAIN}, 4309 {0xa0, 0x65, ZC3XX_R118_BGAIN},
4305 {} 4310 {}
4306}; 4311};
4307static const struct usb_action mi0360soc_InitialScale[] = { /* 320x240 */ 4312static const struct usb_action mt9v111_1_InitialScale[] = { /* 320x240 */
4308 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, 4313 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
4309 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, 4314 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
4310 {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, 4315 {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},
@@ -4315,14 +4320,14 @@ static const struct usb_action mi0360soc_InitialScale[] = { /* 320x240 */
4315 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, 4320 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
4316 {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR}, 4321 {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR},
4317 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, 4322 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
4318 {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, /*jfm: was 03*/ 4323 {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC},
4319/* {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, */
4320 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, 4324 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
4321 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, 4325 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
4322 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, 4326 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
4323 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, 4327 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
4324 {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR}, 4328 {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR},
4325 {0xdd, 0x00, 0x0200}, 4329 {0xdd, 0x00, 0x0200},
4330 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
4326 {0xaa, 0x01, 0x0001}, 4331 {0xaa, 0x01, 0x0001},
4327 {0xaa, 0x06, 0x0000}, 4332 {0xaa, 0x06, 0x0000},
4328 {0xaa, 0x08, 0x0483}, 4333 {0xaa, 0x08, 0x0483},
@@ -4332,7 +4337,7 @@ static const struct usb_action mi0360soc_InitialScale[] = { /* 320x240 */
4332 {0xaa, 0x03, 0x01e7}, 4337 {0xaa, 0x03, 0x01e7},
4333 {0xaa, 0x04, 0x0287}, 4338 {0xaa, 0x04, 0x0287},
4334 {0xaa, 0x07, 0x3002}, 4339 {0xaa, 0x07, 0x3002},
4335 {0xaa, 0x20, 0x5100}, /*jfm: was 1100*/ 4340 {0xaa, 0x20, 0x5100},
4336 {0xaa, 0x35, 0x007f}, /*jfm: was 0050*/ 4341 {0xaa, 0x35, 0x007f}, /*jfm: was 0050*/
4337 {0xaa, 0x30, 0x0005}, 4342 {0xaa, 0x30, 0x0005},
4338 {0xaa, 0x31, 0x0000}, 4343 {0xaa, 0x31, 0x0000},
@@ -4343,7 +4348,7 @@ static const struct usb_action mi0360soc_InitialScale[] = { /* 320x240 */
4343 {0xaa, 0x2d, 0x007f}, /*jfm: was 30*/ 4348 {0xaa, 0x2d, 0x007f}, /*jfm: was 30*/
4344 {0xaa, 0x2e, 0x007f}, /*jfm: was 28*/ 4349 {0xaa, 0x2e, 0x007f}, /*jfm: was 28*/
4345 {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID}, 4350 {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID},
4346 {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, /*jfm: was 37*/ 4351 {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION},
4347 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, 4352 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
4348 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, 4353 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
4349 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, 4354 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
@@ -4353,12 +4358,12 @@ static const struct usb_action mi0360soc_InitialScale[] = { /* 320x240 */
4353 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, 4358 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
4354 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, 4359 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
4355 {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, 4360 {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN},
4356 {0xa0, 0x6c, ZC3XX_R18D_YTARGET}, /*jfm: was 78*/ 4361 {0xa0, 0x6c, ZC3XX_R18D_YTARGET},
4357 {0xa0, 0x61, ZC3XX_R116_RGAIN}, 4362 {0xa0, 0x61, ZC3XX_R116_RGAIN},
4358 {0xa0, 0x65, ZC3XX_R118_BGAIN}, 4363 {0xa0, 0x65, ZC3XX_R118_BGAIN},
4359 {} 4364 {}
4360}; 4365};
4361static const struct usb_action mi360soc_AE50HZ[] = { 4366static const struct usb_action mt9v111_1_AE50HZ[] = {
4362 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, 4367 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
4363 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, 4368 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
4364 {0xbb, 0x00, 0x0562}, 4369 {0xbb, 0x00, 0x0562},
@@ -4381,7 +4386,7 @@ static const struct usb_action mi360soc_AE50HZ[] = {
4381 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, 4386 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
4382 {} 4387 {}
4383}; 4388};
4384static const struct usb_action mi360soc_AE50HZScale[] = { 4389static const struct usb_action mt9v111_1_AE50HZScale[] = {
4385 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, 4390 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
4386 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, 4391 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
4387 {0xbb, 0x00, 0x0509}, 4392 {0xbb, 0x00, 0x0509},
@@ -4403,11 +4408,11 @@ static const struct usb_action mi360soc_AE50HZScale[] = {
4403 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, 4408 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
4404 {} 4409 {}
4405}; 4410};
4406static const struct usb_action mi360soc_AE60HZ[] = { 4411static const struct usb_action mt9v111_1_AE60HZ[] = {
4407 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, 4412 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
4408 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, 4413 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
4409 {0xbb, 0x00, 0x053d}, 4414 {0xaa, 0x05, 0x003d},
4410 {0xbb, 0x01, 0x096e}, 4415 {0xaa, 0x09, 0x016e},
4411 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, 4416 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
4412 {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, 4417 {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID},
4413 {0xa0, 0xdd, ZC3XX_R192_EXPOSURELIMITLOW}, 4418 {0xa0, 0xdd, ZC3XX_R192_EXPOSURELIMITLOW},
@@ -4426,7 +4431,7 @@ static const struct usb_action mi360soc_AE60HZ[] = {
4426 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, 4431 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
4427 {} 4432 {}
4428}; 4433};
4429static const struct usb_action mi360soc_AE60HZScale[] = { 4434static const struct usb_action mt9v111_1_AE60HZScale[] = {
4430 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, 4435 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
4431 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, 4436 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
4432 {0xbb, 0x00, 0x0509}, 4437 {0xbb, 0x00, 0x0509},
@@ -4448,7 +4453,7 @@ static const struct usb_action mi360soc_AE60HZScale[] = {
4448 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, 4453 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
4449 {} 4454 {}
4450}; 4455};
4451static const struct usb_action mi360soc_AENoFliker[] = { 4456static const struct usb_action mt9v111_1_AENoFliker[] = {
4452 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, 4457 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
4453 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, 4458 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
4454 {0xbb, 0x00, 0x0509}, 4459 {0xbb, 0x00, 0x0509},
@@ -4471,7 +4476,7 @@ static const struct usb_action mi360soc_AENoFliker[] = {
4471 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, 4476 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
4472 {} 4477 {}
4473}; 4478};
4474static const struct usb_action mi360soc_AENoFlikerScale[] = { 4479static const struct usb_action mt9v111_1_AENoFlikerScale[] = {
4475 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, 4480 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
4476 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, 4481 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
4477 {0xbb, 0x00, 0x0534}, 4482 {0xbb, 0x00, 0x0534},
@@ -4494,6 +4499,251 @@ static const struct usb_action mi360soc_AENoFlikerScale[] = {
4494 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, 4499 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
4495 {} 4500 {}
4496}; 4501};
4502/* from usbvm303.inf 0ac8:303b 07/03/25 (3 - tas5130c) */
4503static const struct usb_action mt9v111_3_Initial[] = {
4504 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
4505 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
4506 {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},
4507 {0xa0, 0x04, ZC3XX_R002_CLOCKSELECT},
4508 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
4509 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
4510 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
4511 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
4512 {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR},
4513 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
4514 {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC},
4515 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
4516 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
4517 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
4518 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
4519 {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR},
4520 {0xdd, 0x00, 0x0200},
4521 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
4522 {0xaa, 0x01, 0x0001}, /* select IFP/SOC registers */
4523 {0xaa, 0x06, 0x0000}, /* operating mode control */
4524 {0xaa, 0x08, 0x0483}, /* output format control */
4525 /* H red first, V red or blue first,
4526 * raw Bayer, auto flicker */
4527 {0xaa, 0x01, 0x0004}, /* select sensor core registers */
4528 {0xaa, 0x08, 0x0006}, /* row start */
4529 {0xaa, 0x02, 0x0011}, /* column start */
4530 {0xaa, 0x03, 0x01e5}, /* window height - 1 */
4531 {0xaa, 0x04, 0x0285}, /* window width - 1 */
4532 {0xaa, 0x07, 0x3002}, /* output control */
4533 {0xaa, 0x20, 0x1100}, /* read mode: bits 8 & 12 (?) */
4534 {0xaa, 0x35, 0x007f}, /* global gain */
4535 {0xaa, 0x30, 0x0005},
4536 {0xaa, 0x31, 0x0000},
4537 {0xaa, 0x58, 0x0078},
4538 {0xaa, 0x62, 0x0411},
4539 {0xaa, 0x2b, 0x007f}, /* green1 gain */
4540 {0xaa, 0x2c, 0x007f}, /* blue gain */
4541 {0xaa, 0x2d, 0x007f}, /* red gain */
4542 {0xaa, 0x2e, 0x007f}, /* green2 gain */
4543 {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID},
4544 {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION},
4545 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
4546 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
4547 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
4548 {0xa0, 0x00, 0x01ad},
4549 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
4550 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
4551 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
4552 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
4553 {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN},
4554 {0xa0, 0x80, ZC3XX_R18D_YTARGET},
4555 {0xa0, 0x61, ZC3XX_R116_RGAIN},
4556 {0xa0, 0x65, ZC3XX_R118_BGAIN},
4557 {}
4558};
4559static const struct usb_action mt9v111_3_InitialScale[] = {
4560 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
4561 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
4562 {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},
4563 {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT},
4564 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
4565 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
4566 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
4567 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
4568 {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR},
4569 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
4570 {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC},
4571 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
4572 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
4573 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
4574 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
4575 {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR},
4576 {0xdd, 0x00, 0x0200},
4577 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
4578 {0xaa, 0x01, 0x0001},
4579 {0xaa, 0x06, 0x0000},
4580 {0xaa, 0x08, 0x0483},
4581 {0xaa, 0x01, 0x0004},
4582 {0xaa, 0x08, 0x0006},
4583 {0xaa, 0x02, 0x0011},
4584 {0xaa, 0x03, 0x01e7},
4585 {0xaa, 0x04, 0x0287},
4586 {0xaa, 0x07, 0x3002},
4587 {0xaa, 0x20, 0x1100},
4588 {0xaa, 0x35, 0x007f},
4589 {0xaa, 0x30, 0x0005},
4590 {0xaa, 0x31, 0x0000},
4591 {0xaa, 0x58, 0x0078},
4592 {0xaa, 0x62, 0x0411},
4593 {0xaa, 0x2b, 0x007f},
4594 {0xaa, 0x2c, 0x007f},
4595 {0xaa, 0x2d, 0x007f},
4596 {0xaa, 0x2e, 0x007f},
4597 {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID},
4598 {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION},
4599 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
4600 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
4601 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
4602 {0xa0, 0x00, 0x01ad},
4603 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
4604 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
4605 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
4606 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
4607 {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN},
4608 {0xa0, 0x80, ZC3XX_R18D_YTARGET},
4609 {0xa0, 0x61, ZC3XX_R116_RGAIN},
4610 {0xa0, 0x65, ZC3XX_R118_BGAIN},
4611 {}
4612};
4613static const struct usb_action mt9v111_3_AE50HZ[] = {
4614 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
4615 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
4616 {0xaa, 0x05, 0x0009}, /* horizontal blanking */
4617 {0xaa, 0x09, 0x01ce}, /* shutter width */
4618 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
4619 {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID},
4620 {0xa0, 0xd2, ZC3XX_R192_EXPOSURELIMITLOW},
4621 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
4622 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
4623 {0xa0, 0x9a, ZC3XX_R197_ANTIFLICKERLOW},
4624 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
4625 {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE},
4626 {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF},
4627 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
4628 {0xa0, 0xd7, ZC3XX_R01D_HSYNC_0},
4629 {0xa0, 0xf4, ZC3XX_R01E_HSYNC_1},
4630 {0xa0, 0xf9, ZC3XX_R01F_HSYNC_2},
4631 {0xa0, 0xff, ZC3XX_R020_HSYNC_3},
4632 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
4633 {}
4634};
4635static const struct usb_action mt9v111_3_AE50HZScale[] = {
4636 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
4637 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
4638 {0xaa, 0x05, 0x0009},
4639 {0xaa, 0x09, 0x01ce},
4640 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
4641 {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID},
4642 {0xa0, 0xd2, ZC3XX_R192_EXPOSURELIMITLOW},
4643 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
4644 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
4645 {0xa0, 0x9a, ZC3XX_R197_ANTIFLICKERLOW},
4646 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
4647 {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE},
4648 {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF},
4649 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
4650 {0xa0, 0xd7, ZC3XX_R01D_HSYNC_0},
4651 {0xa0, 0xf4, ZC3XX_R01E_HSYNC_1},
4652 {0xa0, 0xf9, ZC3XX_R01F_HSYNC_2},
4653 {0xa0, 0xff, ZC3XX_R020_HSYNC_3},
4654 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
4655 {}
4656};
4657static const struct usb_action mt9v111_3_AE60HZ[] = {
4658 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
4659 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
4660 {0xaa, 0x05, 0x0009},
4661 {0xaa, 0x09, 0x0083},
4662 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
4663 {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID},
4664 {0xa0, 0x8f, ZC3XX_R192_EXPOSURELIMITLOW},
4665 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
4666 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
4667 {0xa0, 0x81, ZC3XX_R197_ANTIFLICKERLOW},
4668 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
4669 {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE},
4670 {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF},
4671 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
4672 {0xa0, 0xd7, ZC3XX_R01D_HSYNC_0},
4673 {0xa0, 0xf4, ZC3XX_R01E_HSYNC_1},
4674 {0xa0, 0xf9, ZC3XX_R01F_HSYNC_2},
4675 {0xa0, 0xff, ZC3XX_R020_HSYNC_3},
4676 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
4677 {}
4678};
4679static const struct usb_action mt9v111_3_AE60HZScale[] = {
4680 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
4681 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
4682 {0xaa, 0x05, 0x0009},
4683 {0xaa, 0x09, 0x0083},
4684 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
4685 {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID},
4686 {0xa0, 0x8f, ZC3XX_R192_EXPOSURELIMITLOW},
4687 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
4688 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
4689 {0xa0, 0x81, ZC3XX_R197_ANTIFLICKERLOW},
4690 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
4691 {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE},
4692 {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF},
4693 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
4694 {0xa0, 0xd7, ZC3XX_R01D_HSYNC_0},
4695 {0xa0, 0xf4, ZC3XX_R01E_HSYNC_1},
4696 {0xa0, 0xf9, ZC3XX_R01F_HSYNC_2},
4697 {0xa0, 0xff, ZC3XX_R020_HSYNC_3},
4698 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
4699 {}
4700};
4701static const struct usb_action mt9v111_3_AENoFliker[] = {
4702 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
4703 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
4704 {0xaa, 0x05, 0x0034},
4705 {0xaa, 0x09, 0x0260},
4706 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
4707 {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID},
4708 {0xa0, 0xf0, ZC3XX_R192_EXPOSURELIMITLOW},
4709 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
4710 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
4711 {0xa0, 0x04, ZC3XX_R197_ANTIFLICKERLOW},
4712 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
4713 {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE},
4714 {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF},
4715 {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP},
4716 {0xa0, 0x34, ZC3XX_R01D_HSYNC_0},
4717 {0xa0, 0x60, ZC3XX_R01E_HSYNC_1},
4718 {0xa0, 0x90, ZC3XX_R01F_HSYNC_2},
4719 {0xa0, 0xe0, ZC3XX_R020_HSYNC_3},
4720 {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},
4721 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
4722 {}
4723};
4724static const struct usb_action mt9v111_3_AENoFlikerScale[] = {
4725 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
4726 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
4727 {0xaa, 0x05, 0x0034},
4728 {0xaa, 0x09, 0x0260},
4729 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
4730 {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID},
4731 {0xa0, 0xf0, ZC3XX_R192_EXPOSURELIMITLOW},
4732 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
4733 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
4734 {0xa0, 0x04, ZC3XX_R197_ANTIFLICKERLOW},
4735 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
4736 {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE},
4737 {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF},
4738 {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP},
4739 {0xa0, 0x34, ZC3XX_R01D_HSYNC_0},
4740 {0xa0, 0x60, ZC3XX_R01E_HSYNC_1},
4741 {0xa0, 0x90, ZC3XX_R01F_HSYNC_2},
4742 {0xa0, 0xe0, ZC3XX_R020_HSYNC_3},
4743 {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},
4744 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
4745 {}
4746};
4497 4747
4498static const struct usb_action pb0330_Initial[] = { /* 640x480 */ 4748static const struct usb_action pb0330_Initial[] = { /* 640x480 */
4499 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, 4749 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
@@ -4936,418 +5186,6 @@ static const struct usb_action po2030_NoFliker[] = {
4936 {} 5186 {}
4937}; 5187};
4938 5188
4939/* TEST */
4940static const struct usb_action tas5130cK_InitialScale[] = {
4941 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
4942 {0xa0, 0x01, 0x003b},
4943 {0xa0, 0x0e, 0x003a},
4944 {0xa0, 0x01, 0x0038},
4945 {0xa0, 0x0b, 0x0039},
4946 {0xa0, 0x00, 0x0038},
4947 {0xa0, 0x0b, 0x0039},
4948 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
4949 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
4950 {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},
4951 {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT},
4952 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
4953 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
4954 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
4955 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
4956 {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR},
4957 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
4958 {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC},
4959 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
4960 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
4961 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
4962 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
4963 {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR},
4964 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
4965 {0xa0, 0x01, ZC3XX_R092_I2CADDRESSSELECT},
4966 {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE},
4967 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
4968 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
4969 {0xa0, 0x06, ZC3XX_R092_I2CADDRESSSELECT},
4970 {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
4971 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
4972 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
4973 {0xa0, 0x08, ZC3XX_R092_I2CADDRESSSELECT},
4974 {0xa0, 0x83, ZC3XX_R093_I2CSETVALUE},
4975 {0xa0, 0x04, ZC3XX_R094_I2CWRITEACK},
4976 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
4977 {0xa0, 0x01, ZC3XX_R092_I2CADDRESSSELECT},
4978 {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE},
4979 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
4980 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
4981 {0xa0, 0x08, ZC3XX_R092_I2CADDRESSSELECT},
4982 {0xa0, 0x06, ZC3XX_R093_I2CSETVALUE},
4983 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
4984 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
4985 {0xa0, 0x02, ZC3XX_R092_I2CADDRESSSELECT},
4986 {0xa0, 0x11, ZC3XX_R093_I2CSETVALUE},
4987 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
4988 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
4989 {0xa0, 0x03, ZC3XX_R092_I2CADDRESSSELECT},
4990 {0xa0, 0xE7, ZC3XX_R093_I2CSETVALUE},
4991 {0xa0, 0x01, ZC3XX_R094_I2CWRITEACK},
4992 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
4993 {0xa0, 0x04, ZC3XX_R092_I2CADDRESSSELECT},
4994 {0xa0, 0x87, ZC3XX_R093_I2CSETVALUE},
4995 {0xa0, 0x02, ZC3XX_R094_I2CWRITEACK},
4996 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
4997 {0xa0, 0x07, ZC3XX_R092_I2CADDRESSSELECT},
4998 {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE},
4999 {0xa0, 0x30, ZC3XX_R094_I2CWRITEACK},
5000 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
5001 {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT},
5002 {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
5003 {0xa0, 0x51, ZC3XX_R094_I2CWRITEACK},
5004 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
5005 {0xa0, 0x35, ZC3XX_R092_I2CADDRESSSELECT},
5006 {0xa0, 0x7F, ZC3XX_R093_I2CSETVALUE},
5007 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
5008 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
5009 {0xa0, 0x30, ZC3XX_R092_I2CADDRESSSELECT},
5010 {0xa0, 0x05, ZC3XX_R093_I2CSETVALUE},
5011 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
5012 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
5013 {0xa0, 0x31, ZC3XX_R092_I2CADDRESSSELECT},
5014 {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
5015 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
5016 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
5017 {0xa0, 0x58, ZC3XX_R092_I2CADDRESSSELECT},
5018 {0xa0, 0x78, ZC3XX_R093_I2CSETVALUE},
5019 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
5020 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
5021 {0xa0, 0x62, ZC3XX_R092_I2CADDRESSSELECT},
5022 {0xa0, 0x11, ZC3XX_R093_I2CSETVALUE},
5023 {0xa0, 0x04, ZC3XX_R094_I2CWRITEACK},
5024 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
5025 {0xa0, 0x2B, ZC3XX_R092_I2CADDRESSSELECT},
5026 {0xa0, 0x7f, ZC3XX_R093_I2CSETVALUE},
5027 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
5028 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
5029 {0xa0, 0x2c, ZC3XX_R092_I2CADDRESSSELECT},
5030 {0xa0, 0x7f, ZC3XX_R093_I2CSETVALUE},
5031 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
5032 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
5033 {0xa0, 0x2D, ZC3XX_R092_I2CADDRESSSELECT},
5034 {0xa0, 0x7f, ZC3XX_R093_I2CSETVALUE},
5035 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
5036 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
5037 {0xa0, 0x2e, ZC3XX_R092_I2CADDRESSSELECT},
5038 {0xa0, 0x7f, ZC3XX_R093_I2CSETVALUE},
5039 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
5040 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
5041 {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID},
5042 {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION},
5043 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
5044 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
5045 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
5046 {0xa0, 0x09, 0x01ad},
5047 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
5048 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
5049 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
5050 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
5051 {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN},
5052 {0xa0, 0x6c, ZC3XX_R18D_YTARGET},
5053 {0xa0, 0x61, ZC3XX_R116_RGAIN},
5054 {0xa0, 0x65, ZC3XX_R118_BGAIN},
5055 {0xa0, 0x09, 0x01ad},
5056 {0xa0, 0x15, 0x01ae},
5057 {0xa0, 0x4c, ZC3XX_R10A_RGB00}, /* matrix */
5058 {0xa0, 0xf1, ZC3XX_R10B_RGB01},
5059 {0xa0, 0x03, ZC3XX_R10C_RGB02},
5060 {0xa0, 0xfe, ZC3XX_R10D_RGB10},
5061 {0xa0, 0x51, ZC3XX_R10E_RGB11},
5062 {0xa0, 0xf1, ZC3XX_R10F_RGB12},
5063 {0xa0, 0xec, ZC3XX_R110_RGB20},
5064 {0xa0, 0x03, ZC3XX_R111_RGB21},
5065 {0xa0, 0x51, ZC3XX_R112_RGB22},
5066 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
5067 {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */
5068 {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */
5069 {0xa0, 0x38, ZC3XX_R120_GAMMA00}, /* gamma > 5 */
5070 {0xa0, 0x51, ZC3XX_R121_GAMMA01},
5071 {0xa0, 0x6e, ZC3XX_R122_GAMMA02},
5072 {0xa0, 0x8c, ZC3XX_R123_GAMMA03},
5073 {0xa0, 0xa2, ZC3XX_R124_GAMMA04},
5074 {0xa0, 0xb6, ZC3XX_R125_GAMMA05},
5075 {0xa0, 0xc8, ZC3XX_R126_GAMMA06},
5076 {0xa0, 0xd6, ZC3XX_R127_GAMMA07},
5077 {0xa0, 0xe2, ZC3XX_R128_GAMMA08},
5078 {0xa0, 0xed, ZC3XX_R129_GAMMA09},
5079 {0xa0, 0xf5, ZC3XX_R12A_GAMMA0A},
5080 {0xa0, 0xfc, ZC3XX_R12B_GAMMA0B},
5081 {0xa0, 0xff, ZC3XX_R12C_GAMMA0C},
5082 {0xa0, 0xff, ZC3XX_R12D_GAMMA0D},
5083 {0xa0, 0xff, ZC3XX_R12E_GAMMA0E},
5084 {0xa0, 0xff, ZC3XX_R12F_GAMMA0F},
5085 {0xa0, 0x12, ZC3XX_R130_GAMMA10},
5086 {0xa0, 0x1b, ZC3XX_R131_GAMMA11},
5087 {0xa0, 0x1d, ZC3XX_R132_GAMMA12},
5088 {0xa0, 0x1a, ZC3XX_R133_GAMMA13},
5089 {0xa0, 0x15, ZC3XX_R134_GAMMA14},
5090 {0xa0, 0x12, ZC3XX_R135_GAMMA15},
5091 {0xa0, 0x0f, ZC3XX_R136_GAMMA16},
5092 {0xa0, 0x0d, ZC3XX_R137_GAMMA17},
5093 {0xa0, 0x0b, ZC3XX_R138_GAMMA18},
5094 {0xa0, 0x09, ZC3XX_R139_GAMMA19},
5095 {0xa0, 0x07, ZC3XX_R13A_GAMMA1A},
5096 {0xa0, 0x05, ZC3XX_R13B_GAMMA1B},
5097 {0xa0, 0x00, ZC3XX_R13C_GAMMA1C},
5098 {0xa0, 0x00, ZC3XX_R13D_GAMMA1D},
5099 {0xa0, 0x00, ZC3XX_R13E_GAMMA1E},
5100 {0xa0, 0x01, ZC3XX_R13F_GAMMA1F},
5101 {0xa0, 0x4c, ZC3XX_R10A_RGB00}, /* matrix */
5102 {0xa0, 0xf1, ZC3XX_R10B_RGB01},
5103 {0xa0, 0x03, ZC3XX_R10C_RGB02},
5104 {0xa0, 0xfe, ZC3XX_R10D_RGB10},
5105 {0xa0, 0x51, ZC3XX_R10E_RGB11},
5106 {0xa0, 0xf1, ZC3XX_R10F_RGB12},
5107 {0xa0, 0xec, ZC3XX_R110_RGB20},
5108 {0xa0, 0x03, ZC3XX_R111_RGB21},
5109 {0xa0, 0x51, ZC3XX_R112_RGB22},
5110 {0xa0, 0x10, ZC3XX_R180_AUTOCORRECTENABLE},
5111 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
5112 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
5113 {0xa0, 0x05, ZC3XX_R092_I2CADDRESSSELECT},
5114 {0xa0, 0x09, ZC3XX_R093_I2CSETVALUE},
5115 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
5116 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
5117 {0xa0, 0x09, ZC3XX_R092_I2CADDRESSSELECT},
5118 {0xa0, 0x34, ZC3XX_R093_I2CSETVALUE},
5119 {0xa0, 0x01, ZC3XX_R094_I2CWRITEACK},
5120 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
5121 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
5122 {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID},
5123 {0xa0, 0xd2, ZC3XX_R192_EXPOSURELIMITLOW},
5124 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
5125 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
5126 {0xa0, 0x9a, ZC3XX_R197_ANTIFLICKERLOW},
5127 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
5128 {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE},
5129 {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF},
5130 {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP},
5131 {0xa0, 0xd7, ZC3XX_R01D_HSYNC_0},
5132 {0xa0, 0xf4, ZC3XX_R01E_HSYNC_1},
5133 {0xa0, 0xf9, ZC3XX_R01F_HSYNC_2},
5134 {0xa0, 0xff, ZC3XX_R020_HSYNC_3},
5135 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
5136 {0xa0, 0x09, 0x01ad},
5137 {0xa0, 0x15, 0x01ae},
5138 {0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE},
5139 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
5140 {}
5141};
5142
5143static const struct usb_action tas5130cK_Initial[] = {
5144 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
5145 {0xa0, 0x01, 0x003b},
5146 {0xa0, 0x0e, 0x003a},
5147 {0xa0, 0x01, 0x0038},
5148 {0xa0, 0x0b, 0x0039},
5149 {0xa0, 0x00, 0x0038},
5150 {0xa0, 0x0b, 0x0039},
5151 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
5152 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
5153 {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},
5154 {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT},
5155 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
5156 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
5157 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
5158 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
5159 {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR},
5160 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
5161 {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC},
5162 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
5163 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
5164 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
5165 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
5166 {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR},
5167 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
5168 {0xa0, 0x01, ZC3XX_R092_I2CADDRESSSELECT},
5169 {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE},
5170 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
5171 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
5172 {0xa0, 0x06, ZC3XX_R092_I2CADDRESSSELECT},
5173 {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
5174 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
5175 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
5176 {0xa0, 0x08, ZC3XX_R092_I2CADDRESSSELECT},
5177 {0xa0, 0x83, ZC3XX_R093_I2CSETVALUE},
5178 {0xa0, 0x04, ZC3XX_R094_I2CWRITEACK},
5179 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
5180 {0xa0, 0x01, ZC3XX_R092_I2CADDRESSSELECT},
5181 {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE},
5182 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
5183 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
5184 {0xa0, 0x08, ZC3XX_R092_I2CADDRESSSELECT},
5185 {0xa0, 0x06, ZC3XX_R093_I2CSETVALUE},
5186 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
5187 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
5188 {0xa0, 0x02, ZC3XX_R092_I2CADDRESSSELECT},
5189 {0xa0, 0x11, ZC3XX_R093_I2CSETVALUE},
5190 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
5191 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
5192 {0xa0, 0x03, ZC3XX_R092_I2CADDRESSSELECT},
5193 {0xa0, 0xe5, ZC3XX_R093_I2CSETVALUE},
5194 {0xa0, 0x01, ZC3XX_R094_I2CWRITEACK},
5195 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
5196 {0xa0, 0x04, ZC3XX_R092_I2CADDRESSSELECT},
5197 {0xa0, 0x85, ZC3XX_R093_I2CSETVALUE},
5198 {0xa0, 0x02, ZC3XX_R094_I2CWRITEACK},
5199 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
5200 {0xa0, 0x07, ZC3XX_R092_I2CADDRESSSELECT},
5201 {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE},
5202 {0xa0, 0x30, ZC3XX_R094_I2CWRITEACK},
5203 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
5204 {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT},
5205 {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
5206 {0xa0, 0x51, ZC3XX_R094_I2CWRITEACK},
5207 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
5208 {0xa0, 0x35, ZC3XX_R092_I2CADDRESSSELECT},
5209 {0xa0, 0x7F, ZC3XX_R093_I2CSETVALUE},
5210 {0xa0, 0x50, ZC3XX_R094_I2CWRITEACK},
5211 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
5212 {0xa0, 0x30, ZC3XX_R092_I2CADDRESSSELECT},
5213 {0xa0, 0x05, ZC3XX_R093_I2CSETVALUE},
5214 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
5215 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
5216 {0xa0, 0x31, ZC3XX_R092_I2CADDRESSSELECT},
5217 {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
5218 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
5219 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
5220 {0xa0, 0x58, ZC3XX_R092_I2CADDRESSSELECT},
5221 {0xa0, 0x78, ZC3XX_R093_I2CSETVALUE},
5222 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
5223 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
5224 {0xa0, 0x62, ZC3XX_R092_I2CADDRESSSELECT},
5225 {0xa0, 0x11, ZC3XX_R093_I2CSETVALUE},
5226 {0xa0, 0x04, ZC3XX_R094_I2CWRITEACK},
5227 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
5228 {0xa0, 0x2B, ZC3XX_R092_I2CADDRESSSELECT},
5229 {0xa0, 0x7f, ZC3XX_R093_I2CSETVALUE},
5230 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
5231 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
5232 {0xa0, 0x2C, ZC3XX_R092_I2CADDRESSSELECT},
5233 {0xa0, 0x7F, ZC3XX_R093_I2CSETVALUE},
5234 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
5235 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
5236 {0xa0, 0x2D, ZC3XX_R092_I2CADDRESSSELECT},
5237 {0xa0, 0x7f, ZC3XX_R093_I2CSETVALUE},
5238 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
5239 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
5240 {0xa0, 0x2e, ZC3XX_R092_I2CADDRESSSELECT},
5241 {0xa0, 0x7f, ZC3XX_R093_I2CSETVALUE},
5242 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
5243 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
5244 {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID},
5245 {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION},
5246 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
5247 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
5248 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
5249 {0xa0, 0x09, 0x01ad},
5250 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
5251 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
5252 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
5253 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
5254 {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN},
5255 {0xa0, 0x6c, ZC3XX_R18D_YTARGET},
5256 {0xa0, 0x61, ZC3XX_R116_RGAIN},
5257 {0xa0, 0x65, ZC3XX_R118_BGAIN},
5258 {0xa0, 0x09, 0x01ad},
5259 {0xa0, 0x15, 0x01ae},
5260 {0xa0, 0x4c, ZC3XX_R10A_RGB00}, /* matrix */
5261 {0xa0, 0xf1, ZC3XX_R10B_RGB01},
5262 {0xa0, 0x03, ZC3XX_R10C_RGB02},
5263 {0xa0, 0xfe, ZC3XX_R10D_RGB10},
5264 {0xa0, 0x51, ZC3XX_R10E_RGB11},
5265 {0xa0, 0xf1, ZC3XX_R10F_RGB12},
5266 {0xa0, 0xec, ZC3XX_R110_RGB20},
5267 {0xa0, 0x03, ZC3XX_R111_RGB21},
5268 {0xa0, 0x51, ZC3XX_R112_RGB22},
5269 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
5270 {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */
5271 {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */
5272 {0xa0, 0x38, ZC3XX_R120_GAMMA00}, /* gamma > 5 */
5273 {0xa0, 0x51, ZC3XX_R121_GAMMA01},
5274 {0xa0, 0x6e, ZC3XX_R122_GAMMA02},
5275 {0xa0, 0x8c, ZC3XX_R123_GAMMA03},
5276 {0xa0, 0xa2, ZC3XX_R124_GAMMA04},
5277 {0xa0, 0xb6, ZC3XX_R125_GAMMA05},
5278 {0xa0, 0xc8, ZC3XX_R126_GAMMA06},
5279 {0xa0, 0xd6, ZC3XX_R127_GAMMA07},
5280 {0xa0, 0xe2, ZC3XX_R128_GAMMA08},
5281 {0xa0, 0xed, ZC3XX_R129_GAMMA09},
5282 {0xa0, 0xf5, ZC3XX_R12A_GAMMA0A},
5283 {0xa0, 0xfc, ZC3XX_R12B_GAMMA0B},
5284 {0xa0, 0xff, ZC3XX_R12C_GAMMA0C},
5285 {0xa0, 0xff, ZC3XX_R12D_GAMMA0D},
5286 {0xa0, 0xff, ZC3XX_R12E_GAMMA0E},
5287 {0xa0, 0xff, ZC3XX_R12F_GAMMA0F},
5288 {0xa0, 0x12, ZC3XX_R130_GAMMA10},
5289 {0xa0, 0x1b, ZC3XX_R131_GAMMA11},
5290 {0xa0, 0x1d, ZC3XX_R132_GAMMA12},
5291 {0xa0, 0x1a, ZC3XX_R133_GAMMA13},
5292 {0xa0, 0x15, ZC3XX_R134_GAMMA14},
5293 {0xa0, 0x12, ZC3XX_R135_GAMMA15},
5294 {0xa0, 0x0f, ZC3XX_R136_GAMMA16},
5295 {0xa0, 0x0d, ZC3XX_R137_GAMMA17},
5296 {0xa0, 0x0b, ZC3XX_R138_GAMMA18},
5297 {0xa0, 0x09, ZC3XX_R139_GAMMA19},
5298 {0xa0, 0x07, ZC3XX_R13A_GAMMA1A},
5299 {0xa0, 0x05, ZC3XX_R13B_GAMMA1B},
5300 {0xa0, 0x00, ZC3XX_R13C_GAMMA1C},
5301 {0xa0, 0x00, ZC3XX_R13D_GAMMA1D},
5302 {0xa0, 0x00, ZC3XX_R13E_GAMMA1E},
5303 {0xa0, 0x01, ZC3XX_R13F_GAMMA1F},
5304 {0xa0, 0x4c, ZC3XX_R10A_RGB00}, /* matrix */
5305 {0xa0, 0xf1, ZC3XX_R10B_RGB01},
5306 {0xa0, 0x03, ZC3XX_R10C_RGB02},
5307 {0xa0, 0xfe, ZC3XX_R10D_RGB10},
5308 {0xa0, 0x51, ZC3XX_R10E_RGB11},
5309 {0xa0, 0xf1, ZC3XX_R10F_RGB12},
5310 {0xa0, 0xec, ZC3XX_R110_RGB20},
5311 {0xa0, 0x03, ZC3XX_R111_RGB21},
5312 {0xa0, 0x51, ZC3XX_R112_RGB22},
5313 {0xa0, 0x10, ZC3XX_R180_AUTOCORRECTENABLE},
5314 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
5315 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
5316 {0xa0, 0x05, ZC3XX_R092_I2CADDRESSSELECT},
5317 {0xa0, 0x62, ZC3XX_R093_I2CSETVALUE},
5318 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
5319 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
5320 {0xa0, 0x09, ZC3XX_R092_I2CADDRESSSELECT},
5321 {0xa0, 0xaa, ZC3XX_R093_I2CSETVALUE},
5322 {0xa0, 0x01, ZC3XX_R094_I2CWRITEACK},
5323 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
5324 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
5325 {0xa0, 0x03, ZC3XX_R191_EXPOSURELIMITMID},
5326 {0xa0, 0x9b, ZC3XX_R192_EXPOSURELIMITLOW},
5327 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
5328 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
5329 {0xa0, 0x47, ZC3XX_R197_ANTIFLICKERLOW},
5330 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},
5331 {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE},
5332 {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF},
5333 {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP},
5334 {0xa0, 0x62, ZC3XX_R01D_HSYNC_0},
5335 {0xa0, 0x90, ZC3XX_R01E_HSYNC_1},
5336 {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2},
5337 {0xa0, 0xff, ZC3XX_R020_HSYNC_3},
5338 {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},
5339 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
5340 {0xa0, 0x09, 0x01ad},
5341 {0xa0, 0x15, 0x01ae},
5342 {0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE},
5343 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
5344 {0xa0, 0x30, 0x0007},
5345 {0xa0, 0x02, ZC3XX_R008_CLOCKSETTING},
5346 {0xa0, 0x00, 0x0007},
5347 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
5348 {}
5349};
5350
5351static const struct usb_action tas5130c_InitialScale[] = { /* 320x240 */ 5189static const struct usb_action tas5130c_InitialScale[] = { /* 320x240 */
5352 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, 5190 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
5353 {0xa0, 0x50, ZC3XX_R002_CLOCKSELECT}, 5191 {0xa0, 0x50, ZC3XX_R002_CLOCKSELECT},
@@ -6012,14 +5850,14 @@ static void setmatrix(struct gspca_dev *gspca_dev)
6012 [SENSOR_HV7131R] = NULL, 5850 [SENSOR_HV7131R] = NULL,
6013 [SENSOR_ICM105A] = po2030_matrix, 5851 [SENSOR_ICM105A] = po2030_matrix,
6014 [SENSOR_MC501CB] = NULL, 5852 [SENSOR_MC501CB] = NULL,
6015 [SENSOR_MI0360SOC] = gc0305_matrix, 5853 [SENSOR_MT9V111_1] = gc0305_matrix,
5854 [SENSOR_MT9V111_3] = gc0305_matrix,
6016 [SENSOR_OV7620] = ov7620_matrix, 5855 [SENSOR_OV7620] = ov7620_matrix,
6017 [SENSOR_OV7630C] = NULL, 5856 [SENSOR_OV7630C] = NULL,
6018 [SENSOR_PAS106] = NULL, 5857 [SENSOR_PAS106] = NULL,
6019 [SENSOR_PAS202B] = pas202b_matrix, 5858 [SENSOR_PAS202B] = pas202b_matrix,
6020 [SENSOR_PB0330] = gc0305_matrix, 5859 [SENSOR_PB0330] = gc0305_matrix,
6021 [SENSOR_PO2030] = po2030_matrix, 5860 [SENSOR_PO2030] = po2030_matrix,
6022 [SENSOR_TAS5130CK] = NULL,
6023 [SENSOR_TAS5130C] = tas5130c_matrix, 5861 [SENSOR_TAS5130C] = tas5130c_matrix,
6024 [SENSOR_TAS5130C_VF0250] = vf0250_matrix, 5862 [SENSOR_TAS5130C_VF0250] = vf0250_matrix,
6025 }; 5863 };
@@ -6185,10 +6023,14 @@ static void setlightfreq(struct gspca_dev *gspca_dev)
6185 {mc501cb_NoFliker, mc501cb_NoFlikerScale, 6023 {mc501cb_NoFliker, mc501cb_NoFlikerScale,
6186 mc501cb_50HZ, mc501cb_50HZScale, 6024 mc501cb_50HZ, mc501cb_50HZScale,
6187 mc501cb_60HZ, mc501cb_60HZScale}, 6025 mc501cb_60HZ, mc501cb_60HZScale},
6188 [SENSOR_MI0360SOC] = 6026 [SENSOR_MT9V111_1] =
6189 {mi360soc_AENoFliker, mi360soc_AENoFlikerScale, 6027 {mt9v111_1_AENoFliker, mt9v111_1_AENoFlikerScale,
6190 mi360soc_AE50HZ, mi360soc_AE50HZScale, 6028 mt9v111_1_AE50HZ, mt9v111_1_AE50HZScale,
6191 mi360soc_AE60HZ, mi360soc_AE60HZScale}, 6029 mt9v111_1_AE60HZ, mt9v111_1_AE60HZScale},
6030 [SENSOR_MT9V111_3] =
6031 {mt9v111_3_AENoFliker, mt9v111_3_AENoFlikerScale,
6032 mt9v111_3_AE50HZ, mt9v111_3_AE50HZScale,
6033 mt9v111_3_AE60HZ, mt9v111_3_AE60HZScale},
6192 [SENSOR_OV7620] = 6034 [SENSOR_OV7620] =
6193 {ov7620_NoFliker, ov7620_NoFliker, 6035 {ov7620_NoFliker, ov7620_NoFliker,
6194 ov7620_50HZ, ov7620_50HZ, 6036 ov7620_50HZ, ov7620_50HZ,
@@ -6213,10 +6055,6 @@ static void setlightfreq(struct gspca_dev *gspca_dev)
6213 {po2030_NoFliker, po2030_NoFliker, 6055 {po2030_NoFliker, po2030_NoFliker,
6214 po2030_50HZ, po2030_50HZ, 6056 po2030_50HZ, po2030_50HZ,
6215 po2030_60HZ, po2030_60HZ}, 6057 po2030_60HZ, po2030_60HZ},
6216 [SENSOR_TAS5130CK] =
6217 {tas5130c_NoFliker, tas5130c_NoFlikerScale,
6218 tas5130c_50HZ, tas5130c_50HZScale,
6219 tas5130c_60HZ, tas5130c_60HZScale},
6220 [SENSOR_TAS5130C] = 6058 [SENSOR_TAS5130C] =
6221 {tas5130c_NoFliker, tas5130c_NoFlikerScale, 6059 {tas5130c_NoFliker, tas5130c_NoFlikerScale,
6222 tas5130c_50HZ, tas5130c_50HZScale, 6060 tas5130c_50HZ, tas5130c_50HZScale,
@@ -6280,7 +6118,8 @@ static void send_unknown(struct gspca_dev *gspca_dev, int sensor)
6280 case SENSOR_ADCM2700: 6118 case SENSOR_ADCM2700:
6281 case SENSOR_GC0305: 6119 case SENSOR_GC0305:
6282 case SENSOR_OV7620: 6120 case SENSOR_OV7620:
6283 case SENSOR_MI0360SOC: 6121 case SENSOR_MT9V111_1:
6122 case SENSOR_MT9V111_3:
6284 case SENSOR_PB0330: 6123 case SENSOR_PB0330:
6285 case SENSOR_PO2030: 6124 case SENSOR_PO2030:
6286 reg_w(gspca_dev, 0x0d, 0x003a); 6125 reg_w(gspca_dev, 0x0d, 0x003a);
@@ -6424,11 +6263,11 @@ struct sensor_by_chipset_revision {
6424}; 6263};
6425static const struct sensor_by_chipset_revision chipset_revision_sensor[] = { 6264static const struct sensor_by_chipset_revision chipset_revision_sensor[] = {
6426 {0xc000, 0x12}, /* TAS5130C */ 6265 {0xc000, 0x12}, /* TAS5130C */
6427 {0xc001, 0x13}, /* MI0360SOC */ 6266 {0xc001, 0x13}, /* MT9V111 */
6428 {0xe001, 0x13}, 6267 {0xe001, 0x13},
6429 {0x8001, 0x13}, 6268 {0x8001, 0x13},
6430 {0x8000, 0x14}, /* CS2102K */ 6269 {0x8000, 0x14}, /* CS2102K */
6431 {0x8400, 0x15}, /* TAS5130K */ 6270 {0x8400, 0x15}, /* MT9V111 */
6432 {0xe400, 0x15}, 6271 {0xe400, 0x15},
6433}; 6272};
6434 6273
@@ -6580,6 +6419,11 @@ static int sd_config(struct gspca_dev *gspca_dev,
6580{ 6419{
6581 struct sd *sd = (struct sd *) gspca_dev; 6420 struct sd *sd = (struct sd *) gspca_dev;
6582 6421
6422 if (id->idProduct == 0x301b)
6423 sd->bridge = BRIDGE_ZC301;
6424 else
6425 sd->bridge = BRIDGE_ZC303;
6426
6583 /* define some sensors from the vendor/product */ 6427 /* define some sensors from the vendor/product */
6584 sd->sensor = id->driver_info; 6428 sd->sensor = id->driver_info;
6585 6429
@@ -6609,14 +6453,14 @@ static int sd_init(struct gspca_dev *gspca_dev)
6609 [SENSOR_HV7131R] = 4, 6453 [SENSOR_HV7131R] = 4,
6610 [SENSOR_ICM105A] = 4, 6454 [SENSOR_ICM105A] = 4,
6611 [SENSOR_MC501CB] = 4, 6455 [SENSOR_MC501CB] = 4,
6612 [SENSOR_MI0360SOC] = 4, 6456 [SENSOR_MT9V111_1] = 4,
6457 [SENSOR_MT9V111_3] = 4,
6613 [SENSOR_OV7620] = 3, 6458 [SENSOR_OV7620] = 3,
6614 [SENSOR_OV7630C] = 4, 6459 [SENSOR_OV7630C] = 4,
6615 [SENSOR_PAS106] = 4, 6460 [SENSOR_PAS106] = 4,
6616 [SENSOR_PAS202B] = 4, 6461 [SENSOR_PAS202B] = 4,
6617 [SENSOR_PB0330] = 4, 6462 [SENSOR_PB0330] = 4,
6618 [SENSOR_PO2030] = 4, 6463 [SENSOR_PO2030] = 4,
6619 [SENSOR_TAS5130CK] = 4,
6620 [SENSOR_TAS5130C] = 3, 6464 [SENSOR_TAS5130C] = 3,
6621 [SENSOR_TAS5130C_VF0250] = 3, 6465 [SENSOR_TAS5130C_VF0250] = 3,
6622 }; 6466 };
@@ -6630,14 +6474,14 @@ static int sd_init(struct gspca_dev *gspca_dev)
6630 [SENSOR_HV7131R] = 1, 6474 [SENSOR_HV7131R] = 1,
6631 [SENSOR_ICM105A] = 1, 6475 [SENSOR_ICM105A] = 1,
6632 [SENSOR_MC501CB] = 2, 6476 [SENSOR_MC501CB] = 2,
6633 [SENSOR_MI0360SOC] = 1, 6477 [SENSOR_MT9V111_1] = 1,
6478 [SENSOR_MT9V111_3] = 1,
6634 [SENSOR_OV7620] = 2, 6479 [SENSOR_OV7620] = 2,
6635 [SENSOR_OV7630C] = 1, 6480 [SENSOR_OV7630C] = 1,
6636 [SENSOR_PAS106] = 0, 6481 [SENSOR_PAS106] = 0,
6637 [SENSOR_PAS202B] = 1, 6482 [SENSOR_PAS202B] = 1,
6638 [SENSOR_PB0330] = 1, 6483 [SENSOR_PB0330] = 1,
6639 [SENSOR_PO2030] = 1, 6484 [SENSOR_PO2030] = 1,
6640 [SENSOR_TAS5130CK] = 1,
6641 [SENSOR_TAS5130C] = 1, 6485 [SENSOR_TAS5130C] = 1,
6642 [SENSOR_TAS5130C_VF0250] = 1, 6486 [SENSOR_TAS5130C_VF0250] = 1,
6643 }; 6487 };
@@ -6722,10 +6566,13 @@ static int sd_init(struct gspca_dev *gspca_dev)
6722 sd->sensor = SENSOR_HV7131R; 6566 sd->sensor = SENSOR_HV7131R;
6723 break; 6567 break;
6724 case 0x13: 6568 case 0x13:
6569 case 0x15:
6725 PDEBUG(D_PROBE, 6570 PDEBUG(D_PROBE,
6726 "Find Sensor MI0360SOC. Chip revision %x", 6571 "Sensor MT9V111. Chip revision %04x",
6727 sd->chip_revision); 6572 sd->chip_revision);
6728 sd->sensor = SENSOR_MI0360SOC; 6573 sd->sensor = sd->bridge == BRIDGE_ZC301
6574 ? SENSOR_MT9V111_1
6575 : SENSOR_MT9V111_3;
6729 break; 6576 break;
6730 case 0x14: 6577 case 0x14:
6731 PDEBUG(D_PROBE, 6578 PDEBUG(D_PROBE,
@@ -6733,12 +6580,6 @@ static int sd_init(struct gspca_dev *gspca_dev)
6733 sd->chip_revision); 6580 sd->chip_revision);
6734 sd->sensor = SENSOR_CS2102K; 6581 sd->sensor = SENSOR_CS2102K;
6735 break; 6582 break;
6736 case 0x15:
6737 PDEBUG(D_PROBE,
6738 "Find Sensor TAS5130CK?. Chip revision %x",
6739 sd->chip_revision);
6740 sd->sensor = SENSOR_TAS5130CK;
6741 break;
6742 case 0x16: 6583 case 0x16:
6743 PDEBUG(D_PROBE, "Find Sensor ADCM2700"); 6584 PDEBUG(D_PROBE, "Find Sensor ADCM2700");
6744 sd->sensor = SENSOR_ADCM2700; 6585 sd->sensor = SENSOR_ADCM2700;
@@ -6831,8 +6672,10 @@ static int sd_start(struct gspca_dev *gspca_dev)
6831 {icm105a_Initial, icm105a_InitialScale}, 6672 {icm105a_Initial, icm105a_InitialScale},
6832 [SENSOR_MC501CB] = 6673 [SENSOR_MC501CB] =
6833 {mc501cb_Initial, mc501cb_InitialScale}, 6674 {mc501cb_Initial, mc501cb_InitialScale},
6834 [SENSOR_MI0360SOC] = 6675 [SENSOR_MT9V111_1] =
6835 {mi0360soc_Initial, mi0360soc_InitialScale}, 6676 {mt9v111_1_Initial, mt9v111_1_InitialScale},
6677 [SENSOR_MT9V111_3] =
6678 {mt9v111_3_Initial, mt9v111_3_InitialScale},
6836 [SENSOR_OV7620] = 6679 [SENSOR_OV7620] =
6837 {ov7620_Initial, ov7620_InitialScale}, 6680 {ov7620_Initial, ov7620_InitialScale},
6838 [SENSOR_OV7630C] = 6681 [SENSOR_OV7630C] =
@@ -6845,8 +6688,6 @@ static int sd_start(struct gspca_dev *gspca_dev)
6845 {pb0330_Initial, pb0330_InitialScale}, 6688 {pb0330_Initial, pb0330_InitialScale},
6846 [SENSOR_PO2030] = 6689 [SENSOR_PO2030] =
6847 {po2030_Initial, po2030_InitialScale}, 6690 {po2030_Initial, po2030_InitialScale},
6848 [SENSOR_TAS5130CK] =
6849 {tas5130cK_Initial, tas5130cK_InitialScale},
6850 [SENSOR_TAS5130C] = 6691 [SENSOR_TAS5130C] =
6851 {tas5130c_Initial, tas5130c_InitialScale}, 6692 {tas5130c_Initial, tas5130c_InitialScale},
6852 [SENSOR_TAS5130C_VF0250] = 6693 [SENSOR_TAS5130C_VF0250] =
@@ -6916,7 +6757,6 @@ static int sd_start(struct gspca_dev *gspca_dev)
6916 case SENSOR_CS2102K: /* gamma set in xxx_Initial */ 6757 case SENSOR_CS2102K: /* gamma set in xxx_Initial */
6917 case SENSOR_HDCS2020b: 6758 case SENSOR_HDCS2020b:
6918 case SENSOR_OV7630C: 6759 case SENSOR_OV7630C:
6919 case SENSOR_TAS5130CK:
6920 break; 6760 break;
6921 default: 6761 default:
6922 setcontrast(gspca_dev); 6762 setcontrast(gspca_dev);