diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2009-07-27 05:28:37 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-09-12 11:18:19 -0400 |
commit | 8b605f18104c369e838e29a123ed768a7457d3d3 (patch) | |
tree | 6b8fb674a076eeb2ed550a1e136f47e8e3766f5e | |
parent | e27188ee6bed7fae205dfeee0d22fc9fc83a3cb2 (diff) |
V4L/DVB (12355): gspca - vc032x: Cleanup source
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/vc032x.c | 122 |
1 files changed, 57 insertions, 65 deletions
diff --git a/drivers/media/video/gspca/vc032x.c b/drivers/media/video/gspca/vc032x.c index d8e8bdc73fa4..c4ef7811bf60 100644 --- a/drivers/media/video/gspca/vc032x.c +++ b/drivers/media/video/gspca/vc032x.c | |||
@@ -32,14 +32,14 @@ MODULE_LICENSE("GPL"); | |||
32 | struct sd { | 32 | struct sd { |
33 | struct gspca_dev gspca_dev; /* !! must be the first item */ | 33 | struct gspca_dev gspca_dev; /* !! must be the first item */ |
34 | 34 | ||
35 | __u8 hflip; | 35 | u8 hflip; |
36 | __u8 vflip; | 36 | u8 vflip; |
37 | __u8 lightfreq; | 37 | u8 lightfreq; |
38 | __u8 sharpness; | 38 | u8 sharpness; |
39 | 39 | ||
40 | u8 image_offset; | 40 | u8 image_offset; |
41 | 41 | ||
42 | char bridge; | 42 | u8 bridge; |
43 | #define BRIDGE_VC0321 0 | 43 | #define BRIDGE_VC0321 0 |
44 | #define BRIDGE_VC0323 1 | 44 | #define BRIDGE_VC0323 1 |
45 | u8 sensor; | 45 | u8 sensor; |
@@ -192,11 +192,11 @@ static const struct v4l2_pix_format svga_mode[] = { | |||
192 | #define OV7660_MVFP_MIRROR 0x20 | 192 | #define OV7660_MVFP_MIRROR 0x20 |
193 | #define OV7660_MVFP_VFLIP 0x10 | 193 | #define OV7660_MVFP_VFLIP 0x10 |
194 | 194 | ||
195 | static const __u8 mi0360_matrix[9] = { | 195 | static const u8 mi0360_matrix[9] = { |
196 | 0x50, 0xf8, 0xf8, 0xf5, 0x50, 0xfb, 0xff, 0xf1, 0x50 | 196 | 0x50, 0xf8, 0xf8, 0xf5, 0x50, 0xfb, 0xff, 0xf1, 0x50 |
197 | }; | 197 | }; |
198 | 198 | ||
199 | static const __u8 mi0360_initVGA_JPG[][4] = { | 199 | static const u8 mi0360_initVGA_JPG[][4] = { |
200 | {0xb0, 0x03, 0x19, 0xcc}, | 200 | {0xb0, 0x03, 0x19, 0xcc}, |
201 | {0xb0, 0x04, 0x02, 0xcc}, | 201 | {0xb0, 0x04, 0x02, 0xcc}, |
202 | {0xb3, 0x00, 0x24, 0xcc}, | 202 | {0xb3, 0x00, 0x24, 0xcc}, |
@@ -305,7 +305,7 @@ static const __u8 mi0360_initVGA_JPG[][4] = { | |||
305 | {0xb3, 0x5c, 0x01, 0xcc}, | 305 | {0xb3, 0x5c, 0x01, 0xcc}, |
306 | {} | 306 | {} |
307 | }; | 307 | }; |
308 | static const __u8 mi0360_initQVGA_JPG[][4] = { | 308 | static const u8 mi0360_initQVGA_JPG[][4] = { |
309 | {0xb0, 0x03, 0x19, 0xcc}, | 309 | {0xb0, 0x03, 0x19, 0xcc}, |
310 | {0xb0, 0x04, 0x02, 0xcc}, | 310 | {0xb0, 0x04, 0x02, 0xcc}, |
311 | {0xb3, 0x00, 0x24, 0xcc}, | 311 | {0xb3, 0x00, 0x24, 0xcc}, |
@@ -425,7 +425,7 @@ static const __u8 mi0360_initQVGA_JPG[][4] = { | |||
425 | {} | 425 | {} |
426 | }; | 426 | }; |
427 | 427 | ||
428 | static const __u8 mi1310_socinitVGA_JPG[][4] = { | 428 | static const u8 mi1310_socinitVGA_JPG[][4] = { |
429 | {0xb0, 0x03, 0x19, 0xcc}, | 429 | {0xb0, 0x03, 0x19, 0xcc}, |
430 | {0xb0, 0x04, 0x02, 0xcc}, | 430 | {0xb0, 0x04, 0x02, 0xcc}, |
431 | {0xb3, 0x00, 0x64, 0xcc}, | 431 | {0xb3, 0x00, 0x64, 0xcc}, |
@@ -577,7 +577,7 @@ static const __u8 mi1310_socinitVGA_JPG[][4] = { | |||
577 | {0x03, 0x03, 0xc0, 0xbb}, | 577 | {0x03, 0x03, 0xc0, 0xbb}, |
578 | {}, | 578 | {}, |
579 | }; | 579 | }; |
580 | static const __u8 mi1310_socinitQVGA_JPG[][4] = { | 580 | static const u8 mi1310_socinitQVGA_JPG[][4] = { |
581 | {0xb0, 0x03, 0x19, 0xcc}, {0xb0, 0x04, 0x02, 0xcc}, | 581 | {0xb0, 0x03, 0x19, 0xcc}, {0xb0, 0x04, 0x02, 0xcc}, |
582 | {0xb3, 0x00, 0x64, 0xcc}, {0xb3, 0x00, 0x65, 0xcc}, | 582 | {0xb3, 0x00, 0x64, 0xcc}, {0xb3, 0x00, 0x65, 0xcc}, |
583 | {0xb3, 0x05, 0x00, 0xcc}, {0xb3, 0x06, 0x00, 0xcc}, | 583 | {0xb3, 0x05, 0x00, 0xcc}, {0xb3, 0x06, 0x00, 0xcc}, |
@@ -845,14 +845,14 @@ static const u8 mi1310_soc_InitSXGA_JPG[][4] = { | |||
845 | {} | 845 | {} |
846 | }; | 846 | }; |
847 | 847 | ||
848 | static const __u8 mi1320_gamma[17] = { | 848 | static const u8 mi1320_gamma[17] = { |
849 | 0x00, 0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8, | 849 | 0x00, 0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8, |
850 | 0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff | 850 | 0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff |
851 | }; | 851 | }; |
852 | static const __u8 mi1320_matrix[9] = { | 852 | static const u8 mi1320_matrix[9] = { |
853 | 0x54, 0xda, 0x06, 0xf1, 0x50, 0xf4, 0xf7, 0xea, 0x52 | 853 | 0x54, 0xda, 0x06, 0xf1, 0x50, 0xf4, 0xf7, 0xea, 0x52 |
854 | }; | 854 | }; |
855 | static const __u8 mi1320_initVGA_data[][4] = { | 855 | static const u8 mi1320_initVGA_data[][4] = { |
856 | {0xb3, 0x01, 0x01, 0xcc}, {0x00, 0x00, 0x33, 0xdd}, | 856 | {0xb3, 0x01, 0x01, 0xcc}, {0x00, 0x00, 0x33, 0xdd}, |
857 | {0xb0, 0x03, 0x19, 0xcc}, {0x00, 0x00, 0x33, 0xdd}, | 857 | {0xb0, 0x03, 0x19, 0xcc}, {0x00, 0x00, 0x33, 0xdd}, |
858 | {0xb0, 0x04, 0x02, 0xcc}, {0x00, 0x00, 0x33, 0xdd}, | 858 | {0xb0, 0x04, 0x02, 0xcc}, {0x00, 0x00, 0x33, 0xdd}, |
@@ -931,7 +931,7 @@ static const __u8 mi1320_initVGA_data[][4] = { | |||
931 | {0xb3, 0x5c, 0x01, 0xcc}, {0xb3, 0x01, 0x41, 0xcc}, | 931 | {0xb3, 0x5c, 0x01, 0xcc}, {0xb3, 0x01, 0x41, 0xcc}, |
932 | {} | 932 | {} |
933 | }; | 933 | }; |
934 | static const __u8 mi1320_initQVGA_data[][4] = { | 934 | static const u8 mi1320_initQVGA_data[][4] = { |
935 | {0xb3, 0x01, 0x01, 0xcc}, {0x00, 0x00, 0x33, 0xdd}, | 935 | {0xb3, 0x01, 0x01, 0xcc}, {0x00, 0x00, 0x33, 0xdd}, |
936 | {0xb0, 0x03, 0x19, 0xcc}, {0x00, 0x00, 0x33, 0xdd}, | 936 | {0xb0, 0x03, 0x19, 0xcc}, {0x00, 0x00, 0x33, 0xdd}, |
937 | {0xb0, 0x04, 0x02, 0xcc}, {0x00, 0x00, 0x33, 0xdd}, | 937 | {0xb0, 0x04, 0x02, 0xcc}, {0x00, 0x00, 0x33, 0xdd}, |
@@ -1339,15 +1339,15 @@ static const u8 mi1320_soc_InitSXGA[][4] = { | |||
1339 | {0x64, 0x5e, 0x1c, 0xbb}, | 1339 | {0x64, 0x5e, 0x1c, 0xbb}, |
1340 | {} | 1340 | {} |
1341 | }; | 1341 | }; |
1342 | static const __u8 po3130_gamma[17] = { | 1342 | static const u8 po3130_gamma[17] = { |
1343 | 0x00, 0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8, | 1343 | 0x00, 0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8, |
1344 | 0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff | 1344 | 0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff |
1345 | }; | 1345 | }; |
1346 | static const __u8 po3130_matrix[9] = { | 1346 | static const u8 po3130_matrix[9] = { |
1347 | 0x5f, 0xec, 0xf5, 0xf1, 0x5a, 0xf5, 0xf1, 0xec, 0x63 | 1347 | 0x5f, 0xec, 0xf5, 0xf1, 0x5a, 0xf5, 0xf1, 0xec, 0x63 |
1348 | }; | 1348 | }; |
1349 | 1349 | ||
1350 | static const __u8 po3130_initVGA_data[][4] = { | 1350 | static const u8 po3130_initVGA_data[][4] = { |
1351 | {0xb0, 0x4d, 0x00, 0xcc}, {0xb3, 0x01, 0x01, 0xcc}, | 1351 | {0xb0, 0x4d, 0x00, 0xcc}, {0xb3, 0x01, 0x01, 0xcc}, |
1352 | {0x00, 0x00, 0x50, 0xdd}, {0xb0, 0x03, 0x01, 0xcc}, | 1352 | {0x00, 0x00, 0x50, 0xdd}, {0xb0, 0x03, 0x01, 0xcc}, |
1353 | {0xb3, 0x00, 0x04, 0xcc}, {0xb3, 0x00, 0x24, 0xcc}, | 1353 | {0xb3, 0x00, 0x04, 0xcc}, {0xb3, 0x00, 0x24, 0xcc}, |
@@ -1430,7 +1430,7 @@ static const __u8 po3130_initVGA_data[][4] = { | |||
1430 | {0xb3, 0x5c, 0x00, 0xcc}, {0xb3, 0x01, 0x41, 0xcc}, | 1430 | {0xb3, 0x5c, 0x00, 0xcc}, {0xb3, 0x01, 0x41, 0xcc}, |
1431 | {} | 1431 | {} |
1432 | }; | 1432 | }; |
1433 | static const __u8 po3130_rundata[][4] = { | 1433 | static const u8 po3130_rundata[][4] = { |
1434 | {0x00, 0x47, 0x45, 0xaa}, {0x00, 0x48, 0x9b, 0xaa}, | 1434 | {0x00, 0x47, 0x45, 0xaa}, {0x00, 0x48, 0x9b, 0xaa}, |
1435 | {0x00, 0x49, 0x3a, 0xaa}, {0x00, 0x4a, 0x01, 0xaa}, | 1435 | {0x00, 0x49, 0x3a, 0xaa}, {0x00, 0x4a, 0x01, 0xaa}, |
1436 | {0x00, 0x44, 0x40, 0xaa}, | 1436 | {0x00, 0x44, 0x40, 0xaa}, |
@@ -1445,7 +1445,7 @@ static const __u8 po3130_rundata[][4] = { | |||
1445 | {} | 1445 | {} |
1446 | }; | 1446 | }; |
1447 | 1447 | ||
1448 | static const __u8 po3130_initQVGA_data[][4] = { | 1448 | static const u8 po3130_initQVGA_data[][4] = { |
1449 | {0xb0, 0x4d, 0x00, 0xcc}, {0xb3, 0x01, 0x01, 0xcc}, | 1449 | {0xb0, 0x4d, 0x00, 0xcc}, {0xb3, 0x01, 0x01, 0xcc}, |
1450 | {0x00, 0x00, 0x50, 0xdd}, {0xb0, 0x03, 0x09, 0xcc}, | 1450 | {0x00, 0x00, 0x50, 0xdd}, {0xb0, 0x03, 0x09, 0xcc}, |
1451 | {0xb3, 0x00, 0x04, 0xcc}, {0xb3, 0x00, 0x24, 0xcc}, | 1451 | {0xb3, 0x00, 0x04, 0xcc}, {0xb3, 0x00, 0x24, 0xcc}, |
@@ -1531,16 +1531,16 @@ static const __u8 po3130_initQVGA_data[][4] = { | |||
1531 | {} | 1531 | {} |
1532 | }; | 1532 | }; |
1533 | 1533 | ||
1534 | static const __u8 hv7131r_gamma[17] = { | 1534 | static const u8 hv7131r_gamma[17] = { |
1535 | /* 0x00, 0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8, | 1535 | /* 0x00, 0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8, |
1536 | * 0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff */ | 1536 | * 0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff */ |
1537 | 0x04, 0x1a, 0x36, 0x55, 0x6f, 0x87, 0x9d, 0xb0, 0xc1, | 1537 | 0x04, 0x1a, 0x36, 0x55, 0x6f, 0x87, 0x9d, 0xb0, 0xc1, |
1538 | 0xcf, 0xda, 0xe4, 0xec, 0xf3, 0xf8, 0xfd, 0xff | 1538 | 0xcf, 0xda, 0xe4, 0xec, 0xf3, 0xf8, 0xfd, 0xff |
1539 | }; | 1539 | }; |
1540 | static const __u8 hv7131r_matrix[9] = { | 1540 | static const u8 hv7131r_matrix[9] = { |
1541 | 0x5f, 0xec, 0xf5, 0xf1, 0x5a, 0xf5, 0xf1, 0xec, 0x63 | 1541 | 0x5f, 0xec, 0xf5, 0xf1, 0x5a, 0xf5, 0xf1, 0xec, 0x63 |
1542 | }; | 1542 | }; |
1543 | static const __u8 hv7131r_initVGA_data[][4] = { | 1543 | static const u8 hv7131r_initVGA_data[][4] = { |
1544 | {0xb0, 0x4d, 0x00, 0xcc}, {0xb3, 0x01, 0x01, 0xcc}, | 1544 | {0xb0, 0x4d, 0x00, 0xcc}, {0xb3, 0x01, 0x01, 0xcc}, |
1545 | {0x00, 0x00, 0x50, 0xdd}, {0xb0, 0x03, 0x01, 0xcc}, | 1545 | {0x00, 0x00, 0x50, 0xdd}, {0xb0, 0x03, 0x01, 0xcc}, |
1546 | {0xb3, 0x00, 0x24, 0xcc}, | 1546 | {0xb3, 0x00, 0x24, 0xcc}, |
@@ -1583,7 +1583,7 @@ static const __u8 hv7131r_initVGA_data[][4] = { | |||
1583 | {} | 1583 | {} |
1584 | }; | 1584 | }; |
1585 | 1585 | ||
1586 | static const __u8 hv7131r_initQVGA_data[][4] = { | 1586 | static const u8 hv7131r_initQVGA_data[][4] = { |
1587 | {0xb0, 0x4d, 0x00, 0xcc}, {0xb3, 0x01, 0x01, 0xcc}, | 1587 | {0xb0, 0x4d, 0x00, 0xcc}, {0xb3, 0x01, 0x01, 0xcc}, |
1588 | {0x00, 0x00, 0x50, 0xdd}, {0xb0, 0x03, 0x01, 0xcc}, | 1588 | {0x00, 0x00, 0x50, 0xdd}, {0xb0, 0x03, 0x01, 0xcc}, |
1589 | {0xb3, 0x00, 0x24, 0xcc}, | 1589 | {0xb3, 0x00, 0x24, 0xcc}, |
@@ -1638,14 +1638,14 @@ static const __u8 hv7131r_initQVGA_data[][4] = { | |||
1638 | {} | 1638 | {} |
1639 | }; | 1639 | }; |
1640 | 1640 | ||
1641 | static const __u8 ov7660_gamma[17] = { | 1641 | static const u8 ov7660_gamma[17] = { |
1642 | 0x00, 0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8, | 1642 | 0x00, 0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8, |
1643 | 0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff | 1643 | 0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff |
1644 | }; | 1644 | }; |
1645 | static const __u8 ov7660_matrix[9] = { | 1645 | static const u8 ov7660_matrix[9] = { |
1646 | 0x5a, 0xf0, 0xf6, 0xf3, 0x57, 0xf6, 0xf3, 0xef, 0x62 | 1646 | 0x5a, 0xf0, 0xf6, 0xf3, 0x57, 0xf6, 0xf3, 0xef, 0x62 |
1647 | }; | 1647 | }; |
1648 | static const __u8 ov7660_initVGA_data[][4] = { | 1648 | static const u8 ov7660_initVGA_data[][4] = { |
1649 | {0xb0, 0x4d, 0x00, 0xcc}, {0xb3, 0x01, 0x01, 0xcc}, | 1649 | {0xb0, 0x4d, 0x00, 0xcc}, {0xb3, 0x01, 0x01, 0xcc}, |
1650 | {0x00, 0x00, 0x50, 0xdd}, | 1650 | {0x00, 0x00, 0x50, 0xdd}, |
1651 | {0xb0, 0x03, 0x01, 0xcc}, | 1651 | {0xb0, 0x03, 0x01, 0xcc}, |
@@ -1703,7 +1703,7 @@ static const __u8 ov7660_initVGA_data[][4] = { | |||
1703 | {0x00, 0x29, 0x3c, 0xaa}, {0xb3, 0x01, 0x45, 0xcc}, | 1703 | {0x00, 0x29, 0x3c, 0xaa}, {0xb3, 0x01, 0x45, 0xcc}, |
1704 | {} | 1704 | {} |
1705 | }; | 1705 | }; |
1706 | static const __u8 ov7660_initQVGA_data[][4] = { | 1706 | static const u8 ov7660_initQVGA_data[][4] = { |
1707 | {0xb0, 0x4d, 0x00, 0xcc}, {0xb3, 0x01, 0x01, 0xcc}, | 1707 | {0xb0, 0x4d, 0x00, 0xcc}, {0xb3, 0x01, 0x01, 0xcc}, |
1708 | {0x00, 0x00, 0x50, 0xdd}, {0xb0, 0x03, 0x01, 0xcc}, | 1708 | {0x00, 0x00, 0x50, 0xdd}, {0xb0, 0x03, 0x01, 0xcc}, |
1709 | {0xb3, 0x00, 0x21, 0xcc}, {0xb3, 0x00, 0x26, 0xcc}, | 1709 | {0xb3, 0x00, 0x21, 0xcc}, {0xb3, 0x00, 0x26, 0xcc}, |
@@ -1772,26 +1772,26 @@ static const __u8 ov7660_initQVGA_data[][4] = { | |||
1772 | {} | 1772 | {} |
1773 | }; | 1773 | }; |
1774 | 1774 | ||
1775 | static const __u8 ov7660_50HZ[][4] = { | 1775 | static const u8 ov7660_50HZ[][4] = { |
1776 | {0x00, 0x3b, 0x08, 0xaa}, | 1776 | {0x00, 0x3b, 0x08, 0xaa}, |
1777 | {0x00, 0x9d, 0x40, 0xaa}, | 1777 | {0x00, 0x9d, 0x40, 0xaa}, |
1778 | {0x00, 0x13, 0xa7, 0xaa}, | 1778 | {0x00, 0x13, 0xa7, 0xaa}, |
1779 | {} | 1779 | {} |
1780 | }; | 1780 | }; |
1781 | 1781 | ||
1782 | static const __u8 ov7660_60HZ[][4] = { | 1782 | static const u8 ov7660_60HZ[][4] = { |
1783 | {0x00, 0x3b, 0x00, 0xaa}, | 1783 | {0x00, 0x3b, 0x00, 0xaa}, |
1784 | {0x00, 0x9e, 0x40, 0xaa}, | 1784 | {0x00, 0x9e, 0x40, 0xaa}, |
1785 | {0x00, 0x13, 0xa7, 0xaa}, | 1785 | {0x00, 0x13, 0xa7, 0xaa}, |
1786 | {} | 1786 | {} |
1787 | }; | 1787 | }; |
1788 | 1788 | ||
1789 | static const __u8 ov7660_NoFliker[][4] = { | 1789 | static const u8 ov7660_NoFliker[][4] = { |
1790 | {0x00, 0x13, 0x87, 0xaa}, | 1790 | {0x00, 0x13, 0x87, 0xaa}, |
1791 | {} | 1791 | {} |
1792 | }; | 1792 | }; |
1793 | 1793 | ||
1794 | static const __u8 ov7670_initVGA_JPG[][4] = { | 1794 | static const u8 ov7670_initVGA_JPG[][4] = { |
1795 | {0xb3, 0x01, 0x05, 0xcc}, | 1795 | {0xb3, 0x01, 0x05, 0xcc}, |
1796 | {0x00, 0x00, 0x30, 0xdd}, {0xb0, 0x03, 0x19, 0xcc}, | 1796 | {0x00, 0x00, 0x30, 0xdd}, {0xb0, 0x03, 0x19, 0xcc}, |
1797 | {0x00, 0x00, 0x10, 0xdd}, | 1797 | {0x00, 0x00, 0x10, 0xdd}, |
@@ -1921,7 +1921,7 @@ static const __u8 ov7670_initVGA_JPG[][4] = { | |||
1921 | {}, | 1921 | {}, |
1922 | }; | 1922 | }; |
1923 | 1923 | ||
1924 | static const __u8 ov7670_initQVGA_JPG[][4] = { | 1924 | static const u8 ov7670_initQVGA_JPG[][4] = { |
1925 | {0xb3, 0x01, 0x05, 0xcc}, {0x00, 0x00, 0x30, 0xdd}, | 1925 | {0xb3, 0x01, 0x05, 0xcc}, {0x00, 0x00, 0x30, 0xdd}, |
1926 | {0xb0, 0x03, 0x19, 0xcc}, {0x00, 0x00, 0x10, 0xdd}, | 1926 | {0xb0, 0x03, 0x19, 0xcc}, {0x00, 0x00, 0x10, 0xdd}, |
1927 | {0xb0, 0x04, 0x02, 0xcc}, {0x00, 0x00, 0x10, 0xdd}, | 1927 | {0xb0, 0x04, 0x02, 0xcc}, {0x00, 0x00, 0x10, 0xdd}, |
@@ -2056,14 +2056,14 @@ static const __u8 ov7670_initQVGA_JPG[][4] = { | |||
2056 | }; | 2056 | }; |
2057 | 2057 | ||
2058 | /* PO1200 - values from usbvm326.inf and ms-win trace */ | 2058 | /* PO1200 - values from usbvm326.inf and ms-win trace */ |
2059 | static const __u8 po1200_gamma[17] = { | 2059 | static const u8 po1200_gamma[17] = { |
2060 | 0x00, 0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8, | 2060 | 0x00, 0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8, |
2061 | 0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff | 2061 | 0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff |
2062 | }; | 2062 | }; |
2063 | static const __u8 po1200_matrix[9] = { | 2063 | static const u8 po1200_matrix[9] = { |
2064 | 0x60, 0xf9, 0xe5, 0xe7, 0x50, 0x05, 0xf3, 0xe6, 0x5e | 2064 | 0x60, 0xf9, 0xe5, 0xe7, 0x50, 0x05, 0xf3, 0xe6, 0x5e |
2065 | }; | 2065 | }; |
2066 | static const __u8 po1200_initVGA_data[][4] = { | 2066 | static const u8 po1200_initVGA_data[][4] = { |
2067 | {0xb0, 0x03, 0x19, 0xcc}, /* reset? */ | 2067 | {0xb0, 0x03, 0x19, 0xcc}, /* reset? */ |
2068 | {0xb0, 0x03, 0x19, 0xcc}, | 2068 | {0xb0, 0x03, 0x19, 0xcc}, |
2069 | /* {0x00, 0x00, 0x33, 0xdd}, */ | 2069 | /* {0x00, 0x00, 0x33, 0xdd}, */ |
@@ -2366,9 +2366,9 @@ static const struct sensor_info sensor_info_data[] = { | |||
2366 | 2366 | ||
2367 | /* read 'len' bytes in gspca_dev->usb_buf */ | 2367 | /* read 'len' bytes in gspca_dev->usb_buf */ |
2368 | static void reg_r(struct gspca_dev *gspca_dev, | 2368 | static void reg_r(struct gspca_dev *gspca_dev, |
2369 | __u16 req, | 2369 | u16 req, |
2370 | __u16 index, | 2370 | u16 index, |
2371 | __u16 len) | 2371 | u16 len) |
2372 | { | 2372 | { |
2373 | usb_control_msg(gspca_dev->dev, | 2373 | usb_control_msg(gspca_dev->dev, |
2374 | usb_rcvctrlpipe(gspca_dev->dev, 0), | 2374 | usb_rcvctrlpipe(gspca_dev->dev, 0), |
@@ -2380,9 +2380,9 @@ static void reg_r(struct gspca_dev *gspca_dev, | |||
2380 | } | 2380 | } |
2381 | 2381 | ||
2382 | static void reg_w(struct usb_device *dev, | 2382 | static void reg_w(struct usb_device *dev, |
2383 | __u16 req, | 2383 | u16 req, |
2384 | __u16 value, | 2384 | u16 value, |
2385 | __u16 index) | 2385 | u16 index) |
2386 | { | 2386 | { |
2387 | usb_control_msg(dev, | 2387 | usb_control_msg(dev, |
2388 | usb_sndctrlpipe(dev, 0), | 2388 | usb_sndctrlpipe(dev, 0), |
@@ -2503,17 +2503,17 @@ static void i2c_write(struct gspca_dev *gspca_dev, | |||
2503 | } | 2503 | } |
2504 | 2504 | ||
2505 | static void put_tab_to_reg(struct gspca_dev *gspca_dev, | 2505 | static void put_tab_to_reg(struct gspca_dev *gspca_dev, |
2506 | const __u8 *tab, __u8 tabsize, __u16 addr) | 2506 | const u8 *tab, u8 tabsize, u16 addr) |
2507 | { | 2507 | { |
2508 | int j; | 2508 | int j; |
2509 | __u16 ad = addr; | 2509 | u16 ad = addr; |
2510 | 2510 | ||
2511 | for (j = 0; j < tabsize; j++) | 2511 | for (j = 0; j < tabsize; j++) |
2512 | reg_w(gspca_dev->dev, 0xa0, tab[j], ad++); | 2512 | reg_w(gspca_dev->dev, 0xa0, tab[j], ad++); |
2513 | } | 2513 | } |
2514 | 2514 | ||
2515 | static void usb_exchange(struct gspca_dev *gspca_dev, | 2515 | static void usb_exchange(struct gspca_dev *gspca_dev, |
2516 | const __u8 data[][4]) | 2516 | const u8 data[][4]) |
2517 | { | 2517 | { |
2518 | struct usb_device *dev = gspca_dev->dev; | 2518 | struct usb_device *dev = gspca_dev->dev; |
2519 | int i = 0; | 2519 | int i = 0; |
@@ -2707,7 +2707,7 @@ static void sethvflip(struct gspca_dev *gspca_dev) | |||
2707 | static void setlightfreq(struct gspca_dev *gspca_dev) | 2707 | static void setlightfreq(struct gspca_dev *gspca_dev) |
2708 | { | 2708 | { |
2709 | struct sd *sd = (struct sd *) gspca_dev; | 2709 | struct sd *sd = (struct sd *) gspca_dev; |
2710 | static const __u8 (*ov7660_freq_tb[3])[4] = | 2710 | static const u8 (*ov7660_freq_tb[3])[4] = |
2711 | {ov7660_NoFliker, ov7660_50HZ, ov7660_60HZ}; | 2711 | {ov7660_NoFliker, ov7660_50HZ, ov7660_60HZ}; |
2712 | 2712 | ||
2713 | if (sd->sensor != SENSOR_OV7660) | 2713 | if (sd->sensor != SENSOR_OV7660) |
@@ -2719,7 +2719,7 @@ static void setlightfreq(struct gspca_dev *gspca_dev) | |||
2719 | static void setsharpness(struct gspca_dev *gspca_dev) | 2719 | static void setsharpness(struct gspca_dev *gspca_dev) |
2720 | { | 2720 | { |
2721 | struct sd *sd = (struct sd *) gspca_dev; | 2721 | struct sd *sd = (struct sd *) gspca_dev; |
2722 | __u8 data; | 2722 | u8 data; |
2723 | 2723 | ||
2724 | if (sd->sensor != SENSOR_PO1200) | 2724 | if (sd->sensor != SENSOR_PO1200) |
2725 | return; | 2725 | return; |
@@ -2732,9 +2732,9 @@ static void setsharpness(struct gspca_dev *gspca_dev) | |||
2732 | static int sd_start(struct gspca_dev *gspca_dev) | 2732 | static int sd_start(struct gspca_dev *gspca_dev) |
2733 | { | 2733 | { |
2734 | struct sd *sd = (struct sd *) gspca_dev; | 2734 | struct sd *sd = (struct sd *) gspca_dev; |
2735 | const __u8 (*init)[4]; | 2735 | const u8 (*init)[4]; |
2736 | const __u8 *GammaT = NULL; | 2736 | const u8 *GammaT = NULL; |
2737 | const __u8 *MatrixT = NULL; | 2737 | const u8 *MatrixT = NULL; |
2738 | int mode; | 2738 | int mode; |
2739 | static const u8 (*mi1320_soc_init[])[4] = { | 2739 | static const u8 (*mi1320_soc_init[])[4] = { |
2740 | mi1320_soc_InitSXGA, | 2740 | mi1320_soc_InitSXGA, |
@@ -2875,7 +2875,7 @@ static void sd_stopN(struct gspca_dev *gspca_dev) | |||
2875 | struct usb_device *dev = gspca_dev->dev; | 2875 | struct usb_device *dev = gspca_dev->dev; |
2876 | struct sd *sd = (struct sd *) gspca_dev; | 2876 | struct sd *sd = (struct sd *) gspca_dev; |
2877 | 2877 | ||
2878 | if( sd->sensor == SENSOR_MI1310_SOC) | 2878 | if (sd->sensor == SENSOR_MI1310_SOC) |
2879 | reg_w(dev, 0x89, 0x058c, 0x00ff); | 2879 | reg_w(dev, 0x89, 0x058c, 0x00ff); |
2880 | else | 2880 | else |
2881 | reg_w(dev, 0x89, 0xffff, 0xffff); | 2881 | reg_w(dev, 0x89, 0xffff, 0xffff); |
@@ -2891,7 +2891,8 @@ static void sd_stop0(struct gspca_dev *gspca_dev) | |||
2891 | 2891 | ||
2892 | if (!gspca_dev->present) | 2892 | if (!gspca_dev->present) |
2893 | return; | 2893 | return; |
2894 | if( sd->sensor == SENSOR_MI1310_SOC) | 2894 | /*fixme: is this useful?*/ |
2895 | if (sd->sensor == SENSOR_MI1310_SOC) | ||
2895 | reg_w(dev, 0x89, 0x058c, 0x00ff); | 2896 | reg_w(dev, 0x89, 0x058c, 0x00ff); |
2896 | else | 2897 | else |
2897 | reg_w(dev, 0x89, 0xffff, 0xffff); | 2898 | reg_w(dev, 0x89, 0xffff, 0xffff); |
@@ -2899,7 +2900,7 @@ static void sd_stop0(struct gspca_dev *gspca_dev) | |||
2899 | 2900 | ||
2900 | static void sd_pkt_scan(struct gspca_dev *gspca_dev, | 2901 | static void sd_pkt_scan(struct gspca_dev *gspca_dev, |
2901 | struct gspca_frame *frame, /* target */ | 2902 | struct gspca_frame *frame, /* target */ |
2902 | __u8 *data, /* isoc packet */ | 2903 | u8 *data, /* isoc packet */ |
2903 | int len) /* iso pkt length */ | 2904 | int len) /* iso pkt length */ |
2904 | { | 2905 | { |
2905 | struct sd *sd = (struct sd *) gspca_dev; | 2906 | struct sd *sd = (struct sd *) gspca_dev; |
@@ -2999,21 +3000,12 @@ static int sd_getsharpness(struct gspca_dev *gspca_dev, __s32 *val) | |||
2999 | static int sd_querymenu(struct gspca_dev *gspca_dev, | 3000 | static int sd_querymenu(struct gspca_dev *gspca_dev, |
3000 | struct v4l2_querymenu *menu) | 3001 | struct v4l2_querymenu *menu) |
3001 | { | 3002 | { |
3003 | static const char *freq_nm[3] = {"NoFliker", "50 Hz", "60 Hz"}; | ||
3004 | |||
3002 | switch (menu->id) { | 3005 | switch (menu->id) { |
3003 | case V4L2_CID_POWER_LINE_FREQUENCY: | 3006 | case V4L2_CID_POWER_LINE_FREQUENCY: |
3004 | switch (menu->index) { | 3007 | strcpy((char *) menu->name, freq_nm[menu->index]); |
3005 | case 0: /* V4L2_CID_POWER_LINE_FREQUENCY_DISABLED */ | 3008 | return 0; |
3006 | strcpy((char *) menu->name, "NoFliker"); | ||
3007 | return 0; | ||
3008 | case 1: /* V4L2_CID_POWER_LINE_FREQUENCY_50HZ */ | ||
3009 | strcpy((char *) menu->name, "50 Hz"); | ||
3010 | return 0; | ||
3011 | default: | ||
3012 | /* case 2: * V4L2_CID_POWER_LINE_FREQUENCY_60HZ */ | ||
3013 | strcpy((char *) menu->name, "60 Hz"); | ||
3014 | return 0; | ||
3015 | } | ||
3016 | break; | ||
3017 | } | 3009 | } |
3018 | return -EINVAL; | 3010 | return -EINVAL; |
3019 | } | 3011 | } |