提交 6a7eba24 编写于 作者: J Jean-Francois Moine 提交者: Mauro Carvalho Chehab

V4L/DVB (8157): gspca: all subdrivers

- remaning subdrivers added
- remove the decoding helper and some specific frame decodings
Signed-off-by: NJean-Francois Moine <moinejf@free.fr>
Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 d43fa32f
Here the list of the known working cameras with gspca.
List of the webcams know by gspca.
The modules are:
gspca_main main driver
......@@ -6,106 +6,73 @@ The modules are:
xxxx vend:prod
----
conex 0572:0041 Creative Notebook cx11646
etoms 102c:6151 Qcam Sangha CIF
etoms 102c:6251 Qcam xxxxxx VGA
mars 093a:050f Mars-Semi Pc-Camera
spca501 0000:0000 MystFromOri Unknow Camera
spca501 040a:0002 Kodak DVC-325
spca500 040a:0300 Kodak EZ200
zc3xx 041e:041e Creative WebCam Live!
spca500 041e:400a Creative PC-CAM 300
sunplus 041e:400b Creative PC-CAM 600
sunplus 041e:4012 PC-Cam350
sunplus 041e:4013 Creative Pccam750
zc3xx 041e:4017 Creative Webcam Mobile PD1090
spca508 041e:4018 Creative Webcam Vista (PD1100)
spca561 041e:401a Creative Webcam Vista (PD1100)
zc3xx 041e:401c Creative NX
spca505 041e:401d Creative Webcam NX ULTRA
zc3xx 041e:401e Creative Nx Pro
zc3xx 041e:401f Creative Webcam Notebook PD1171
pac207 041e:4028 Creative Webcam Vista Plus
zc3xx 041e:4029 Creative WebCam Vista Pro
zc3xx 041e:4034 Creative Instant P0620
zc3xx 041e:4035 Creative Instant P0620D
zc3xx 041e:4036 Creative Live !
zc3xx 041e:403a Creative Nx Pro 2
spca561 041e:403b Creative Webcam Vista (VF0010)
zc3xx 041e:4051 Creative Live!Cam Notebook Pro (VF0250)
ov519 041e:4052 Creative Live! VISTA IM
zc3xx 041e:4053 Creative Live!Cam Video IM
ov519 041e:405f Creative Live! VISTA VF0330
ov519 041e:4060 Creative Live! VISTA VF0350
ov519 041e:4061 Creative Live! VISTA VF0400
ov519 041e:4064 Creative Live! VISTA VF0420
ov519 041e:4068 Creative Live! VISTA VF0470
ov519 045e:028c Micro$oft xbox cam
ov519 054c:0154 Sonny toy4
ov519 054c:0155 Sonny toy5
ov519 05a9:0519 OmniVision
ov519 05a9:4519 OmniVision
ov519 05a9:8519 OmniVision
ov519 05a9:0530 OmniVision
pac207 041e:4028 Creative Webcam Vista Plus
pac207 093a:2460 PAC207 Qtec Webcam 100
pac207 093a:2463 Philips spc200nc pac207
pac207 093a:2464 Labtec Webcam 1200
pac207 093a:2468 PAC207
pac207 093a:2470 Genius GF112
pac207 093a:2471 PAC207 Genius VideoCam ge111
pac207 093a:2472 PAC207 Genius VideoCam ge110
pac7311 093a:2600 PAC7311 Typhoon
pac7311 093a:2601 PAC7311 Phillips SPC610NC
pac7311 093a:2603 PAC7312
pac7311 093a:2608 PAC7311 Trust WB-3300p
pac7311 093a:260e PAC7311 Gigaware VGA PC Camera, Trust WB-3350p, SIGMA cam 2350
pac7311 093a:260f PAC7311 SnakeCam
sonixb 0c45:6001 Genius VideoCAM NB
sonixb 0c45:6005 Sweex Tas5110
sonixb 0c45:6007 Sonix sn9c101 + Tas5110D
sonixb 0c45:6009 spcaCam@120
sonixb 0c45:600d spcaCam@120
sonixb 0c45:6011 MAX Webcam (Microdia - OV6650 - SN9C101G)
sonixb 0c45:6019 Generic Sonix OV7630
sonixb 0c45:6024 Generic Sonix Tas5130c
sonixb 0c45:6025 Xcam Shanga
sonixb 0c45:6028 Sonix Btc Pc380
sonixb 0c45:6029 spcaCam@150
sonixb 0c45:602c Generic Sonix OV7630
sonixb 0c45:602d LIC-200 LG
sonixb 0c45:602e Genius VideoCam Messenger
spca561 0458:7004 Genius VideoCAM Express V2
sunplus 0458:7006 Genius Dsc 1.3 Smart
zc3xx 0458:7007 Genius VideoCam V2
zc3xx 0458:700c Genius VideoCam V3
zc3xx 0458:700f Genius VideoCam Web V2
sonixj 0458:7025 Genius Eye 311Q
sonixj 045e:00f5 MicroSoft VX3000
sonixj 045e:00f7 MicroSoft VX1000
sonixj 0471:0327 Philips SPC 600 NC
sonixj 0471:0328 Philips SPC 700 NC
sonixj 0471:0330 Philips SPC 710NC
sonixj 0c45:6040 Speed NVC 350K
sonixj 0c45:607c Sonix sn9c102p Hv7131R
sonixj 0c45:60c0 Sangha Sn535
sonixj 0c45:60ec SN9C105+MO4000
sonixj 0c45:60fb Surfer NoName
sonixj 0c45:60fc LG-LIC300
sonixj 0c45:612a Avant Camera
sonixj 0c45:612c Typhoon Rasy Cam 1.3MPix
sonixj 0c45:6130 Sonix Pccam
sonixj 0c45:6138 Sn9c120 Mo4000
sonixj 0c45:613b Surfer SN-206
sonixj 0c45:613c Sonix Pccam168
spca500 040a:0300 Kodak EZ200
spca500 041e:400a Creative PC-CAM 300
ov519 045e:028c Micro$oft xbox cam
spca508 0461:0815 Micro Innovation IC200
zc3xx 0461:0a00 MicroInnovation WebCam320
spca500 046d:0890 Logitech QuickCam traveler
vc032x 046d:0892 Logitech Orbicam
vc032x 046d:0896 Logitech Orbicam
zc3xx 046d:08a0 Logitech QC IM
zc3xx 046d:08a1 Logitech QC IM 0x08A1 +sound
zc3xx 046d:08a2 Labtec Webcam Pro
zc3xx 046d:08a3 Logitech QC Chat
zc3xx 046d:08a6 Logitech QCim
zc3xx 046d:08a7 Logitech QuickCam Image
zc3xx 046d:08a9 Logitech Notebook Deluxe
zc3xx 046d:08aa Labtec Webcam Notebook
zc3xx 046d:08ac Logitech QuickCam Cool
zc3xx 046d:08ad Logitech QCCommunicate STX
zc3xx 046d:08ae Logitech QuickCam for Notebooks
zc3xx 046d:08af Logitech QuickCam Cool
zc3xx 046d:08b9 Logitech QC IM ???
zc3xx 046d:08d7 Logitech QCam STX
zc3xx 046d:08d9 Logitech QuickCam IM/Connect
zc3xx 046d:08d8 Logitech Notebook Deluxe
zc3xx 046d:08da Logitech QuickCam Messenger
zc3xx 046d:08dd Logitech QuickCam for Notebooks
spca500 046d:0900 Logitech Inc. ClickSmart 310
spca500 046d:0901 Logitech Inc. ClickSmart 510
spca500 04a5:300c Benq DC1016
spca500 04fc:7333 PalmPixDC85
spca500 055f:c200 Mustek Gsmart 300
spca500 055f:c220 Gsmart Mini
spca500 06bd:0404 Agfa CL20
spca500 06be:0800 Optimedia
spca500 084d:0003 D-Link DSC-350
spca500 08ca:0103 Aiptek PocketDV
spca500 2899:012c Toptro Industrial
spca500 8086:0630 Intel Pocket PC Camera
spca501 040a:0002 Kodak DVC-325
spca501 0497:c001 Smile International
spca501 0506:00df 3Com HomeConnect Lite
spca501 0733:0401 Intel Create and Share
spca501 0733:0402 ViewQuest M318B
spca501 1776:501c Arowana 300K CMOS Camera
spca501 0000:0000 MystFromOri Unknow Camera
spca505 041e:401d Creative Webcam NX ULTRA
spca505 0733:0430 Intel PC Camera Pro
spca506 06e1:a190 ADS Instant VCD
spca506 0734:043b 3DeMon USB Capture aka
spca506 99fa:8988 Grandtec V.cap
spca506 99fa:8988 Grandtec V.cap
spca508 041e:4018 Creative Webcam Vista (PD1100)
spca508 0461:0815 Micro Innovation IC200
spca508 0733:0110 ViewQuest VQ110
spca508 0af9:0010 Hama USB Sightcam 100
spca508 0af9:0011 Hama USB Sightcam 100
spca508 8086:0110 Intel Easy PC Camera
spca561 041e:401a Creative Webcam Vista (PD1100)
spca561 041e:403b Creative Webcam Vista (VF0010)
spca561 0458:7004 Genius VideoCAM Express V2
sunplus 046d:0905 Logitech ClickSmart 820
tv8532 046d:0920 QC Express
tv8532 046d:0921 Labtec Webcam
spca561 046d:0928 Logitech QC Express Etch2
spca561 046d:0929 Labtec Webcam Elch2
spca561 046d:092a Logitech QC for Notebook
......@@ -114,33 +81,42 @@ spca561 046d:092c Logitech QC chat Elch2
spca561 046d:092d Logitech QC Elch2
spca561 046d:092e Logitech QC Elch2
spca561 046d:092f Logitech QC Elch2
spca561 04fc:0561 Flexcam 100
spca561 060b:a001 Maxell Compact Pc PM3
spca561 10fd:7e50 FlyCam Usb 100
spca561 abcd:cdee Petcam
stk014 05e1:0893 Syntek DV4000
sunplus 041e:400b Creative PC-CAM 600
sunplus 041e:4012 PC-Cam350
sunplus 041e:4013 Creative Pccam750
sunplus 0458:7006 Genius Dsc 1.3 Smart
sunplus 046d:0905 Logitech ClickSmart 820
sunplus 046d:0960 Logitech ClickSmart 420
sunplus 0471:0322 Philips DMVC1300K
zc3xx 0471:0325 Philips SPC 200 NC
zc3xx 0471:0326 Philips SPC 300 NC
sonixj 0471:0327 Philips SPC 600 NC
sonixj 0471:0328 Philips SPC 700 NC
zc3xx 0471:032d Philips spc210nc
zc3xx 0471:032e Philips spc315nc
sonixj 0471:0330 Philips SPC 710NC
spca501 0497:c001 Smile International
sunplus 04a5:3003 Benq DC 1300
sunplus 04a5:3008 Benq DC 1500
sunplus 04a5:300a Benq DC3410
spca500 04a5:300c Benq DC1016
sunplus 04f1:1001 JVC GC A50
spca561 04fc:0561 Flexcam 100
sunplus 04fc:500c Sunplus CA500C
sunplus 04fc:504a Aiptek Mini PenCam 1.3
sunplus 04fc:504b Maxell MaxPocket LE 1.3
sunplus 04fc:5330 Digitrex 2110
sunplus 04fc:5360 Sunplus Generic
spca500 04fc:7333 PalmPixDC85
sunplus 04fc:ffff Pure DigitalDakota
spca501 0506:00df 3Com HomeConnect Lite
sunplus 052b:1513 Megapix V4
tv8532 0545:808b Veo Stingray
tv8532 0545:8333 Veo Stingray
sunplus 0546:3155 Polaroid PDC3070
sunplus 0546:3191 Polaroid Ion 80
sunplus 0546:3273 Polaroid PDC2030
ov519 054c:0154 Sonny toy4
ov519 054c:0155 Sonny toy5
zc3xx 055f:c005 Mustek Wcam300A
spca500 055f:c200 Mustek Gsmart 300
sunplus 055f:c211 Kowa Bs888e Microcamera
spca500 055f:c220 Gsmart Mini
sunplus 055f:c230 Mustek Digicam 330K
sunplus 055f:c232 Mustek MDC3500
sunplus 055f:c360 Mustek DV4000 Mpeg4
......@@ -152,14 +128,34 @@ sunplus 055f:c530 Mustek Gsmart LCD 3
sunplus 055f:c540 Gsmart D30
sunplus 055f:c630 Mustek MDC4000
sunplus 055f:c650 Mustek MDC5500Z
zc3xx 055f:d003 Mustek WCam300A
zc3xx 055f:d004 Mustek WCam300 AN
conex 0572:0041 Creative Notebook cx11646
ov519 05a9:0519 OmniVision
ov519 05a9:0530 OmniVision
ov519 05a9:4519 OmniVision
ov519 05a9:8519 OmniVision
sunplus 05da:1018 Digital Dream Enigma 1.3
stk014 05e1:0893 Syntek DV4000
spca561 060b:a001 Maxell Compact Pc PM3
zc3xx 0698:2003 CTX M730V built in
spca500 06bd:0404 Agfa CL20
spca500 06be:0800 Optimedia
sunplus 06d6:0031 Trust 610 LCD PowerC@m Zoom
spca506 06e1:a190 ADS Instant VCD
spca508 0733:0110 ViewQuest VQ110
spca501 0733:0401 Intel Create and Share
spca501 0733:0402 ViewQuest M318B
spca505 0733:0430 Intel PC Camera Pro
sunplus 0733:1311 Digital Dream Epsilon 1.3
sunplus 0733:1314 Mercury 2.1MEG Deluxe Classic Cam
sunplus 0733:2211 Jenoptik jdc 21 LCD
sunplus 0733:2221 Mercury Digital Pro 3.1p
sunplus 0733:3261 Concord 3045 spca536a
sunplus 0733:3281 Cyberpix S550V
spca506 0734:043b 3DeMon USB Capture aka
spca500 084d:0003 D-Link DSC-350
spca500 08ca:0103 Aiptek PocketDV
sunplus 08ca:0104 Aiptek PocketDVII 1.3
sunplus 08ca:0106 Aiptek Pocket DV3100+
sunplus 08ca:2008 Aiptek Mini PenCam 2 M
......@@ -173,66 +169,72 @@ sunplus 08ca:2028 Aiptek PocketCam4M
sunplus 08ca:2040 Aiptek PocketDV4100M
sunplus 08ca:2042 Aiptek PocketDV5100
sunplus 08ca:2060 Aiptek PocketDV5300
sunplus 0d64:0303 Sunplus FashionCam DXG
tv8532 046d:0920 QC Express
tv8532 046d:0921 Labtec Webcam
tv8532 0545:808b Veo Stingray
tv8532 0545:8333 Veo Stingray
tv8532 0923:010f ICM532 cams
vc032x 046d:0892 Logitech Orbicam
vc032x 046d:0896 Logitech Orbicam
mars 093a:050f Mars-Semi Pc-Camera
pac207 093a:2460 PAC207 Qtec Webcam 100
pac207 093a:2463 Philips spc200nc pac207
pac207 093a:2464 Labtec Webcam 1200
pac207 093a:2468 PAC207
pac207 093a:2470 Genius GF112
pac207 093a:2471 PAC207 Genius VideoCam ge111
pac207 093a:2472 PAC207 Genius VideoCam ge110
pac7311 093a:2600 PAC7311 Typhoon
pac7311 093a:2601 PAC7311 Phillips SPC610NC
pac7311 093a:2603 PAC7312
pac7311 093a:2608 PAC7311 Trust WB-3300p
pac7311 093a:260e PAC7311 Gigaware VGA PC Camera, Trust WB-3350p, SIGMA cam 2350
pac7311 093a:260f PAC7311 SnakeCam
pac7311 093a:2621 PAC731x
zc3xx 0ac8:0302 Z-star Vimicro zc0302
vc032x 0ac8:0321 Vimicro generic vc0321
vc032x 0ac8:0323 Vimicro Vc0323
vc032x 0ac8:0328 A4Tech PK-130MG
vc032x 0ac8:c001 Sony embedded vimicro
vc032x 0ac8:c002 Sony embedded vimicro
vc032x 17ef:4802 Lenovo Vc0323+MI1310_SOC
zc3xx 041e:041e Creative WebCam Live!
zc3xx 041e:4017 Creative Webcam Mobile PD1090
zc3xx 041e:401c Creative NX
zc3xx 041e:401e Creative Nx Pro
zc3xx 041e:401f Creative Webcam Notebook PD1171
zc3xx 041e:4029 Creative WebCam Vista Pro
zc3xx 041e:4034 Creative Instant P0620
zc3xx 041e:4035 Creative Instant P0620D
zc3xx 041e:4036 Creative Live !
zc3xx 041e:403a Creative Nx Pro 2
zc3xx 041e:4051 Creative Live!Cam Notebook Pro (VF0250)
zc3xx 041e:4053 Creative Live!Cam Video IM
zc3xx 0458:7007 Genius VideoCam V2
zc3xx 0458:700c Genius VideoCam V3
zc3xx 0458:700f Genius VideoCam Web V2
zc3xx 0461:0a00 MicroInnovation WebCam320
zc3xx 046d:08a0 Logitech QC IM
zc3xx 046d:08a1 Logitech QC IM 0x08A1 +sound
zc3xx 046d:08a2 Labtec Webcam Pro
zc3xx 046d:08a3 Logitech QC Chat
zc3xx 046d:08a6 Logitech QCim
zc3xx 046d:08a7 Logitech QuickCam Image
zc3xx 046d:08a9 Logitech Notebook Deluxe
zc3xx 046d:08aa Labtec Webcam Notebook
zc3xx 046d:08ac Logitech QuickCam Cool
zc3xx 046d:08ad Logitech QCCommunicate STX
zc3xx 046d:08ae Logitech QuickCam for Notebooks
zc3xx 046d:08af Logitech QuickCam Cool
zc3xx 046d:08b9 Logitech QC IM ???
zc3xx 046d:08d7 Logitech QCam STX
zc3xx 046d:08d9 Logitech QuickCam IM/Connect
zc3xx 046d:08d8 Logitech Notebook Deluxe
zc3xx 046d:08da Logitech QuickCam Messenger
zc3xx 046d:08dd Logitech QuickCam for Notebooks
zc3xx 0471:0325 Philips SPC 200 NC
zc3xx 0471:0326 Philips SPC 300 NC
zc3xx 0471:032d Philips spc210nc
zc3xx 0471:032e Philips spc315nc
zc3xx 055f:c005 Mustek Wcam300A
zc3xx 055f:d003 Mustek WCam300A
zc3xx 055f:d004 Mustek WCam300 AN
zc3xx 0698:2003 CTX M730V built in
zc3xx 0ac8:0302 Z-star Vimicro zc0302
zc3xx 0ac8:301b Z-Star zc301b
zc3xx 0ac8:303b Vimicro 0x303b
zc3xx 0ac8:305b Z-star Vimicro zc0305b
zc3xx 0ac8:307b Ldlc VC302+Ov7620
vc032x 0ac8:c001 Sony embedded vimicro
vc032x 0ac8:c002 Sony embedded vimicro
spca508 0af9:0010 Hama USB Sightcam 100
spca508 0af9:0011 Hama USB Sightcam 100
sonixb 0c45:6001 Genius VideoCAM NB
sonixb 0c45:6005 Sweex Tas5110
sonixb 0c45:6007 Sonix sn9c101 + Tas5110D
sonixb 0c45:6009 spcaCam@120
sonixb 0c45:600d spcaCam@120
sonixb 0c45:6011 MAX Webcam (Microdia - OV6650 - SN9C101G)
sonixb 0c45:6019 Generic Sonix OV7630
sonixb 0c45:6024 Generic Sonix Tas5130c
sonixb 0c45:6025 Xcam Shanga
sonixb 0c45:6028 Sonix Btc Pc380
sonixb 0c45:6029 spcaCam@150
sonixb 0c45:602c Generic Sonix OV7630
sonixb 0c45:602d LIC-200 LG
sonixb 0c45:602e Genius VideoCam Messenger
sonixj 0c45:6040 Speed NVC 350K
sonixj 0c45:607c Sonix sn9c102p Hv7131R
sonixj 0c45:60c0 Sangha Sn535
sonixj 0c45:60ec SN9C105+MO4000
sonixj 0c45:60fb Surfer NoName
sonixj 0c45:60fc LG-LIC300
sonixj 0c45:612a Avant Camera
sonixj 0c45:612c Typhoon Rasy Cam 1.3MPix
sonixj 0c45:6130 Sonix Pccam
sonixj 0c45:6138 Sn9c120 Mo4000
sonixj 0c45:613b Surfer SN-206
sonixj 0c45:613c Sonix Pccam168
sunplus 0d64:0303 Sunplus FashionCam DXG
etoms 102c:6151 Qcam Sangha CIF
etoms 102c:6251 Qcam xxxxxx VGA
zc3xx 10fd:0128 Typhoon Webshot II USB 300k 0x0128
spca561 10fd:7e50 FlyCam Usb 100
zc3xx 10fd:8050 Typhoon Webshot II USB 300k
spca501 1776:501c Arowana 300K CMOS Camera
t613 17a1:0128 T613/TAS5130A
vc032x 17ef:4802 Lenovo Vc0323+MI1310_SOC
pac207 2001:f115 D-Link DSB-C120
spca500 2899:012c Toptro Industrial
spca508 8086:0110 Intel Easy PC Camera
spca500 8086:0630 Intel Pocket PC Camera
spca506 99fa:8988 Grandtec V.cap
spca561 abcd:cdee Petcam
......@@ -117,6 +117,7 @@ obj-$(CONFIG_USB_SN9C102) += sn9c102/
obj-$(CONFIG_USB_ET61X251) += et61x251/
obj-$(CONFIG_USB_PWC) += pwc/
obj-$(CONFIG_USB_ZC0301) += zc0301/
obj-$(CONFIG_USB_GSPCA) += gspca/
obj-$(CONFIG_USB_IBMCAM) += usbvideo/
obj-$(CONFIG_USB_KONICAWC) += usbvideo/
......
......@@ -2,7 +2,7 @@ config USB_GSPCA
tristate "USB GSPCA driver"
depends on VIDEO_V4L2
---help---
Say Y here if you want support for various USB cameras.
Say Y here if you want support for various USB webcams.
See <file:Documentation/video4linux/gspca.txt> for more info.
......
obj-$(CONFIG_GSPCA) += gspca_main.o \
gspca_pac207.o gspca_stk014.o gspca_zc3xx.o
obj-$(CONFIG_USB_GSPCA) += gspca_main.o \
gspca_conex.o gspca_etoms.o gspca_mars.o \
gspca_ov519.o gspca_pac207.o gspca_pac7311.o \
gspca_sonixb.o gspca_sonixj.o gspca_spca500.o gspca_spca501.o \
gspca_spca505.o gspca_spca506.o gspca_spca508.o gspca_spca561.o \
gspca_sunplus.o gspca_stk014.o gspca_t613.o gspca_tv8532.o \
gspca_vc032x.o gspca_zc3xx.o
gspca_main-objs := gspca.o
gspca_conex-objs := conex.o
gspca_etoms-objs := etoms.o
gspca_mars-objs := mars.o
gspca_ov519-objs := ov519.o
gspca_pac207-objs := pac207.o
gspca_pac7311-objs := pac7311.o
gspca_sonixb-objs := sonixb.o
gspca_sonixj-objs := sonixj.o
gspca_spca500-objs := spca500.o
gspca_spca501-objs := spca501.o
gspca_spca505-objs := spca505.o
gspca_spca506-objs := spca506.o
gspca_spca508-objs := spca508.o
gspca_spca561-objs := spca561.o
gspca_stk014-objs := stk014.o
gspca_sunplus-objs := sunplus.o
gspca_t613-objs := t613.o
gspca_tv8532-objs := tv8532.o
gspca_vc032x-objs := vc032x.o
gspca_zc3xx-objs := zc3xx.o
此差异已折叠。
此差异已折叠。
此差异已折叠。
......@@ -9,7 +9,26 @@
#include <media/v4l2-common.h>
#include <linux/mutex.h>
#ifdef GSPCA_DEBUG
/* values in 2.6.27 */
#ifndef V4L2_PIX_FMT_SPCA501
#define V4L2_PIX_FMT_SPCA501 v4l2_fourcc('S', '5', '0', '1')
#endif
#ifndef V4L2_PIX_FMT_SPCA561
#define V4L2_PIX_FMT_SPCA561 v4l2_fourcc('S', '5', '6', '1')
#endif
/* values in 2.6.26 */
#ifndef V4L2_CID_POWER_LINE_FREQUENCY
#define V4L2_CID_POWER_LINE_FREQUENCY (V4L2_CID_BASE+24)
#endif
#ifndef V4L2_CID_WHITE_BALANCE_TEMPERATURE
#define V4L2_CID_WHITE_BALANCE_TEMPERATURE (V4L2_CID_BASE + 26)
#endif
#ifndef V4L2_CID_SHARPNESS
#define V4L2_CID_SHARPNESS (V4L2_CID_BASE+27)
#endif
#ifdef VIDEO_ADV_DEBUG
/* GSPCA our debug messages */
extern int gspca_debug;
#define PDEBUG(level, fmt, args...) \
......@@ -47,7 +66,7 @@ extern int gspca_debug;
#define GSPCA_MAX_FRAMES 16 /* maximum number of video frame buffers */
/* ISOC transfers */
#define MAX_NURBS 32 /* max number of URBs (read & userptr) */
#define MAX_NURBS 16 /* max number of URBs */
#define ISO_MAX_PKT 32 /* max number of packets in an ISOC transfer */
#define ISO_MAX_SIZE 0x8000 /* max size of one URB buffer (32 Kb) */
......@@ -79,7 +98,7 @@ typedef int (*cam_qmnu_op) (struct gspca_dev *,
struct v4l2_querymenu *);
typedef void (*cam_pkt_op) (struct gspca_dev *gspca_dev,
struct gspca_frame *frame,
unsigned char *data,
__u8 *data,
int len);
struct ctrl {
......@@ -116,8 +135,8 @@ struct sd_desc {
#define LAST_PACKET 3
struct gspca_frame {
unsigned char *data; /* frame buffer */
unsigned char *data_end; /* end of frame while filling */
__u8 *data; /* frame buffer */
__u8 *data_end; /* end of frame while filling */
int vma_use_count;
struct v4l2_buffer v4l2_buf;
};
......@@ -135,7 +154,7 @@ struct gspca_dev {
__u8 *frbuf; /* buffer for nframes */
struct gspca_frame frame[GSPCA_MAX_FRAMES];
unsigned int frsz; /* frame size */
__u32 frsz; /* frame size */
char nframes; /* number of frames */
char fr_i; /* frame being filled */
char fr_q; /* next frame to queue */
......@@ -145,10 +164,10 @@ struct gspca_dev {
__u8 iface; /* USB interface number */
__u8 alt; /* USB alternate setting */
unsigned char curr_mode; /* current camera mode */
__u8 curr_mode; /* current camera mode */
__u32 pixfmt; /* current mode parameters */
short width;
short height;
__u16 width;
__u16 height;
atomic_t nevent; /* number of frames done */
wait_queue_head_t wq; /* wait queue */
......@@ -176,6 +195,6 @@ void gspca_disconnect(struct usb_interface *intf);
struct gspca_frame *gspca_frame_add(struct gspca_dev *gspca_dev,
int packet_type,
struct gspca_frame *frame,
unsigned char *data,
__u8 *data,
int len);
#endif /* GSPCAV2_H */
/*
* Mars-Semi MR97311A library
* Copyright (C) 2005 <bradlch@hotmail.com>
*
* V4L2 by Jean-Francois Moine <http://moinejf.free.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#define MODULE_NAME "mars"
#include "gspca.h"
#include "jpeg.h"
#define DRIVER_VERSION_NUMBER KERNEL_VERSION(2, 1, 0)
static const char version[] = "2.1.0";
MODULE_AUTHOR("Michel Xhaard <mxhaard@users.sourceforge.net>");
MODULE_DESCRIPTION("GSPCA/Mars USB Camera Driver");
MODULE_LICENSE("GPL");
/* specific webcam descriptor */
struct sd {
struct gspca_dev gspca_dev; /* !! must be the first item */
char qindex;
};
/* V4L2 controls supported by the driver */
static struct ctrl sd_ctrls[] = {
};
static struct cam_mode vga_mode[] = {
{V4L2_PIX_FMT_JPEG, 320, 240, 2},
{V4L2_PIX_FMT_JPEG, 640, 480, 1},
};
/* MI Register table //elvis */
enum {
REG_HW_MI_0,
REG_HW_MI_1,
REG_HW_MI_2,
REG_HW_MI_3,
REG_HW_MI_4,
REG_HW_MI_5,
REG_HW_MI_6,
REG_HW_MI_7,
REG_HW_MI_9 = 0x09,
REG_HW_MI_B = 0x0B,
REG_HW_MI_C,
REG_HW_MI_D,
REG_HW_MI_1E = 0x1E,
REG_HW_MI_20 = 0x20,
REG_HW_MI_2B = 0x2B,
REG_HW_MI_2C,
REG_HW_MI_2D,
REG_HW_MI_2E,
REG_HW_MI_35 = 0x35,
REG_HW_MI_5F = 0x5f,
REG_HW_MI_60,
REG_HW_MI_61,
REG_HW_MI_62,
REG_HW_MI_63,
REG_HW_MI_64,
REG_HW_MI_F1 = 0xf1,
ATTR_TOTAL_MI_REG = 242
};
static int pcam_reg_write(struct usb_device *dev,
__u16 index, unsigned char *value, int length)
{
int rc;
rc = usb_control_msg(dev,
usb_sndbulkpipe(dev, 4),
0x12,
/* ?? 0xc8 = USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_??? !? */
0xc8,
0, /* value */
index, value, length, 500);
PDEBUG(D_USBO, "reg write: 0x%02X , result = 0x%x", index, rc);
if (rc < 0)
PDEBUG(D_ERR, "reg write: error %d", rc);
return rc;
}
static void MISensor_BulkWrite(struct usb_device *dev, unsigned short *pch,
char Address)
{
int result;
unsigned char data[6];
data[0] = 0x1f;
data[1] = 0;
data[2] = Address;
data[3] = *pch >> 8; /* high byte */
data[4] = *pch; /* low byte */
data[5] = 0;
result = usb_control_msg(dev,
usb_sndbulkpipe(dev, 4),
0x12,
/* ?? 0xc8 = USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_??? !? */
0xc8,
0, /* value */
Address, /* index */
data, 5, 500);
PDEBUG(D_USBO, "bulk write 0x%02x = 0x%04x", Address, *pch);
if (result < 0)
PDEBUG(D_ERR, "reg write: error %d", result);
}
/* this function is called at probe time */
static int sd_config(struct gspca_dev *gspca_dev,
const struct usb_device_id *id)
{
struct sd *sd = (struct sd *) gspca_dev;
struct cam *cam;
cam = &gspca_dev->cam;
cam->dev_name = (char *) id->driver_info;
cam->epaddr = 0x01;
cam->cam_mode = vga_mode;
cam->nmodes = sizeof vga_mode / sizeof vga_mode[0];
sd->qindex = 1; /* set the quantization table */
return 0;
}
/* this function is called at open time */
static int sd_open(struct gspca_dev *gspca_dev)
{
return 0;
}
static void sd_start(struct gspca_dev *gspca_dev)
{
struct usb_device *dev = gspca_dev->dev;
int err_code;
__u8 data[12];
__u16 MI_buf[242];
int h_size, v_size;
int intpipe;
/* struct usb_device *dev = pcam->dev; */
memset(data, 0, sizeof data);
memset(MI_buf, 0, sizeof MI_buf);
PDEBUG(D_STREAM, "camera start, iface %d, alt 8", gspca_dev->iface);
if (usb_set_interface(dev, gspca_dev->iface, 8) < 0) {
PDEBUG(D_ERR|D_STREAM, "Set packet size: set interface error");
return;
}
data[0] = 0x01; /* address */
data[1] = 0x01;
err_code = pcam_reg_write(dev, data[0], data, 0x02);
if (err_code < 0)
return;
/*
Initialize the MR97113 chip register
*/
data[0] = 0x00; /* address */
data[1] = 0x0c | 0x01; /* reg 0 */
data[2] = 0x01; /* reg 1 */
h_size = gspca_dev->width;
v_size = gspca_dev->height;
data[3] = h_size / 8; /* h_size , reg 2 */
data[4] = v_size / 8; /* v_size , reg 3 */
data[5] = 0x30; /* reg 4, MI, PAS5101 :
* 0x30 for 24mhz , 0x28 for 12mhz */
data[6] = 4; /* reg 5, H start */
data[7] = 0xc0; /* reg 6, gamma 1.5 */
data[8] = 3; /* reg 7, V start */
/* if(h_size == 320 ) */
/* data[9]= 0x56; * reg 8, 24MHz, 2:1 scale down */
/* else */
data[9] = 0x52; /* reg 8, 24MHz, no scale down */
data[10] = 0x5d; /* reg 9, I2C device address
* [for PAS5101 (0x40)] [for MI (0x5d)] */
err_code = pcam_reg_write(dev, data[0], data, 0x0b);
if (err_code < 0)
return;
data[0] = 0x23; /* address */
data[1] = 0x09; /* reg 35, append frame header */
err_code = pcam_reg_write(dev, data[0], data, 0x02);
if (err_code < 0) {
PDEBUG(D_ERR, "Register write failed");
return;
}
data[0] = 0x3C; /* address */
/* if (pcam->width == 1280) */
/* data[1] = 200; * reg 60, pc-cam frame size
* (unit: 4KB) 800KB */
/* else */
data[1] = 50; /* 50 reg 60, pc-cam frame size
* (unit: 4KB) 200KB */
err_code = pcam_reg_write(dev, data[0], data, 0x02);
if (err_code < 0)
return;
if (0) { /* fixed dark-gain */
data[1] = 0; /* reg 94, Y Gain (1.75) */
data[2] = 0; /* reg 95, UV Gain (1.75) */
data[3] = 0x3f; /* reg 96, Y Gain/UV Gain/disable auto dark-gain */
data[4] = 0; /* reg 97, set fixed dark level */
data[5] = 0; /* reg 98, don't care */
} else { /* auto dark-gain */
data[1] = 0; /* reg 94, Y Gain (auto) */
data[2] = 0; /* reg 95, UV Gain (1.75) */
data[3] = 0x78; /* reg 96, Y Gain/UV Gain/disable auto dark-gain */
switch (gspca_dev->width) {
/* case 1280: */
/* data[4] = 154;
* reg 97, %3 shadow point (unit: 256 pixel) */
/* data[5] = 51;
* reg 98, %1 highlight point
* (uint: 256 pixel) */
/* break; */
default:
/* case 640: */
data[4] = 36; /* reg 97, %3 shadow point
* (unit: 256 pixel) */
data[5] = 12; /* reg 98, %1 highlight point
* (uint: 256 pixel) */
break;
case 320:
data[4] = 9; /* reg 97, %3 shadow point
* (unit: 256 pixel) */
data[5] = 3; /* reg 98, %1 highlight point
* (uint: 256 pixel) */
break;
}
}
/* auto dark-gain */
data[0] = 0x5e; /* address */
err_code = pcam_reg_write(dev, data[0], data, 0x06);
if (err_code < 0)
return;
data[0] = 0x67;
data[1] = 0x13; /* reg 103, first pixel B, disable sharpness */
err_code = pcam_reg_write(dev, data[0], data, 0x02);
if (err_code < 0)
return;
/*
* initialize the value of MI sensor...
*/
MI_buf[REG_HW_MI_1] = 0x000a;
MI_buf[REG_HW_MI_2] = 0x000c;
MI_buf[REG_HW_MI_3] = 0x0405;
MI_buf[REG_HW_MI_4] = 0x0507;
/* mi_Attr_Reg_[REG_HW_MI_5] = 0x01ff;//13 */
MI_buf[REG_HW_MI_5] = 0x0013; /* 13 */
MI_buf[REG_HW_MI_6] = 0x001f; /* vertical blanking */
/* mi_Attr_Reg_[REG_HW_MI_6] = 0x0400; // vertical blanking */
MI_buf[REG_HW_MI_7] = 0x0002;
/* mi_Attr_Reg_[REG_HW_MI_9] = 0x015f; */
/* mi_Attr_Reg_[REG_HW_MI_9] = 0x030f; */
MI_buf[REG_HW_MI_9] = 0x0374;
MI_buf[REG_HW_MI_B] = 0x0000;
MI_buf[REG_HW_MI_C] = 0x0000;
MI_buf[REG_HW_MI_D] = 0x0000;
MI_buf[REG_HW_MI_1E] = 0x8000;
/* mi_Attr_Reg_[REG_HW_MI_20] = 0x1104; */
MI_buf[REG_HW_MI_20] = 0x1104; /* 0x111c; */
MI_buf[REG_HW_MI_2B] = 0x0008;
/* mi_Attr_Reg_[REG_HW_MI_2C] = 0x000f; */
MI_buf[REG_HW_MI_2C] = 0x001f; /* lita suggest */
MI_buf[REG_HW_MI_2D] = 0x0008;
MI_buf[REG_HW_MI_2E] = 0x0008;
MI_buf[REG_HW_MI_35] = 0x0051;
MI_buf[REG_HW_MI_5F] = 0x0904; /* fail to write */
MI_buf[REG_HW_MI_60] = 0x0000;
MI_buf[REG_HW_MI_61] = 0x0000;
MI_buf[REG_HW_MI_62] = 0x0498;
MI_buf[REG_HW_MI_63] = 0x0000;
MI_buf[REG_HW_MI_64] = 0x0000;
MI_buf[REG_HW_MI_F1] = 0x0001;
/* changing while setting up the different value of dx/dy */
if (gspca_dev->width != 1280) {
MI_buf[0x01] = 0x010a;
MI_buf[0x02] = 0x014c;
MI_buf[0x03] = 0x01e5;
MI_buf[0x04] = 0x0287;
}
MI_buf[0x20] = 0x1104;
MISensor_BulkWrite(dev, MI_buf + 1, 1);
MISensor_BulkWrite(dev, MI_buf + 2, 2);
MISensor_BulkWrite(dev, MI_buf + 3, 3);
MISensor_BulkWrite(dev, MI_buf + 4, 4);
MISensor_BulkWrite(dev, MI_buf + 5, 5);
MISensor_BulkWrite(dev, MI_buf + 6, 6);
MISensor_BulkWrite(dev, MI_buf + 7, 7);
MISensor_BulkWrite(dev, MI_buf + 9, 9);
MISensor_BulkWrite(dev, MI_buf + 0x0b, 0x0b);
MISensor_BulkWrite(dev, MI_buf + 0x0c, 0x0c);
MISensor_BulkWrite(dev, MI_buf + 0x0d, 0x0d);
MISensor_BulkWrite(dev, MI_buf + 0x1e, 0x1e);
MISensor_BulkWrite(dev, MI_buf + 0x20, 0x20);
MISensor_BulkWrite(dev, MI_buf + 0x2b, 0x2b);
MISensor_BulkWrite(dev, MI_buf + 0x2c, 0x2c);
MISensor_BulkWrite(dev, MI_buf + 0x2d, 0x2d);
MISensor_BulkWrite(dev, MI_buf + 0x2e, 0x2e);
MISensor_BulkWrite(dev, MI_buf + 0x35, 0x35);
MISensor_BulkWrite(dev, MI_buf + 0x5f, 0x5f);
MISensor_BulkWrite(dev, MI_buf + 0x60, 0x60);
MISensor_BulkWrite(dev, MI_buf + 0x61, 0x61);
MISensor_BulkWrite(dev, MI_buf + 0x62, 0x62);
MISensor_BulkWrite(dev, MI_buf + 0x63, 0x63);
MISensor_BulkWrite(dev, MI_buf + 0x64, 0x64);
MISensor_BulkWrite(dev, MI_buf + 0xf1, 0xf1);
intpipe = usb_sndintpipe(dev, 0);
err_code = usb_clear_halt(dev, intpipe);
data[0] = 0x00;
data[1] = 0x4d; /* ISOC transfering enable... */
pcam_reg_write(dev, data[0], data, 0x02);
}
static void sd_stopN(struct gspca_dev *gspca_dev)
{
int result;
__u8 data[2];
data[0] = 1;
data[1] = 0;
result = pcam_reg_write(gspca_dev->dev, data[0], data, 2);
if (result < 0)
PDEBUG(D_ERR, "Camera Stop failed");
}
static void sd_stop0(struct gspca_dev *gspca_dev)
{
}
static void sd_close(struct gspca_dev *gspca_dev)
{
}
static void sd_pkt_scan(struct gspca_dev *gspca_dev,
struct gspca_frame *frame, /* target */
unsigned char *data, /* isoc packet */
int len) /* iso packet length */
{
struct sd *sd = (struct sd *) gspca_dev;
int p;
if (len < 6) {
/* gspca_dev->last_packet_type = DISCARD_PACKET; */
return;
}
for (p = 0; p < len - 6; p++) {
if (data[0 + p] == 0xff
&& data[1 + p] == 0xff
&& data[2 + p] == 0x00
&& data[3 + p] == 0xff
&& data[4 + p] == 0x96) {
if (data[5 + p] == 0x64
|| data[5 + p] == 0x65
|| data[5 + p] == 0x66
|| data[5 + p] == 0x67) {
PDEBUG(D_PACK, "sof offset: %d leng: %d",
p, len);
frame = gspca_frame_add(gspca_dev, LAST_PACKET,
frame, data, 0);
/* put the JPEG header */
jpeg_put_header(gspca_dev, frame,
sd->qindex, 0x21);
data += 16;
len -= 16;
break;
}
}
}
gspca_frame_add(gspca_dev, INTER_PACKET, frame, data, len);
}
/* sub-driver description */
static struct sd_desc sd_desc = {
.name = MODULE_NAME,
.ctrls = sd_ctrls,
.nctrls = ARRAY_SIZE(sd_ctrls),
.config = sd_config,
.open = sd_open,
.start = sd_start,
.stopN = sd_stopN,
.stop0 = sd_stop0,
.close = sd_close,
.pkt_scan = sd_pkt_scan,
};
/* -- module initialisation -- */
#define DVNM(name) .driver_info = (kernel_ulong_t) name
static __devinitdata struct usb_device_id device_table[] = {
{USB_DEVICE(0x093a, 0x050f), DVNM("Mars-Semi Pc-Camera")},
{}
};
MODULE_DEVICE_TABLE(usb, device_table);
/* -- device connect -- */
static int sd_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
THIS_MODULE);
}
static struct usb_driver sd_driver = {
.name = MODULE_NAME,
.id_table = device_table,
.probe = sd_probe,
.disconnect = gspca_disconnect,
};
/* -- module insert / remove -- */
static int __init sd_mod_init(void)
{
if (usb_register(&sd_driver) < 0)
return -1;
PDEBUG(D_PROBE, "v%s registered", version);
return 0;
}
static void __exit sd_mod_exit(void)
{
usb_deregister(&sd_driver);
PDEBUG(D_PROBE, "deregistered");
}
module_init(sd_mod_init);
module_exit(sd_mod_exit);
此差异已折叠。
......@@ -27,8 +27,8 @@
#include "gspca.h"
#define DRIVER_VERSION_NUMBER KERNEL_VERSION(0, 2, 15)
static const char version[] = "0.2.15";
#define DRIVER_VERSION_NUMBER KERNEL_VERSION(2, 1, 0)
static const char version[] = "2.1.0";
MODULE_AUTHOR("Hans de Goede <j.w.r.degoede@hhs.nl>");
MODULE_DESCRIPTION("Pixart PAC207");
......@@ -297,7 +297,6 @@ static int sd_open(struct gspca_dev *gspca_dev)
struct sd *sd = (struct sd *) gspca_dev;
sd->autogain = 1;
return 0;
}
......@@ -338,7 +337,7 @@ static void sd_start(struct gspca_dev *gspca_dev)
pac207_write_reg(gspca_dev, 0x13, 0x01); /* Bit 0, auto clear */
pac207_write_reg(gspca_dev, 0x1c, 0x01); /* not documented */
udelay(1000); /* taken from gspca */
msleep(10);
pac207_write_reg(gspca_dev, 0x40, 0x01); /* Start ISO pipe */
sd->sof_read = 0;
......@@ -743,8 +742,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
PDEBUG(D_STREAM, "Incomplete frame");
}
pac207_decode_frame_init(gspca_dev);
gspca_frame_add(gspca_dev, FIRST_PACKET, frame, NULL,
0);
gspca_frame_add(gspca_dev, FIRST_PACKET, frame, NULL, 0);
len -= sof - data;
data = sof;
}
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
......@@ -324,6 +324,8 @@ struct v4l2_pix_format
#define V4L2_PIX_FMT_PWC1 v4l2_fourcc('P','W','C','1') /* pwc older webcam */
#define V4L2_PIX_FMT_PWC2 v4l2_fourcc('P','W','C','2') /* pwc newer webcam */
#define V4L2_PIX_FMT_ET61X251 v4l2_fourcc('E','6','2','5') /* ET61X251 compression */
#define V4L2_PIX_FMT_SPCA501 v4l2_fourcc('S','5','0','1') /* YUYV per line */
#define V4L2_PIX_FMT_SPCA561 v4l2_fourcc('S','5','6','1') /* compressed BGGR bayer */
/*
* F O R M A T E N U M E R A T I O N
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册