diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /Documentation/video4linux | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'Documentation/video4linux')
-rw-r--r-- | Documentation/video4linux/CARDLIST.cx23885 | 3 | ||||
-rw-r--r-- | Documentation/video4linux/CARDLIST.cx88 | 1 | ||||
-rw-r--r-- | Documentation/video4linux/CARDLIST.em28xx | 3 | ||||
-rw-r--r-- | Documentation/video4linux/CARDLIST.saa7134 | 3 | ||||
-rw-r--r-- | Documentation/video4linux/CARDLIST.tuner | 1 | ||||
-rw-r--r-- | Documentation/video4linux/README.tlg2300 | 47 | ||||
-rw-r--r-- | Documentation/video4linux/gspca.txt | 70 | ||||
-rw-r--r-- | Documentation/video4linux/sh_mobile_ceu_camera.txt | 157 | ||||
-rw-r--r-- | Documentation/video4linux/si4713.txt | 2 | ||||
-rw-r--r-- | Documentation/video4linux/v4l2-framework.txt | 122 | ||||
-rw-r--r-- | Documentation/video4linux/videobuf | 360 | ||||
-rw-r--r-- | Documentation/video4linux/zr364xx.txt | 1 |
12 files changed, 649 insertions, 121 deletions
diff --git a/Documentation/video4linux/CARDLIST.cx23885 b/Documentation/video4linux/CARDLIST.cx23885 index 5f33d8486102..16ca030e1185 100644 --- a/Documentation/video4linux/CARDLIST.cx23885 +++ b/Documentation/video4linux/CARDLIST.cx23885 | |||
@@ -24,3 +24,6 @@ | |||
24 | 23 -> Magic-Pro ProHDTV Extreme 2 [14f1:8657] | 24 | 23 -> Magic-Pro ProHDTV Extreme 2 [14f1:8657] |
25 | 24 -> Hauppauge WinTV-HVR1850 [0070:8541] | 25 | 24 -> Hauppauge WinTV-HVR1850 [0070:8541] |
26 | 25 -> Compro VideoMate E800 [1858:e800] | 26 | 25 -> Compro VideoMate E800 [1858:e800] |
27 | 26 -> Hauppauge WinTV-HVR1290 [0070:8551] | ||
28 | 27 -> Mygica X8558 PRO DMB-TH [14f1:8578] | ||
29 | 28 -> LEADTEK WinFast PxTV1200 [107d:6f22] | ||
diff --git a/Documentation/video4linux/CARDLIST.cx88 b/Documentation/video4linux/CARDLIST.cx88 index 3385f8b094a5..7ec3c4e4b60f 100644 --- a/Documentation/video4linux/CARDLIST.cx88 +++ b/Documentation/video4linux/CARDLIST.cx88 | |||
@@ -81,3 +81,4 @@ | |||
81 | 80 -> Hauppauge WinTV-IR Only [0070:9290] | 81 | 80 -> Hauppauge WinTV-IR Only [0070:9290] |
82 | 81 -> Leadtek WinFast DTV1800 Hybrid [107d:6654] | 82 | 81 -> Leadtek WinFast DTV1800 Hybrid [107d:6654] |
83 | 82 -> WinFast DTV2000 H rev. J [107d:6f2b] | 83 | 82 -> WinFast DTV2000 H rev. J [107d:6f2b] |
84 | 83 -> Prof 7301 DVB-S/S2 [b034:3034] | ||
diff --git a/Documentation/video4linux/CARDLIST.em28xx b/Documentation/video4linux/CARDLIST.em28xx index b8afef4c0e01..0c166ff003a0 100644 --- a/Documentation/video4linux/CARDLIST.em28xx +++ b/Documentation/video4linux/CARDLIST.em28xx | |||
@@ -1,5 +1,5 @@ | |||
1 | 0 -> Unknown EM2800 video grabber (em2800) [eb1a:2800] | 1 | 0 -> Unknown EM2800 video grabber (em2800) [eb1a:2800] |
2 | 1 -> Unknown EM2750/28xx video grabber (em2820/em2840) [eb1a:2710,eb1a:2820,eb1a:2821,eb1a:2860,eb1a:2861,eb1a:2870,eb1a:2881,eb1a:2883,eb1a:2868] | 2 | 1 -> Unknown EM2750/28xx video grabber (em2820/em2840) [eb1a:2710,eb1a:2820,eb1a:2821,eb1a:2860,eb1a:2861,eb1a:2862,eb1a:2870,eb1a:2881,eb1a:2883,eb1a:2868] |
3 | 2 -> Terratec Cinergy 250 USB (em2820/em2840) [0ccd:0036] | 3 | 2 -> Terratec Cinergy 250 USB (em2820/em2840) [0ccd:0036] |
4 | 3 -> Pinnacle PCTV USB 2 (em2820/em2840) [2304:0208] | 4 | 3 -> Pinnacle PCTV USB 2 (em2820/em2840) [2304:0208] |
5 | 4 -> Hauppauge WinTV USB 2 (em2820/em2840) [2040:4200,2040:4201] | 5 | 4 -> Hauppauge WinTV USB 2 (em2820/em2840) [2040:4200,2040:4201] |
@@ -69,3 +69,4 @@ | |||
69 | 71 -> Silvercrest Webcam 1.3mpix (em2820/em2840) | 69 | 71 -> Silvercrest Webcam 1.3mpix (em2820/em2840) |
70 | 72 -> Gadmei UTV330+ (em2861) | 70 | 72 -> Gadmei UTV330+ (em2861) |
71 | 73 -> Reddo DVB-C USB TV Box (em2870) | 71 | 73 -> Reddo DVB-C USB TV Box (em2870) |
72 | 74 -> Actionmaster/LinXcel/Digitus VC211A (em2800) | ||
diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134 index 2620d60341ee..b4a767060ed7 100644 --- a/Documentation/video4linux/CARDLIST.saa7134 +++ b/Documentation/video4linux/CARDLIST.saa7134 | |||
@@ -172,3 +172,6 @@ | |||
172 | 171 -> Beholder BeholdTV X7 [5ace:7595] | 172 | 171 -> Beholder BeholdTV X7 [5ace:7595] |
173 | 172 -> RoverMedia TV Link Pro FM [19d1:0138] | 173 | 172 -> RoverMedia TV Link Pro FM [19d1:0138] |
174 | 173 -> Zolid Hybrid TV Tuner PCI [1131:2004] | 174 | 173 -> Zolid Hybrid TV Tuner PCI [1131:2004] |
175 | 174 -> Asus Europa Hybrid OEM [1043:4847] | ||
176 | 175 -> Leadtek Winfast DTV1000S [107d:6655] | ||
177 | 176 -> Beholder BeholdTV 505 RDS [0000:5051] | ||
diff --git a/Documentation/video4linux/CARDLIST.tuner b/Documentation/video4linux/CARDLIST.tuner index e0d298fe8830..9b2e0dd6017e 100644 --- a/Documentation/video4linux/CARDLIST.tuner +++ b/Documentation/video4linux/CARDLIST.tuner | |||
@@ -81,3 +81,4 @@ tuner=80 - Philips FQ1216LME MK3 PAL/SECAM w/active loopthrough | |||
81 | tuner=81 - Partsnic (Daewoo) PTI-5NF05 | 81 | tuner=81 - Partsnic (Daewoo) PTI-5NF05 |
82 | tuner=82 - Philips CU1216L | 82 | tuner=82 - Philips CU1216L |
83 | tuner=83 - NXP TDA18271 | 83 | tuner=83 - NXP TDA18271 |
84 | tuner=84 - Sony BTF-Pxn01Z | ||
diff --git a/Documentation/video4linux/README.tlg2300 b/Documentation/video4linux/README.tlg2300 new file mode 100644 index 000000000000..416ccb93d8c9 --- /dev/null +++ b/Documentation/video4linux/README.tlg2300 | |||
@@ -0,0 +1,47 @@ | |||
1 | tlg2300 release notes | ||
2 | ==================== | ||
3 | |||
4 | This is a v4l2/dvb device driver for the tlg2300 chip. | ||
5 | |||
6 | |||
7 | current status | ||
8 | ============== | ||
9 | |||
10 | video | ||
11 | - support mmap and read().(no overlay) | ||
12 | |||
13 | audio | ||
14 | - The driver will register a ALSA card for the audio input. | ||
15 | |||
16 | vbi | ||
17 | - Works for almost TV norms. | ||
18 | |||
19 | dvb-t | ||
20 | - works for DVB-T | ||
21 | |||
22 | FM | ||
23 | - Works for radio. | ||
24 | |||
25 | --------------------------------------------------------------------------- | ||
26 | TESTED APPLICATIONS: | ||
27 | |||
28 | -VLC1.0.4 test the video and dvb. The GUI is friendly to use. | ||
29 | |||
30 | -Mplayer test the video. | ||
31 | |||
32 | -Mplayer test the FM. The mplayer should be compiled with --enable-radio and | ||
33 | --enable-radio-capture. | ||
34 | The command runs as this(The alsa audio registers to card 1): | ||
35 | #mplayer radio://103.7/capture/ -radio adevice=hw=1,0:arate=48000 \ | ||
36 | -rawaudio rate=48000:channels=2 | ||
37 | |||
38 | --------------------------------------------------------------------------- | ||
39 | KNOWN PROBLEMS: | ||
40 | about preemphasis: | ||
41 | You can set the preemphasis for radio by the following command: | ||
42 | #v4l2-ctl -d /dev/radio0 --set-ctrl=pre_emphasis_settings=1 | ||
43 | |||
44 | "pre_emphasis_settings=1" means that you select the 50us. If you want | ||
45 | to select the 75us, please use "pre_emphasis_settings=2" | ||
46 | |||
47 | |||
diff --git a/Documentation/video4linux/gspca.txt b/Documentation/video4linux/gspca.txt index 3f61825be499..181b9e6fd984 100644 --- a/Documentation/video4linux/gspca.txt +++ b/Documentation/video4linux/gspca.txt | |||
@@ -6,11 +6,13 @@ The modules are: | |||
6 | 6 | ||
7 | xxxx vend:prod | 7 | xxxx vend:prod |
8 | ---- | 8 | ---- |
9 | spca501 0000:0000 MystFromOri Unknow Camera | 9 | spca501 0000:0000 MystFromOri Unknown Camera |
10 | spca508 0130:0130 Clone Digital Webcam 11043 | ||
10 | m5602 0402:5602 ALi Video Camera Controller | 11 | m5602 0402:5602 ALi Video Camera Controller |
11 | spca501 040a:0002 Kodak DVC-325 | 12 | spca501 040a:0002 Kodak DVC-325 |
12 | spca500 040a:0300 Kodak EZ200 | 13 | spca500 040a:0300 Kodak EZ200 |
13 | zc3xx 041e:041e Creative WebCam Live! | 14 | zc3xx 041e:041e Creative WebCam Live! |
15 | ov519 041e:4003 Video Blaster WebCam Go Plus | ||
14 | spca500 041e:400a Creative PC-CAM 300 | 16 | spca500 041e:400a Creative PC-CAM 300 |
15 | sunplus 041e:400b Creative PC-CAM 600 | 17 | sunplus 041e:400b Creative PC-CAM 600 |
16 | sunplus 041e:4012 PC-Cam350 | 18 | sunplus 041e:4012 PC-Cam350 |
@@ -37,8 +39,10 @@ ov519 041e:405f Creative Live! VISTA VF0330 | |||
37 | ov519 041e:4060 Creative Live! VISTA VF0350 | 39 | ov519 041e:4060 Creative Live! VISTA VF0350 |
38 | ov519 041e:4061 Creative Live! VISTA VF0400 | 40 | ov519 041e:4061 Creative Live! VISTA VF0400 |
39 | ov519 041e:4064 Creative Live! VISTA VF0420 | 41 | ov519 041e:4064 Creative Live! VISTA VF0420 |
42 | ov519 041e:4067 Creative Live! Cam Video IM (VF0350) | ||
40 | ov519 041e:4068 Creative Live! VISTA VF0470 | 43 | ov519 041e:4068 Creative Live! VISTA VF0470 |
41 | spca561 0458:7004 Genius VideoCAM Express V2 | 44 | spca561 0458:7004 Genius VideoCAM Express V2 |
45 | sn9c2028 0458:7005 Genius Smart 300, version 2 | ||
42 | sunplus 0458:7006 Genius Dsc 1.3 Smart | 46 | sunplus 0458:7006 Genius Dsc 1.3 Smart |
43 | zc3xx 0458:7007 Genius VideoCam V2 | 47 | zc3xx 0458:7007 Genius VideoCam V2 |
44 | zc3xx 0458:700c Genius VideoCam V3 | 48 | zc3xx 0458:700c Genius VideoCam V3 |
@@ -68,12 +72,12 @@ zc3xx 046d:08a3 Logitech QC Chat | |||
68 | zc3xx 046d:08a6 Logitech QCim | 72 | zc3xx 046d:08a6 Logitech QCim |
69 | zc3xx 046d:08a7 Logitech QuickCam Image | 73 | zc3xx 046d:08a7 Logitech QuickCam Image |
70 | zc3xx 046d:08a9 Logitech Notebook Deluxe | 74 | zc3xx 046d:08a9 Logitech Notebook Deluxe |
71 | zc3xx 046d:08aa Labtec Webcam Notebook | 75 | zc3xx 046d:08aa Labtec Webcam Notebook |
72 | zc3xx 046d:08ac Logitech QuickCam Cool | 76 | zc3xx 046d:08ac Logitech QuickCam Cool |
73 | zc3xx 046d:08ad Logitech QCCommunicate STX | 77 | zc3xx 046d:08ad Logitech QCCommunicate STX |
74 | zc3xx 046d:08ae Logitech QuickCam for Notebooks | 78 | zc3xx 046d:08ae Logitech QuickCam for Notebooks |
75 | zc3xx 046d:08af Logitech QuickCam Cool | 79 | zc3xx 046d:08af Logitech QuickCam Cool |
76 | zc3xx 046d:08b9 Logitech QC IM ??? | 80 | zc3xx 046d:08b9 Logitech QuickCam Express |
77 | zc3xx 046d:08d7 Logitech QCam STX | 81 | zc3xx 046d:08d7 Logitech QCam STX |
78 | zc3xx 046d:08d9 Logitech QuickCam IM/Connect | 82 | zc3xx 046d:08d9 Logitech QuickCam IM/Connect |
79 | zc3xx 046d:08d8 Logitech Notebook Deluxe | 83 | zc3xx 046d:08d8 Logitech Notebook Deluxe |
@@ -82,7 +86,7 @@ zc3xx 046d:08dd Logitech QuickCam for Notebooks | |||
82 | spca500 046d:0900 Logitech Inc. ClickSmart 310 | 86 | spca500 046d:0900 Logitech Inc. ClickSmart 310 |
83 | spca500 046d:0901 Logitech Inc. ClickSmart 510 | 87 | spca500 046d:0901 Logitech Inc. ClickSmart 510 |
84 | sunplus 046d:0905 Logitech ClickSmart 820 | 88 | sunplus 046d:0905 Logitech ClickSmart 820 |
85 | tv8532 046d:0920 QC Express | 89 | tv8532 046d:0920 Logitech QuickCam Express |
86 | tv8532 046d:0921 Labtec Webcam | 90 | tv8532 046d:0921 Labtec Webcam |
87 | spca561 046d:0928 Logitech QC Express Etch2 | 91 | spca561 046d:0928 Logitech QC Express Etch2 |
88 | spca561 046d:0929 Labtec Webcam Elch2 | 92 | spca561 046d:0929 Labtec Webcam Elch2 |
@@ -91,7 +95,7 @@ spca561 046d:092b Labtec Webcam Plus | |||
91 | spca561 046d:092c Logitech QC chat Elch2 | 95 | spca561 046d:092c Logitech QC chat Elch2 |
92 | spca561 046d:092d Logitech QC Elch2 | 96 | spca561 046d:092d Logitech QC Elch2 |
93 | spca561 046d:092e Logitech QC Elch2 | 97 | spca561 046d:092e Logitech QC Elch2 |
94 | spca561 046d:092f Logitech QuickCam Express Plus | 98 | spca561 046d:092f Logitech QuickCam Express Plus |
95 | sunplus 046d:0960 Logitech ClickSmart 420 | 99 | sunplus 046d:0960 Logitech ClickSmart 420 |
96 | sunplus 0471:0322 Philips DMVC1300K | 100 | sunplus 0471:0322 Philips DMVC1300K |
97 | zc3xx 0471:0325 Philips SPC 200 NC | 101 | zc3xx 0471:0325 Philips SPC 200 NC |
@@ -106,6 +110,7 @@ sunplus 04a5:3003 Benq DC 1300 | |||
106 | sunplus 04a5:3008 Benq DC 1500 | 110 | sunplus 04a5:3008 Benq DC 1500 |
107 | sunplus 04a5:300a Benq DC 3410 | 111 | sunplus 04a5:300a Benq DC 3410 |
108 | spca500 04a5:300c Benq DC 1016 | 112 | spca500 04a5:300c Benq DC 1016 |
113 | benq 04a5:3035 Benq DC E300 | ||
109 | finepix 04cb:0104 Fujifilm FinePix 4800 | 114 | finepix 04cb:0104 Fujifilm FinePix 4800 |
110 | finepix 04cb:0109 Fujifilm FinePix A202 | 115 | finepix 04cb:0109 Fujifilm FinePix A202 |
111 | finepix 04cb:010b Fujifilm FinePix A203 | 116 | finepix 04cb:010b Fujifilm FinePix A203 |
@@ -139,6 +144,7 @@ sunplus 04fc:5360 Sunplus Generic | |||
139 | spca500 04fc:7333 PalmPixDC85 | 144 | spca500 04fc:7333 PalmPixDC85 |
140 | sunplus 04fc:ffff Pure DigitalDakota | 145 | sunplus 04fc:ffff Pure DigitalDakota |
141 | spca501 0506:00df 3Com HomeConnect Lite | 146 | spca501 0506:00df 3Com HomeConnect Lite |
147 | sunplus 052b:1507 Megapixel 5 Pretec DC-1007 | ||
142 | sunplus 052b:1513 Megapix V4 | 148 | sunplus 052b:1513 Megapix V4 |
143 | sunplus 052b:1803 MegaImage VI | 149 | sunplus 052b:1803 MegaImage VI |
144 | tv8532 0545:808b Veo Stingray | 150 | tv8532 0545:808b Veo Stingray |
@@ -148,6 +154,7 @@ sunplus 0546:3191 Polaroid Ion 80 | |||
148 | sunplus 0546:3273 Polaroid PDC2030 | 154 | sunplus 0546:3273 Polaroid PDC2030 |
149 | ov519 054c:0154 Sonny toy4 | 155 | ov519 054c:0154 Sonny toy4 |
150 | ov519 054c:0155 Sonny toy5 | 156 | ov519 054c:0155 Sonny toy5 |
157 | cpia1 0553:0002 CPIA CPiA (version1) based cameras | ||
151 | zc3xx 055f:c005 Mustek Wcam300A | 158 | zc3xx 055f:c005 Mustek Wcam300A |
152 | spca500 055f:c200 Mustek Gsmart 300 | 159 | spca500 055f:c200 Mustek Gsmart 300 |
153 | sunplus 055f:c211 Kowa Bs888e Microcamera | 160 | sunplus 055f:c211 Kowa Bs888e Microcamera |
@@ -166,10 +173,14 @@ sunplus 055f:c650 Mustek MDC5500Z | |||
166 | zc3xx 055f:d003 Mustek WCam300A | 173 | zc3xx 055f:d003 Mustek WCam300A |
167 | zc3xx 055f:d004 Mustek WCam300 AN | 174 | zc3xx 055f:d004 Mustek WCam300 AN |
168 | conex 0572:0041 Creative Notebook cx11646 | 175 | conex 0572:0041 Creative Notebook cx11646 |
176 | ov519 05a9:0511 Video Blaster WebCam 3/WebCam Plus, D-Link USB Digital Video Camera | ||
177 | ov519 05a9:0518 Creative WebCam | ||
169 | ov519 05a9:0519 OV519 Microphone | 178 | ov519 05a9:0519 OV519 Microphone |
170 | ov519 05a9:0530 OmniVision | 179 | ov519 05a9:0530 OmniVision |
180 | ov519 05a9:2800 OmniVision SuperCAM | ||
171 | ov519 05a9:4519 Webcam Classic | 181 | ov519 05a9:4519 Webcam Classic |
172 | ov519 05a9:8519 OmniVision | 182 | ov519 05a9:8519 OmniVision |
183 | ov519 05a9:a511 D-Link USB Digital Video Camera | ||
173 | ov519 05a9:a518 D-Link DSB-C310 Webcam | 184 | ov519 05a9:a518 D-Link DSB-C310 Webcam |
174 | sunplus 05da:1018 Digital Dream Enigma 1.3 | 185 | sunplus 05da:1018 Digital Dream Enigma 1.3 |
175 | stk014 05e1:0893 Syntek DV4000 | 186 | stk014 05e1:0893 Syntek DV4000 |
@@ -181,13 +192,11 @@ spca500 06bd:0404 Agfa CL20 | |||
181 | spca500 06be:0800 Optimedia | 192 | spca500 06be:0800 Optimedia |
182 | sunplus 06d6:0031 Trust 610 LCD PowerC@m Zoom | 193 | sunplus 06d6:0031 Trust 610 LCD PowerC@m Zoom |
183 | spca506 06e1:a190 ADS Instant VCD | 194 | spca506 06e1:a190 ADS Instant VCD |
184 | ov534 06f8:3002 Hercules Blog Webcam | 195 | ov534_9 06f8:3003 Hercules Dualpix HD Weblog |
185 | ov534 06f8:3003 Hercules Dualpix HD Weblog | ||
186 | sonixj 06f8:3004 Hercules Classic Silver | 196 | sonixj 06f8:3004 Hercules Classic Silver |
187 | sonixj 06f8:3008 Hercules Deluxe Optical Glass | 197 | sonixj 06f8:3008 Hercules Deluxe Optical Glass |
188 | pac7311 06f8:3009 Hercules Classic Link | 198 | pac7302 06f8:3009 Hercules Classic Link |
189 | spca508 0733:0110 ViewQuest VQ110 | 199 | spca508 0733:0110 ViewQuest VQ110 |
190 | spca508 0130:0130 Clone Digital Webcam 11043 | ||
191 | spca501 0733:0401 Intel Create and Share | 200 | spca501 0733:0401 Intel Create and Share |
192 | spca501 0733:0402 ViewQuest M318B | 201 | spca501 0733:0402 ViewQuest M318B |
193 | spca505 0733:0430 Intel PC Camera Pro | 202 | spca505 0733:0430 Intel PC Camera Pro |
@@ -198,10 +207,13 @@ sunplus 0733:2221 Mercury Digital Pro 3.1p | |||
198 | sunplus 0733:3261 Concord 3045 spca536a | 207 | sunplus 0733:3261 Concord 3045 spca536a |
199 | sunplus 0733:3281 Cyberpix S550V | 208 | sunplus 0733:3281 Cyberpix S550V |
200 | spca506 0734:043b 3DeMon USB Capture aka | 209 | spca506 0734:043b 3DeMon USB Capture aka |
210 | cpia1 0813:0001 QX3 camera | ||
211 | ov519 0813:0002 Dual Mode USB Camera Plus | ||
201 | spca500 084d:0003 D-Link DSC-350 | 212 | spca500 084d:0003 D-Link DSC-350 |
202 | spca500 08ca:0103 Aiptek PocketDV | 213 | spca500 08ca:0103 Aiptek PocketDV |
203 | sunplus 08ca:0104 Aiptek PocketDVII 1.3 | 214 | sunplus 08ca:0104 Aiptek PocketDVII 1.3 |
204 | sunplus 08ca:0106 Aiptek Pocket DV3100+ | 215 | sunplus 08ca:0106 Aiptek Pocket DV3100+ |
216 | mr97310a 08ca:0110 Trust Spyc@m 100 | ||
205 | mr97310a 08ca:0111 Aiptek PenCam VGA+ | 217 | mr97310a 08ca:0111 Aiptek PenCam VGA+ |
206 | sunplus 08ca:2008 Aiptek Mini PenCam 2 M | 218 | sunplus 08ca:2008 Aiptek Mini PenCam 2 M |
207 | sunplus 08ca:2010 Aiptek PocketCam 3M | 219 | sunplus 08ca:2010 Aiptek PocketCam 3M |
@@ -217,12 +229,13 @@ sunplus 08ca:2050 Medion MD 41437 | |||
217 | sunplus 08ca:2060 Aiptek PocketDV5300 | 229 | sunplus 08ca:2060 Aiptek PocketDV5300 |
218 | tv8532 0923:010f ICM532 cams | 230 | tv8532 0923:010f ICM532 cams |
219 | mars 093a:050f Mars-Semi Pc-Camera | 231 | mars 093a:050f Mars-Semi Pc-Camera |
220 | mr97310a 093a:010f Sakar Digital no. 77379 | 232 | mr97310a 093a:010e All known CIF cams with this ID |
233 | mr97310a 093a:010f All known VGA cams with this ID | ||
221 | pac207 093a:2460 Qtec Webcam 100 | 234 | pac207 093a:2460 Qtec Webcam 100 |
222 | pac207 093a:2461 HP Webcam | 235 | pac207 093a:2461 HP Webcam |
223 | pac207 093a:2463 Philips SPC 220 NC | 236 | pac207 093a:2463 Philips SPC 220 NC |
224 | pac207 093a:2464 Labtec Webcam 1200 | 237 | pac207 093a:2464 Labtec Webcam 1200 |
225 | pac207 093a:2468 PAC207 | 238 | pac207 093a:2468 Webcam WB-1400T |
226 | pac207 093a:2470 Genius GF112 | 239 | pac207 093a:2470 Genius GF112 |
227 | pac207 093a:2471 Genius VideoCam ge111 | 240 | pac207 093a:2471 Genius VideoCam ge111 |
228 | pac207 093a:2472 Genius VideoCam ge110 | 241 | pac207 093a:2472 Genius VideoCam ge110 |
@@ -230,18 +243,19 @@ pac207 093a:2474 Genius iLook 111 | |||
230 | pac207 093a:2476 Genius e-Messenger 112 | 243 | pac207 093a:2476 Genius e-Messenger 112 |
231 | pac7311 093a:2600 PAC7311 Typhoon | 244 | pac7311 093a:2600 PAC7311 Typhoon |
232 | pac7311 093a:2601 Philips SPC 610 NC | 245 | pac7311 093a:2601 Philips SPC 610 NC |
233 | pac7311 093a:2603 PAC7312 | 246 | pac7311 093a:2603 Philips SPC 500 NC |
234 | pac7311 093a:2608 Trust WB-3300p | 247 | pac7311 093a:2608 Trust WB-3300p |
235 | pac7311 093a:260e Gigaware VGA PC Camera, Trust WB-3350p, SIGMA cam 2350 | 248 | pac7311 093a:260e Gigaware VGA PC Camera, Trust WB-3350p, SIGMA cam 2350 |
236 | pac7311 093a:260f SnakeCam | 249 | pac7311 093a:260f SnakeCam |
237 | pac7311 093a:2620 Apollo AC-905 | 250 | pac7302 093a:2620 Apollo AC-905 |
238 | pac7311 093a:2621 PAC731x | 251 | pac7302 093a:2621 PAC731x |
239 | pac7311 093a:2622 Genius Eye 312 | 252 | pac7302 093a:2622 Genius Eye 312 |
240 | pac7311 093a:2624 PAC7302 | 253 | pac7302 093a:2624 PAC7302 |
241 | pac7311 093a:2626 Labtec 2200 | 254 | pac7302 093a:2626 Labtec 2200 |
242 | pac7311 093a:2629 Genious iSlim 300 | 255 | pac7302 093a:2628 Genius iLook 300 |
243 | pac7311 093a:262a Webcam 300k | 256 | pac7302 093a:2629 Genious iSlim 300 |
244 | pac7311 093a:262c Philips SPC 230 NC | 257 | pac7302 093a:262a Webcam 300k |
258 | pac7302 093a:262c Philips SPC 230 NC | ||
245 | jeilinj 0979:0280 Sakar 57379 | 259 | jeilinj 0979:0280 Sakar 57379 |
246 | zc3xx 0ac8:0302 Z-star Vimicro zc0302 | 260 | zc3xx 0ac8:0302 Z-star Vimicro zc0302 |
247 | vc032x 0ac8:0321 Vimicro generic vc0321 | 261 | vc032x 0ac8:0321 Vimicro generic vc0321 |
@@ -250,12 +264,13 @@ vc032x 0ac8:0328 A4Tech PK-130MG | |||
250 | zc3xx 0ac8:301b Z-Star zc301b | 264 | zc3xx 0ac8:301b Z-Star zc301b |
251 | zc3xx 0ac8:303b Vimicro 0x303b | 265 | zc3xx 0ac8:303b Vimicro 0x303b |
252 | zc3xx 0ac8:305b Z-star Vimicro zc0305b | 266 | zc3xx 0ac8:305b Z-star Vimicro zc0305b |
253 | zc3xx 0ac8:307b Ldlc VC302+Ov7620 | 267 | zc3xx 0ac8:307b PC Camera (ZS0211) |
254 | vc032x 0ac8:c001 Sony embedded vimicro | 268 | vc032x 0ac8:c001 Sony embedded vimicro |
255 | vc032x 0ac8:c002 Sony embedded vimicro | 269 | vc032x 0ac8:c002 Sony embedded vimicro |
256 | vc032x 0ac8:c301 Samsung Q1 Ultra Premium | 270 | vc032x 0ac8:c301 Samsung Q1 Ultra Premium |
257 | spca508 0af9:0010 Hama USB Sightcam 100 | 271 | spca508 0af9:0010 Hama USB Sightcam 100 |
258 | spca508 0af9:0011 Hama USB Sightcam 100 | 272 | spca508 0af9:0011 Hama USB Sightcam 100 |
273 | ov519 0b62:0059 iBOT2 Webcam | ||
259 | sonixb 0c45:6001 Genius VideoCAM NB | 274 | sonixb 0c45:6001 Genius VideoCAM NB |
260 | sonixb 0c45:6005 Microdia Sweex Mini Webcam | 275 | sonixb 0c45:6005 Microdia Sweex Mini Webcam |
261 | sonixb 0c45:6007 Sonix sn9c101 + Tas5110D | 276 | sonixb 0c45:6007 Sonix sn9c101 + Tas5110D |
@@ -292,6 +307,7 @@ sonixj 0c45:613b Surfer SN-206 | |||
292 | sonixj 0c45:613c Sonix Pccam168 | 307 | sonixj 0c45:613c Sonix Pccam168 |
293 | sonixj 0c45:6143 Sonix Pccam168 | 308 | sonixj 0c45:6143 Sonix Pccam168 |
294 | sonixj 0c45:6148 Digitus DA-70811/ZSMC USB PC Camera ZS211/Microdia | 309 | sonixj 0c45:6148 Digitus DA-70811/ZSMC USB PC Camera ZS211/Microdia |
310 | sonixj 0c45:614a Frontech E-Ccam (JIL-2225) | ||
295 | sn9c20x 0c45:6240 PC Camera (SN9C201 + MT9M001) | 311 | sn9c20x 0c45:6240 PC Camera (SN9C201 + MT9M001) |
296 | sn9c20x 0c45:6242 PC Camera (SN9C201 + MT9M111) | 312 | sn9c20x 0c45:6242 PC Camera (SN9C201 + MT9M111) |
297 | sn9c20x 0c45:6248 PC Camera (SN9C201 + OV9655) | 313 | sn9c20x 0c45:6248 PC Camera (SN9C201 + OV9655) |
@@ -314,9 +330,15 @@ sn9c20x 0c45:62b0 PC Camera (SN9C202 + MT9V011/MT9V111/MT9V112) | |||
314 | sn9c20x 0c45:62b3 PC Camera (SN9C202 + OV9655) | 330 | sn9c20x 0c45:62b3 PC Camera (SN9C202 + OV9655) |
315 | sn9c20x 0c45:62bb PC Camera (SN9C202 + OV7660) | 331 | sn9c20x 0c45:62bb PC Camera (SN9C202 + OV7660) |
316 | sn9c20x 0c45:62bc PC Camera (SN9C202 + HV7131R) | 332 | sn9c20x 0c45:62bc PC Camera (SN9C202 + HV7131R) |
333 | sn9c2028 0c45:8001 Wild Planet Digital Spy Camera | ||
334 | sn9c2028 0c45:8003 Sakar #11199, #6637x, #67480 keychain cams | ||
335 | sn9c2028 0c45:8008 Mini-Shotz ms-350 | ||
336 | sn9c2028 0c45:800a Vivitar Vivicam 3350B | ||
317 | sunplus 0d64:0303 Sunplus FashionCam DXG | 337 | sunplus 0d64:0303 Sunplus FashionCam DXG |
338 | ov519 0e96:c001 TRUST 380 USB2 SPACEC@M | ||
318 | etoms 102c:6151 Qcam Sangha CIF | 339 | etoms 102c:6151 Qcam Sangha CIF |
319 | etoms 102c:6251 Qcam xxxxxx VGA | 340 | etoms 102c:6251 Qcam xxxxxx VGA |
341 | ov519 1046:9967 W9967CF/W9968CF WebCam IC, Video Blaster WebCam Go | ||
320 | zc3xx 10fd:0128 Typhoon Webshot II USB 300k 0x0128 | 342 | zc3xx 10fd:0128 Typhoon Webshot II USB 300k 0x0128 |
321 | spca561 10fd:7e50 FlyCam Usb 100 | 343 | spca561 10fd:7e50 FlyCam Usb 100 |
322 | zc3xx 10fd:8050 Typhoon Webshot II USB 300k | 344 | zc3xx 10fd:8050 Typhoon Webshot II USB 300k |
@@ -329,7 +351,13 @@ spca501 1776:501c Arowana 300K CMOS Camera | |||
329 | t613 17a1:0128 TASCORP JPEG Webcam, NGS Cyclops | 351 | t613 17a1:0128 TASCORP JPEG Webcam, NGS Cyclops |
330 | vc032x 17ef:4802 Lenovo Vc0323+MI1310_SOC | 352 | vc032x 17ef:4802 Lenovo Vc0323+MI1310_SOC |
331 | pac207 2001:f115 D-Link DSB-C120 | 353 | pac207 2001:f115 D-Link DSB-C120 |
354 | sq905c 2770:9050 Disney pix micro (CIF) | ||
355 | sq905c 2770:9052 Disney pix micro 2 (VGA) | ||
356 | sq905c 2770:905c All 11 known cameras with this ID | ||
357 | sq905 2770:9120 All 24 known cameras with this ID | ||
358 | sq905c 2770:913d All 4 known cameras with this ID | ||
332 | spca500 2899:012c Toptro Industrial | 359 | spca500 2899:012c Toptro Industrial |
360 | ov519 8020:ef04 ov519 | ||
333 | spca508 8086:0110 Intel Easy PC Camera | 361 | spca508 8086:0110 Intel Easy PC Camera |
334 | spca500 8086:0630 Intel Pocket PC Camera | 362 | spca500 8086:0630 Intel Pocket PC Camera |
335 | spca506 99fa:8988 Grandtec V.cap | 363 | spca506 99fa:8988 Grandtec V.cap |
diff --git a/Documentation/video4linux/sh_mobile_ceu_camera.txt b/Documentation/video4linux/sh_mobile_ceu_camera.txt new file mode 100644 index 000000000000..2ae16349a78d --- /dev/null +++ b/Documentation/video4linux/sh_mobile_ceu_camera.txt | |||
@@ -0,0 +1,157 @@ | |||
1 | Cropping and Scaling algorithm, used in the sh_mobile_ceu_camera driver | ||
2 | ======================================================================= | ||
3 | |||
4 | Terminology | ||
5 | ----------- | ||
6 | |||
7 | sensor scales: horizontal and vertical scales, configured by the sensor driver | ||
8 | host scales: -"- host driver | ||
9 | combined scales: sensor_scale * host_scale | ||
10 | |||
11 | |||
12 | Generic scaling / cropping scheme | ||
13 | --------------------------------- | ||
14 | |||
15 | -1-- | ||
16 | | | ||
17 | -2-- -\ | ||
18 | | --\ | ||
19 | | --\ | ||
20 | +-5-- -\ -- -3-- | ||
21 | | ---\ | ||
22 | | --- -4-- -\ | ||
23 | | -\ | ||
24 | | - -6-- | ||
25 | | | ||
26 | | - -6'- | ||
27 | | -/ | ||
28 | | --- -4'- -/ | ||
29 | | ---/ | ||
30 | +-5'- -/ | ||
31 | | -- -3'- | ||
32 | | --/ | ||
33 | | --/ | ||
34 | -2'- -/ | ||
35 | | | ||
36 | | | ||
37 | -1'- | ||
38 | |||
39 | Produced by user requests: | ||
40 | |||
41 | S_CROP(left / top = (5) - (1), width / height = (5') - (5)) | ||
42 | S_FMT(width / height = (6') - (6)) | ||
43 | |||
44 | Here: | ||
45 | |||
46 | (1) to (1') - whole max width or height | ||
47 | (1) to (2) - sensor cropped left or top | ||
48 | (2) to (2') - sensor cropped width or height | ||
49 | (3) to (3') - sensor scale | ||
50 | (3) to (4) - CEU cropped left or top | ||
51 | (4) to (4') - CEU cropped width or height | ||
52 | (5) to (5') - reverse sensor scale applied to CEU cropped width or height | ||
53 | (2) to (5) - reverse sensor scale applied to CEU cropped left or top | ||
54 | (6) to (6') - CEU scale - user window | ||
55 | |||
56 | |||
57 | S_FMT | ||
58 | ----- | ||
59 | |||
60 | Do not touch input rectangle - it is already optimal. | ||
61 | |||
62 | 1. Calculate current sensor scales: | ||
63 | |||
64 | scale_s = ((3') - (3)) / ((2') - (2)) | ||
65 | |||
66 | 2. Calculate "effective" input crop (sensor subwindow) - CEU crop scaled back at | ||
67 | current sensor scales onto input window - this is user S_CROP: | ||
68 | |||
69 | width_u = (5') - (5) = ((4') - (4)) * scale_s | ||
70 | |||
71 | 3. Calculate new combined scales from "effective" input window to requested user | ||
72 | window: | ||
73 | |||
74 | scale_comb = width_u / ((6') - (6)) | ||
75 | |||
76 | 4. Calculate sensor output window by applying combined scales to real input | ||
77 | window: | ||
78 | |||
79 | width_s_out = ((2') - (2)) / scale_comb | ||
80 | |||
81 | 5. Apply iterative sensor S_FMT for sensor output window. | ||
82 | |||
83 | subdev->video_ops->s_fmt(.width = width_s_out) | ||
84 | |||
85 | 6. Retrieve sensor output window (g_fmt) | ||
86 | |||
87 | 7. Calculate new sensor scales: | ||
88 | |||
89 | scale_s_new = ((3')_new - (3)_new) / ((2') - (2)) | ||
90 | |||
91 | 8. Calculate new CEU crop - apply sensor scales to previously calculated | ||
92 | "effective" crop: | ||
93 | |||
94 | width_ceu = (4')_new - (4)_new = width_u / scale_s_new | ||
95 | left_ceu = (4)_new - (3)_new = ((5) - (2)) / scale_s_new | ||
96 | |||
97 | 9. Use CEU cropping to crop to the new window: | ||
98 | |||
99 | ceu_crop(.width = width_ceu, .left = left_ceu) | ||
100 | |||
101 | 10. Use CEU scaling to scale to the requested user window: | ||
102 | |||
103 | scale_ceu = width_ceu / width | ||
104 | |||
105 | |||
106 | S_CROP | ||
107 | ------ | ||
108 | |||
109 | If old scale applied to new crop is invalid produce nearest new scale possible | ||
110 | |||
111 | 1. Calculate current combined scales. | ||
112 | |||
113 | scale_comb = (((4') - (4)) / ((6') - (6))) * (((2') - (2)) / ((3') - (3))) | ||
114 | |||
115 | 2. Apply iterative sensor S_CROP for new input window. | ||
116 | |||
117 | 3. If old combined scales applied to new crop produce an impossible user window, | ||
118 | adjust scales to produce nearest possible window. | ||
119 | |||
120 | width_u_out = ((5') - (5)) / scale_comb | ||
121 | |||
122 | if (width_u_out > max) | ||
123 | scale_comb = ((5') - (5)) / max; | ||
124 | else if (width_u_out < min) | ||
125 | scale_comb = ((5') - (5)) / min; | ||
126 | |||
127 | 4. Issue G_CROP to retrieve actual input window. | ||
128 | |||
129 | 5. Using actual input window and calculated combined scales calculate sensor | ||
130 | target output window. | ||
131 | |||
132 | width_s_out = ((3') - (3)) = ((2') - (2)) / scale_comb | ||
133 | |||
134 | 6. Apply iterative S_FMT for new sensor target output window. | ||
135 | |||
136 | 7. Issue G_FMT to retrieve the actual sensor output window. | ||
137 | |||
138 | 8. Calculate sensor scales. | ||
139 | |||
140 | scale_s = ((3') - (3)) / ((2') - (2)) | ||
141 | |||
142 | 9. Calculate sensor output subwindow to be cropped on CEU by applying sensor | ||
143 | scales to the requested window. | ||
144 | |||
145 | width_ceu = ((5') - (5)) / scale_s | ||
146 | |||
147 | 10. Use CEU cropping for above calculated window. | ||
148 | |||
149 | 11. Calculate CEU scales from sensor scales from results of (10) and user window | ||
150 | from (3) | ||
151 | |||
152 | scale_ceu = calc_scale(((5') - (5)), &width_u_out) | ||
153 | |||
154 | 12. Apply CEU scales. | ||
155 | |||
156 | -- | ||
157 | Author: Guennadi Liakhovetski <g.liakhovetski@gmx.de> | ||
diff --git a/Documentation/video4linux/si4713.txt b/Documentation/video4linux/si4713.txt index 25abdb78209d..2e7392a4fee1 100644 --- a/Documentation/video4linux/si4713.txt +++ b/Documentation/video4linux/si4713.txt | |||
@@ -164,7 +164,7 @@ Stereo/Mono and RDS subchannels | |||
164 | 164 | ||
165 | The device can also be configured using the available sub channels for | 165 | The device can also be configured using the available sub channels for |
166 | transmission. To do that use S/G_MODULATOR ioctl and configure txsubchans properly. | 166 | transmission. To do that use S/G_MODULATOR ioctl and configure txsubchans properly. |
167 | Refer to v4l2-spec for proper use of this ioctl. | 167 | Refer to the V4L2 API specification for proper use of this ioctl. |
168 | 168 | ||
169 | Testing | 169 | Testing |
170 | ======= | 170 | ======= |
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt index b806edaf3e75..5155700c206b 100644 --- a/Documentation/video4linux/v4l2-framework.txt +++ b/Documentation/video4linux/v4l2-framework.txt | |||
@@ -561,6 +561,8 @@ video_device helper functions | |||
561 | 561 | ||
562 | There are a few useful helper functions: | 562 | There are a few useful helper functions: |
563 | 563 | ||
564 | - file/video_device private data | ||
565 | |||
564 | You can set/get driver private data in the video_device struct using: | 566 | You can set/get driver private data in the video_device struct using: |
565 | 567 | ||
566 | void *video_get_drvdata(struct video_device *vdev); | 568 | void *video_get_drvdata(struct video_device *vdev); |
@@ -575,8 +577,7 @@ struct video_device *video_devdata(struct file *file); | |||
575 | 577 | ||
576 | returns the video_device belonging to the file struct. | 578 | returns the video_device belonging to the file struct. |
577 | 579 | ||
578 | The final helper function combines video_get_drvdata with | 580 | The video_drvdata function combines video_get_drvdata with video_devdata: |
579 | video_devdata: | ||
580 | 581 | ||
581 | void *video_drvdata(struct file *file); | 582 | void *video_drvdata(struct file *file); |
582 | 583 | ||
@@ -584,102 +585,27 @@ You can go from a video_device struct to the v4l2_device struct using: | |||
584 | 585 | ||
585 | struct v4l2_device *v4l2_dev = vdev->v4l2_dev; | 586 | struct v4l2_device *v4l2_dev = vdev->v4l2_dev; |
586 | 587 | ||
588 | - Device node name | ||
589 | |||
590 | The video_device node kernel name can be retrieved using | ||
591 | |||
592 | const char *video_device_node_name(struct video_device *vdev); | ||
593 | |||
594 | The name is used as a hint by userspace tools such as udev. The function | ||
595 | should be used where possible instead of accessing the video_device::num and | ||
596 | video_device::minor fields. | ||
597 | |||
598 | |||
587 | video buffer helper functions | 599 | video buffer helper functions |
588 | ----------------------------- | 600 | ----------------------------- |
589 | 601 | ||
590 | The v4l2 core API provides a standard method for dealing with video | 602 | The v4l2 core API provides a set of standard methods (called "videobuf") |
591 | buffers. Those methods allow a driver to implement read(), mmap() and | 603 | for dealing with video buffers. Those methods allow a driver to implement |
592 | overlay() on a consistent way. | 604 | read(), mmap() and overlay() in a consistent way. There are currently |
593 | 605 | methods for using video buffers on devices that supports DMA with | |
594 | There are currently methods for using video buffers on devices that | 606 | scatter/gather method (videobuf-dma-sg), DMA with linear access |
595 | supports DMA with scatter/gather method (videobuf-dma-sg), DMA with | 607 | (videobuf-dma-contig), and vmalloced buffers, mostly used on USB drivers |
596 | linear access (videobuf-dma-contig), and vmalloced buffers, mostly | 608 | (videobuf-vmalloc). |
597 | used on USB drivers (videobuf-vmalloc). | 609 | |
598 | 610 | Please see Documentation/video4linux/videobuf for more information on how | |
599 | Any driver using videobuf should provide operations (callbacks) for | 611 | to use the videobuf layer. |
600 | four handlers: | ||
601 | |||
602 | ops->buf_setup - calculates the size of the video buffers and avoid they | ||
603 | to waste more than some maximum limit of RAM; | ||
604 | ops->buf_prepare - fills the video buffer structs and calls | ||
605 | videobuf_iolock() to alloc and prepare mmaped memory; | ||
606 | ops->buf_queue - advices the driver that another buffer were | ||
607 | requested (by read() or by QBUF); | ||
608 | ops->buf_release - frees any buffer that were allocated. | ||
609 | |||
610 | In order to use it, the driver need to have a code (generally called at | ||
611 | interrupt context) that will properly handle the buffer request lists, | ||
612 | announcing that a new buffer were filled. | ||
613 | |||
614 | The irq handling code should handle the videobuf task lists, in order | ||
615 | to advice videobuf that a new frame were filled, in order to honor to a | ||
616 | request. The code is generally like this one: | ||
617 | if (list_empty(&dma_q->active)) | ||
618 | return; | ||
619 | |||
620 | buf = list_entry(dma_q->active.next, struct vbuffer, vb.queue); | ||
621 | |||
622 | if (!waitqueue_active(&buf->vb.done)) | ||
623 | return; | ||
624 | |||
625 | /* Some logic to handle the buf may be needed here */ | ||
626 | |||
627 | list_del(&buf->vb.queue); | ||
628 | do_gettimeofday(&buf->vb.ts); | ||
629 | wake_up(&buf->vb.done); | ||
630 | |||
631 | Those are the videobuffer functions used on drivers, implemented on | ||
632 | videobuf-core: | ||
633 | |||
634 | - Videobuf init functions | ||
635 | videobuf_queue_sg_init() | ||
636 | Initializes the videobuf infrastructure. This function should be | ||
637 | called before any other videobuf function on drivers that uses DMA | ||
638 | Scatter/Gather buffers. | ||
639 | |||
640 | videobuf_queue_dma_contig_init | ||
641 | Initializes the videobuf infrastructure. This function should be | ||
642 | called before any other videobuf function on drivers that need DMA | ||
643 | contiguous buffers. | ||
644 | |||
645 | videobuf_queue_vmalloc_init() | ||
646 | Initializes the videobuf infrastructure. This function should be | ||
647 | called before any other videobuf function on USB (and other drivers) | ||
648 | that need a vmalloced type of videobuf. | ||
649 | |||
650 | - videobuf_iolock() | ||
651 | Prepares the videobuf memory for the proper method (read, mmap, overlay). | ||
652 | |||
653 | - videobuf_queue_is_busy() | ||
654 | Checks if a videobuf is streaming. | ||
655 | |||
656 | - videobuf_queue_cancel() | ||
657 | Stops video handling. | ||
658 | |||
659 | - videobuf_mmap_free() | ||
660 | frees mmap buffers. | ||
661 | |||
662 | - videobuf_stop() | ||
663 | Stops video handling, ends mmap and frees mmap and other buffers. | ||
664 | |||
665 | - V4L2 api functions. Those functions correspond to VIDIOC_foo ioctls: | ||
666 | videobuf_reqbufs(), videobuf_querybuf(), videobuf_qbuf(), | ||
667 | videobuf_dqbuf(), videobuf_streamon(), videobuf_streamoff(). | ||
668 | |||
669 | - V4L1 api function (corresponds to VIDIOCMBUF ioctl): | ||
670 | videobuf_cgmbuf() | ||
671 | This function is used to provide backward compatibility with V4L1 | ||
672 | API. | ||
673 | |||
674 | - Some help functions for read()/poll() operations: | ||
675 | videobuf_read_stream() | ||
676 | For continuous stream read() | ||
677 | videobuf_read_one() | ||
678 | For snapshot read() | ||
679 | videobuf_poll_stream() | ||
680 | polling help function | ||
681 | |||
682 | The better way to understand it is to take a look at vivi driver. One | ||
683 | of the main reasons for vivi is to be a videobuf usage example. the | ||
684 | vivi_thread_tick() does the task that the IRQ callback would do on PCI | ||
685 | drivers (or the irq callback on USB). | ||
diff --git a/Documentation/video4linux/videobuf b/Documentation/video4linux/videobuf new file mode 100644 index 000000000000..17a1f9abf260 --- /dev/null +++ b/Documentation/video4linux/videobuf | |||
@@ -0,0 +1,360 @@ | |||
1 | An introduction to the videobuf layer | ||
2 | Jonathan Corbet <corbet@lwn.net> | ||
3 | Current as of 2.6.33 | ||
4 | |||
5 | The videobuf layer functions as a sort of glue layer between a V4L2 driver | ||
6 | and user space. It handles the allocation and management of buffers for | ||
7 | the storage of video frames. There is a set of functions which can be used | ||
8 | to implement many of the standard POSIX I/O system calls, including read(), | ||
9 | poll(), and, happily, mmap(). Another set of functions can be used to | ||
10 | implement the bulk of the V4L2 ioctl() calls related to streaming I/O, | ||
11 | including buffer allocation, queueing and dequeueing, and streaming | ||
12 | control. Using videobuf imposes a few design decisions on the driver | ||
13 | author, but the payback comes in the form of reduced code in the driver and | ||
14 | a consistent implementation of the V4L2 user-space API. | ||
15 | |||
16 | Buffer types | ||
17 | |||
18 | Not all video devices use the same kind of buffers. In fact, there are (at | ||
19 | least) three common variations: | ||
20 | |||
21 | - Buffers which are scattered in both the physical and (kernel) virtual | ||
22 | address spaces. (Almost) all user-space buffers are like this, but it | ||
23 | makes great sense to allocate kernel-space buffers this way as well when | ||
24 | it is possible. Unfortunately, it is not always possible; working with | ||
25 | this kind of buffer normally requires hardware which can do | ||
26 | scatter/gather DMA operations. | ||
27 | |||
28 | - Buffers which are physically scattered, but which are virtually | ||
29 | contiguous; buffers allocated with vmalloc(), in other words. These | ||
30 | buffers are just as hard to use for DMA operations, but they can be | ||
31 | useful in situations where DMA is not available but virtually-contiguous | ||
32 | buffers are convenient. | ||
33 | |||
34 | - Buffers which are physically contiguous. Allocation of this kind of | ||
35 | buffer can be unreliable on fragmented systems, but simpler DMA | ||
36 | controllers cannot deal with anything else. | ||
37 | |||
38 | Videobuf can work with all three types of buffers, but the driver author | ||
39 | must pick one at the outset and design the driver around that decision. | ||
40 | |||
41 | [It's worth noting that there's a fourth kind of buffer: "overlay" buffers | ||
42 | which are located within the system's video memory. The overlay | ||
43 | functionality is considered to be deprecated for most use, but it still | ||
44 | shows up occasionally in system-on-chip drivers where the performance | ||
45 | benefits merit the use of this technique. Overlay buffers can be handled | ||
46 | as a form of scattered buffer, but there are very few implementations in | ||
47 | the kernel and a description of this technique is currently beyond the | ||
48 | scope of this document.] | ||
49 | |||
50 | Data structures, callbacks, and initialization | ||
51 | |||
52 | Depending on which type of buffers are being used, the driver should | ||
53 | include one of the following files: | ||
54 | |||
55 | <media/videobuf-dma-sg.h> /* Physically scattered */ | ||
56 | <media/videobuf-vmalloc.h> /* vmalloc() buffers */ | ||
57 | <media/videobuf-dma-contig.h> /* Physically contiguous */ | ||
58 | |||
59 | The driver's data structure describing a V4L2 device should include a | ||
60 | struct videobuf_queue instance for the management of the buffer queue, | ||
61 | along with a list_head for the queue of available buffers. There will also | ||
62 | need to be an interrupt-safe spinlock which is used to protect (at least) | ||
63 | the queue. | ||
64 | |||
65 | The next step is to write four simple callbacks to help videobuf deal with | ||
66 | the management of buffers: | ||
67 | |||
68 | struct videobuf_queue_ops { | ||
69 | int (*buf_setup)(struct videobuf_queue *q, | ||
70 | unsigned int *count, unsigned int *size); | ||
71 | int (*buf_prepare)(struct videobuf_queue *q, | ||
72 | struct videobuf_buffer *vb, | ||
73 | enum v4l2_field field); | ||
74 | void (*buf_queue)(struct videobuf_queue *q, | ||
75 | struct videobuf_buffer *vb); | ||
76 | void (*buf_release)(struct videobuf_queue *q, | ||
77 | struct videobuf_buffer *vb); | ||
78 | }; | ||
79 | |||
80 | buf_setup() is called early in the I/O process, when streaming is being | ||
81 | initiated; its purpose is to tell videobuf about the I/O stream. The count | ||
82 | parameter will be a suggested number of buffers to use; the driver should | ||
83 | check it for rationality and adjust it if need be. As a practical rule, a | ||
84 | minimum of two buffers are needed for proper streaming, and there is | ||
85 | usually a maximum (which cannot exceed 32) which makes sense for each | ||
86 | device. The size parameter should be set to the expected (maximum) size | ||
87 | for each frame of data. | ||
88 | |||
89 | Each buffer (in the form of a struct videobuf_buffer pointer) will be | ||
90 | passed to buf_prepare(), which should set the buffer's size, width, height, | ||
91 | and field fields properly. If the buffer's state field is | ||
92 | VIDEOBUF_NEEDS_INIT, the driver should pass it to: | ||
93 | |||
94 | int videobuf_iolock(struct videobuf_queue* q, struct videobuf_buffer *vb, | ||
95 | struct v4l2_framebuffer *fbuf); | ||
96 | |||
97 | Among other things, this call will usually allocate memory for the buffer. | ||
98 | Finally, the buf_prepare() function should set the buffer's state to | ||
99 | VIDEOBUF_PREPARED. | ||
100 | |||
101 | When a buffer is queued for I/O, it is passed to buf_queue(), which should | ||
102 | put it onto the driver's list of available buffers and set its state to | ||
103 | VIDEOBUF_QUEUED. Note that this function is called with the queue spinlock | ||
104 | held; if it tries to acquire it as well things will come to a screeching | ||
105 | halt. Yes, this is the voice of experience. Note also that videobuf may | ||
106 | wait on the first buffer in the queue; placing other buffers in front of it | ||
107 | could again gum up the works. So use list_add_tail() to enqueue buffers. | ||
108 | |||
109 | Finally, buf_release() is called when a buffer is no longer intended to be | ||
110 | used. The driver should ensure that there is no I/O active on the buffer, | ||
111 | then pass it to the appropriate free routine(s): | ||
112 | |||
113 | /* Scatter/gather drivers */ | ||
114 | int videobuf_dma_unmap(struct videobuf_queue *q, | ||
115 | struct videobuf_dmabuf *dma); | ||
116 | int videobuf_dma_free(struct videobuf_dmabuf *dma); | ||
117 | |||
118 | /* vmalloc drivers */ | ||
119 | void videobuf_vmalloc_free (struct videobuf_buffer *buf); | ||
120 | |||
121 | /* Contiguous drivers */ | ||
122 | void videobuf_dma_contig_free(struct videobuf_queue *q, | ||
123 | struct videobuf_buffer *buf); | ||
124 | |||
125 | One way to ensure that a buffer is no longer under I/O is to pass it to: | ||
126 | |||
127 | int videobuf_waiton(struct videobuf_buffer *vb, int non_blocking, int intr); | ||
128 | |||
129 | Here, vb is the buffer, non_blocking indicates whether non-blocking I/O | ||
130 | should be used (it should be zero in the buf_release() case), and intr | ||
131 | controls whether an interruptible wait is used. | ||
132 | |||
133 | File operations | ||
134 | |||
135 | At this point, much of the work is done; much of the rest is slipping | ||
136 | videobuf calls into the implementation of the other driver callbacks. The | ||
137 | first step is in the open() function, which must initialize the | ||
138 | videobuf queue. The function to use depends on the type of buffer used: | ||
139 | |||
140 | void videobuf_queue_sg_init(struct videobuf_queue *q, | ||
141 | struct videobuf_queue_ops *ops, | ||
142 | struct device *dev, | ||
143 | spinlock_t *irqlock, | ||
144 | enum v4l2_buf_type type, | ||
145 | enum v4l2_field field, | ||
146 | unsigned int msize, | ||
147 | void *priv); | ||
148 | |||
149 | void videobuf_queue_vmalloc_init(struct videobuf_queue *q, | ||
150 | struct videobuf_queue_ops *ops, | ||
151 | struct device *dev, | ||
152 | spinlock_t *irqlock, | ||
153 | enum v4l2_buf_type type, | ||
154 | enum v4l2_field field, | ||
155 | unsigned int msize, | ||
156 | void *priv); | ||
157 | |||
158 | void videobuf_queue_dma_contig_init(struct videobuf_queue *q, | ||
159 | struct videobuf_queue_ops *ops, | ||
160 | struct device *dev, | ||
161 | spinlock_t *irqlock, | ||
162 | enum v4l2_buf_type type, | ||
163 | enum v4l2_field field, | ||
164 | unsigned int msize, | ||
165 | void *priv); | ||
166 | |||
167 | In each case, the parameters are the same: q is the queue structure for the | ||
168 | device, ops is the set of callbacks as described above, dev is the device | ||
169 | structure for this video device, irqlock is an interrupt-safe spinlock to | ||
170 | protect access to the data structures, type is the buffer type used by the | ||
171 | device (cameras will use V4L2_BUF_TYPE_VIDEO_CAPTURE, for example), field | ||
172 | describes which field is being captured (often V4L2_FIELD_NONE for | ||
173 | progressive devices), msize is the size of any containing structure used | ||
174 | around struct videobuf_buffer, and priv is a private data pointer which | ||
175 | shows up in the priv_data field of struct videobuf_queue. Note that these | ||
176 | are void functions which, evidently, are immune to failure. | ||
177 | |||
178 | V4L2 capture drivers can be written to support either of two APIs: the | ||
179 | read() system call and the rather more complicated streaming mechanism. As | ||
180 | a general rule, it is necessary to support both to ensure that all | ||
181 | applications have a chance of working with the device. Videobuf makes it | ||
182 | easy to do that with the same code. To implement read(), the driver need | ||
183 | only make a call to one of: | ||
184 | |||
185 | ssize_t videobuf_read_one(struct videobuf_queue *q, | ||
186 | char __user *data, size_t count, | ||
187 | loff_t *ppos, int nonblocking); | ||
188 | |||
189 | ssize_t videobuf_read_stream(struct videobuf_queue *q, | ||
190 | char __user *data, size_t count, | ||
191 | loff_t *ppos, int vbihack, int nonblocking); | ||
192 | |||
193 | Either one of these functions will read frame data into data, returning the | ||
194 | amount actually read; the difference is that videobuf_read_one() will only | ||
195 | read a single frame, while videobuf_read_stream() will read multiple frames | ||
196 | if they are needed to satisfy the count requested by the application. A | ||
197 | typical driver read() implementation will start the capture engine, call | ||
198 | one of the above functions, then stop the engine before returning (though a | ||
199 | smarter implementation might leave the engine running for a little while in | ||
200 | anticipation of another read() call happening in the near future). | ||
201 | |||
202 | The poll() function can usually be implemented with a direct call to: | ||
203 | |||
204 | unsigned int videobuf_poll_stream(struct file *file, | ||
205 | struct videobuf_queue *q, | ||
206 | poll_table *wait); | ||
207 | |||
208 | Note that the actual wait queue eventually used will be the one associated | ||
209 | with the first available buffer. | ||
210 | |||
211 | When streaming I/O is done to kernel-space buffers, the driver must support | ||
212 | the mmap() system call to enable user space to access the data. In many | ||
213 | V4L2 drivers, the often-complex mmap() implementation simplifies to a | ||
214 | single call to: | ||
215 | |||
216 | int videobuf_mmap_mapper(struct videobuf_queue *q, | ||
217 | struct vm_area_struct *vma); | ||
218 | |||
219 | Everything else is handled by the videobuf code. | ||
220 | |||
221 | The release() function requires two separate videobuf calls: | ||
222 | |||
223 | void videobuf_stop(struct videobuf_queue *q); | ||
224 | int videobuf_mmap_free(struct videobuf_queue *q); | ||
225 | |||
226 | The call to videobuf_stop() terminates any I/O in progress - though it is | ||
227 | still up to the driver to stop the capture engine. The call to | ||
228 | videobuf_mmap_free() will ensure that all buffers have been unmapped; if | ||
229 | so, they will all be passed to the buf_release() callback. If buffers | ||
230 | remain mapped, videobuf_mmap_free() returns an error code instead. The | ||
231 | purpose is clearly to cause the closing of the file descriptor to fail if | ||
232 | buffers are still mapped, but every driver in the 2.6.32 kernel cheerfully | ||
233 | ignores its return value. | ||
234 | |||
235 | ioctl() operations | ||
236 | |||
237 | The V4L2 API includes a very long list of driver callbacks to respond to | ||
238 | the many ioctl() commands made available to user space. A number of these | ||
239 | - those associated with streaming I/O - turn almost directly into videobuf | ||
240 | calls. The relevant helper functions are: | ||
241 | |||
242 | int videobuf_reqbufs(struct videobuf_queue *q, | ||
243 | struct v4l2_requestbuffers *req); | ||
244 | int videobuf_querybuf(struct videobuf_queue *q, struct v4l2_buffer *b); | ||
245 | int videobuf_qbuf(struct videobuf_queue *q, struct v4l2_buffer *b); | ||
246 | int videobuf_dqbuf(struct videobuf_queue *q, struct v4l2_buffer *b, | ||
247 | int nonblocking); | ||
248 | int videobuf_streamon(struct videobuf_queue *q); | ||
249 | int videobuf_streamoff(struct videobuf_queue *q); | ||
250 | int videobuf_cgmbuf(struct videobuf_queue *q, struct video_mbuf *mbuf, | ||
251 | int count); | ||
252 | |||
253 | So, for example, a VIDIOC_REQBUFS call turns into a call to the driver's | ||
254 | vidioc_reqbufs() callback which, in turn, usually only needs to locate the | ||
255 | proper struct videobuf_queue pointer and pass it to videobuf_reqbufs(). | ||
256 | These support functions can replace a great deal of buffer management | ||
257 | boilerplate in a lot of V4L2 drivers. | ||
258 | |||
259 | The vidioc_streamon() and vidioc_streamoff() functions will be a bit more | ||
260 | complex, of course, since they will also need to deal with starting and | ||
261 | stopping the capture engine. videobuf_cgmbuf(), called from the driver's | ||
262 | vidiocgmbuf() function, only exists if the V4L1 compatibility module has | ||
263 | been selected with CONFIG_VIDEO_V4L1_COMPAT, so its use must be surrounded | ||
264 | with #ifdef directives. | ||
265 | |||
266 | Buffer allocation | ||
267 | |||
268 | Thus far, we have talked about buffers, but have not looked at how they are | ||
269 | allocated. The scatter/gather case is the most complex on this front. For | ||
270 | allocation, the driver can leave buffer allocation entirely up to the | ||
271 | videobuf layer; in this case, buffers will be allocated as anonymous | ||
272 | user-space pages and will be very scattered indeed. If the application is | ||
273 | using user-space buffers, no allocation is needed; the videobuf layer will | ||
274 | take care of calling get_user_pages() and filling in the scatterlist array. | ||
275 | |||
276 | If the driver needs to do its own memory allocation, it should be done in | ||
277 | the vidioc_reqbufs() function, *after* calling videobuf_reqbufs(). The | ||
278 | first step is a call to: | ||
279 | |||
280 | struct videobuf_dmabuf *videobuf_to_dma(struct videobuf_buffer *buf); | ||
281 | |||
282 | The returned videobuf_dmabuf structure (defined in | ||
283 | <media/videobuf-dma-sg.h>) includes a couple of relevant fields: | ||
284 | |||
285 | struct scatterlist *sglist; | ||
286 | int sglen; | ||
287 | |||
288 | The driver must allocate an appropriately-sized scatterlist array and | ||
289 | populate it with pointers to the pieces of the allocated buffer; sglen | ||
290 | should be set to the length of the array. | ||
291 | |||
292 | Drivers using the vmalloc() method need not (and cannot) concern themselves | ||
293 | with buffer allocation at all; videobuf will handle those details. The | ||
294 | same is normally true of contiguous-DMA drivers as well; videobuf will | ||
295 | allocate the buffers (with dma_alloc_coherent()) when it sees fit. That | ||
296 | means that these drivers may be trying to do high-order allocations at any | ||
297 | time, an operation which is not always guaranteed to work. Some drivers | ||
298 | play tricks by allocating DMA space at system boot time; videobuf does not | ||
299 | currently play well with those drivers. | ||
300 | |||
301 | As of 2.6.31, contiguous-DMA drivers can work with a user-supplied buffer, | ||
302 | as long as that buffer is physically contiguous. Normal user-space | ||
303 | allocations will not meet that criterion, but buffers obtained from other | ||
304 | kernel drivers, or those contained within huge pages, will work with these | ||
305 | drivers. | ||
306 | |||
307 | Filling the buffers | ||
308 | |||
309 | The final part of a videobuf implementation has no direct callback - it's | ||
310 | the portion of the code which actually puts frame data into the buffers, | ||
311 | usually in response to interrupts from the device. For all types of | ||
312 | drivers, this process works approximately as follows: | ||
313 | |||
314 | - Obtain the next available buffer and make sure that somebody is actually | ||
315 | waiting for it. | ||
316 | |||
317 | - Get a pointer to the memory and put video data there. | ||
318 | |||
319 | - Mark the buffer as done and wake up the process waiting for it. | ||
320 | |||
321 | Step (1) above is done by looking at the driver-managed list_head structure | ||
322 | - the one which is filled in the buf_queue() callback. Because starting | ||
323 | the engine and enqueueing buffers are done in separate steps, it's possible | ||
324 | for the engine to be running without any buffers available - in the | ||
325 | vmalloc() case especially. So the driver should be prepared for the list | ||
326 | to be empty. It is equally possible that nobody is yet interested in the | ||
327 | buffer; the driver should not remove it from the list or fill it until a | ||
328 | process is waiting on it. That test can be done by examining the buffer's | ||
329 | done field (a wait_queue_head_t structure) with waitqueue_active(). | ||
330 | |||
331 | A buffer's state should be set to VIDEOBUF_ACTIVE before being mapped for | ||
332 | DMA; that ensures that the videobuf layer will not try to do anything with | ||
333 | it while the device is transferring data. | ||
334 | |||
335 | For scatter/gather drivers, the needed memory pointers will be found in the | ||
336 | scatterlist structure described above. Drivers using the vmalloc() method | ||
337 | can get a memory pointer with: | ||
338 | |||
339 | void *videobuf_to_vmalloc(struct videobuf_buffer *buf); | ||
340 | |||
341 | For contiguous DMA drivers, the function to use is: | ||
342 | |||
343 | dma_addr_t videobuf_to_dma_contig(struct videobuf_buffer *buf); | ||
344 | |||
345 | The contiguous DMA API goes out of its way to hide the kernel-space address | ||
346 | of the DMA buffer from drivers. | ||
347 | |||
348 | The final step is to set the size field of the relevant videobuf_buffer | ||
349 | structure to the actual size of the captured image, set state to | ||
350 | VIDEOBUF_DONE, then call wake_up() on the done queue. At this point, the | ||
351 | buffer is owned by the videobuf layer and the driver should not touch it | ||
352 | again. | ||
353 | |||
354 | Developers who are interested in more information can go into the relevant | ||
355 | header files; there are a few low-level functions declared there which have | ||
356 | not been talked about here. Also worthwhile is the vivi driver | ||
357 | (drivers/media/video/vivi.c), which is maintained as an example of how V4L2 | ||
358 | drivers should be written. Vivi only uses the vmalloc() API, but it's good | ||
359 | enough to get started with. Note also that all of these calls are exported | ||
360 | GPL-only, so they will not be available to non-GPL kernel modules. | ||
diff --git a/Documentation/video4linux/zr364xx.txt b/Documentation/video4linux/zr364xx.txt index 7f3d1955d214..d98e4d302977 100644 --- a/Documentation/video4linux/zr364xx.txt +++ b/Documentation/video4linux/zr364xx.txt | |||
@@ -66,3 +66,4 @@ Vendor Product Distributor Model | |||
66 | 0x0a17 0x004e Pentax Optio 50 | 66 | 0x0a17 0x004e Pentax Optio 50 |
67 | 0x041e 0x405d Creative DiVi CAM 516 | 67 | 0x041e 0x405d Creative DiVi CAM 516 |
68 | 0x08ca 0x2102 Aiptek DV T300 | 68 | 0x08ca 0x2102 Aiptek DV T300 |
69 | 0x06d6 0x003d Trust Powerc@m 910Z | ||