aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/zc3xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/gspca/zc3xx.c')
-rw-r--r--drivers/media/video/gspca/zc3xx.c117
1 files changed, 50 insertions, 67 deletions
diff --git a/drivers/media/video/gspca/zc3xx.c b/drivers/media/video/gspca/zc3xx.c
index 0202fead6b97..b9e15bb0328b 100644
--- a/drivers/media/video/gspca/zc3xx.c
+++ b/drivers/media/video/gspca/zc3xx.c
@@ -5381,12 +5381,12 @@ static const struct usb_action tas5130c_NoFlikerScale[] = {
5381 {} 5381 {}
5382}; 5382};
5383 5383
5384static const struct usb_action gc0303_InitialScale[] = { 5384/* from usbvm305.inf 0ac8:305b 07/06/15 (3 - tas5130c) */
5385static const struct usb_action gc0303_Initial[] = {
5385 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc, */ 5386 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc, */
5386 {0xa0, 0x02, ZC3XX_R008_CLOCKSETTING}, /* 00,08,02,cc, */ 5387 {0xa0, 0x02, ZC3XX_R008_CLOCKSETTING}, /* 00,08,02,cc, */
5387 {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc, */ 5388 {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc, */
5388 {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, /* 00,02,00,cc, 5389 {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT},
5389 * 0<->10 */
5390 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc, */ 5390 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc, */
5391 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc, */ 5391 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc, */
5392 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc, */ 5392 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc, */
@@ -5405,29 +5405,22 @@ static const struct usb_action gc0303_InitialScale[] = {
5405 * 6<->8 */ 5405 * 6<->8 */
5406 {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID}, /* 00,87,10,cc, */ 5406 {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID}, /* 00,87,10,cc, */
5407 {0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,98,cc, */ 5407 {0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,98,cc, */
5408 {0xaa, 0x1b, 0x0024}, /* 00,1b,24,aa, */
5409 {0xdd, 0x00, 0x0080}, /* 00,00,80,dd, */
5410 {0xaa, 0x1b, 0x0000}, /* 00,1b,00,aa, */
5411 {0xaa, 0x13, 0x0002}, /* 00,13,02,aa, */
5412 {0xaa, 0x15, 0x0004}, /* 00,15,04,aa */
5413/*?? {0xaa, 0x01, 0x0000}, */
5414 {0xaa, 0x01, 0x0000}, 5408 {0xaa, 0x01, 0x0000},
5415 {0xaa, 0x1a, 0x0000}, /* 00,1a,00,aa, */ 5409 {0xaa, 0x1a, 0x0000}, /* 00,1a,00,aa, */
5416 {0xaa, 0x1c, 0x0017}, /* 00,1c,17,aa, */ 5410 {0xaa, 0x1c, 0x0017}, /* 00,1c,17,aa, */
5411 {0xaa, 0x1b, 0x0000},
5417 {0xa0, 0x82, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,82,cc, */ 5412 {0xa0, 0x82, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,82,cc, */
5418 {0xa0, 0x83, ZC3XX_R087_EXPTIMEMID}, /* 00,87,83,cc, */ 5413 {0xa0, 0x83, ZC3XX_R087_EXPTIMEMID}, /* 00,87,83,cc, */
5419 {0xa0, 0x84, ZC3XX_R088_EXPTIMELOW}, /* 00,88,84,cc, */ 5414 {0xa0, 0x84, ZC3XX_R088_EXPTIMELOW}, /* 00,88,84,cc, */
5420 {0xaa, 0x05, 0x0010}, /* 00,05,10,aa, */ 5415 {0xaa, 0x05, 0x0010}, /* 00,05,10,aa, */
5421 {0xaa, 0x0a, 0x0000}, /* 00,0a,00,aa, */ 5416 {0xaa, 0x0a, 0x0002},
5422 {0xaa, 0x0b, 0x00a0}, /* 00,0b,a0,aa, */ 5417 {0xaa, 0x0b, 0x0000},
5423 {0xaa, 0x0c, 0x0000}, /* 00,0c,00,aa, */ 5418 {0xaa, 0x0c, 0x0002},
5424 {0xaa, 0x0d, 0x00a0}, /* 00,0d,a0,aa, */ 5419 {0xaa, 0x0d, 0x0000},
5425 {0xaa, 0x0e, 0x0000}, /* 00,0e,00,aa, */ 5420 {0xaa, 0x0e, 0x0002},
5426 {0xaa, 0x0f, 0x00a0}, /* 00,0f,a0,aa, */ 5421 {0xaa, 0x0f, 0x0000},
5427 {0xaa, 0x10, 0x0000}, /* 00,10,00,aa, */ 5422 {0xaa, 0x10, 0x0002},
5428 {0xaa, 0x11, 0x00a0}, /* 00,11,a0,aa, */ 5423 {0xaa, 0x11, 0x0000},
5429/*?? {0xa0, 0x00, 0x0039},
5430 {0xa1, 0x01, 0x0037}, */
5431 {0xaa, 0x16, 0x0001}, /* 00,16,01,aa, */ 5424 {0xaa, 0x16, 0x0001}, /* 00,16,01,aa, */
5432 {0xaa, 0x17, 0x00e8}, /* 00,17,e6,aa, (e6 -> e8) */ 5425 {0xaa, 0x17, 0x00e8}, /* 00,17,e6,aa, (e6 -> e8) */
5433 {0xaa, 0x18, 0x0002}, /* 00,18,02,aa, */ 5426 {0xaa, 0x18, 0x0002}, /* 00,18,02,aa, */
@@ -5442,17 +5435,18 @@ static const struct usb_action gc0303_InitialScale[] = {
5442 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc, */ 5435 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc, */
5443 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc, */ 5436 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc, */
5444 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc, */ 5437 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc, */
5445 {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,60,cc, */ 5438 {0xa0, 0x58, ZC3XX_R1A8_DIGITALGAIN},
5446 {0xa0, 0x61, ZC3XX_R116_RGAIN}, /* 01,16,61,cc, */ 5439 {0xa0, 0x61, ZC3XX_R116_RGAIN}, /* 01,16,61,cc, */
5447 {0xa0, 0x65, ZC3XX_R118_BGAIN}, /* 01,18,65,cc */ 5440 {0xa0, 0x65, ZC3XX_R118_BGAIN}, /* 01,18,65,cc */
5441 {0xaa, 0x1b, 0x0000},
5448 {} 5442 {}
5449}; 5443};
5450 5444
5451static const struct usb_action gc0303_Initial[] = { 5445static const struct usb_action gc0303_InitialScale[] = {
5452 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc, */ 5446 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc, */
5453 {0xa0, 0x02, ZC3XX_R008_CLOCKSETTING}, /* 00,08,02,cc, */ 5447 {0xa0, 0x02, ZC3XX_R008_CLOCKSETTING}, /* 00,08,02,cc, */
5454 {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc, */ 5448 {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc, */
5455 {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, /* 00,02,10,cc, */ 5449 {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT},
5456 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc, */ 5450 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc, */
5457 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc, */ 5451 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc, */
5458 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc, */ 5452 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc, */
@@ -5471,34 +5465,26 @@ static const struct usb_action gc0303_Initial[] = {
5471 * 8<->6 */ 5465 * 8<->6 */
5472 {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID}, /* 00,87,10,cc, */ 5466 {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID}, /* 00,87,10,cc, */
5473 {0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,98,cc, */ 5467 {0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,98,cc, */
5474 {0xaa, 0x1b, 0x0024}, /* 00,1b,24,aa, */
5475 {0xdd, 0x00, 0x0080}, /* 00,00,80,dd, */
5476 {0xaa, 0x1b, 0x0000}, /* 00,1b,00,aa, */
5477 {0xaa, 0x13, 0x0002}, /* 00,13,02,aa, */
5478 {0xaa, 0x15, 0x0004}, /* 00,15,04,aa */
5479/*?? {0xaa, 0x01, 0x0000}, */
5480 {0xaa, 0x01, 0x0000}, 5468 {0xaa, 0x01, 0x0000},
5481 {0xaa, 0x1a, 0x0000}, /* 00,1a,00,aa, */ 5469 {0xaa, 0x1a, 0x0000}, /* 00,1a,00,aa, */
5482 {0xaa, 0x1c, 0x0017}, /* 00,1c,17,aa, */ 5470 {0xaa, 0x1c, 0x0017}, /* 00,1c,17,aa, */
5471 {0xaa, 0x1b, 0x0000},
5483 {0xa0, 0x82, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,82,cc, */ 5472 {0xa0, 0x82, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,82,cc, */
5484 {0xa0, 0x83, ZC3XX_R087_EXPTIMEMID}, /* 00,87,83,cc, */ 5473 {0xa0, 0x83, ZC3XX_R087_EXPTIMEMID}, /* 00,87,83,cc, */
5485 {0xa0, 0x84, ZC3XX_R088_EXPTIMELOW}, /* 00,88,84,cc, */ 5474 {0xa0, 0x84, ZC3XX_R088_EXPTIMELOW}, /* 00,88,84,cc, */
5486 {0xaa, 0x05, 0x0010}, /* 00,05,10,aa, */ 5475 {0xaa, 0x05, 0x0010}, /* 00,05,10,aa, */
5487 {0xaa, 0x0a, 0x0000}, /* 00,0a,00,aa, */ 5476 {0xaa, 0x0a, 0x0001},
5488 {0xaa, 0x0b, 0x00a0}, /* 00,0b,a0,aa, */ 5477 {0xaa, 0x0b, 0x0000},
5489 {0xaa, 0x0c, 0x0000}, /* 00,0c,00,aa, */ 5478 {0xaa, 0x0c, 0x0001},
5490 {0xaa, 0x0d, 0x00a0}, /* 00,0d,a0,aa, */ 5479 {0xaa, 0x0d, 0x0000},
5491 {0xaa, 0x0e, 0x0000}, /* 00,0e,00,aa, */ 5480 {0xaa, 0x0e, 0x0001},
5492 {0xaa, 0x0f, 0x00a0}, /* 00,0f,a0,aa, */ 5481 {0xaa, 0x0f, 0x0000},
5493 {0xaa, 0x10, 0x0000}, /* 00,10,00,aa, */ 5482 {0xaa, 0x10, 0x0001},
5494 {0xaa, 0x11, 0x00a0}, /* 00,11,a0,aa, */ 5483 {0xaa, 0x11, 0x0000},
5495/*?? {0xa0, 0x00, 0x0039},
5496 {0xa1, 0x01, 0x0037}, */
5497 {0xaa, 0x16, 0x0001}, /* 00,16,01,aa, */ 5484 {0xaa, 0x16, 0x0001}, /* 00,16,01,aa, */
5498 {0xaa, 0x17, 0x00e8}, /* 00,17,e6,aa (e6 -> e8) */ 5485 {0xaa, 0x17, 0x00e8}, /* 00,17,e6,aa (e6 -> e8) */
5499 {0xaa, 0x18, 0x0002}, /* 00,18,02,aa, */ 5486 {0xaa, 0x18, 0x0002}, /* 00,18,02,aa, */
5500 {0xaa, 0x19, 0x0088}, /* 00,19,88,aa, */ 5487 {0xaa, 0x19, 0x0088}, /* 00,19,88,aa, */
5501 {0xaa, 0x20, 0x0020}, /* 00,20,20,aa, */
5502 {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,b7,cc, */ 5488 {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,b7,cc, */
5503 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc, */ 5489 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc, */
5504 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc, */ 5490 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc, */
@@ -5508,36 +5494,37 @@ static const struct usb_action gc0303_Initial[] = {
5508 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc, */ 5494 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc, */
5509 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc, */ 5495 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc, */
5510 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc, */ 5496 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc, */
5511 {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,60,cc, */ 5497 {0xa0, 0x58, ZC3XX_R1A8_DIGITALGAIN},
5512 {0xa0, 0x61, ZC3XX_R116_RGAIN}, /* 01,16,61,cc, */ 5498 {0xa0, 0x61, ZC3XX_R116_RGAIN}, /* 01,16,61,cc, */
5513 {0xa0, 0x65, ZC3XX_R118_BGAIN}, /* 01,18,65,cc */ 5499 {0xa0, 0x65, ZC3XX_R118_BGAIN}, /* 01,18,65,cc */
5500 {0xaa, 0x1b, 0x0000},
5514 {} 5501 {}
5515}; 5502};
5516static const struct usb_action gc0303_50HZScale[] = { 5503static const struct usb_action gc0303_50HZ[] = {
5517 {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */ 5504 {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */
5518 {0xaa, 0x83, 0x0001}, /* 00,83,01,aa */ 5505 {0xaa, 0x83, 0x0001}, /* 00,83,01,aa */
5519 {0xaa, 0x84, 0x00aa}, /* 00,84,aa,aa */ 5506 {0xaa, 0x84, 0x0063},
5520 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc, */ 5507 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc, */
5521 {0xa0, 0x06, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,0d,cc, */ 5508 {0xa0, 0x06, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,0d,cc, */
5522 {0xa0, 0xa8, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,50,cc, */ 5509 {0xa0, 0xa8, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,50,cc, */
5523 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc, */ 5510 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc, */
5524 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc, */ 5511 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc, */
5525 {0xa0, 0x8e, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,47,cc, */ 5512 {0xa0, 0x47, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,47,cc, */
5526 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0e,cc, */ 5513 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0e,cc, */
5527 {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,15,cc, */ 5514 {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,15,cc, */
5528 {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc, */ 5515 {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc, */
5529 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc, */ 5516 {0xa0, 0x48, ZC3XX_R1AA_DIGITALGAINSTEP},
5530 {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, /* 00,1d,62,cc, */ 5517 {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, /* 00,1d,62,cc, */
5531 {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, /* 00,1e,90,cc, */ 5518 {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, /* 00,1e,90,cc, */
5532 {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,c8,cc, */ 5519 {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,c8,cc, */
5533 {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc, */ 5520 {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc, */
5534 {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,58,cc, */ 5521 {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,58,cc, */
5535 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc, */ 5522 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc, */
5536 {0xa0, 0x78, ZC3XX_R18D_YTARGET}, /* 01,8d,78,cc */ 5523 {0xa0, 0x7f, ZC3XX_R18D_YTARGET},
5537 {} 5524 {}
5538}; 5525};
5539 5526
5540static const struct usb_action gc0303_50HZ[] = { 5527static const struct usb_action gc0303_50HZScale[] = {
5541 {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */ 5528 {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */
5542 {0xaa, 0x83, 0x0003}, /* 00,83,03,aa */ 5529 {0xaa, 0x83, 0x0003}, /* 00,83,03,aa */
5543 {0xaa, 0x84, 0x0054}, /* 00,84,54,aa */ 5530 {0xaa, 0x84, 0x0054}, /* 00,84,54,aa */
@@ -5550,21 +5537,21 @@ static const struct usb_action gc0303_50HZ[] = {
5550 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0e,cc, */ 5537 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0e,cc, */
5551 {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,15,cc, */ 5538 {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,15,cc, */
5552 {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc, */ 5539 {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc, */
5553 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc, */ 5540 {0xa0, 0x48, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc, */
5554 {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, /* 00,1d,62,cc, */ 5541 {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, /* 00,1d,62,cc, */
5555 {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, /* 00,1e,90,cc, */ 5542 {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, /* 00,1e,90,cc, */
5556 {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,c8,cc, */ 5543 {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,c8,cc, */
5557 {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc, */ 5544 {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc, */
5558 {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,58,cc, */ 5545 {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,58,cc, */
5559 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc, */ 5546 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc, */
5560 {0xa0, 0x78, ZC3XX_R18D_YTARGET}, /* 01,8d,78,cc */ 5547 {0xa0, 0x7f, ZC3XX_R18D_YTARGET},
5561 {} 5548 {}
5562}; 5549};
5563 5550
5564static const struct usb_action gc0303_60HZScale[] = { 5551static const struct usb_action gc0303_60HZ[] = {
5565 {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */ 5552 {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */
5566 {0xaa, 0x83, 0x0001}, /* 00,83,01,aa */ 5553 {0xaa, 0x83, 0x0000},
5567 {0xaa, 0x84, 0x0062}, /* 00,84,62,aa */ 5554 {0xaa, 0x84, 0x003b},
5568 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc, */ 5555 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc, */
5569 {0xa0, 0x05, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,05,cc, */ 5556 {0xa0, 0x05, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,05,cc, */
5570 {0xa0, 0x88, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,88,cc, */ 5557 {0xa0, 0x88, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,88,cc, */
@@ -5581,14 +5568,14 @@ static const struct usb_action gc0303_60HZScale[] = {
5581 {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc, */ 5568 {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc, */
5582 {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,58,cc, */ 5569 {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,58,cc, */
5583 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc, */ 5570 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc, */
5584 {0xa0, 0x78, ZC3XX_R18D_YTARGET}, /* 01,8d,78,cc */ 5571 {0xa0, 0x80, ZC3XX_R18D_YTARGET},
5585 {} 5572 {}
5586}; 5573};
5587 5574
5588static const struct usb_action gc0303_60HZ[] = { 5575static const struct usb_action gc0303_60HZScale[] = {
5589 {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */ 5576 {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */
5590 {0xaa, 0x83, 0x0002}, /* 00,83,02,aa */ 5577 {0xaa, 0x83, 0x0000},
5591 {0xaa, 0x84, 0x00c4}, /* 00,84,c4,aa */ 5578 {0xaa, 0x84, 0x0076},
5592 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc, */ 5579 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc, */
5593 {0xa0, 0x0b, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,1,0b,cc, */ 5580 {0xa0, 0x0b, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,1,0b,cc, */
5594 {0xa0, 0x10, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,2,10,cc, */ 5581 {0xa0, 0x10, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,2,10,cc, */
@@ -5605,18 +5592,18 @@ static const struct usb_action gc0303_60HZ[] = {
5605 {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,0,ff,cc, */ 5592 {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,0,ff,cc, */
5606 {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN}, /* 01,d,58,cc, */ 5593 {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN}, /* 01,d,58,cc, */
5607 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc, */ 5594 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc, */
5608 {0xa0, 0x78, ZC3XX_R18D_YTARGET}, /* 01,d,78,cc */ 5595 {0xa0, 0x80, ZC3XX_R18D_YTARGET},
5609 {} 5596 {}
5610}; 5597};
5611 5598
5612static const struct usb_action gc0303_NoFlikerScale[] = { 5599static const struct usb_action gc0303_NoFliker[] = {
5613 {0xa0, 0x0c, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0c,cc, */ 5600 {0xa0, 0x0c, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0c,cc, */
5614 {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */ 5601 {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */
5615 {0xaa, 0x83, 0x0000}, /* 00,83,00,aa */ 5602 {0xaa, 0x83, 0x0000}, /* 00,83,00,aa */
5616 {0xaa, 0x84, 0x0020}, /* 00,84,20,aa */ 5603 {0xaa, 0x84, 0x0020}, /* 00,84,20,aa */
5617 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,0,00,cc, */ 5604 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,0,00,cc, */
5618 {0xa0, 0x05, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,05,cc, */ 5605 {0xa0, 0x00, ZC3XX_R191_EXPOSURELIMITMID},
5619 {0xa0, 0x88, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,88,cc, */ 5606 {0xa0, 0x48, ZC3XX_R192_EXPOSURELIMITLOW},
5620 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc, */ 5607 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc, */
5621 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc, */ 5608 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc, */
5622 {0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,10,cc, */ 5609 {0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,10,cc, */
@@ -5631,14 +5618,14 @@ static const struct usb_action gc0303_NoFlikerScale[] = {
5631 {} 5618 {}
5632}; 5619};
5633 5620
5634static const struct usb_action gc0303_NoFliker[] = { 5621static const struct usb_action gc0303_NoFlikerScale[] = {
5635 {0xa0, 0x0c, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0c,cc, */ 5622 {0xa0, 0x0c, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0c,cc, */
5636 {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */ 5623 {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */
5637 {0xaa, 0x83, 0x0000}, /* 00,83,00,aa */ 5624 {0xaa, 0x83, 0x0000}, /* 00,83,00,aa */
5638 {0xaa, 0x84, 0x0020}, /* 00,84,20,aa */ 5625 {0xaa, 0x84, 0x0020}, /* 00,84,20,aa */
5639 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc, */ 5626 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc, */
5640 {0xa0, 0x0b, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,0b,cc, */ 5627 {0xa0, 0x00, ZC3XX_R191_EXPOSURELIMITMID},
5641 {0xa0, 0x10, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,10,cc, */ 5628 {0xa0, 0x48, ZC3XX_R192_EXPOSURELIMITLOW},
5642 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc, */ 5629 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc, */
5643 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc, */ 5630 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc, */
5644 {0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,10,cc, */ 5631 {0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,10,cc, */
@@ -5809,7 +5796,7 @@ static void setmatrix(struct gspca_dev *gspca_dev)
5809 static const u8 tas5130c_matrix[9] = 5796 static const u8 tas5130c_matrix[9] =
5810 {0x68, 0xec, 0xec, 0xec, 0x68, 0xec, 0xec, 0xec, 0x68}; 5797 {0x68, 0xec, 0xec, 0xec, 0x68, 0xec, 0xec, 0xec, 0x68};
5811 static const u8 gc0303_matrix[9] = 5798 static const u8 gc0303_matrix[9] =
5812 {0x7b, 0xea, 0xea, 0xea, 0x7b, 0xea, 0xea, 0xea, 0x7b}; 5799 {0x6c, 0xea, 0xea, 0xea, 0x6c, 0xea, 0xea, 0xea, 0x6c};
5813 static const u8 *matrix_tb[SENSOR_MAX] = { 5800 static const u8 *matrix_tb[SENSOR_MAX] = {
5814 [SENSOR_ADCM2700] = adcm2700_matrix, 5801 [SENSOR_ADCM2700] = adcm2700_matrix,
5815 [SENSOR_CS2102] = ov7620_matrix, 5802 [SENSOR_CS2102] = ov7620_matrix,
@@ -6426,10 +6413,6 @@ static int sd_config(struct gspca_dev *gspca_dev,
6426 gspca_dev->cam.ctrls = sd->ctrls; 6413 gspca_dev->cam.ctrls = sd->ctrls;
6427 sd->quality = QUALITY_DEF; 6414 sd->quality = QUALITY_DEF;
6428 6415
6429 /* if USB 1.1, let some bandwidth for the audio device */
6430 if (gspca_dev->audio && gspca_dev->dev->speed < USB_SPEED_HIGH)
6431 gspca_dev->nbalt--;
6432
6433 return 0; 6416 return 0;
6434} 6417}
6435 6418