aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-11-06 13:35:21 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-30 06:38:01 -0500
commit13563f44a27a07dfade36662903037edbf8a6e01 (patch)
tree3b65d3cc9f1cb6079e2c9ed8f0271ccfc1524eda
parentf7823f8f437fbbd41155f2312ef17e471199b706 (diff)
V4L/DVB (9558): gspca: Add the light frequency control for the sensor HV7131B in zc3xx
Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/gspca/zc3xx.c278
1 files changed, 154 insertions, 124 deletions
diff --git a/drivers/media/video/gspca/zc3xx.c b/drivers/media/video/gspca/zc3xx.c
index 0befacf49855..7c1eaa823315 100644
--- a/drivers/media/video/gspca/zc3xx.c
+++ b/drivers/media/video/gspca/zc3xx.c
@@ -2310,67 +2310,6 @@ static const struct usb_action hv7131bxx_Initial[] = { /* 320x240 */
2310 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, 2310 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
2311 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, 2311 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
2312 {0xaa, 0x02, 0x0090}, /* 00,02,80,aa */ 2312 {0xaa, 0x02, 0x0090}, /* 00,02,80,aa */
2313 {0xa1, 0x01, 0x0002},
2314 {0xa0, 0x00, ZC3XX_R092_I2CADDRESSSELECT},
2315 {0xa0, 0x02, ZC3XX_R090_I2CCOMMAND},
2316 {0xa1, 0x01, 0x0091},
2317 {0xa1, 0x01, 0x0095},
2318 {0xa1, 0x01, 0x0096},
2319
2320 {0xa1, 0x01, 0x0008},
2321 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */
2322 {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */
2323 {0xa1, 0x01, 0x01c8},
2324 {0xa1, 0x01, 0x01c9},
2325 {0xa1, 0x01, 0x01ca},
2326 {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */
2327
2328 {0xa0, 0x50, ZC3XX_R10A_RGB00}, /* matrix */
2329 {0xa0, 0xf8, ZC3XX_R10B_RGB01},
2330 {0xa0, 0xf8, ZC3XX_R10C_RGB02},
2331 {0xa0, 0xf8, ZC3XX_R10D_RGB10},
2332 {0xa0, 0x50, ZC3XX_R10E_RGB11},
2333 {0xa0, 0xf8, ZC3XX_R10F_RGB12},
2334 {0xa0, 0xf8, ZC3XX_R110_RGB20},
2335 {0xa0, 0xf8, ZC3XX_R111_RGB21},
2336 {0xa0, 0x50, ZC3XX_R112_RGB22},
2337 {0xa1, 0x01, 0x0180},
2338 {0xa0, 0x10, ZC3XX_R180_AUTOCORRECTENABLE},
2339 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
2340 {0xaa, 0x25, 0x0007},
2341 {0xaa, 0x26, 0x00a1},
2342 {0xaa, 0x27, 0x0020},
2343 {0xaa, 0x20, 0x0000},
2344 {0xaa, 0x21, 0x00a0},
2345 {0xaa, 0x22, 0x0016},
2346 {0xaa, 0x23, 0x0040},
2347
2348 {0xa0, 0x10, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 2F */
2349 {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 4d */
2350 {0xa0, 0x60, ZC3XX_R192_EXPOSURELIMITLOW},
2351 {0xa0, 0x01, ZC3XX_R195_ANTIFLICKERHIGH},
2352 {0xa0, 0x86, ZC3XX_R196_ANTIFLICKERMID},
2353 {0xa0, 0xa0, ZC3XX_R197_ANTIFLICKERLOW},
2354 {0xa0, 0x07, ZC3XX_R18C_AEFREEZE},
2355 {0xa0, 0x0f, ZC3XX_R18F_AEUNFREEZE},
2356 {0xa0, 0x18, ZC3XX_R1A9_DIGITALLIMITDIFF},
2357 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
2358 {0xa0, 0x00, ZC3XX_R01D_HSYNC_0},
2359 {0xa0, 0xa0, ZC3XX_R01E_HSYNC_1},
2360 {0xa0, 0x16, ZC3XX_R01F_HSYNC_2},
2361 {0xa0, 0x40, ZC3XX_R020_HSYNC_3},
2362 {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},
2363 {0xa1, 0x01, 0x001d},
2364 {0xa1, 0x01, 0x001e},
2365 {0xa1, 0x01, 0x001f},
2366 {0xa1, 0x01, 0x0020},
2367 {0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE},
2368 {0xa1, 0x01, 0x0180},
2369 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
2370 {0xa0, 0x40, ZC3XX_R116_RGAIN},
2371 {0xa0, 0x40, ZC3XX_R117_GGAIN},
2372 {0xa0, 0x40, ZC3XX_R118_BGAIN},
2373/* {0xa0, 0x02, ZC3XX_R008_CLOCKSETTING}, */
2374 {} 2313 {}
2375}; 2314};
2376 2315
@@ -2418,65 +2357,156 @@ static const struct usb_action hv7131bxx_InitialScale[] = { /* 640x480*/
2418 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, 2357 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
2419 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, 2358 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
2420 {0xaa, 0x02, 0x0090}, /* {0xaa, 0x02, 0x0080}, */ 2359 {0xaa, 0x02, 0x0090}, /* {0xaa, 0x02, 0x0080}, */
2421 {0xa1, 0x01, 0x0002}, 2360 {}
2422 {0xa0, 0x00, ZC3XX_R092_I2CADDRESSSELECT}, 2361};
2423 {0xa0, 0x02, ZC3XX_R090_I2CCOMMAND}, 2362static const struct usb_action hv7131b_50HZ[] = { /* 640x480*/
2424 {0xa1, 0x01, 0x0091}, 2363 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */
2425 {0xa1, 0x01, 0x0095}, 2364 {0xaa, 0x25, 0x0007}, /* 00,25,07,aa */
2426 {0xa1, 0x01, 0x0096}, 2365 {0xaa, 0x26, 0x0053}, /* 00,26,53,aa */
2427 {0xa1, 0x01, 0x0008}, 2366 {0xaa, 0x27, 0x0000}, /* 00,27,00,aa */
2428 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */ 2367 {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */
2429 {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ 2368 {0xaa, 0x21, 0x0050}, /* 00,21,50,aa */
2430 {0xa1, 0x01, 0x01c8}, 2369 {0xaa, 0x22, 0x001b}, /* 00,22,1b,aa */
2431 {0xa1, 0x01, 0x01c9}, 2370 {0xaa, 0x23, 0x00fc}, /* 00,23,fc,aa */
2432 {0xa1, 0x01, 0x01ca}, 2371 {0xa0, 0x2f, ZC3XX_R190_SYNC00LOW}, /* 01,90,2f,cc */
2433 {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ 2372 {0xa0, 0x9b, ZC3XX_R191_SYNC00MID}, /* 01,91,9b,cc */
2434 2373 {0xa0, 0x80, ZC3XX_R192_SYNC00HIGH}, /* 01,92,80,cc */
2435 {0xa0, 0x50, ZC3XX_R10A_RGB00}, /* matrix */ 2374 {0xa0, 0x00, ZC3XX_R195_SYNC01LOW}, /* 01,95,00,cc */
2436 {0xa0, 0xf8, ZC3XX_R10B_RGB01}, 2375 {0xa0, 0xea, ZC3XX_R196_SYNC01MID}, /* 01,96,ea,cc */
2437 {0xa0, 0xf8, ZC3XX_R10C_RGB02}, 2376 {0xa0, 0x60, ZC3XX_R197_SYNC01HIGH}, /* 01,97,60,cc */
2438 {0xa0, 0xf8, ZC3XX_R10D_RGB10}, 2377 {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0c,cc */
2439 {0xa0, 0x50, ZC3XX_R10E_RGB11}, 2378 {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,18,cc */
2440 {0xa0, 0xf8, ZC3XX_R10F_RGB12}, 2379 {0xa0, 0x18, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,18,cc */
2441 {0xa0, 0xf8, ZC3XX_R110_RGB20}, 2380 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */
2442 {0xa0, 0xf8, ZC3XX_R111_RGB21}, 2381 {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, /* 00,1d,00,cc */
2443 {0xa0, 0x50, ZC3XX_R112_RGB22}, 2382 {0xa0, 0x50, ZC3XX_R01E_HSYNC_1}, /* 00,1e,50,cc */
2444 {0xa1, 0x01, 0x0180}, 2383 {0xa0, 0x1b, ZC3XX_R01F_HSYNC_2}, /* 00,1f,1b,cc */
2445 {0xa0, 0x10, ZC3XX_R180_AUTOCORRECTENABLE}, 2384 {0xa0, 0xfc, ZC3XX_R020_HSYNC_3}, /* 00,20,fc,cc */
2446 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, 2385 {}
2447 {0xaa, 0x25, 0x0007}, 2386};
2448 {0xaa, 0x26, 0x00a1}, 2387static const struct usb_action hv7131b_50HZScale[] = { /* 320x240 */
2449 {0xaa, 0x27, 0x0020}, 2388 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */
2450 {0xaa, 0x20, 0x0000}, 2389 {0xaa, 0x25, 0x0007}, /* 00,25,07,aa */
2451 {0xaa, 0x21, 0x0040}, 2390 {0xaa, 0x26, 0x0053}, /* 00,26,53,aa */
2452 {0xaa, 0x22, 0x0013}, 2391 {0xaa, 0x27, 0x0000}, /* 00,27,00,aa */
2453 {0xaa, 0x23, 0x004c}, 2392 {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */
2454 {0xa0, 0x10, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 2f */ 2393 {0xaa, 0x21, 0x0050}, /* 00,21,50,aa */
2455 {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 4d */ 2394 {0xaa, 0x22, 0x0012}, /* 00,22,12,aa */
2456 {0xa0, 0x60, ZC3XX_R192_EXPOSURELIMITLOW}, /* 60 */ 2395 {0xaa, 0x23, 0x0080}, /* 00,23,80,aa */
2457 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, 2396 {0xa0, 0x2f, ZC3XX_R190_SYNC00LOW}, /* 01,90,2f,cc */
2458 {0xa0, 0xc3, ZC3XX_R196_ANTIFLICKERMID}, 2397 {0xa0, 0x9b, ZC3XX_R191_SYNC00MID}, /* 01,91,9b,cc */
2459 {0xa0, 0x50, ZC3XX_R197_ANTIFLICKERLOW}, 2398 {0xa0, 0x80, ZC3XX_R192_SYNC00HIGH}, /* 01,92,80,cc */
2460 {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, 2399 {0xa0, 0x01, ZC3XX_R195_SYNC01LOW}, /* 01,95,01,cc */
2461 {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, 2400 {0xa0, 0xd4, ZC3XX_R196_SYNC01MID}, /* 01,96,d4,cc */
2462 {0xa0, 0x18, ZC3XX_R1A9_DIGITALLIMITDIFF}, 2401 {0xa0, 0xc0, ZC3XX_R197_SYNC01HIGH}, /* 01,97,c0,cc */
2463 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, 2402 {0xa0, 0x07, ZC3XX_R18C_AEFREEZE}, /* 01,8c,07,cc */
2464 {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, 2403 {0xa0, 0x0f, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,0f,cc */
2465 {0xa0, 0x40, ZC3XX_R01E_HSYNC_1}, 2404 {0xa0, 0x18, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,18,cc */
2466 {0xa0, 0x13, ZC3XX_R01F_HSYNC_2}, 2405 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */
2467 {0xa0, 0x4c, ZC3XX_R020_HSYNC_3}, 2406 {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, /* 00,1d,00,cc */
2468 {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, 2407 {0xa0, 0x50, ZC3XX_R01E_HSYNC_1}, /* 00,1e,50,cc */
2469 {0xa1, 0x01, 0x001d}, 2408 {0xa0, 0x12, ZC3XX_R01F_HSYNC_2}, /* 00,1f,12,cc */
2470 {0xa1, 0x01, 0x001e}, 2409 {0xa0, 0x80, ZC3XX_R020_HSYNC_3}, /* 00,20,80,cc */
2471 {0xa1, 0x01, 0x001f}, 2410 {}
2472 {0xa1, 0x01, 0x0020}, 2411};
2473 {0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE}, 2412static const struct usb_action hv7131b_60HZ[] = { /* 640x480*/
2474 {0xa1, 0x01, 0x0180}, 2413 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */
2475 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, 2414 {0xaa, 0x25, 0x0007}, /* 00,25,07,aa */
2476 {0xa0, 0x40, ZC3XX_R116_RGAIN}, 2415 {0xaa, 0x26, 0x00a1}, /* 00,26,a1,aa */
2477 {0xa0, 0x40, ZC3XX_R117_GGAIN}, 2416 {0xaa, 0x27, 0x0020}, /* 00,27,20,aa */
2478 {0xa0, 0x40, ZC3XX_R118_BGAIN}, 2417 {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */
2479/* {0xa0, 0x02, ZC3XX_R008_CLOCKSETTING}, */ 2418 {0xaa, 0x21, 0x0040}, /* 00,21,40,aa */
2419 {0xaa, 0x22, 0x0013}, /* 00,22,13,aa */
2420 {0xaa, 0x23, 0x004c}, /* 00,23,4c,aa */
2421 {0xa0, 0x2f, ZC3XX_R190_SYNC00LOW}, /* 01,90,2f,cc */
2422 {0xa0, 0x4d, ZC3XX_R191_SYNC00MID}, /* 01,91,4d,cc */
2423 {0xa0, 0x60, ZC3XX_R192_SYNC00HIGH}, /* 01,92,60,cc */
2424 {0xa0, 0x00, ZC3XX_R195_SYNC01LOW}, /* 01,95,00,cc */
2425 {0xa0, 0xc3, ZC3XX_R196_SYNC01MID}, /* 01,96,c3,cc */
2426 {0xa0, 0x50, ZC3XX_R197_SYNC01HIGH}, /* 01,97,50,cc */
2427 {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0c,cc */
2428 {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,18,cc */
2429 {0xa0, 0x18, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,18,cc */
2430 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */
2431 {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, /* 00,1d,00,cc */
2432 {0xa0, 0x40, ZC3XX_R01E_HSYNC_1}, /* 00,1e,40,cc */
2433 {0xa0, 0x13, ZC3XX_R01F_HSYNC_2}, /* 00,1f,13,cc */
2434 {0xa0, 0x4c, ZC3XX_R020_HSYNC_3}, /* 00,20,4c,cc */
2435 {}
2436};
2437static const struct usb_action hv7131b_60HZScale[] = { /* 320x240 */
2438 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */
2439 {0xaa, 0x25, 0x0007}, /* 00,25,07,aa */
2440 {0xaa, 0x26, 0x00a1}, /* 00,26,a1,aa */
2441 {0xaa, 0x27, 0x0020}, /* 00,27,20,aa */
2442 {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */
2443 {0xaa, 0x21, 0x00a0}, /* 00,21,a0,aa */
2444 {0xaa, 0x22, 0x0016}, /* 00,22,16,aa */
2445 {0xaa, 0x23, 0x0040}, /* 00,23,40,aa */
2446 {0xa0, 0x2f, ZC3XX_R190_SYNC00LOW}, /* 01,90,2f,cc */
2447 {0xa0, 0x4d, ZC3XX_R191_SYNC00MID}, /* 01,91,4d,cc */
2448 {0xa0, 0x60, ZC3XX_R192_SYNC00HIGH}, /* 01,92,60,cc */
2449 {0xa0, 0x01, ZC3XX_R195_SYNC01LOW}, /* 01,95,01,cc */
2450 {0xa0, 0x86, ZC3XX_R196_SYNC01MID}, /* 01,96,86,cc */
2451 {0xa0, 0xa0, ZC3XX_R197_SYNC01HIGH}, /* 01,97,a0,cc */
2452 {0xa0, 0x07, ZC3XX_R18C_AEFREEZE}, /* 01,8c,07,cc */
2453 {0xa0, 0x0f, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,0f,cc */
2454 {0xa0, 0x18, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,18,cc */
2455 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */
2456 {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, /* 00,1d,00,cc */
2457 {0xa0, 0xa0, ZC3XX_R01E_HSYNC_1}, /* 00,1e,a0,cc */
2458 {0xa0, 0x16, ZC3XX_R01F_HSYNC_2}, /* 00,1f,16,cc */
2459 {0xa0, 0x40, ZC3XX_R020_HSYNC_3}, /* 00,20,40,cc */
2460 {}
2461};
2462static const struct usb_action hv7131b_NoFliker[] = { /* 640x480*/
2463 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */
2464 {0xaa, 0x25, 0x0003}, /* 00,25,03,aa */
2465 {0xaa, 0x26, 0x0000}, /* 00,26,00,aa */
2466 {0xaa, 0x27, 0x0000}, /* 00,27,00,aa */
2467 {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */
2468 {0xaa, 0x21, 0x0010}, /* 00,21,10,aa */
2469 {0xaa, 0x22, 0x0000}, /* 00,22,00,aa */
2470 {0xaa, 0x23, 0x0003}, /* 00,23,03,aa */
2471 {0xa0, 0x2f, ZC3XX_R190_SYNC00LOW}, /* 01,90,2f,cc */
2472 {0xa0, 0xf8, ZC3XX_R191_SYNC00MID}, /* 01,91,f8,cc */
2473 {0xa0, 0x00, ZC3XX_R192_SYNC00HIGH}, /* 01,92,00,cc */
2474 {0xa0, 0x00, ZC3XX_R195_SYNC01LOW}, /* 01,95,00,cc */
2475 {0xa0, 0x02, ZC3XX_R196_SYNC01MID}, /* 01,96,02,cc */
2476 {0xa0, 0x00, ZC3XX_R197_SYNC01HIGH}, /* 01,97,00,cc */
2477 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */
2478 {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */
2479 {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */
2480 {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,00,cc */
2481 {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, /* 00,1d,00,cc */
2482 {0xa0, 0x10, ZC3XX_R01E_HSYNC_1}, /* 00,1e,10,cc */
2483 {0xa0, 0x00, ZC3XX_R01F_HSYNC_2}, /* 00,1f,00,cc */
2484 {0xa0, 0x03, ZC3XX_R020_HSYNC_3}, /* 00,20,03,cc */
2485 {}
2486};
2487static const struct usb_action hv7131b_NoFlikerScale[] = { /* 320x240 */
2488 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */
2489 {0xaa, 0x25, 0x0003}, /* 00,25,03,aa */
2490 {0xaa, 0x26, 0x0000}, /* 00,26,00,aa */
2491 {0xaa, 0x27, 0x0000}, /* 00,27,00,aa */
2492 {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */
2493 {0xaa, 0x21, 0x00a0}, /* 00,21,a0,aa */
2494 {0xaa, 0x22, 0x0016}, /* 00,22,16,aa */
2495 {0xaa, 0x23, 0x0040}, /* 00,23,40,aa */
2496 {0xa0, 0x2f, ZC3XX_R190_SYNC00LOW}, /* 01,90,2f,cc */
2497 {0xa0, 0xf8, ZC3XX_R191_SYNC00MID}, /* 01,91,f8,cc */
2498 {0xa0, 0x00, ZC3XX_R192_SYNC00HIGH}, /* 01,92,00,cc */
2499 {0xa0, 0x00, ZC3XX_R195_SYNC01LOW}, /* 01,95,00,cc */
2500 {0xa0, 0x02, ZC3XX_R196_SYNC01MID}, /* 01,96,02,cc */
2501 {0xa0, 0x00, ZC3XX_R197_SYNC01HIGH}, /* 01,97,00,cc */
2502 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */
2503 {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */
2504 {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */
2505 {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,00,cc */
2506 {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, /* 00,1d,00,cc */
2507 {0xa0, 0xa0, ZC3XX_R01E_HSYNC_1}, /* 00,1e,a0,cc */
2508 {0xa0, 0x16, ZC3XX_R01F_HSYNC_2}, /* 00,1f,16,cc */
2509 {0xa0, 0x40, ZC3XX_R020_HSYNC_3}, /* 00,20,40,cc */
2480 {} 2510 {}
2481}; 2511};
2482 2512
@@ -6353,6 +6383,7 @@ static void setmatrix(struct gspca_dev *gspca_dev)
6353 6383
6354 switch (sd->sensor) { 6384 switch (sd->sensor) {
6355 case SENSOR_GC0305: 6385 case SENSOR_GC0305:
6386 case SENSOR_HV7131B:
6356 matrix = gc0305_matrix; 6387 matrix = gc0305_matrix;
6357 break; 6388 break;
6358 case SENSOR_MC501CB: 6389 case SENSOR_MC501CB:
@@ -6594,9 +6625,9 @@ static int setlightfreq(struct gspca_dev *gspca_dev)
6594 hdcs2020b_50HZ, hdcs2020b_50HZ, 6625 hdcs2020b_50HZ, hdcs2020b_50HZ,
6595 hdcs2020b_60HZ, hdcs2020b_60HZ}, 6626 hdcs2020b_60HZ, hdcs2020b_60HZ},
6596/* SENSOR_HV7131B 5 */ 6627/* SENSOR_HV7131B 5 */
6597 {NULL, NULL, 6628 {hv7131b_NoFlikerScale, hv7131b_NoFliker,
6598 NULL, NULL, 6629 hv7131b_50HZScale, hv7131b_50HZ,
6599 NULL, NULL}, 6630 hv7131b_60HZScale, hv7131b_60HZ},
6600/* SENSOR_HV7131C 6 */ 6631/* SENSOR_HV7131C 6 */
6601 {NULL, NULL, 6632 {NULL, NULL,
6602 NULL, NULL, 6633 NULL, NULL,
@@ -7153,7 +7184,6 @@ static int sd_config(struct gspca_dev *gspca_dev,
7153 sd->gamma = gamma[(int) sd->sensor]; 7184 sd->gamma = gamma[(int) sd->sensor];
7154 sd->autogain = sd_ctrls[SD_AUTOGAIN].qctrl.default_value; 7185 sd->autogain = sd_ctrls[SD_AUTOGAIN].qctrl.default_value;
7155 sd->lightfreq = sd_ctrls[SD_FREQ].qctrl.default_value; 7186 sd->lightfreq = sd_ctrls[SD_FREQ].qctrl.default_value;
7156 sd->sharpness = sd_ctrls[SD_SHARPNESS].qctrl.default_value;
7157 7187
7158 switch (sd->sensor) { 7188 switch (sd->sensor) {
7159 case SENSOR_GC0305: 7189 case SENSOR_GC0305: