diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /Documentation/video4linux | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'Documentation/video4linux')
28 files changed, 840 insertions, 565 deletions
diff --git a/Documentation/video4linux/CARDLIST.cx88 b/Documentation/video4linux/CARDLIST.cx88 index f2510541373b..42517d9121de 100644 --- a/Documentation/video4linux/CARDLIST.cx88 +++ b/Documentation/video4linux/CARDLIST.cx88 | |||
@@ -83,3 +83,4 @@ | |||
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] | 84 | 83 -> Prof 7301 DVB-S/S2 [b034:3034] |
85 | 84 -> Samsung SMT 7020 DVB-S [18ac:dc00,18ac:dccd] | 85 | 84 -> Samsung SMT 7020 DVB-S [18ac:dc00,18ac:dccd] |
86 | 85 -> Twinhan VP-1027 DVB-S [1822:0023] | ||
diff --git a/Documentation/video4linux/CARDLIST.em28xx b/Documentation/video4linux/CARDLIST.em28xx index 5c568757c301..9aae449440dc 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:2862,eb1a:2863,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:2863,eb1a:2870,eb1a:2881,eb1a:2883,eb1a:2868,eb1a:2875] |
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] |
@@ -9,7 +9,7 @@ | |||
9 | 8 -> Kworld USB2800 (em2800) | 9 | 8 -> Kworld USB2800 (em2800) |
10 | 9 -> Pinnacle Dazzle DVC 90/100/101/107 / Kaiser Baas Video to DVD maker (em2820/em2840) [1b80:e302,1b80:e304,2304:0207,2304:021a] | 10 | 9 -> Pinnacle Dazzle DVC 90/100/101/107 / Kaiser Baas Video to DVD maker (em2820/em2840) [1b80:e302,1b80:e304,2304:0207,2304:021a] |
11 | 10 -> Hauppauge WinTV HVR 900 (em2880) [2040:6500] | 11 | 10 -> Hauppauge WinTV HVR 900 (em2880) [2040:6500] |
12 | 11 -> Terratec Hybrid XS (em2880) [0ccd:0042] | 12 | 11 -> Terratec Hybrid XS (em2880) |
13 | 12 -> Kworld PVR TV 2800 RF (em2820/em2840) | 13 | 12 -> Kworld PVR TV 2800 RF (em2820/em2840) |
14 | 13 -> Terratec Prodigy XS (em2880) [0ccd:0047] | 14 | 13 -> Terratec Prodigy XS (em2880) [0ccd:0047] |
15 | 14 -> SIIG AVTuner-PVR / Pixelview Prolink PlayTV USB 2.0 (em2820/em2840) | 15 | 14 -> SIIG AVTuner-PVR / Pixelview Prolink PlayTV USB 2.0 (em2820/em2840) |
@@ -31,6 +31,7 @@ | |||
31 | 30 -> Videology 20K14XUSB USB2.0 (em2820/em2840) | 31 | 30 -> Videology 20K14XUSB USB2.0 (em2820/em2840) |
32 | 31 -> Usbgear VD204v9 (em2821) | 32 | 31 -> Usbgear VD204v9 (em2821) |
33 | 32 -> Supercomp USB 2.0 TV (em2821) | 33 | 32 -> Supercomp USB 2.0 TV (em2821) |
34 | 33 -> Elgato Video Capture (em2860) [0fd9:0033] | ||
34 | 34 -> Terratec Cinergy A Hybrid XS (em2860) [0ccd:004f] | 35 | 34 -> Terratec Cinergy A Hybrid XS (em2860) [0ccd:004f] |
35 | 35 -> Typhoon DVD Maker (em2860) | 36 | 35 -> Typhoon DVD Maker (em2860) |
36 | 36 -> NetGMBH Cam (em2860) | 37 | 36 -> NetGMBH Cam (em2860) |
@@ -45,15 +46,15 @@ | |||
45 | 45 -> Pinnacle PCTV DVB-T (em2870) | 46 | 45 -> Pinnacle PCTV DVB-T (em2870) |
46 | 46 -> Compro, VideoMate U3 (em2870) [185b:2870] | 47 | 46 -> Compro, VideoMate U3 (em2870) [185b:2870] |
47 | 47 -> KWorld DVB-T 305U (em2880) [eb1a:e305] | 48 | 47 -> KWorld DVB-T 305U (em2880) [eb1a:e305] |
48 | 48 -> KWorld DVB-T 310U (em2880) [eb1a:e310] | 49 | 48 -> KWorld DVB-T 310U (em2880) |
49 | 49 -> MSI DigiVox A/D (em2880) [eb1a:e310] | 50 | 49 -> MSI DigiVox A/D (em2880) [eb1a:e310] |
50 | 50 -> MSI DigiVox A/D II (em2880) [eb1a:e320] | 51 | 50 -> MSI DigiVox A/D II (em2880) [eb1a:e320] |
51 | 51 -> Terratec Hybrid XS Secam (em2880) [0ccd:004c] | 52 | 51 -> Terratec Hybrid XS Secam (em2880) [0ccd:004c] |
52 | 52 -> DNT DA2 Hybrid (em2881) | 53 | 52 -> DNT DA2 Hybrid (em2881) |
53 | 53 -> Pinnacle Hybrid Pro (em2881) | 54 | 53 -> Pinnacle Hybrid Pro (em2881) |
54 | 54 -> Kworld VS-DVB-T 323UR (em2882) [eb1a:e323] | 55 | 54 -> Kworld VS-DVB-T 323UR (em2882) [eb1a:e323] |
55 | 55 -> Terratec Hybrid XS (em2882) (em2882) [0ccd:005e] | 56 | 55 -> Terratec Cinnergy Hybrid T USB XS (em2882) (em2882) [0ccd:005e,0ccd:0042] |
56 | 56 -> Pinnacle Hybrid Pro (2) (em2882) [2304:0226] | 57 | 56 -> Pinnacle Hybrid Pro (330e) (em2882) [2304:0226] |
57 | 57 -> Kworld PlusTV HD Hybrid 330 (em2883) [eb1a:a316] | 58 | 57 -> Kworld PlusTV HD Hybrid 330 (em2883) [eb1a:a316] |
58 | 58 -> Compro VideoMate ForYou/Stereo (em2820/em2840) [185b:2041] | 59 | 58 -> Compro VideoMate ForYou/Stereo (em2820/em2840) [185b:2041] |
59 | 60 -> Hauppauge WinTV HVR 850 (em2883) [2040:651f] | 60 | 60 -> Hauppauge WinTV HVR 850 (em2883) [2040:651f] |
diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134 index 4000c29fcfb6..6b4c72d8862d 100644 --- a/Documentation/video4linux/CARDLIST.saa7134 +++ b/Documentation/video4linux/CARDLIST.saa7134 | |||
@@ -126,7 +126,7 @@ | |||
126 | 125 -> Beholder BeholdTV 409 [0000:4090] | 126 | 125 -> Beholder BeholdTV 409 [0000:4090] |
127 | 126 -> Beholder BeholdTV 505 FM [5ace:5050] | 127 | 126 -> Beholder BeholdTV 505 FM [5ace:5050] |
128 | 127 -> Beholder BeholdTV 507 FM / BeholdTV 509 FM [5ace:5070,5ace:5090] | 128 | 127 -> Beholder BeholdTV 507 FM / BeholdTV 509 FM [5ace:5070,5ace:5090] |
129 | 128 -> Beholder BeholdTV Columbus TVFM [0000:5201] | 129 | 128 -> Beholder BeholdTV Columbus TV/FM [0000:5201] |
130 | 129 -> Beholder BeholdTV 607 FM [5ace:6070] | 130 | 129 -> Beholder BeholdTV 607 FM [5ace:6070] |
131 | 130 -> Beholder BeholdTV M6 [5ace:6190] | 131 | 130 -> Beholder BeholdTV M6 [5ace:6190] |
132 | 131 -> Twinhan Hybrid DTV-DVB 3056 PCI [1822:0022] | 132 | 131 -> Twinhan Hybrid DTV-DVB 3056 PCI [1822:0022] |
@@ -180,3 +180,5 @@ | |||
180 | 179 -> Beholder BeholdTV A7 [5ace:7090] | 180 | 179 -> Beholder BeholdTV A7 [5ace:7090] |
181 | 180 -> Avermedia PCI M733A [1461:4155,1461:4255] | 181 | 180 -> Avermedia PCI M733A [1461:4155,1461:4255] |
182 | 181 -> TechoTrend TT-budget T-3000 [13c2:2804] | 182 | 181 -> TechoTrend TT-budget T-3000 [13c2:2804] |
183 | 182 -> Kworld PCI SBTVD/ISDB-T Full-Seg Hybrid [17de:b136] | ||
184 | 183 -> Compro VideoMate Vista M1F [185b:c900] | ||
diff --git a/Documentation/video4linux/Makefile b/Documentation/video4linux/Makefile deleted file mode 100644 index 1ed0e98d057d..000000000000 --- a/Documentation/video4linux/Makefile +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | # kbuild trick to avoid linker error. Can be omitted if a module is built. | ||
2 | obj- := dummy.o | ||
3 | |||
4 | # List of programs to build | ||
5 | hostprogs-y := v4lgrab | ||
6 | |||
7 | # Tell kbuild to always build the programs | ||
8 | always := $(hostprogs-y) | ||
diff --git a/Documentation/video4linux/README.cpia b/Documentation/video4linux/README.cpia deleted file mode 100644 index 8a747fee661f..000000000000 --- a/Documentation/video4linux/README.cpia +++ /dev/null | |||
@@ -1,191 +0,0 @@ | |||
1 | This is a driver for the CPiA PPC2 driven parallel connected | ||
2 | Camera. For example the Creative WebcamII is CPiA driven. | ||
3 | |||
4 | ) [1]Peter Pregler, Linz 2000, published under the [2]GNU GPL | ||
5 | |||
6 | --------------------------------------------------------------------------- | ||
7 | |||
8 | USAGE: | ||
9 | |||
10 | General: | ||
11 | ======== | ||
12 | |||
13 | 1) Make sure you have created the video devices (/dev/video*): | ||
14 | |||
15 | - if you have a recent MAKEDEV do a 'cd /dev;./MAKEDEV video' | ||
16 | - otherwise do a: | ||
17 | |||
18 | cd /dev | ||
19 | mknod video0 c 81 0 | ||
20 | ln -s video0 video | ||
21 | |||
22 | 2) Compile the kernel (see below for the list of options to use), | ||
23 | configure your parport and reboot. | ||
24 | |||
25 | 3) If all worked well you should get messages similar | ||
26 | to the following (your versions may be different) on the console: | ||
27 | |||
28 | V4L-Driver for Vision CPiA based cameras v0.7.4 | ||
29 | parport0: read2 timeout. | ||
30 | parport0: Multimedia device, VLSI Vision Ltd PPC2 | ||
31 | Parallel port driver for Vision CPiA based camera | ||
32 | CPIA Version: 1.20 (2.0) | ||
33 | CPIA PnP-ID: 0553:0002:0100 | ||
34 | VP-Version: 1.0 0100 | ||
35 | 1 camera(s) found | ||
36 | |||
37 | |||
38 | As modules: | ||
39 | =========== | ||
40 | |||
41 | Make sure you have selected the following kernel options (you can | ||
42 | select all stuff as modules): | ||
43 | |||
44 | The cpia-stuff is in the section 'Character devices -> Video For Linux'. | ||
45 | |||
46 | CONFIG_PARPORT=m | ||
47 | CONFIG_PARPORT_PC=m | ||
48 | CONFIG_PARPORT_PC_FIFO=y | ||
49 | CONFIG_PARPORT_1284=y | ||
50 | CONFIG_VIDEO_DEV=m | ||
51 | CONFIG_VIDEO_CPIA=m | ||
52 | CONFIG_VIDEO_CPIA_PP=m | ||
53 | |||
54 | For autoloading of all those modules you need to tell module-init-tools | ||
55 | some stuff. Add the following line to your module-init-tools config-file | ||
56 | (e.g. /etc/modprobe.conf or wherever your distribution does store that | ||
57 | stuff): | ||
58 | |||
59 | options parport_pc io=0x378 irq=7 dma=3 | ||
60 | alias char-major-81 cpia_pp | ||
61 | |||
62 | The first line tells the dma/irq channels to use. Those _must_ match | ||
63 | the settings of your BIOS. Do NOT simply use the values above. See | ||
64 | Documentation/parport.txt for more information about this. The second | ||
65 | line associates the video-device file with the driver. Of cause you | ||
66 | can also load the modules once upon boot (usually done in /etc/modules). | ||
67 | |||
68 | Linked into the kernel: | ||
69 | ======================= | ||
70 | |||
71 | Make sure you have selected the following kernel options. Note that | ||
72 | you cannot compile the parport-stuff as modules and the cpia-driver | ||
73 | statically (the other way round is okay though). | ||
74 | |||
75 | The cpia-stuff is in the section 'Character devices -> Video For Linux'. | ||
76 | |||
77 | CONFIG_PARPORT=y | ||
78 | CONFIG_PARPORT_PC=y | ||
79 | CONFIG_PARPORT_PC_FIFO=y | ||
80 | CONFIG_PARPORT_1284=y | ||
81 | CONFIG_VIDEO_DEV=y | ||
82 | CONFIG_VIDEO_CPIA=y | ||
83 | CONFIG_VIDEO_CPIA_PP=y | ||
84 | |||
85 | To use DMA/irq you will need to tell the kernel upon boot time the | ||
86 | hardware configuration of the parport. You can give the boot-parameter | ||
87 | at the LILO-prompt or specify it in lilo.conf. I use the following | ||
88 | append-line in lilo.conf: | ||
89 | |||
90 | append="parport=0x378,7,3" | ||
91 | |||
92 | See Documentation/parport.txt for more information about the | ||
93 | configuration of the parport and the values given above. Do not simply | ||
94 | use the values given above. | ||
95 | |||
96 | --------------------------------------------------------------------------- | ||
97 | FEATURES: | ||
98 | |||
99 | - mmap/read v4l-interface (but no overlay) | ||
100 | - image formats: CIF/QCIF, SIF/QSIF, various others used by isabel; | ||
101 | note: all sizes except CIF/QCIF are implemented by clipping, i.e. | ||
102 | pixels are not uploaded from the camera | ||
103 | - palettes: VIDEO_PALETTE_GRAY, VIDEO_PALETTE_RGB565, VIDEO_PALETTE_RGB555, | ||
104 | VIDEO_PALETTE_RGB24, VIDEO_PALETTE_RGB32, VIDEO_PALETTE_YUYV, | ||
105 | VIDEO_PALETTE_UYVY, VIDEO_PALETTE_YUV422 | ||
106 | - state information (color balance, exposure, ...) is preserved between | ||
107 | device opens | ||
108 | - complete control over camera via proc-interface (_all_ camera settings are | ||
109 | supported), there is also a python-gtk application available for this [3] | ||
110 | - works under SMP (but the driver is completely serialized and synchronous) | ||
111 | so you get no benefit from SMP, but at least it does not crash your box | ||
112 | - might work for non-Intel architecture, let us know about this | ||
113 | |||
114 | --------------------------------------------------------------------------- | ||
115 | TESTED APPLICATIONS: | ||
116 | |||
117 | - a simple test application based on Xt is available at [3] | ||
118 | - another test-application based on gqcam-0.4 (uses GTK) | ||
119 | - gqcam-0.6 should work | ||
120 | - xawtv-3.x (also the webcam software) | ||
121 | - xawtv-2.46 | ||
122 | - w3cam (cgi-interface and vidcat, e.g. you may try out 'vidcat |xv | ||
123 | -maxpect -root -quit +noresetroot -rmode 5 -') | ||
124 | - vic, the MBONE video conferencing tool (version 2.8ucl4-1) | ||
125 | - isabel 3R4beta (barely working, but AFAICT all the problems are on | ||
126 | their side) | ||
127 | - camserv-0.40 | ||
128 | |||
129 | See [3] for pointers to v4l-applications. | ||
130 | |||
131 | --------------------------------------------------------------------------- | ||
132 | KNOWN PROBLEMS: | ||
133 | |||
134 | - some applications do not handle the image format correctly, you will | ||
135 | see strange horizontal stripes instead of a nice picture -> make sure | ||
136 | your application does use a supported image size or queries the driver | ||
137 | for the actually used size (reason behind this: the camera cannot | ||
138 | provide any image format, so if size NxM is requested the driver will | ||
139 | use a format to the closest fitting N1xM1, the application should now | ||
140 | query for this granted size, most applications do not). | ||
141 | - all the todo ;) | ||
142 | - if there is not enough light and the picture is too dark try to | ||
143 | adjust the SetSensorFPS setting, automatic frame rate adjustment | ||
144 | has its price | ||
145 | - do not try out isabel 3R4beta (built 135), you will be disappointed | ||
146 | |||
147 | --------------------------------------------------------------------------- | ||
148 | TODO: | ||
149 | |||
150 | - multiple camera support (struct camera or something) - This should work, | ||
151 | but hasn't been tested yet. | ||
152 | - architecture independence? | ||
153 | - SMP-safe asynchronous mmap interface | ||
154 | - nibble mode for old parport interfaces | ||
155 | - streaming capture, this should give a performance gain | ||
156 | |||
157 | --------------------------------------------------------------------------- | ||
158 | IMPLEMENTATION NOTES: | ||
159 | |||
160 | The camera can act in two modes, streaming or grabbing. Right now a | ||
161 | polling grab-scheme is used. Maybe interrupt driven streaming will be | ||
162 | used for a asynchronous mmap interface in the next major release of the | ||
163 | driver. This might give a better frame rate. | ||
164 | |||
165 | --------------------------------------------------------------------------- | ||
166 | THANKS (in no particular order): | ||
167 | |||
168 | - Scott J. Bertin <sbertin@mindspring.com> for cleanups, the proc-filesystem | ||
169 | and much more | ||
170 | - Henry Bruce <whb@vvl.co.uk> for providing developers information about | ||
171 | the CPiA chip, I wish all companies would treat Linux as seriously | ||
172 | - Karoly Erdei <Karoly.Erdei@risc.uni-linz.ac.at> and RISC-Linz for being | ||
173 | my boss ;) resp. my employer and for providing me the hardware and | ||
174 | allow me to devote some working time to this project | ||
175 | - Manuel J. Petit de Gabriel <mpetit@dit.upm.es> for providing help | ||
176 | with Isabel (http://isabel.dit.upm.es/) | ||
177 | - Bas Huisman <bhuism@cs.utwente.nl> for writing the initial parport code | ||
178 | - Jarl Totland <Jarl.Totland@bdc.no> for setting up the mailing list | ||
179 | and maintaining the web-server[3] | ||
180 | - Chris Whiteford <Chris@informinteractive.com> for fixes related to the | ||
181 | 1.02 firmware | ||
182 | - special kudos to all the tester whose machines crashed and/or | ||
183 | will crash. :) | ||
184 | |||
185 | --------------------------------------------------------------------------- | ||
186 | REFERENCES | ||
187 | |||
188 | 1. http://www.risc.uni-linz.ac.at/ | ||
189 | mailto:Peter_Pregler@email.com | ||
190 | 2. see the file COPYING in the top directory of the kernel tree | ||
191 | 3. http://webcam.sourceforge.net/ | ||
diff --git a/Documentation/video4linux/README.ivtv b/Documentation/video4linux/README.ivtv index 42b06686eb78..2579b5b709ed 100644 --- a/Documentation/video4linux/README.ivtv +++ b/Documentation/video4linux/README.ivtv | |||
@@ -36,8 +36,7 @@ Additional features for the PVR-350 (CX23415 based): | |||
36 | * Provides comprehensive OSD (On Screen Display: ie. graphics overlaying the | 36 | * Provides comprehensive OSD (On Screen Display: ie. graphics overlaying the |
37 | video signal) | 37 | video signal) |
38 | * Provides a framebuffer (allowing X applications to appear on the video | 38 | * Provides a framebuffer (allowing X applications to appear on the video |
39 | device) (this framebuffer is not yet part of the kernel. In the meantime it | 39 | device) |
40 | is available from www.ivtvdriver.org). | ||
41 | * Supports raw YUV output. | 40 | * Supports raw YUV output. |
42 | 41 | ||
43 | IMPORTANT: In case of problems first read this page: | 42 | IMPORTANT: In case of problems first read this page: |
diff --git a/Documentation/video4linux/README.pvrusb2 b/Documentation/video4linux/README.pvrusb2 index a747200fe67c..2137b589276b 100644 --- a/Documentation/video4linux/README.pvrusb2 +++ b/Documentation/video4linux/README.pvrusb2 | |||
@@ -172,7 +172,7 @@ Source file list / functional overview: | |||
172 | to provide a streaming API usable by a read() system call style of | 172 | to provide a streaming API usable by a read() system call style of |
173 | I/O. Right now this is the only layer on top of pvrusb2-io.[ch], | 173 | I/O. Right now this is the only layer on top of pvrusb2-io.[ch], |
174 | however the underlying architecture here was intended to allow for | 174 | however the underlying architecture here was intended to allow for |
175 | other styles of I/O to be implemented with additonal modules, like | 175 | other styles of I/O to be implemented with additional modules, like |
176 | mmap()'ed buffers or something even more exotic. | 176 | mmap()'ed buffers or something even more exotic. |
177 | 177 | ||
178 | pvrusb2-main.c - This is the top level of the driver. Module level | 178 | pvrusb2-main.c - This is the top level of the driver. Module level |
diff --git a/Documentation/video4linux/Zoran b/Documentation/video4linux/Zoran index 00e3f9267814..9ed629d4874b 100644 --- a/Documentation/video4linux/Zoran +++ b/Documentation/video4linux/Zoran | |||
@@ -130,7 +130,6 @@ Card number: 4 | |||
130 | 130 | ||
131 | Note: No module for the mse3000 is available yet | 131 | Note: No module for the mse3000 is available yet |
132 | Note: No module for the vpx3224 is available yet | 132 | Note: No module for the vpx3224 is available yet |
133 | Note: use encoder=X or decoder=X for non-default i2c chips (see i2c-id.h) | ||
134 | 133 | ||
135 | =========================== | 134 | =========================== |
136 | 135 | ||
@@ -322,76 +321,11 @@ your IRQs and make sure the card has its own interrupts. | |||
322 | 321 | ||
323 | 4. Programming interface | 322 | 4. Programming interface |
324 | 323 | ||
325 | This driver conforms to video4linux and video4linux2, both can be used to | 324 | This driver conforms to video4linux2. Support for V4L1 and for the custom |
326 | use the driver. Since video4linux didn't provide adequate calls to fully | 325 | zoran ioctls has been removed in kernel 2.6.38. |
327 | use the cards' features, we've introduced several programming extensions, | ||
328 | which are currently officially accepted in the 2.4.x branch of the kernel. | ||
329 | These extensions are known as the v4l/mjpeg extensions. See zoran.h for | ||
330 | details (structs/ioctls). | ||
331 | |||
332 | Information - video4linux: | ||
333 | http://linux.bytesex.org/v4l2/API.html | ||
334 | Documentation/video4linux/API.html | ||
335 | /usr/include/linux/videodev.h | ||
336 | |||
337 | Information - video4linux/mjpeg extensions: | ||
338 | ./zoran.h | ||
339 | (also see below) | ||
340 | |||
341 | Information - video4linux2: | ||
342 | http://linuxtv.org | ||
343 | http://v4l2spec.bytesex.org/ | ||
344 | /usr/include/linux/videodev2.h | ||
345 | |||
346 | More information on the video4linux/mjpeg extensions, by Serguei | ||
347 | Miridonovi and Rainer Johanni: | ||
348 | -- | ||
349 | The ioctls for that interface are as follows: | ||
350 | |||
351 | BUZIOC_G_PARAMS | ||
352 | BUZIOC_S_PARAMS | ||
353 | |||
354 | Get and set the parameters of the buz. The user should always do a | ||
355 | BUZIOC_G_PARAMS (with a struct buz_params) to obtain the default | ||
356 | settings, change what he likes and then make a BUZIOC_S_PARAMS call. | ||
357 | |||
358 | BUZIOC_REQBUFS | ||
359 | |||
360 | Before being able to capture/playback, the user has to request | ||
361 | the buffers he is wanting to use. Fill the structure | ||
362 | zoran_requestbuffers with the size (recommended: 256*1024) and | ||
363 | the number (recommended 32 up to 256). There are no such restrictions | ||
364 | as for the Video for Linux buffers, you should LEAVE SUFFICIENT | ||
365 | MEMORY for your system however, else strange things will happen .... | ||
366 | On return, the zoran_requestbuffers structure contains number and | ||
367 | size of the actually allocated buffers. | ||
368 | You should use these numbers for doing a mmap of the buffers | ||
369 | into the user space. | ||
370 | The BUZIOC_REQBUFS ioctl also makes it happen, that the next mmap | ||
371 | maps the MJPEG buffer instead of the V4L buffers. | ||
372 | |||
373 | BUZIOC_QBUF_CAPT | ||
374 | BUZIOC_QBUF_PLAY | ||
375 | |||
376 | Queue a buffer for capture or playback. The first call also starts | ||
377 | streaming capture. When streaming capture is going on, you may | ||
378 | only queue further buffers or issue syncs until streaming | ||
379 | capture is switched off again with a argument of -1 to | ||
380 | a BUZIOC_QBUF_CAPT/BUZIOC_QBUF_PLAY ioctl. | ||
381 | |||
382 | BUZIOC_SYNC | ||
383 | |||
384 | Issue this ioctl when all buffers are queued. This ioctl will | ||
385 | block until the first buffer becomes free for saving its | ||
386 | data to disk (after BUZIOC_QBUF_CAPT) or for reuse (after BUZIOC_QBUF_PLAY). | ||
387 | |||
388 | BUZIOC_G_STATUS | ||
389 | |||
390 | Get the status of the input lines (video source connected/norm). | ||
391 | 326 | ||
392 | For programming example, please, look at lavrec.c and lavplay.c code in | 327 | For programming example, please, look at lavrec.c and lavplay.c code in |
393 | lavtools-1.2p2 package (URL: http://www.cicese.mx/) | 328 | the MJPEG-tools (http://mjpeg.sf.net/). |
394 | and the 'examples' directory in the original Buz driver distribution. | ||
395 | 329 | ||
396 | Additional notes for software developers: | 330 | Additional notes for software developers: |
397 | 331 | ||
@@ -402,9 +336,6 @@ Additional notes for software developers: | |||
402 | standard is "more constant" for current country than geometry | 336 | standard is "more constant" for current country than geometry |
403 | settings of a variety of TV capture cards which may work in ITU or | 337 | settings of a variety of TV capture cards which may work in ITU or |
404 | square pixel format. | 338 | square pixel format. |
405 | -- | ||
406 | Please note that lavplay/lavrec are also included in the MJPEG-tools | ||
407 | (http://mjpeg.sf.net/). | ||
408 | 339 | ||
409 | =========================== | 340 | =========================== |
410 | 341 | ||
diff --git a/Documentation/video4linux/bttv/Cards b/Documentation/video4linux/bttv/Cards index 12217fc49725..db833ced2cb8 100644 --- a/Documentation/video4linux/bttv/Cards +++ b/Documentation/video4linux/bttv/Cards | |||
@@ -464,10 +464,6 @@ Siemens | |||
464 | ------- | 464 | ------- |
465 | Multimedia eXtension Board (MXB) (SAA7146, SAA7111) | 465 | Multimedia eXtension Board (MXB) (SAA7146, SAA7111) |
466 | 466 | ||
467 | Stradis | ||
468 | ------- | ||
469 | SDM275,SDM250,SDM026,SDM025 (SAA7146, IBMMPEG2): MPEG2 decoder only | ||
470 | |||
471 | Powercolor | 467 | Powercolor |
472 | ---------- | 468 | ---------- |
473 | MTV878 | 469 | MTV878 |
diff --git a/Documentation/video4linux/bttv/Insmod-options b/Documentation/video4linux/bttv/Insmod-options index bbe3ed667d91..14c065fa23ef 100644 --- a/Documentation/video4linux/bttv/Insmod-options +++ b/Documentation/video4linux/bttv/Insmod-options | |||
@@ -1,5 +1,5 @@ | |||
1 | 1 | ||
2 | Note: "modinfo <module>" prints various informations about a kernel | 2 | Note: "modinfo <module>" prints various information about a kernel |
3 | module, among them a complete and up-to-date list of insmod options. | 3 | module, among them a complete and up-to-date list of insmod options. |
4 | This list tends to be outdated because it is updated manually ... | 4 | This list tends to be outdated because it is updated manually ... |
5 | 5 | ||
diff --git a/Documentation/video4linux/bttv/MAKEDEV b/Documentation/video4linux/bttv/MAKEDEV index 9d112f7fd5f7..093c0cd18042 100644 --- a/Documentation/video4linux/bttv/MAKEDEV +++ b/Documentation/video4linux/bttv/MAKEDEV | |||
@@ -19,7 +19,6 @@ function makedev () { | |||
19 | echo "*** new device names ***" | 19 | echo "*** new device names ***" |
20 | makedev video 0 | 20 | makedev video 0 |
21 | makedev radio 64 | 21 | makedev radio 64 |
22 | makedev vtx 192 | ||
23 | makedev vbi 224 | 22 | makedev vbi 224 |
24 | 23 | ||
25 | #echo "*** old device names (for compatibility only) ***" | 24 | #echo "*** old device names (for compatibility only) ***" |
diff --git a/Documentation/video4linux/bttv/README b/Documentation/video4linux/bttv/README index 3a367cdb664e..7cbf4fb6cf31 100644 --- a/Documentation/video4linux/bttv/README +++ b/Documentation/video4linux/bttv/README | |||
@@ -70,7 +70,7 @@ If you have trouble with some specific TV card, try to ask there | |||
70 | instead of mailing me directly. The chance that someone with the | 70 | instead of mailing me directly. The chance that someone with the |
71 | same card listens there is much higher... | 71 | same card listens there is much higher... |
72 | 72 | ||
73 | For problems with sound: There are alot of different systems used | 73 | For problems with sound: There are a lot of different systems used |
74 | for TV sound all over the world. And there are also different chips | 74 | for TV sound all over the world. And there are also different chips |
75 | which decode the audio signal. Reports about sound problems ("stereo | 75 | which decode the audio signal. Reports about sound problems ("stereo |
76 | does'nt work") are pretty useless unless you include some details | 76 | does'nt work") are pretty useless unless you include some details |
diff --git a/Documentation/video4linux/bttv/README.freeze b/Documentation/video4linux/bttv/README.freeze index 4259dccc8287..5eddfa076cfb 100644 --- a/Documentation/video4linux/bttv/README.freeze +++ b/Documentation/video4linux/bttv/README.freeze | |||
@@ -33,7 +33,7 @@ state is stuck. | |||
33 | 33 | ||
34 | I've seen reports that bttv 0.7.x crashes whereas 0.8.x works rock solid | 34 | I've seen reports that bttv 0.7.x crashes whereas 0.8.x works rock solid |
35 | for some people. Thus probably a small buglet left somewhere in bttv | 35 | for some people. Thus probably a small buglet left somewhere in bttv |
36 | 0.7.x. I have no idea where exactly, it works stable for me and alot of | 36 | 0.7.x. I have no idea where exactly, it works stable for me and a lot of |
37 | other people. But in case you have problems with the 0.7.x versions you | 37 | other people. But in case you have problems with the 0.7.x versions you |
38 | can give 0.8.x a try ... | 38 | can give 0.8.x a try ... |
39 | 39 | ||
diff --git a/Documentation/video4linux/bttv/Sound-FAQ b/Documentation/video4linux/bttv/Sound-FAQ index 1e6328f91083..395f6c6fdd98 100644 --- a/Documentation/video4linux/bttv/Sound-FAQ +++ b/Documentation/video4linux/bttv/Sound-FAQ | |||
@@ -2,13 +2,13 @@ | |||
2 | bttv and sound mini howto | 2 | bttv and sound mini howto |
3 | ========================= | 3 | ========================= |
4 | 4 | ||
5 | There are alot of different bt848/849/878/879 based boards available. | 5 | There are a lot of different bt848/849/878/879 based boards available. |
6 | Making video work often is not a big deal, because this is handled | 6 | Making video work often is not a big deal, because this is handled |
7 | completely by the bt8xx chip, which is common on all boards. But | 7 | completely by the bt8xx chip, which is common on all boards. But |
8 | sound is handled in slightly different ways on each board. | 8 | sound is handled in slightly different ways on each board. |
9 | 9 | ||
10 | To handle the grabber boards correctly, there is a array tvcards[] in | 10 | To handle the grabber boards correctly, there is a array tvcards[] in |
11 | bttv-cards.c, which holds the informations required for each board. | 11 | bttv-cards.c, which holds the information required for each board. |
12 | Sound will work only, if the correct entry is used (for video it often | 12 | Sound will work only, if the correct entry is used (for video it often |
13 | makes no difference). The bttv driver prints a line to the kernel | 13 | makes no difference). The bttv driver prints a line to the kernel |
14 | log, telling which card type is used. Like this one: | 14 | log, telling which card type is used. Like this one: |
diff --git a/Documentation/video4linux/et61x251.txt b/Documentation/video4linux/et61x251.txt index 1247566c4de3..e0cdae491858 100644 --- a/Documentation/video4linux/et61x251.txt +++ b/Documentation/video4linux/et61x251.txt | |||
@@ -191,10 +191,10 @@ Syntax: <n> | |||
191 | Description: Debugging information level, from 0 to 3: | 191 | Description: Debugging information level, from 0 to 3: |
192 | 0 = none (use carefully) | 192 | 0 = none (use carefully) |
193 | 1 = critical errors | 193 | 1 = critical errors |
194 | 2 = significant informations | 194 | 2 = significant information |
195 | 3 = more verbose messages | 195 | 3 = more verbose messages |
196 | Level 3 is useful for testing only, when only one device | 196 | Level 3 is useful for testing only, when only one device |
197 | is used at the same time. It also shows some more informations | 197 | is used at the same time. It also shows some more information |
198 | about the hardware being detected. This module parameter can be | 198 | about the hardware being detected. This module parameter can be |
199 | changed at runtime thanks to the /sys filesystem interface. | 199 | changed at runtime thanks to the /sys filesystem interface. |
200 | Default: 2 | 200 | Default: 2 |
diff --git a/Documentation/video4linux/gspca.txt b/Documentation/video4linux/gspca.txt index 56ba7bba7168..5bfa9a777d26 100644 --- a/Documentation/video4linux/gspca.txt +++ b/Documentation/video4linux/gspca.txt | |||
@@ -103,6 +103,7 @@ spca561 046d:092d Logitech QC Elch2 | |||
103 | spca561 046d:092e Logitech QC Elch2 | 103 | spca561 046d:092e Logitech QC Elch2 |
104 | spca561 046d:092f Logitech QuickCam Express Plus | 104 | spca561 046d:092f Logitech QuickCam Express Plus |
105 | sunplus 046d:0960 Logitech ClickSmart 420 | 105 | sunplus 046d:0960 Logitech ClickSmart 420 |
106 | nw80x 046d:d001 Logitech QuickCam Pro (dark focus ring) | ||
106 | sunplus 0471:0322 Philips DMVC1300K | 107 | sunplus 0471:0322 Philips DMVC1300K |
107 | zc3xx 0471:0325 Philips SPC 200 NC | 108 | zc3xx 0471:0325 Philips SPC 200 NC |
108 | zc3xx 0471:0326 Philips SPC 300 NC | 109 | zc3xx 0471:0326 Philips SPC 300 NC |
@@ -150,10 +151,12 @@ sunplus 04fc:5330 Digitrex 2110 | |||
150 | sunplus 04fc:5360 Sunplus Generic | 151 | sunplus 04fc:5360 Sunplus Generic |
151 | spca500 04fc:7333 PalmPixDC85 | 152 | spca500 04fc:7333 PalmPixDC85 |
152 | sunplus 04fc:ffff Pure DigitalDakota | 153 | sunplus 04fc:ffff Pure DigitalDakota |
154 | nw80x 0502:d001 DVC V6 | ||
153 | spca501 0506:00df 3Com HomeConnect Lite | 155 | spca501 0506:00df 3Com HomeConnect Lite |
154 | sunplus 052b:1507 Megapixel 5 Pretec DC-1007 | 156 | sunplus 052b:1507 Megapixel 5 Pretec DC-1007 |
155 | sunplus 052b:1513 Megapix V4 | 157 | sunplus 052b:1513 Megapix V4 |
156 | sunplus 052b:1803 MegaImage VI | 158 | sunplus 052b:1803 MegaImage VI |
159 | nw80x 052b:d001 EZCam Pro p35u | ||
157 | tv8532 0545:808b Veo Stingray | 160 | tv8532 0545:808b Veo Stingray |
158 | tv8532 0545:8333 Veo Stingray | 161 | tv8532 0545:8333 Veo Stingray |
159 | sunplus 0546:3155 Polaroid PDC3070 | 162 | sunplus 0546:3155 Polaroid PDC3070 |
@@ -177,6 +180,7 @@ sunplus 055f:c530 Mustek Gsmart LCD 3 | |||
177 | sunplus 055f:c540 Gsmart D30 | 180 | sunplus 055f:c540 Gsmart D30 |
178 | sunplus 055f:c630 Mustek MDC4000 | 181 | sunplus 055f:c630 Mustek MDC4000 |
179 | sunplus 055f:c650 Mustek MDC5500Z | 182 | sunplus 055f:c650 Mustek MDC5500Z |
183 | nw80x 055f:d001 Mustek Wcam 300 mini | ||
180 | zc3xx 055f:d003 Mustek WCam300A | 184 | zc3xx 055f:d003 Mustek WCam300A |
181 | zc3xx 055f:d004 Mustek WCam300 AN | 185 | zc3xx 055f:d004 Mustek WCam300 AN |
182 | conex 0572:0041 Creative Notebook cx11646 | 186 | conex 0572:0041 Creative Notebook cx11646 |
@@ -195,14 +199,20 @@ gl860 05e3:0503 Genesys Logic PC Camera | |||
195 | gl860 05e3:f191 Genesys Logic PC Camera | 199 | gl860 05e3:f191 Genesys Logic PC Camera |
196 | spca561 060b:a001 Maxell Compact Pc PM3 | 200 | spca561 060b:a001 Maxell Compact Pc PM3 |
197 | zc3xx 0698:2003 CTX M730V built in | 201 | zc3xx 0698:2003 CTX M730V built in |
202 | nw80x 06a5:0000 Typhoon Webcam 100 USB | ||
203 | nw80x 06a5:d001 Divio based webcams | ||
204 | nw80x 06a5:d800 Divio Chicony TwinkleCam, Trust SpaceCam | ||
198 | spca500 06bd:0404 Agfa CL20 | 205 | spca500 06bd:0404 Agfa CL20 |
199 | spca500 06be:0800 Optimedia | 206 | spca500 06be:0800 Optimedia |
207 | nw80x 06be:d001 EZCam Pro p35u | ||
200 | sunplus 06d6:0031 Trust 610 LCD PowerC@m Zoom | 208 | sunplus 06d6:0031 Trust 610 LCD PowerC@m Zoom |
201 | spca506 06e1:a190 ADS Instant VCD | 209 | spca506 06e1:a190 ADS Instant VCD |
210 | ov534 06f8:3002 Hercules Blog Webcam | ||
202 | ov534_9 06f8:3003 Hercules Dualpix HD Weblog | 211 | ov534_9 06f8:3003 Hercules Dualpix HD Weblog |
203 | sonixj 06f8:3004 Hercules Classic Silver | 212 | sonixj 06f8:3004 Hercules Classic Silver |
204 | sonixj 06f8:3008 Hercules Deluxe Optical Glass | 213 | sonixj 06f8:3008 Hercules Deluxe Optical Glass |
205 | pac7302 06f8:3009 Hercules Classic Link | 214 | pac7302 06f8:3009 Hercules Classic Link |
215 | nw80x 0728:d001 AVerMedia Camguard | ||
206 | spca508 0733:0110 ViewQuest VQ110 | 216 | spca508 0733:0110 ViewQuest VQ110 |
207 | spca501 0733:0401 Intel Create and Share | 217 | spca501 0733:0401 Intel Create and Share |
208 | spca501 0733:0402 ViewQuest M318B | 218 | spca501 0733:0402 ViewQuest M318B |
@@ -265,6 +275,7 @@ pac7302 093a:2629 Genious iSlim 300 | |||
265 | pac7302 093a:262a Webcam 300k | 275 | pac7302 093a:262a Webcam 300k |
266 | pac7302 093a:262c Philips SPC 230 NC | 276 | pac7302 093a:262c Philips SPC 230 NC |
267 | jeilinj 0979:0280 Sakar 57379 | 277 | jeilinj 0979:0280 Sakar 57379 |
278 | jeilinj 0979:0280 Sportscam DV15 | ||
268 | zc3xx 0ac8:0302 Z-star Vimicro zc0302 | 279 | zc3xx 0ac8:0302 Z-star Vimicro zc0302 |
269 | vc032x 0ac8:0321 Vimicro generic vc0321 | 280 | vc032x 0ac8:0321 Vimicro generic vc0321 |
270 | vc032x 0ac8:0323 Vimicro Vc0323 | 281 | vc032x 0ac8:0323 Vimicro Vc0323 |
@@ -302,12 +313,14 @@ sonixj 0c45:60fb Surfer NoName | |||
302 | sonixj 0c45:60fc LG-LIC300 | 313 | sonixj 0c45:60fc LG-LIC300 |
303 | sonixj 0c45:60fe Microdia Audio | 314 | sonixj 0c45:60fe Microdia Audio |
304 | sonixj 0c45:6100 PC Camera (SN9C128) | 315 | sonixj 0c45:6100 PC Camera (SN9C128) |
316 | sonixj 0c45:6102 PC Camera (SN9C128) | ||
305 | sonixj 0c45:610a PC Camera (SN9C128) | 317 | sonixj 0c45:610a PC Camera (SN9C128) |
306 | sonixj 0c45:610b PC Camera (SN9C128) | 318 | sonixj 0c45:610b PC Camera (SN9C128) |
307 | sonixj 0c45:610c PC Camera (SN9C128) | 319 | sonixj 0c45:610c PC Camera (SN9C128) |
308 | sonixj 0c45:610e PC Camera (SN9C128) | 320 | sonixj 0c45:610e PC Camera (SN9C128) |
309 | sonixj 0c45:6128 Microdia/Sonix SNP325 | 321 | sonixj 0c45:6128 Microdia/Sonix SNP325 |
310 | sonixj 0c45:612a Avant Camera | 322 | sonixj 0c45:612a Avant Camera |
323 | sonixj 0c45:612b Speed-Link REFLECT2 | ||
311 | sonixj 0c45:612c Typhoon Rasy Cam 1.3MPix | 324 | sonixj 0c45:612c Typhoon Rasy Cam 1.3MPix |
312 | sonixj 0c45:6130 Sonix Pccam | 325 | sonixj 0c45:6130 Sonix Pccam |
313 | sonixj 0c45:6138 Sn9c120 Mo4000 | 326 | sonixj 0c45:6138 Sn9c120 Mo4000 |
@@ -364,6 +377,7 @@ t613 17a1:0128 TASCORP JPEG Webcam, NGS Cyclops | |||
364 | vc032x 17ef:4802 Lenovo Vc0323+MI1310_SOC | 377 | vc032x 17ef:4802 Lenovo Vc0323+MI1310_SOC |
365 | pac207 2001:f115 D-Link DSB-C120 | 378 | pac207 2001:f115 D-Link DSB-C120 |
366 | sq905c 2770:9050 Disney pix micro (CIF) | 379 | sq905c 2770:9050 Disney pix micro (CIF) |
380 | sq905c 2770:9051 Lego Bionicle | ||
367 | sq905c 2770:9052 Disney pix micro 2 (VGA) | 381 | sq905c 2770:9052 Disney pix micro 2 (VGA) |
368 | sq905c 2770:905c All 11 known cameras with this ID | 382 | sq905c 2770:905c All 11 known cameras with this ID |
369 | sq905 2770:9120 All 24 known cameras with this ID | 383 | sq905 2770:9120 All 24 known cameras with this ID |
diff --git a/Documentation/video4linux/meye.txt b/Documentation/video4linux/meye.txt index bf3af5fe558f..34e2842c70ae 100644 --- a/Documentation/video4linux/meye.txt +++ b/Documentation/video4linux/meye.txt | |||
@@ -45,8 +45,6 @@ module argument syntax (<param>=<value> when passing the option to the | |||
45 | module or meye.<param>=<value> on the kernel boot line when meye is | 45 | module or meye.<param>=<value> on the kernel boot line when meye is |
46 | statically linked into the kernel). Those options are: | 46 | statically linked into the kernel). Those options are: |
47 | 47 | ||
48 | forcev4l1: force use of V4L1 API instead of V4L2 | ||
49 | |||
50 | gbuffers: number of capture buffers, default is 2 (32 max) | 48 | gbuffers: number of capture buffers, default is 2 (32 max) |
51 | 49 | ||
52 | gbufsize: size of each capture buffer, default is 614400 | 50 | gbufsize: size of each capture buffer, default is 614400 |
@@ -79,9 +77,8 @@ Usage: | |||
79 | Private API: | 77 | Private API: |
80 | ------------ | 78 | ------------ |
81 | 79 | ||
82 | The driver supports frame grabbing with the video4linux API | 80 | The driver supports frame grabbing with the video4linux API, |
83 | (either v4l1 or v4l2), so all video4linux tools (like xawtv) | 81 | so all video4linux tools (like xawtv) should work with this driver. |
84 | should work with this driver. | ||
85 | 82 | ||
86 | Besides the video4linux interface, the driver has a private interface | 83 | Besides the video4linux interface, the driver has a private interface |
87 | for accessing the Motion Eye extended parameters (camera sharpness, | 84 | for accessing the Motion Eye extended parameters (camera sharpness, |
@@ -123,7 +120,4 @@ Private API: | |||
123 | Bugs / Todo: | 120 | Bugs / Todo: |
124 | ------------ | 121 | ------------ |
125 | 122 | ||
126 | - the driver could be much cleaned up by removing the v4l1 support. | ||
127 | However, this means all v4l1-only applications will stop working. | ||
128 | |||
129 | - 'motioneye' still uses the meye private v4l1 API extensions. | 123 | - 'motioneye' still uses the meye private v4l1 API extensions. |
diff --git a/Documentation/video4linux/omap3isp.txt b/Documentation/video4linux/omap3isp.txt new file mode 100644 index 000000000000..69be2c782b98 --- /dev/null +++ b/Documentation/video4linux/omap3isp.txt | |||
@@ -0,0 +1,278 @@ | |||
1 | OMAP 3 Image Signal Processor (ISP) driver | ||
2 | |||
3 | Copyright (C) 2010 Nokia Corporation | ||
4 | Copyright (C) 2009 Texas Instruments, Inc. | ||
5 | |||
6 | Contacts: Laurent Pinchart <laurent.pinchart@ideasonboard.com> | ||
7 | Sakari Ailus <sakari.ailus@iki.fi> | ||
8 | David Cohen <dacohen@gmail.com> | ||
9 | |||
10 | |||
11 | Introduction | ||
12 | ============ | ||
13 | |||
14 | This file documents the Texas Instruments OMAP 3 Image Signal Processor (ISP) | ||
15 | driver located under drivers/media/video/omap3isp. The original driver was | ||
16 | written by Texas Instruments but since that it has been rewritten (twice) at | ||
17 | Nokia. | ||
18 | |||
19 | The driver has been successfully used on the following versions of OMAP 3: | ||
20 | |||
21 | 3430 | ||
22 | 3530 | ||
23 | 3630 | ||
24 | |||
25 | The driver implements V4L2, Media controller and v4l2_subdev interfaces. | ||
26 | Sensor, lens and flash drivers using the v4l2_subdev interface in the kernel | ||
27 | are supported. | ||
28 | |||
29 | |||
30 | Split to subdevs | ||
31 | ================ | ||
32 | |||
33 | The OMAP 3 ISP is split into V4L2 subdevs, each of the blocks inside the ISP | ||
34 | having one subdev to represent it. Each of the subdevs provide a V4L2 subdev | ||
35 | interface to userspace. | ||
36 | |||
37 | OMAP3 ISP CCP2 | ||
38 | OMAP3 ISP CSI2a | ||
39 | OMAP3 ISP CCDC | ||
40 | OMAP3 ISP preview | ||
41 | OMAP3 ISP resizer | ||
42 | OMAP3 ISP AEWB | ||
43 | OMAP3 ISP AF | ||
44 | OMAP3 ISP histogram | ||
45 | |||
46 | Each possible link in the ISP is modelled by a link in the Media controller | ||
47 | interface. For an example program see [2]. | ||
48 | |||
49 | |||
50 | Controlling the OMAP 3 ISP | ||
51 | ========================== | ||
52 | |||
53 | In general, the settings given to the OMAP 3 ISP take effect at the beginning | ||
54 | of the following frame. This is done when the module becomes idle during the | ||
55 | vertical blanking period on the sensor. In memory-to-memory operation the pipe | ||
56 | is run one frame at a time. Applying the settings is done between the frames. | ||
57 | |||
58 | All the blocks in the ISP, excluding the CSI-2 and possibly the CCP2 receiver, | ||
59 | insist on receiving complete frames. Sensors must thus never send the ISP | ||
60 | partial frames. | ||
61 | |||
62 | Autoidle does have issues with some ISP blocks on the 3430, at least. | ||
63 | Autoidle is only enabled on 3630 when the omap3isp module parameter autoidle | ||
64 | is non-zero. | ||
65 | |||
66 | |||
67 | Events | ||
68 | ====== | ||
69 | |||
70 | The OMAP 3 ISP driver does support the V4L2 event interface on CCDC and | ||
71 | statistics (AEWB, AF and histogram) subdevs. | ||
72 | |||
73 | The CCDC subdev produces V4L2_EVENT_OMAP3ISP_HS_VS type event on HS_VS | ||
74 | interrupt which is used to signal frame start. The event is triggered exactly | ||
75 | when the reception of the first line of the frame starts in the CCDC module. | ||
76 | The event can be subscribed on the CCDC subdev. | ||
77 | |||
78 | (When using parallel interface one must pay account to correct configuration | ||
79 | of the VS signal polarity. This is automatically correct when using the serial | ||
80 | receivers.) | ||
81 | |||
82 | Each of the statistics subdevs is able to produce events. An event is | ||
83 | generated whenever a statistics buffer can be dequeued by a user space | ||
84 | application using the VIDIOC_OMAP3ISP_STAT_REQ IOCTL. The events available | ||
85 | are: | ||
86 | |||
87 | V4L2_EVENT_OMAP3ISP_AEWB | ||
88 | V4L2_EVENT_OMAP3ISP_AF | ||
89 | V4L2_EVENT_OMAP3ISP_HIST | ||
90 | |||
91 | The type of the event data is struct omap3isp_stat_event_status for these | ||
92 | ioctls. If there is an error calculating the statistics, there will be an | ||
93 | event as usual, but no related statistics buffer. In this case | ||
94 | omap3isp_stat_event_status.buf_err is set to non-zero. | ||
95 | |||
96 | |||
97 | Private IOCTLs | ||
98 | ============== | ||
99 | |||
100 | The OMAP 3 ISP driver supports standard V4L2 IOCTLs and controls where | ||
101 | possible and practical. Much of the functions provided by the ISP, however, | ||
102 | does not fall under the standard IOCTLs --- gamma tables and configuration of | ||
103 | statistics collection are examples of such. | ||
104 | |||
105 | In general, there is a private ioctl for configuring each of the blocks | ||
106 | containing hardware-dependent functions. | ||
107 | |||
108 | The following private IOCTLs are supported: | ||
109 | |||
110 | VIDIOC_OMAP3ISP_CCDC_CFG | ||
111 | VIDIOC_OMAP3ISP_PRV_CFG | ||
112 | VIDIOC_OMAP3ISP_AEWB_CFG | ||
113 | VIDIOC_OMAP3ISP_HIST_CFG | ||
114 | VIDIOC_OMAP3ISP_AF_CFG | ||
115 | VIDIOC_OMAP3ISP_STAT_REQ | ||
116 | VIDIOC_OMAP3ISP_STAT_EN | ||
117 | |||
118 | The parameter structures used by these ioctls are described in | ||
119 | include/linux/omap3isp.h. The detailed functions of the ISP itself related to | ||
120 | a given ISP block is described in the Technical Reference Manuals (TRMs) --- | ||
121 | see the end of the document for those. | ||
122 | |||
123 | While it is possible to use the ISP driver without any use of these private | ||
124 | IOCTLs it is not possible to obtain optimal image quality this way. The AEWB, | ||
125 | AF and histogram modules cannot be used without configuring them using the | ||
126 | appropriate private IOCTLs. | ||
127 | |||
128 | |||
129 | CCDC and preview block IOCTLs | ||
130 | ============================= | ||
131 | |||
132 | The VIDIOC_OMAP3ISP_CCDC_CFG and VIDIOC_OMAP3ISP_PRV_CFG IOCTLs are used to | ||
133 | configure, enable and disable functions in the CCDC and preview blocks, | ||
134 | respectively. Both IOCTLs control several functions in the blocks they | ||
135 | control. VIDIOC_OMAP3ISP_CCDC_CFG IOCTL accepts a pointer to struct | ||
136 | omap3isp_ccdc_update_config as its argument. Similarly VIDIOC_OMAP3ISP_PRV_CFG | ||
137 | accepts a pointer to struct omap3isp_prev_update_config. The definition of | ||
138 | both structures is available in [1]. | ||
139 | |||
140 | The update field in the structures tells whether to update the configuration | ||
141 | for the specific function and the flag tells whether to enable or disable the | ||
142 | function. | ||
143 | |||
144 | The update and flag bit masks accept the following values. Each separate | ||
145 | functions in the CCDC and preview blocks is associated with a flag (either | ||
146 | disable or enable; part of the flag field in the structure) and a pointer to | ||
147 | configuration data for the function. | ||
148 | |||
149 | Valid values for the update and flag fields are listed here for | ||
150 | VIDIOC_OMAP3ISP_CCDC_CFG. Values may be or'ed to configure more than one | ||
151 | function in the same IOCTL call. | ||
152 | |||
153 | OMAP3ISP_CCDC_ALAW | ||
154 | OMAP3ISP_CCDC_LPF | ||
155 | OMAP3ISP_CCDC_BLCLAMP | ||
156 | OMAP3ISP_CCDC_BCOMP | ||
157 | OMAP3ISP_CCDC_FPC | ||
158 | OMAP3ISP_CCDC_CULL | ||
159 | OMAP3ISP_CCDC_CONFIG_LSC | ||
160 | OMAP3ISP_CCDC_TBL_LSC | ||
161 | |||
162 | The corresponding values for the VIDIOC_OMAP3ISP_PRV_CFG are here: | ||
163 | |||
164 | OMAP3ISP_PREV_LUMAENH | ||
165 | OMAP3ISP_PREV_INVALAW | ||
166 | OMAP3ISP_PREV_HRZ_MED | ||
167 | OMAP3ISP_PREV_CFA | ||
168 | OMAP3ISP_PREV_CHROMA_SUPP | ||
169 | OMAP3ISP_PREV_WB | ||
170 | OMAP3ISP_PREV_BLKADJ | ||
171 | OMAP3ISP_PREV_RGB2RGB | ||
172 | OMAP3ISP_PREV_COLOR_CONV | ||
173 | OMAP3ISP_PREV_YC_LIMIT | ||
174 | OMAP3ISP_PREV_DEFECT_COR | ||
175 | OMAP3ISP_PREV_GAMMABYPASS | ||
176 | OMAP3ISP_PREV_DRK_FRM_CAPTURE | ||
177 | OMAP3ISP_PREV_DRK_FRM_SUBTRACT | ||
178 | OMAP3ISP_PREV_LENS_SHADING | ||
179 | OMAP3ISP_PREV_NF | ||
180 | OMAP3ISP_PREV_GAMMA | ||
181 | |||
182 | The associated configuration pointer for the function may not be NULL when | ||
183 | enabling the function. When disabling a function the configuration pointer is | ||
184 | ignored. | ||
185 | |||
186 | |||
187 | Statistic blocks IOCTLs | ||
188 | ======================= | ||
189 | |||
190 | The statistics subdevs do offer more dynamic configuration options than the | ||
191 | other subdevs. They can be enabled, disable and reconfigured when the pipeline | ||
192 | is in streaming state. | ||
193 | |||
194 | The statistics blocks always get the input image data from the CCDC (as the | ||
195 | histogram memory read isn't implemented). The statistics are dequeueable by | ||
196 | the user from the statistics subdev nodes using private IOCTLs. | ||
197 | |||
198 | The private IOCTLs offered by the AEWB, AF and histogram subdevs are heavily | ||
199 | reflected by the register level interface offered by the ISP hardware. There | ||
200 | are aspects that are purely related to the driver implementation and these are | ||
201 | discussed next. | ||
202 | |||
203 | VIDIOC_OMAP3ISP_STAT_EN | ||
204 | ----------------------- | ||
205 | |||
206 | This private IOCTL enables/disables a statistic module. If this request is | ||
207 | done before streaming, it will take effect as soon as the pipeline starts to | ||
208 | stream. If the pipeline is already streaming, it will take effect as soon as | ||
209 | the CCDC becomes idle. | ||
210 | |||
211 | VIDIOC_OMAP3ISP_AEWB_CFG, VIDIOC_OMAP3ISP_HIST_CFG and VIDIOC_OMAP3ISP_AF_CFG | ||
212 | ----------------------------------------------------------------------------- | ||
213 | |||
214 | Those IOCTLs are used to configure the modules. They require user applications | ||
215 | to have an in-depth knowledge of the hardware. Most of the fields explanation | ||
216 | can be found on OMAP's TRMs. The two following fields common to all the above | ||
217 | configure private IOCTLs require explanation for better understanding as they | ||
218 | are not part of the TRM. | ||
219 | |||
220 | omap3isp_[h3a_af/h3a_aewb/hist]_config.buf_size: | ||
221 | |||
222 | The modules handle their buffers internally. The necessary buffer size for the | ||
223 | module's data output depends on the requested configuration. Although the | ||
224 | driver supports reconfiguration while streaming, it does not support a | ||
225 | reconfiguration which requires bigger buffer size than what is already | ||
226 | internally allocated if the module is enabled. It will return -EBUSY on this | ||
227 | case. In order to avoid such condition, either disable/reconfigure/enable the | ||
228 | module or request the necessary buffer size during the first configuration | ||
229 | while the module is disabled. | ||
230 | |||
231 | The internal buffer size allocation considers the requested configuration's | ||
232 | minimum buffer size and the value set on buf_size field. If buf_size field is | ||
233 | out of [minimum, maximum] buffer size range, it's clamped to fit in there. | ||
234 | The driver then selects the biggest value. The corrected buf_size value is | ||
235 | written back to user application. | ||
236 | |||
237 | omap3isp_[h3a_af/h3a_aewb/hist]_config.config_counter: | ||
238 | |||
239 | As the configuration doesn't take effect synchronously to the request, the | ||
240 | driver must provide a way to track this information to provide more accurate | ||
241 | data. After a configuration is requested, the config_counter returned to user | ||
242 | space application will be an unique value associated to that request. When | ||
243 | user application receives an event for buffer availability or when a new | ||
244 | buffer is requested, this config_counter is used to match a buffer data and a | ||
245 | configuration. | ||
246 | |||
247 | VIDIOC_OMAP3ISP_STAT_REQ | ||
248 | ------------------------ | ||
249 | |||
250 | Send to user space the oldest data available in the internal buffer queue and | ||
251 | discards such buffer afterwards. The field omap3isp_stat_data.frame_number | ||
252 | matches with the video buffer's field_count. | ||
253 | |||
254 | |||
255 | Technical reference manuals (TRMs) and other documentation | ||
256 | ========================================================== | ||
257 | |||
258 | OMAP 3430 TRM: | ||
259 | <URL:http://focus.ti.com/pdfs/wtbu/OMAP34xx_ES3.1.x_PUBLIC_TRM_vZM.zip> | ||
260 | Referenced 2011-03-05. | ||
261 | |||
262 | OMAP 35xx TRM: | ||
263 | <URL:http://www.ti.com/litv/pdf/spruf98o> Referenced 2011-03-05. | ||
264 | |||
265 | OMAP 3630 TRM: | ||
266 | <URL:http://focus.ti.com/pdfs/wtbu/OMAP36xx_ES1.x_PUBLIC_TRM_vQ.zip> | ||
267 | Referenced 2011-03-05. | ||
268 | |||
269 | DM 3730 TRM: | ||
270 | <URL:http://www.ti.com/litv/pdf/sprugn4h> Referenced 2011-03-06. | ||
271 | |||
272 | |||
273 | References | ||
274 | ========== | ||
275 | |||
276 | [1] include/linux/omap3isp.h | ||
277 | |||
278 | [2] http://git.ideasonboard.org/?p=media-ctl.git;a=summary | ||
diff --git a/Documentation/video4linux/pxa_camera.txt b/Documentation/video4linux/pxa_camera.txt index 4f6d0ca01956..51ed1578b0e8 100644 --- a/Documentation/video4linux/pxa_camera.txt +++ b/Documentation/video4linux/pxa_camera.txt | |||
@@ -84,12 +84,12 @@ DMA usage | |||
84 | transfer is not started. On "End Of Frame" interrupt, the irq handler | 84 | transfer is not started. On "End Of Frame" interrupt, the irq handler |
85 | starts the DMA chain. | 85 | starts the DMA chain. |
86 | - capture of one videobuffer | 86 | - capture of one videobuffer |
87 | The DMA chain starts transfering data into videobuffer RAM pages. | 87 | The DMA chain starts transferring data into videobuffer RAM pages. |
88 | When all pages are transfered, the DMA irq is raised on "ENDINTR" status | 88 | When all pages are transferred, the DMA irq is raised on "ENDINTR" status |
89 | - finishing one videobuffer | 89 | - finishing one videobuffer |
90 | The DMA irq handler marks the videobuffer as "done", and removes it from | 90 | The DMA irq handler marks the videobuffer as "done", and removes it from |
91 | the active running queue | 91 | the active running queue |
92 | Meanwhile, the next videobuffer (if there is one), is transfered by DMA | 92 | Meanwhile, the next videobuffer (if there is one), is transferred by DMA |
93 | - finishing the last videobuffer | 93 | - finishing the last videobuffer |
94 | On the DMA irq of the last videobuffer, the QCI is stopped. | 94 | On the DMA irq of the last videobuffer, the QCI is stopped. |
95 | 95 | ||
@@ -101,7 +101,7 @@ DMA usage | |||
101 | 101 | ||
102 | This structure is pointed by dma->sg_cpu. | 102 | This structure is pointed by dma->sg_cpu. |
103 | The descriptors are used as follows : | 103 | The descriptors are used as follows : |
104 | - desc-sg[i]: i-th descriptor, transfering the i-th sg | 104 | - desc-sg[i]: i-th descriptor, transferring the i-th sg |
105 | element to the video buffer scatter gather | 105 | element to the video buffer scatter gather |
106 | - finisher: has ddadr=DADDR_STOP, dcmd=ENDIRQEN | 106 | - finisher: has ddadr=DADDR_STOP, dcmd=ENDIRQEN |
107 | - linker: has ddadr= desc-sg[0] of next video buffer, dcmd=0 | 107 | - linker: has ddadr= desc-sg[0] of next video buffer, dcmd=0 |
diff --git a/Documentation/video4linux/sh_mobile_ceu_camera.txt b/Documentation/video4linux/sh_mobile_ceu_camera.txt index cb47e723af74..1e96ce6e2d2f 100644 --- a/Documentation/video4linux/sh_mobile_ceu_camera.txt +++ b/Documentation/video4linux/sh_mobile_ceu_camera.txt | |||
@@ -37,7 +37,7 @@ Generic scaling / cropping scheme | |||
37 | -1'- | 37 | -1'- |
38 | 38 | ||
39 | In the above chart minuses and slashes represent "real" data amounts, points and | 39 | In the above chart minuses and slashes represent "real" data amounts, points and |
40 | accents represent "useful" data, basically, CEU scaled amd cropped output, | 40 | accents represent "useful" data, basically, CEU scaled and cropped output, |
41 | mapped back onto the client's source plane. | 41 | mapped back onto the client's source plane. |
42 | 42 | ||
43 | Such a configuration can be produced by user requests: | 43 | Such a configuration can be produced by user requests: |
@@ -65,7 +65,7 @@ Do not touch input rectangle - it is already optimal. | |||
65 | 65 | ||
66 | 1. Calculate current sensor scales: | 66 | 1. Calculate current sensor scales: |
67 | 67 | ||
68 | scale_s = ((3') - (3)) / ((2') - (2)) | 68 | scale_s = ((2') - (2)) / ((3') - (3)) |
69 | 69 | ||
70 | 2. Calculate "effective" input crop (sensor subwindow) - CEU crop scaled back at | 70 | 2. Calculate "effective" input crop (sensor subwindow) - CEU crop scaled back at |
71 | current sensor scales onto input window - this is user S_CROP: | 71 | current sensor scales onto input window - this is user S_CROP: |
@@ -80,7 +80,7 @@ window: | |||
80 | 4. Calculate sensor output window by applying combined scales to real input | 80 | 4. Calculate sensor output window by applying combined scales to real input |
81 | window: | 81 | window: |
82 | 82 | ||
83 | width_s_out = ((2') - (2)) / scale_comb | 83 | width_s_out = ((7') - (7)) = ((2') - (2)) / scale_comb |
84 | 84 | ||
85 | 5. Apply iterative sensor S_FMT for sensor output window. | 85 | 5. Apply iterative sensor S_FMT for sensor output window. |
86 | 86 | ||
diff --git a/Documentation/video4linux/sn9c102.txt b/Documentation/video4linux/sn9c102.txt index 73de4050d637..b4f67040403a 100644 --- a/Documentation/video4linux/sn9c102.txt +++ b/Documentation/video4linux/sn9c102.txt | |||
@@ -214,10 +214,10 @@ Syntax: <n> | |||
214 | Description: Debugging information level, from 0 to 3: | 214 | Description: Debugging information level, from 0 to 3: |
215 | 0 = none (use carefully) | 215 | 0 = none (use carefully) |
216 | 1 = critical errors | 216 | 1 = critical errors |
217 | 2 = significant informations | 217 | 2 = significant information |
218 | 3 = more verbose messages | 218 | 3 = more verbose messages |
219 | Level 3 is useful for testing only. It also shows some more | 219 | Level 3 is useful for testing only. It also shows some more |
220 | informations about the hardware being detected. | 220 | information about the hardware being detected. |
221 | This parameter can be changed at runtime thanks to the /sys | 221 | This parameter can be changed at runtime thanks to the /sys |
222 | filesystem interface. | 222 | filesystem interface. |
223 | Default: 2 | 223 | Default: 2 |
diff --git a/Documentation/video4linux/uvcvideo.txt b/Documentation/video4linux/uvcvideo.txt new file mode 100644 index 000000000000..848d620dcc5c --- /dev/null +++ b/Documentation/video4linux/uvcvideo.txt | |||
@@ -0,0 +1,239 @@ | |||
1 | Linux USB Video Class (UVC) driver | ||
2 | ================================== | ||
3 | |||
4 | This file documents some driver-specific aspects of the UVC driver, such as | ||
5 | driver-specific ioctls and implementation notes. | ||
6 | |||
7 | Questions and remarks can be sent to the Linux UVC development mailing list at | ||
8 | linux-uvc-devel@lists.berlios.de. | ||
9 | |||
10 | |||
11 | Extension Unit (XU) support | ||
12 | --------------------------- | ||
13 | |||
14 | 1. Introduction | ||
15 | |||
16 | The UVC specification allows for vendor-specific extensions through extension | ||
17 | units (XUs). The Linux UVC driver supports extension unit controls (XU controls) | ||
18 | through two separate mechanisms: | ||
19 | |||
20 | - through mappings of XU controls to V4L2 controls | ||
21 | - through a driver-specific ioctl interface | ||
22 | |||
23 | The first one allows generic V4L2 applications to use XU controls by mapping | ||
24 | certain XU controls onto V4L2 controls, which then show up during ordinary | ||
25 | control enumeration. | ||
26 | |||
27 | The second mechanism requires uvcvideo-specific knowledge for the application to | ||
28 | access XU controls but exposes the entire UVC XU concept to user space for | ||
29 | maximum flexibility. | ||
30 | |||
31 | Both mechanisms complement each other and are described in more detail below. | ||
32 | |||
33 | |||
34 | 2. Control mappings | ||
35 | |||
36 | The UVC driver provides an API for user space applications to define so-called | ||
37 | control mappings at runtime. These allow for individual XU controls or byte | ||
38 | ranges thereof to be mapped to new V4L2 controls. Such controls appear and | ||
39 | function exactly like normal V4L2 controls (i.e. the stock controls, such as | ||
40 | brightness, contrast, etc.). However, reading or writing of such a V4L2 controls | ||
41 | triggers a read or write of the associated XU control. | ||
42 | |||
43 | The ioctl used to create these control mappings is called UVCIOC_CTRL_MAP. | ||
44 | Previous driver versions (before 0.2.0) required another ioctl to be used | ||
45 | beforehand (UVCIOC_CTRL_ADD) to pass XU control information to the UVC driver. | ||
46 | This is no longer necessary as newer uvcvideo versions query the information | ||
47 | directly from the device. | ||
48 | |||
49 | For details on the UVCIOC_CTRL_MAP ioctl please refer to the section titled | ||
50 | "IOCTL reference" below. | ||
51 | |||
52 | |||
53 | 3. Driver specific XU control interface | ||
54 | |||
55 | For applications that need to access XU controls directly, e.g. for testing | ||
56 | purposes, firmware upload, or accessing binary controls, a second mechanism to | ||
57 | access XU controls is provided in the form of a driver-specific ioctl, namely | ||
58 | UVCIOC_CTRL_QUERY. | ||
59 | |||
60 | A call to this ioctl allows applications to send queries to the UVC driver that | ||
61 | directly map to the low-level UVC control requests. | ||
62 | |||
63 | In order to make such a request the UVC unit ID of the control's extension unit | ||
64 | and the control selector need to be known. This information either needs to be | ||
65 | hardcoded in the application or queried using other ways such as by parsing the | ||
66 | UVC descriptor or, if available, using the media controller API to enumerate a | ||
67 | device's entities. | ||
68 | |||
69 | Unless the control size is already known it is necessary to first make a | ||
70 | UVC_GET_LEN requests in order to be able to allocate a sufficiently large buffer | ||
71 | and set the buffer size to the correct value. Similarly, to find out whether | ||
72 | UVC_GET_CUR or UVC_SET_CUR are valid requests for a given control, a | ||
73 | UVC_GET_INFO request should be made. The bits 0 (GET supported) and 1 (SET | ||
74 | supported) of the resulting byte indicate which requests are valid. | ||
75 | |||
76 | With the addition of the UVCIOC_CTRL_QUERY ioctl the UVCIOC_CTRL_GET and | ||
77 | UVCIOC_CTRL_SET ioctls have become obsolete since their functionality is a | ||
78 | subset of the former ioctl. For the time being they are still supported but | ||
79 | application developers are encouraged to use UVCIOC_CTRL_QUERY instead. | ||
80 | |||
81 | For details on the UVCIOC_CTRL_QUERY ioctl please refer to the section titled | ||
82 | "IOCTL reference" below. | ||
83 | |||
84 | |||
85 | 4. Security | ||
86 | |||
87 | The API doesn't currently provide a fine-grained access control facility. The | ||
88 | UVCIOC_CTRL_ADD and UVCIOC_CTRL_MAP ioctls require super user permissions. | ||
89 | |||
90 | Suggestions on how to improve this are welcome. | ||
91 | |||
92 | |||
93 | 5. Debugging | ||
94 | |||
95 | In order to debug problems related to XU controls or controls in general it is | ||
96 | recommended to enable the UVC_TRACE_CONTROL bit in the module parameter 'trace'. | ||
97 | This causes extra output to be written into the system log. | ||
98 | |||
99 | |||
100 | 6. IOCTL reference | ||
101 | |||
102 | ---- UVCIOC_CTRL_MAP - Map a UVC control to a V4L2 control ---- | ||
103 | |||
104 | Argument: struct uvc_xu_control_mapping | ||
105 | |||
106 | Description: | ||
107 | This ioctl creates a mapping between a UVC control or part of a UVC | ||
108 | control and a V4L2 control. Once mappings are defined, userspace | ||
109 | applications can access vendor-defined UVC control through the V4L2 | ||
110 | control API. | ||
111 | |||
112 | To create a mapping, applications fill the uvc_xu_control_mapping | ||
113 | structure with information about an existing UVC control defined with | ||
114 | UVCIOC_CTRL_ADD and a new V4L2 control. | ||
115 | |||
116 | A UVC control can be mapped to several V4L2 controls. For instance, | ||
117 | a UVC pan/tilt control could be mapped to separate pan and tilt V4L2 | ||
118 | controls. The UVC control is divided into non overlapping fields using | ||
119 | the 'size' and 'offset' fields and are then independantly mapped to | ||
120 | V4L2 control. | ||
121 | |||
122 | For signed integer V4L2 controls the data_type field should be set to | ||
123 | UVC_CTRL_DATA_TYPE_SIGNED. Other values are currently ignored. | ||
124 | |||
125 | Return value: | ||
126 | On success 0 is returned. On error -1 is returned and errno is set | ||
127 | appropriately. | ||
128 | |||
129 | ENOMEM | ||
130 | Not enough memory to perform the operation. | ||
131 | EPERM | ||
132 | Insufficient privileges (super user privileges are required). | ||
133 | EINVAL | ||
134 | No such UVC control. | ||
135 | EOVERFLOW | ||
136 | The requested offset and size would overflow the UVC control. | ||
137 | EEXIST | ||
138 | Mapping already exists. | ||
139 | |||
140 | Data types: | ||
141 | * struct uvc_xu_control_mapping | ||
142 | |||
143 | __u32 id V4L2 control identifier | ||
144 | __u8 name[32] V4L2 control name | ||
145 | __u8 entity[16] UVC extension unit GUID | ||
146 | __u8 selector UVC control selector | ||
147 | __u8 size V4L2 control size (in bits) | ||
148 | __u8 offset V4L2 control offset (in bits) | ||
149 | enum v4l2_ctrl_type | ||
150 | v4l2_type V4L2 control type | ||
151 | enum uvc_control_data_type | ||
152 | data_type UVC control data type | ||
153 | struct uvc_menu_info | ||
154 | *menu_info Array of menu entries (for menu controls only) | ||
155 | __u32 menu_count Number of menu entries (for menu controls only) | ||
156 | |||
157 | * struct uvc_menu_info | ||
158 | |||
159 | __u32 value Menu entry value used by the device | ||
160 | __u8 name[32] Menu entry name | ||
161 | |||
162 | |||
163 | * enum uvc_control_data_type | ||
164 | |||
165 | UVC_CTRL_DATA_TYPE_RAW Raw control (byte array) | ||
166 | UVC_CTRL_DATA_TYPE_SIGNED Signed integer | ||
167 | UVC_CTRL_DATA_TYPE_UNSIGNED Unsigned integer | ||
168 | UVC_CTRL_DATA_TYPE_BOOLEAN Boolean | ||
169 | UVC_CTRL_DATA_TYPE_ENUM Enumeration | ||
170 | UVC_CTRL_DATA_TYPE_BITMASK Bitmask | ||
171 | |||
172 | |||
173 | ---- UVCIOC_CTRL_QUERY - Query a UVC XU control ---- | ||
174 | |||
175 | Argument: struct uvc_xu_control_query | ||
176 | |||
177 | Description: | ||
178 | This ioctl queries a UVC XU control identified by its extension unit ID | ||
179 | and control selector. | ||
180 | |||
181 | There are a number of different queries available that closely | ||
182 | correspond to the low-level control requests described in the UVC | ||
183 | specification. These requests are: | ||
184 | |||
185 | UVC_GET_CUR | ||
186 | Obtain the current value of the control. | ||
187 | UVC_GET_MIN | ||
188 | Obtain the minimum value of the control. | ||
189 | UVC_GET_MAX | ||
190 | Obtain the maximum value of the control. | ||
191 | UVC_GET_DEF | ||
192 | Obtain the default value of the control. | ||
193 | UVC_GET_RES | ||
194 | Query the resolution of the control, i.e. the step size of the | ||
195 | allowed control values. | ||
196 | UVC_GET_LEN | ||
197 | Query the size of the control in bytes. | ||
198 | UVC_GET_INFO | ||
199 | Query the control information bitmap, which indicates whether | ||
200 | get/set requests are supported. | ||
201 | UVC_SET_CUR | ||
202 | Update the value of the control. | ||
203 | |||
204 | Applications must set the 'size' field to the correct length for the | ||
205 | control. Exceptions are the UVC_GET_LEN and UVC_GET_INFO queries, for | ||
206 | which the size must be set to 2 and 1, respectively. The 'data' field | ||
207 | must point to a valid writable buffer big enough to hold the indicated | ||
208 | number of data bytes. | ||
209 | |||
210 | Data is copied directly from the device without any driver-side | ||
211 | processing. Applications are responsible for data buffer formatting, | ||
212 | including little-endian/big-endian conversion. This is particularly | ||
213 | important for the result of the UVC_GET_LEN requests, which is always | ||
214 | returned as a little-endian 16-bit integer by the device. | ||
215 | |||
216 | Return value: | ||
217 | On success 0 is returned. On error -1 is returned and errno is set | ||
218 | appropriately. | ||
219 | |||
220 | ENOENT | ||
221 | The device does not support the given control or the specified | ||
222 | extension unit could not be found. | ||
223 | ENOBUFS | ||
224 | The specified buffer size is incorrect (too big or too small). | ||
225 | EINVAL | ||
226 | An invalid request code was passed. | ||
227 | EBADRQC | ||
228 | The given request is not supported by the given control. | ||
229 | EFAULT | ||
230 | The data pointer references an inaccessible memory area. | ||
231 | |||
232 | Data types: | ||
233 | * struct uvc_xu_control_query | ||
234 | |||
235 | __u8 unit Extension unit ID | ||
236 | __u8 selector Control selector | ||
237 | __u8 query Request code to send to the device | ||
238 | __u16 size Control data size (in bytes) | ||
239 | __u8 *data Control value | ||
diff --git a/Documentation/video4linux/v4l2-controls.txt b/Documentation/video4linux/v4l2-controls.txt index 8773778d23fc..881e7f44491b 100644 --- a/Documentation/video4linux/v4l2-controls.txt +++ b/Documentation/video4linux/v4l2-controls.txt | |||
@@ -285,6 +285,9 @@ implement g_volatile_ctrl like this: | |||
285 | The 'new value' union is not used in g_volatile_ctrl. In general controls | 285 | The 'new value' union is not used in g_volatile_ctrl. In general controls |
286 | that need to implement g_volatile_ctrl are read-only controls. | 286 | that need to implement g_volatile_ctrl are read-only controls. |
287 | 287 | ||
288 | Note that if one or more controls in a control cluster are marked as volatile, | ||
289 | then all the controls in the cluster are seen as volatile. | ||
290 | |||
288 | To mark a control as volatile you have to set the is_volatile flag: | 291 | To mark a control as volatile you have to set the is_volatile flag: |
289 | 292 | ||
290 | ctrl = v4l2_ctrl_new_std(&sd->ctrl_handler, ...); | 293 | ctrl = v4l2_ctrl_new_std(&sd->ctrl_handler, ...); |
@@ -462,6 +465,15 @@ pointer to the v4l2_ctrl_ops struct that is used for that cluster. | |||
462 | Obviously, all controls in the cluster array must be initialized to either | 465 | Obviously, all controls in the cluster array must be initialized to either |
463 | a valid control or to NULL. | 466 | a valid control or to NULL. |
464 | 467 | ||
468 | In rare cases you might want to know which controls of a cluster actually | ||
469 | were set explicitly by the user. For this you can check the 'is_new' flag of | ||
470 | each control. For example, in the case of a volume/mute cluster the 'is_new' | ||
471 | flag of the mute control would be set if the user called VIDIOC_S_CTRL for | ||
472 | mute only. If the user would call VIDIOC_S_EXT_CTRLS for both mute and volume | ||
473 | controls, then the 'is_new' flag would be 1 for both controls. | ||
474 | |||
475 | The 'is_new' flag is always 1 when called from v4l2_ctrl_handler_setup(). | ||
476 | |||
465 | 477 | ||
466 | VIDIOC_LOG_STATUS Support | 478 | VIDIOC_LOG_STATUS Support |
467 | ========================= | 479 | ========================= |
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt index e831aaca66f8..cf21f7aae976 100644 --- a/Documentation/video4linux/v4l2-framework.txt +++ b/Documentation/video4linux/v4l2-framework.txt | |||
@@ -44,8 +44,8 @@ All drivers have the following structure: | |||
44 | 44 | ||
45 | 2) A way of initializing and commanding sub-devices (if any). | 45 | 2) A way of initializing and commanding sub-devices (if any). |
46 | 46 | ||
47 | 3) Creating V4L2 device nodes (/dev/videoX, /dev/vbiX, /dev/radioX and | 47 | 3) Creating V4L2 device nodes (/dev/videoX, /dev/vbiX and /dev/radioX) |
48 | /dev/vtxX) and keeping track of device-node specific data. | 48 | and keeping track of device-node specific data. |
49 | 49 | ||
50 | 4) Filehandle-specific structs containing per-filehandle data; | 50 | 4) Filehandle-specific structs containing per-filehandle data; |
51 | 51 | ||
@@ -71,6 +71,10 @@ sub-device instances, the video_device struct stores V4L2 device node data | |||
71 | and in the future a v4l2_fh struct will keep track of filehandle instances | 71 | and in the future a v4l2_fh struct will keep track of filehandle instances |
72 | (this is not yet implemented). | 72 | (this is not yet implemented). |
73 | 73 | ||
74 | The V4L2 framework also optionally integrates with the media framework. If a | ||
75 | driver sets the struct v4l2_device mdev field, sub-devices and video nodes | ||
76 | will automatically appear in the media framework as entities. | ||
77 | |||
74 | 78 | ||
75 | struct v4l2_device | 79 | struct v4l2_device |
76 | ------------------ | 80 | ------------------ |
@@ -83,11 +87,20 @@ You must register the device instance: | |||
83 | 87 | ||
84 | v4l2_device_register(struct device *dev, struct v4l2_device *v4l2_dev); | 88 | v4l2_device_register(struct device *dev, struct v4l2_device *v4l2_dev); |
85 | 89 | ||
86 | Registration will initialize the v4l2_device struct and link dev->driver_data | 90 | Registration will initialize the v4l2_device struct. If the dev->driver_data |
87 | to v4l2_dev. If v4l2_dev->name is empty then it will be set to a value derived | 91 | field is NULL, it will be linked to v4l2_dev. |
88 | from dev (driver name followed by the bus_id, to be precise). If you set it | 92 | |
89 | up before calling v4l2_device_register then it will be untouched. If dev is | 93 | Drivers that want integration with the media device framework need to set |
90 | NULL, then you *must* setup v4l2_dev->name before calling v4l2_device_register. | 94 | dev->driver_data manually to point to the driver-specific device structure |
95 | that embed the struct v4l2_device instance. This is achieved by a | ||
96 | dev_set_drvdata() call before registering the V4L2 device instance. They must | ||
97 | also set the struct v4l2_device mdev field to point to a properly initialized | ||
98 | and registered media_device instance. | ||
99 | |||
100 | If v4l2_dev->name is empty then it will be set to a value derived from dev | ||
101 | (driver name followed by the bus_id, to be precise). If you set it up before | ||
102 | calling v4l2_device_register then it will be untouched. If dev is NULL, then | ||
103 | you *must* setup v4l2_dev->name before calling v4l2_device_register. | ||
91 | 104 | ||
92 | You can use v4l2_device_set_name() to set the name based on a driver name and | 105 | You can use v4l2_device_set_name() to set the name based on a driver name and |
93 | a driver-global atomic_t instance. This will generate names like ivtv0, ivtv1, | 106 | a driver-global atomic_t instance. This will generate names like ivtv0, ivtv1, |
@@ -108,6 +121,7 @@ You unregister with: | |||
108 | 121 | ||
109 | v4l2_device_unregister(struct v4l2_device *v4l2_dev); | 122 | v4l2_device_unregister(struct v4l2_device *v4l2_dev); |
110 | 123 | ||
124 | If the dev->driver_data field points to v4l2_dev, it will be reset to NULL. | ||
111 | Unregistering will also automatically unregister all subdevs from the device. | 125 | Unregistering will also automatically unregister all subdevs from the device. |
112 | 126 | ||
113 | If you have a hotpluggable device (e.g. a USB device), then when a disconnect | 127 | If you have a hotpluggable device (e.g. a USB device), then when a disconnect |
@@ -167,6 +181,21 @@ static int __devinit drv_probe(struct pci_dev *pdev, | |||
167 | state->instance = atomic_inc_return(&drv_instance) - 1; | 181 | state->instance = atomic_inc_return(&drv_instance) - 1; |
168 | } | 182 | } |
169 | 183 | ||
184 | If you have multiple device nodes then it can be difficult to know when it is | ||
185 | safe to unregister v4l2_device. For this purpose v4l2_device has refcounting | ||
186 | support. The refcount is increased whenever video_register_device is called and | ||
187 | it is decreased whenever that device node is released. When the refcount reaches | ||
188 | zero, then the v4l2_device release() callback is called. You can do your final | ||
189 | cleanup there. | ||
190 | |||
191 | If other device nodes (e.g. ALSA) are created, then you can increase and | ||
192 | decrease the refcount manually as well by calling: | ||
193 | |||
194 | void v4l2_device_get(struct v4l2_device *v4l2_dev); | ||
195 | |||
196 | or: | ||
197 | |||
198 | int v4l2_device_put(struct v4l2_device *v4l2_dev); | ||
170 | 199 | ||
171 | struct v4l2_subdev | 200 | struct v4l2_subdev |
172 | ------------------ | 201 | ------------------ |
@@ -192,6 +221,11 @@ You also need a way to go from the low-level struct to v4l2_subdev. For the | |||
192 | common i2c_client struct the i2c_set_clientdata() call is used to store a | 221 | common i2c_client struct the i2c_set_clientdata() call is used to store a |
193 | v4l2_subdev pointer, for other busses you may have to use other methods. | 222 | v4l2_subdev pointer, for other busses you may have to use other methods. |
194 | 223 | ||
224 | Bridges might also need to store per-subdev private data, such as a pointer to | ||
225 | bridge-specific per-subdev private data. The v4l2_subdev structure provides | ||
226 | host private data for that purpose that can be accessed with | ||
227 | v4l2_get_subdev_hostdata() and v4l2_set_subdev_hostdata(). | ||
228 | |||
195 | From the bridge driver perspective you load the sub-device module and somehow | 229 | From the bridge driver perspective you load the sub-device module and somehow |
196 | obtain the v4l2_subdev pointer. For i2c devices this is easy: you call | 230 | obtain the v4l2_subdev pointer. For i2c devices this is easy: you call |
197 | i2c_get_clientdata(). For other busses something similar needs to be done. | 231 | i2c_get_clientdata(). For other busses something similar needs to be done. |
@@ -249,6 +283,26 @@ A sub-device driver initializes the v4l2_subdev struct using: | |||
249 | Afterwards you need to initialize subdev->name with a unique name and set the | 283 | Afterwards you need to initialize subdev->name with a unique name and set the |
250 | module owner. This is done for you if you use the i2c helper functions. | 284 | module owner. This is done for you if you use the i2c helper functions. |
251 | 285 | ||
286 | If integration with the media framework is needed, you must initialize the | ||
287 | media_entity struct embedded in the v4l2_subdev struct (entity field) by | ||
288 | calling media_entity_init(): | ||
289 | |||
290 | struct media_pad *pads = &my_sd->pads; | ||
291 | int err; | ||
292 | |||
293 | err = media_entity_init(&sd->entity, npads, pads, 0); | ||
294 | |||
295 | The pads array must have been previously initialized. There is no need to | ||
296 | manually set the struct media_entity type and name fields, but the revision | ||
297 | field must be initialized if needed. | ||
298 | |||
299 | A reference to the entity will be automatically acquired/released when the | ||
300 | subdev device node (if any) is opened/closed. | ||
301 | |||
302 | Don't forget to cleanup the media entity before the sub-device is destroyed: | ||
303 | |||
304 | media_entity_cleanup(&sd->entity); | ||
305 | |||
252 | A device (bridge) driver needs to register the v4l2_subdev with the | 306 | A device (bridge) driver needs to register the v4l2_subdev with the |
253 | v4l2_device: | 307 | v4l2_device: |
254 | 308 | ||
@@ -258,6 +312,9 @@ This can fail if the subdev module disappeared before it could be registered. | |||
258 | After this function was called successfully the subdev->dev field points to | 312 | After this function was called successfully the subdev->dev field points to |
259 | the v4l2_device. | 313 | the v4l2_device. |
260 | 314 | ||
315 | If the v4l2_device parent device has a non-NULL mdev field, the sub-device | ||
316 | entity will be automatically registered with the media device. | ||
317 | |||
261 | You can unregister a sub-device using: | 318 | You can unregister a sub-device using: |
262 | 319 | ||
263 | v4l2_device_unregister_subdev(sd); | 320 | v4l2_device_unregister_subdev(sd); |
@@ -286,7 +343,7 @@ ignored. If you want to check for errors use this: | |||
286 | err = v4l2_device_call_until_err(v4l2_dev, 0, core, g_chip_ident, &chip); | 343 | err = v4l2_device_call_until_err(v4l2_dev, 0, core, g_chip_ident, &chip); |
287 | 344 | ||
288 | Any error except -ENOIOCTLCMD will exit the loop with that error. If no | 345 | Any error except -ENOIOCTLCMD will exit the loop with that error. If no |
289 | errors (except -ENOIOCTLCMD) occured, then 0 is returned. | 346 | errors (except -ENOIOCTLCMD) occurred, then 0 is returned. |
290 | 347 | ||
291 | The second argument to both calls is a group ID. If 0, then all subdevs are | 348 | The second argument to both calls is a group ID. If 0, then all subdevs are |
292 | called. If non-zero, then only those whose group ID match that value will | 349 | called. If non-zero, then only those whose group ID match that value will |
@@ -314,6 +371,61 @@ controlled through GPIO pins. This distinction is only relevant when setting | |||
314 | up the device, but once the subdev is registered it is completely transparent. | 371 | up the device, but once the subdev is registered it is completely transparent. |
315 | 372 | ||
316 | 373 | ||
374 | V4L2 sub-device userspace API | ||
375 | ----------------------------- | ||
376 | |||
377 | Beside exposing a kernel API through the v4l2_subdev_ops structure, V4L2 | ||
378 | sub-devices can also be controlled directly by userspace applications. | ||
379 | |||
380 | Device nodes named v4l-subdevX can be created in /dev to access sub-devices | ||
381 | directly. If a sub-device supports direct userspace configuration it must set | ||
382 | the V4L2_SUBDEV_FL_HAS_DEVNODE flag before being registered. | ||
383 | |||
384 | After registering sub-devices, the v4l2_device driver can create device nodes | ||
385 | for all registered sub-devices marked with V4L2_SUBDEV_FL_HAS_DEVNODE by calling | ||
386 | v4l2_device_register_subdev_nodes(). Those device nodes will be automatically | ||
387 | removed when sub-devices are unregistered. | ||
388 | |||
389 | The device node handles a subset of the V4L2 API. | ||
390 | |||
391 | VIDIOC_QUERYCTRL | ||
392 | VIDIOC_QUERYMENU | ||
393 | VIDIOC_G_CTRL | ||
394 | VIDIOC_S_CTRL | ||
395 | VIDIOC_G_EXT_CTRLS | ||
396 | VIDIOC_S_EXT_CTRLS | ||
397 | VIDIOC_TRY_EXT_CTRLS | ||
398 | |||
399 | The controls ioctls are identical to the ones defined in V4L2. They | ||
400 | behave identically, with the only exception that they deal only with | ||
401 | controls implemented in the sub-device. Depending on the driver, those | ||
402 | controls can be also be accessed through one (or several) V4L2 device | ||
403 | nodes. | ||
404 | |||
405 | VIDIOC_DQEVENT | ||
406 | VIDIOC_SUBSCRIBE_EVENT | ||
407 | VIDIOC_UNSUBSCRIBE_EVENT | ||
408 | |||
409 | The events ioctls are identical to the ones defined in V4L2. They | ||
410 | behave identically, with the only exception that they deal only with | ||
411 | events generated by the sub-device. Depending on the driver, those | ||
412 | events can also be reported by one (or several) V4L2 device nodes. | ||
413 | |||
414 | Sub-device drivers that want to use events need to set the | ||
415 | V4L2_SUBDEV_USES_EVENTS v4l2_subdev::flags and initialize | ||
416 | v4l2_subdev::nevents to events queue depth before registering the | ||
417 | sub-device. After registration events can be queued as usual on the | ||
418 | v4l2_subdev::devnode device node. | ||
419 | |||
420 | To properly support events, the poll() file operation is also | ||
421 | implemented. | ||
422 | |||
423 | Private ioctls | ||
424 | |||
425 | All ioctls not in the above list are passed directly to the sub-device | ||
426 | driver through the core::ioctl operation. | ||
427 | |||
428 | |||
317 | I2C sub-device drivers | 429 | I2C sub-device drivers |
318 | ---------------------- | 430 | ---------------------- |
319 | 431 | ||
@@ -448,6 +560,14 @@ You should also set these fields: | |||
448 | - ioctl_ops: if you use the v4l2_ioctl_ops to simplify ioctl maintenance | 560 | - ioctl_ops: if you use the v4l2_ioctl_ops to simplify ioctl maintenance |
449 | (highly recommended to use this and it might become compulsory in the | 561 | (highly recommended to use this and it might become compulsory in the |
450 | future!), then set this to your v4l2_ioctl_ops struct. | 562 | future!), then set this to your v4l2_ioctl_ops struct. |
563 | - lock: leave to NULL if you want to do all the locking in the driver. | ||
564 | Otherwise you give it a pointer to a struct mutex_lock and before any | ||
565 | of the v4l2_file_operations is called this lock will be taken by the | ||
566 | core and released afterwards. | ||
567 | - prio: keeps track of the priorities. Used to implement VIDIOC_G/S_PRIORITY. | ||
568 | If left to NULL, then it will use the struct v4l2_prio_state in v4l2_device. | ||
569 | If you want to have a separate priority state per (group of) device node(s), | ||
570 | then you can point it to your own struct v4l2_prio_state. | ||
451 | - parent: you only set this if v4l2_device was registered with NULL as | 571 | - parent: you only set this if v4l2_device was registered with NULL as |
452 | the parent device struct. This only happens in cases where one hardware | 572 | the parent device struct. This only happens in cases where one hardware |
453 | device has multiple PCI devices that all share the same v4l2_device core. | 573 | device has multiple PCI devices that all share the same v4l2_device core. |
@@ -457,13 +577,50 @@ You should also set these fields: | |||
457 | (cx8802). Since the v4l2_device cannot be associated with a particular | 577 | (cx8802). Since the v4l2_device cannot be associated with a particular |
458 | PCI device it is setup without a parent device. But when the struct | 578 | PCI device it is setup without a parent device. But when the struct |
459 | video_device is setup you do know which parent PCI device to use. | 579 | video_device is setup you do know which parent PCI device to use. |
580 | - flags: optional. Set to V4L2_FL_USE_FH_PRIO if you want to let the framework | ||
581 | handle the VIDIOC_G/S_PRIORITY ioctls. This requires that you use struct | ||
582 | v4l2_fh. Eventually this flag will disappear once all drivers use the core | ||
583 | priority handling. But for now it has to be set explicitly. | ||
584 | |||
585 | If you use v4l2_ioctl_ops, then you should set .unlocked_ioctl to video_ioctl2 | ||
586 | in your v4l2_file_operations struct. | ||
460 | 587 | ||
461 | If you use v4l2_ioctl_ops, then you should set either .unlocked_ioctl or | 588 | Do not use .ioctl! This is deprecated and will go away in the future. |
462 | .ioctl to video_ioctl2 in your v4l2_file_operations struct. | ||
463 | 589 | ||
464 | The v4l2_file_operations struct is a subset of file_operations. The main | 590 | The v4l2_file_operations struct is a subset of file_operations. The main |
465 | difference is that the inode argument is omitted since it is never used. | 591 | difference is that the inode argument is omitted since it is never used. |
466 | 592 | ||
593 | If integration with the media framework is needed, you must initialize the | ||
594 | media_entity struct embedded in the video_device struct (entity field) by | ||
595 | calling media_entity_init(): | ||
596 | |||
597 | struct media_pad *pad = &my_vdev->pad; | ||
598 | int err; | ||
599 | |||
600 | err = media_entity_init(&vdev->entity, 1, pad, 0); | ||
601 | |||
602 | The pads array must have been previously initialized. There is no need to | ||
603 | manually set the struct media_entity type and name fields. | ||
604 | |||
605 | A reference to the entity will be automatically acquired/released when the | ||
606 | video device is opened/closed. | ||
607 | |||
608 | v4l2_file_operations and locking | ||
609 | -------------------------------- | ||
610 | |||
611 | You can set a pointer to a mutex_lock in struct video_device. Usually this | ||
612 | will be either a top-level mutex or a mutex per device node. If you want | ||
613 | finer-grained locking then you have to set it to NULL and do you own locking. | ||
614 | |||
615 | If a lock is specified then all file operations will be serialized on that | ||
616 | lock. If you use videobuf then you must pass the same lock to the videobuf | ||
617 | queue initialize function: if videobuf has to wait for a frame to arrive, then | ||
618 | it will temporarily unlock the lock and relock it afterwards. If your driver | ||
619 | also waits in the code, then you should do the same to allow other processes | ||
620 | to access the device node while the first process is waiting for something. | ||
621 | |||
622 | The implementation of a hotplug disconnect should also take the lock before | ||
623 | calling v4l2_device_disconnect. | ||
467 | 624 | ||
468 | video_device registration | 625 | video_device registration |
469 | ------------------------- | 626 | ------------------------- |
@@ -477,13 +634,15 @@ for you. | |||
477 | return err; | 634 | return err; |
478 | } | 635 | } |
479 | 636 | ||
637 | If the v4l2_device parent device has a non-NULL mdev field, the video device | ||
638 | entity will be automatically registered with the media device. | ||
639 | |||
480 | Which device is registered depends on the type argument. The following | 640 | Which device is registered depends on the type argument. The following |
481 | types exist: | 641 | types exist: |
482 | 642 | ||
483 | VFL_TYPE_GRABBER: videoX for video input/output devices | 643 | VFL_TYPE_GRABBER: videoX for video input/output devices |
484 | VFL_TYPE_VBI: vbiX for vertical blank data (i.e. closed captions, teletext) | 644 | VFL_TYPE_VBI: vbiX for vertical blank data (i.e. closed captions, teletext) |
485 | VFL_TYPE_RADIO: radioX for radio tuners | 645 | VFL_TYPE_RADIO: radioX for radio tuners |
486 | VFL_TYPE_VTX: vtxX for teletext devices (deprecated, don't use) | ||
487 | 646 | ||
488 | The last argument gives you a certain amount of control over the device | 647 | The last argument gives you a certain amount of control over the device |
489 | device node number used (i.e. the X in videoX). Normally you will pass -1 | 648 | device node number used (i.e. the X in videoX). Normally you will pass -1 |
@@ -547,13 +706,19 @@ from /dev). | |||
547 | 706 | ||
548 | After video_unregister_device() returns no new opens can be done. However, | 707 | After video_unregister_device() returns no new opens can be done. However, |
549 | in the case of USB devices some application might still have one of these | 708 | in the case of USB devices some application might still have one of these |
550 | device nodes open. So after the unregister all file operations will return | 709 | device nodes open. So after the unregister all file operations (except |
551 | an error as well, except for the ioctl and unlocked_ioctl file operations: | 710 | release, of course) will return an error as well. |
552 | those will still be passed on since some buffer ioctls may still be needed. | ||
553 | 711 | ||
554 | When the last user of the video device node exits, then the vdev->release() | 712 | When the last user of the video device node exits, then the vdev->release() |
555 | callback is called and you can do the final cleanup there. | 713 | callback is called and you can do the final cleanup there. |
556 | 714 | ||
715 | Don't forget to cleanup the media entity associated with the video device if | ||
716 | it has been initialized: | ||
717 | |||
718 | media_entity_cleanup(&vdev->entity); | ||
719 | |||
720 | This can be done from the release callback. | ||
721 | |||
557 | 722 | ||
558 | video_device helper functions | 723 | video_device helper functions |
559 | ----------------------------- | 724 | ----------------------------- |
@@ -613,39 +778,25 @@ struct v4l2_fh | |||
613 | -------------- | 778 | -------------- |
614 | 779 | ||
615 | struct v4l2_fh provides a way to easily keep file handle specific data | 780 | struct v4l2_fh provides a way to easily keep file handle specific data |
616 | that is used by the V4L2 framework. Using v4l2_fh is optional for | 781 | that is used by the V4L2 framework. New drivers must use struct v4l2_fh |
617 | drivers. | 782 | since it is also used to implement priority handling (VIDIOC_G/S_PRIORITY) |
783 | if the video_device flag V4L2_FL_USE_FH_PRIO is also set. | ||
618 | 784 | ||
619 | The users of v4l2_fh (in the V4L2 framework, not the driver) know | 785 | The users of v4l2_fh (in the V4L2 framework, not the driver) know |
620 | whether a driver uses v4l2_fh as its file->private_data pointer by | 786 | whether a driver uses v4l2_fh as its file->private_data pointer by |
621 | testing the V4L2_FL_USES_V4L2_FH bit in video_device->flags. | 787 | testing the V4L2_FL_USES_V4L2_FH bit in video_device->flags. This bit is |
622 | 788 | set whenever v4l2_fh_init() is called. | |
623 | Useful functions: | ||
624 | |||
625 | - v4l2_fh_init() | ||
626 | |||
627 | Initialise the file handle. This *MUST* be performed in the driver's | ||
628 | v4l2_file_operations->open() handler. | ||
629 | |||
630 | - v4l2_fh_add() | ||
631 | |||
632 | Add a v4l2_fh to video_device file handle list. May be called after | ||
633 | initialising the file handle. | ||
634 | |||
635 | - v4l2_fh_del() | ||
636 | |||
637 | Unassociate the file handle from video_device(). The file handle | ||
638 | exit function may now be called. | ||
639 | 789 | ||
640 | - v4l2_fh_exit() | 790 | struct v4l2_fh is allocated as a part of the driver's own file handle |
791 | structure and file->private_data is set to it in the driver's open | ||
792 | function by the driver. | ||
641 | 793 | ||
642 | Uninitialise the file handle. After uninitialisation the v4l2_fh | 794 | In many cases the struct v4l2_fh will be embedded in a larger structure. |
643 | memory can be freed. | 795 | In that case you should call v4l2_fh_init+v4l2_fh_add in open() and |
796 | v4l2_fh_del+v4l2_fh_exit in release(). | ||
644 | 797 | ||
645 | struct v4l2_fh is allocated as a part of the driver's own file handle | 798 | Drivers can extract their own file handle structure by using the container_of |
646 | structure and is set to file->private_data in the driver's open | 799 | macro. Example: |
647 | function by the driver. Drivers can extract their own file handle | ||
648 | structure by using the container_of macro. Example: | ||
649 | 800 | ||
650 | struct my_fh { | 801 | struct my_fh { |
651 | int blah; | 802 | int blah; |
@@ -662,15 +813,21 @@ int my_open(struct file *file) | |||
662 | 813 | ||
663 | ... | 814 | ... |
664 | 815 | ||
816 | my_fh = kzalloc(sizeof(*my_fh), GFP_KERNEL); | ||
817 | |||
818 | ... | ||
819 | |||
665 | ret = v4l2_fh_init(&my_fh->fh, vfd); | 820 | ret = v4l2_fh_init(&my_fh->fh, vfd); |
666 | if (ret) | 821 | if (ret) { |
822 | kfree(my_fh); | ||
667 | return ret; | 823 | return ret; |
824 | } | ||
668 | 825 | ||
669 | v4l2_fh_add(&my_fh->fh); | 826 | ... |
670 | 827 | ||
671 | file->private_data = &my_fh->fh; | 828 | file->private_data = &my_fh->fh; |
672 | 829 | v4l2_fh_add(&my_fh->fh); | |
673 | ... | 830 | return 0; |
674 | } | 831 | } |
675 | 832 | ||
676 | int my_release(struct file *file) | 833 | int my_release(struct file *file) |
@@ -679,8 +836,65 @@ int my_release(struct file *file) | |||
679 | struct my_fh *my_fh = container_of(fh, struct my_fh, fh); | 836 | struct my_fh *my_fh = container_of(fh, struct my_fh, fh); |
680 | 837 | ||
681 | ... | 838 | ... |
839 | v4l2_fh_del(&my_fh->fh); | ||
840 | v4l2_fh_exit(&my_fh->fh); | ||
841 | kfree(my_fh); | ||
842 | return 0; | ||
682 | } | 843 | } |
683 | 844 | ||
845 | Below is a short description of the v4l2_fh functions used: | ||
846 | |||
847 | int v4l2_fh_init(struct v4l2_fh *fh, struct video_device *vdev) | ||
848 | |||
849 | Initialise the file handle. This *MUST* be performed in the driver's | ||
850 | v4l2_file_operations->open() handler. | ||
851 | |||
852 | void v4l2_fh_add(struct v4l2_fh *fh) | ||
853 | |||
854 | Add a v4l2_fh to video_device file handle list. Must be called once the | ||
855 | file handle is completely initialized. | ||
856 | |||
857 | void v4l2_fh_del(struct v4l2_fh *fh) | ||
858 | |||
859 | Unassociate the file handle from video_device(). The file handle | ||
860 | exit function may now be called. | ||
861 | |||
862 | void v4l2_fh_exit(struct v4l2_fh *fh) | ||
863 | |||
864 | Uninitialise the file handle. After uninitialisation the v4l2_fh | ||
865 | memory can be freed. | ||
866 | |||
867 | |||
868 | If struct v4l2_fh is not embedded, then you can use these helper functions: | ||
869 | |||
870 | int v4l2_fh_open(struct file *filp) | ||
871 | |||
872 | This allocates a struct v4l2_fh, initializes it and adds it to the struct | ||
873 | video_device associated with the file struct. | ||
874 | |||
875 | int v4l2_fh_release(struct file *filp) | ||
876 | |||
877 | This deletes it from the struct video_device associated with the file | ||
878 | struct, uninitialised the v4l2_fh and frees it. | ||
879 | |||
880 | These two functions can be plugged into the v4l2_file_operation's open() and | ||
881 | release() ops. | ||
882 | |||
883 | |||
884 | Several drivers need to do something when the first file handle is opened and | ||
885 | when the last file handle closes. Two helper functions were added to check | ||
886 | whether the v4l2_fh struct is the only open filehandle of the associated | ||
887 | device node: | ||
888 | |||
889 | int v4l2_fh_is_singular(struct v4l2_fh *fh) | ||
890 | |||
891 | Returns 1 if the file handle is the only open file handle, else 0. | ||
892 | |||
893 | int v4l2_fh_is_singular_file(struct file *filp) | ||
894 | |||
895 | Same, but it calls v4l2_fh_is_singular with filp->private_data. | ||
896 | |||
897 | |||
684 | V4L2 events | 898 | V4L2 events |
685 | ----------- | 899 | ----------- |
686 | 900 | ||
diff --git a/Documentation/video4linux/v4lgrab.c b/Documentation/video4linux/v4lgrab.c deleted file mode 100644 index c8ded175796e..000000000000 --- a/Documentation/video4linux/v4lgrab.c +++ /dev/null | |||
@@ -1,201 +0,0 @@ | |||
1 | /* Simple Video4Linux image grabber. */ | ||
2 | /* | ||
3 | * Video4Linux Driver Test/Example Framegrabbing Program | ||
4 | * | ||
5 | * Compile with: | ||
6 | * gcc -s -Wall -Wstrict-prototypes v4lgrab.c -o v4lgrab | ||
7 | * Use as: | ||
8 | * v4lgrab >image.ppm | ||
9 | * | ||
10 | * Copyright (C) 1998-05-03, Phil Blundell <philb@gnu.org> | ||
11 | * Copied from http://www.tazenda.demon.co.uk/phil/vgrabber.c | ||
12 | * with minor modifications (Dave Forrest, drf5n@virginia.edu). | ||
13 | * | ||
14 | * | ||
15 | * For some cameras you may need to pre-load libv4l to perform | ||
16 | * the necessary decompression, e.g.: | ||
17 | * | ||
18 | * export LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so | ||
19 | * ./v4lgrab >image.ppm | ||
20 | * | ||
21 | * see http://hansdegoede.livejournal.com/3636.html for details. | ||
22 | * | ||
23 | */ | ||
24 | |||
25 | #include <unistd.h> | ||
26 | #include <sys/types.h> | ||
27 | #include <sys/stat.h> | ||
28 | #include <fcntl.h> | ||
29 | #include <stdio.h> | ||
30 | #include <sys/ioctl.h> | ||
31 | #include <stdlib.h> | ||
32 | |||
33 | #include <linux/types.h> | ||
34 | #include <linux/videodev.h> | ||
35 | |||
36 | #define VIDEO_DEV "/dev/video0" | ||
37 | |||
38 | /* Stole this from tvset.c */ | ||
39 | |||
40 | #define READ_VIDEO_PIXEL(buf, format, depth, r, g, b) \ | ||
41 | { \ | ||
42 | switch (format) \ | ||
43 | { \ | ||
44 | case VIDEO_PALETTE_GREY: \ | ||
45 | switch (depth) \ | ||
46 | { \ | ||
47 | case 4: \ | ||
48 | case 6: \ | ||
49 | case 8: \ | ||
50 | (r) = (g) = (b) = (*buf++ << 8);\ | ||
51 | break; \ | ||
52 | \ | ||
53 | case 16: \ | ||
54 | (r) = (g) = (b) = \ | ||
55 | *((unsigned short *) buf); \ | ||
56 | buf += 2; \ | ||
57 | break; \ | ||
58 | } \ | ||
59 | break; \ | ||
60 | \ | ||
61 | \ | ||
62 | case VIDEO_PALETTE_RGB565: \ | ||
63 | { \ | ||
64 | unsigned short tmp = *(unsigned short *)buf; \ | ||
65 | (r) = tmp&0xF800; \ | ||
66 | (g) = (tmp<<5)&0xFC00; \ | ||
67 | (b) = (tmp<<11)&0xF800; \ | ||
68 | buf += 2; \ | ||
69 | } \ | ||
70 | break; \ | ||
71 | \ | ||
72 | case VIDEO_PALETTE_RGB555: \ | ||
73 | (r) = (buf[0]&0xF8)<<8; \ | ||
74 | (g) = ((buf[0] << 5 | buf[1] >> 3)&0xF8)<<8; \ | ||
75 | (b) = ((buf[1] << 2 ) & 0xF8)<<8; \ | ||
76 | buf += 2; \ | ||
77 | break; \ | ||
78 | \ | ||
79 | case VIDEO_PALETTE_RGB24: \ | ||
80 | (r) = buf[0] << 8; (g) = buf[1] << 8; \ | ||
81 | (b) = buf[2] << 8; \ | ||
82 | buf += 3; \ | ||
83 | break; \ | ||
84 | \ | ||
85 | default: \ | ||
86 | fprintf(stderr, \ | ||
87 | "Format %d not yet supported\n", \ | ||
88 | format); \ | ||
89 | } \ | ||
90 | } | ||
91 | |||
92 | static int get_brightness_adj(unsigned char *image, long size, int *brightness) { | ||
93 | long i, tot = 0; | ||
94 | for (i=0;i<size*3;i++) | ||
95 | tot += image[i]; | ||
96 | *brightness = (128 - tot/(size*3))/3; | ||
97 | return !((tot/(size*3)) >= 126 && (tot/(size*3)) <= 130); | ||
98 | } | ||
99 | |||
100 | int main(int argc, char ** argv) | ||
101 | { | ||
102 | int fd = open(VIDEO_DEV, O_RDONLY), f; | ||
103 | struct video_capability cap; | ||
104 | struct video_window win; | ||
105 | struct video_picture vpic; | ||
106 | |||
107 | unsigned char *buffer, *src; | ||
108 | int bpp = 24, r = 0, g = 0, b = 0; | ||
109 | unsigned int i, src_depth = 16; | ||
110 | |||
111 | if (fd < 0) { | ||
112 | perror(VIDEO_DEV); | ||
113 | exit(1); | ||
114 | } | ||
115 | |||
116 | if (ioctl(fd, VIDIOCGCAP, &cap) < 0) { | ||
117 | perror("VIDIOGCAP"); | ||
118 | fprintf(stderr, "(" VIDEO_DEV " not a video4linux device?)\n"); | ||
119 | close(fd); | ||
120 | exit(1); | ||
121 | } | ||
122 | |||
123 | if (ioctl(fd, VIDIOCGWIN, &win) < 0) { | ||
124 | perror("VIDIOCGWIN"); | ||
125 | close(fd); | ||
126 | exit(1); | ||
127 | } | ||
128 | |||
129 | if (ioctl(fd, VIDIOCGPICT, &vpic) < 0) { | ||
130 | perror("VIDIOCGPICT"); | ||
131 | close(fd); | ||
132 | exit(1); | ||
133 | } | ||
134 | |||
135 | if (cap.type & VID_TYPE_MONOCHROME) { | ||
136 | vpic.depth=8; | ||
137 | vpic.palette=VIDEO_PALETTE_GREY; /* 8bit grey */ | ||
138 | if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) { | ||
139 | vpic.depth=6; | ||
140 | if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) { | ||
141 | vpic.depth=4; | ||
142 | if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) { | ||
143 | fprintf(stderr, "Unable to find a supported capture format.\n"); | ||
144 | close(fd); | ||
145 | exit(1); | ||
146 | } | ||
147 | } | ||
148 | } | ||
149 | } else { | ||
150 | vpic.depth=24; | ||
151 | vpic.palette=VIDEO_PALETTE_RGB24; | ||
152 | |||
153 | if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) { | ||
154 | vpic.palette=VIDEO_PALETTE_RGB565; | ||
155 | vpic.depth=16; | ||
156 | |||
157 | if(ioctl(fd, VIDIOCSPICT, &vpic)==-1) { | ||
158 | vpic.palette=VIDEO_PALETTE_RGB555; | ||
159 | vpic.depth=15; | ||
160 | |||
161 | if(ioctl(fd, VIDIOCSPICT, &vpic)==-1) { | ||
162 | fprintf(stderr, "Unable to find a supported capture format.\n"); | ||
163 | return -1; | ||
164 | } | ||
165 | } | ||
166 | } | ||
167 | } | ||
168 | |||
169 | buffer = malloc(win.width * win.height * bpp); | ||
170 | if (!buffer) { | ||
171 | fprintf(stderr, "Out of memory.\n"); | ||
172 | exit(1); | ||
173 | } | ||
174 | |||
175 | do { | ||
176 | int newbright; | ||
177 | read(fd, buffer, win.width * win.height * bpp); | ||
178 | f = get_brightness_adj(buffer, win.width * win.height, &newbright); | ||
179 | if (f) { | ||
180 | vpic.brightness += (newbright << 8); | ||
181 | if(ioctl(fd, VIDIOCSPICT, &vpic)==-1) { | ||
182 | perror("VIDIOSPICT"); | ||
183 | break; | ||
184 | } | ||
185 | } | ||
186 | } while (f); | ||
187 | |||
188 | fprintf(stdout, "P6\n%d %d 255\n", win.width, win.height); | ||
189 | |||
190 | src = buffer; | ||
191 | |||
192 | for (i = 0; i < win.width * win.height; i++) { | ||
193 | READ_VIDEO_PIXEL(src, vpic.palette, src_depth, r, g, b); | ||
194 | fputc(r>>8, stdout); | ||
195 | fputc(g>>8, stdout); | ||
196 | fputc(b>>8, stdout); | ||
197 | } | ||
198 | |||
199 | close(fd); | ||
200 | return 0; | ||
201 | } | ||
diff --git a/Documentation/video4linux/videobuf b/Documentation/video4linux/videobuf index 17a1f9abf260..1d00d7f15b8f 100644 --- a/Documentation/video4linux/videobuf +++ b/Documentation/video4linux/videobuf | |||
@@ -247,8 +247,6 @@ calls. The relevant helper functions are: | |||
247 | int nonblocking); | 247 | int nonblocking); |
248 | int videobuf_streamon(struct videobuf_queue *q); | 248 | int videobuf_streamon(struct videobuf_queue *q); |
249 | int videobuf_streamoff(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 | 250 | ||
253 | So, for example, a VIDIOC_REQBUFS call turns into a call to the driver's | 251 | 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 | 252 | vidioc_reqbufs() callback which, in turn, usually only needs to locate the |
@@ -258,10 +256,7 @@ boilerplate in a lot of V4L2 drivers. | |||
258 | 256 | ||
259 | The vidioc_streamon() and vidioc_streamoff() functions will be a bit more | 257 | 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 | 258 | 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 | 259 | stopping the capture engine. |
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 | 260 | ||
266 | Buffer allocation | 261 | Buffer allocation |
267 | 262 | ||
diff --git a/Documentation/video4linux/w9968cf.txt b/Documentation/video4linux/w9968cf.txt index 05138e8aea07..9649450f3b90 100644 --- a/Documentation/video4linux/w9968cf.txt +++ b/Documentation/video4linux/w9968cf.txt | |||
@@ -413,7 +413,7 @@ Syntax: <n> | |||
413 | Description: Debugging information level, from 0 to 6: | 413 | Description: Debugging information level, from 0 to 6: |
414 | 0 = none (use carefully) | 414 | 0 = none (use carefully) |
415 | 1 = critical errors | 415 | 1 = critical errors |
416 | 2 = significant informations | 416 | 2 = significant information |
417 | 3 = configuration or general messages | 417 | 3 = configuration or general messages |
418 | 4 = warnings | 418 | 4 = warnings |
419 | 5 = called functions | 419 | 5 = called functions |
diff --git a/Documentation/video4linux/zc0301.txt b/Documentation/video4linux/zc0301.txt index befdfdacdc5b..b41c83cf09f4 100644 --- a/Documentation/video4linux/zc0301.txt +++ b/Documentation/video4linux/zc0301.txt | |||
@@ -181,10 +181,10 @@ Syntax: <n> | |||
181 | Description: Debugging information level, from 0 to 3: | 181 | Description: Debugging information level, from 0 to 3: |
182 | 0 = none (use carefully) | 182 | 0 = none (use carefully) |
183 | 1 = critical errors | 183 | 1 = critical errors |
184 | 2 = significant informations | 184 | 2 = significant information |
185 | 3 = more verbose messages | 185 | 3 = more verbose messages |
186 | Level 3 is useful for testing only, when only one device | 186 | Level 3 is useful for testing only, when only one device |
187 | is used at the same time. It also shows some more informations | 187 | is used at the same time. It also shows some information |
188 | about the hardware being detected. This module parameter can be | 188 | about the hardware being detected. This module parameter can be |
189 | changed at runtime thanks to the /sys filesystem interface. | 189 | changed at runtime thanks to the /sys filesystem interface. |
190 | Default: 2 | 190 | Default: 2 |
@@ -261,7 +261,7 @@ the fingerprint is: '88E8 F32F 7244 68BA 3958 5D40 99DA 5D2A FCE6 35A4'. | |||
261 | 261 | ||
262 | 11. Credits | 262 | 11. Credits |
263 | =========== | 263 | =========== |
264 | - Informations about the chip internals needed to enable the I2C protocol have | 264 | - Information about the chip internals needed to enable the I2C protocol have |
265 | been taken from the documentation of the ZC030x Video4Linux1 driver written | 265 | been taken from the documentation of the ZC030x Video4Linux1 driver written |
266 | by Andrew Birkett <andy@nobugs.org>; | 266 | by Andrew Birkett <andy@nobugs.org>; |
267 | - The initialization values of the ZC0301 controller connected to the PAS202BCB | 267 | - The initialization values of the ZC0301 controller connected to the PAS202BCB |