diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/Changes | 2 | ||||
-rw-r--r-- | Documentation/DocBook/libata.tmpl | 96 | ||||
-rw-r--r-- | Documentation/SubmittingDrivers | 14 | ||||
-rw-r--r-- | Documentation/SubmittingPatches | 44 | ||||
-rw-r--r-- | Documentation/kernel-parameters.txt | 15 | ||||
-rw-r--r-- | Documentation/networking/fib_trie.txt | 145 | ||||
-rw-r--r-- | Documentation/pcmcia/devicetable.txt | 5 | ||||
-rw-r--r-- | Documentation/serial/driver | 4 | ||||
-rw-r--r-- | Documentation/video4linux/API.html | 415 | ||||
-rw-r--r-- | Documentation/video4linux/CARDLIST.cx88 | 8 | ||||
-rw-r--r-- | Documentation/video4linux/CARDLIST.saa7134 | 6 | ||||
-rw-r--r-- | Documentation/video4linux/CARDLIST.tuner | 3 | ||||
-rw-r--r-- | Documentation/video4linux/README.saa7134 | 9 |
13 files changed, 333 insertions, 433 deletions
diff --git a/Documentation/Changes b/Documentation/Changes index afebdbcd553a..dfec7569d450 100644 --- a/Documentation/Changes +++ b/Documentation/Changes | |||
@@ -57,7 +57,7 @@ o e2fsprogs 1.29 # tune2fs | |||
57 | o jfsutils 1.1.3 # fsck.jfs -V | 57 | o jfsutils 1.1.3 # fsck.jfs -V |
58 | o reiserfsprogs 3.6.3 # reiserfsck -V 2>&1|grep reiserfsprogs | 58 | o reiserfsprogs 3.6.3 # reiserfsck -V 2>&1|grep reiserfsprogs |
59 | o xfsprogs 2.6.0 # xfs_db -V | 59 | o xfsprogs 2.6.0 # xfs_db -V |
60 | o pcmciautils 001 | 60 | o pcmciautils 004 |
61 | o pcmcia-cs 3.1.21 # cardmgr -V | 61 | o pcmcia-cs 3.1.21 # cardmgr -V |
62 | o quota-tools 3.09 # quota -V | 62 | o quota-tools 3.09 # quota -V |
63 | o PPP 2.4.0 # pppd --version | 63 | o PPP 2.4.0 # pppd --version |
diff --git a/Documentation/DocBook/libata.tmpl b/Documentation/DocBook/libata.tmpl index 6df1dfd18b65..375ae760dc1e 100644 --- a/Documentation/DocBook/libata.tmpl +++ b/Documentation/DocBook/libata.tmpl | |||
@@ -84,6 +84,14 @@ void (*port_disable) (struct ata_port *); | |||
84 | Called from ata_bus_probe() and ata_bus_reset() error paths, | 84 | Called from ata_bus_probe() and ata_bus_reset() error paths, |
85 | as well as when unregistering from the SCSI module (rmmod, hot | 85 | as well as when unregistering from the SCSI module (rmmod, hot |
86 | unplug). | 86 | unplug). |
87 | This function should do whatever needs to be done to take the | ||
88 | port out of use. In most cases, ata_port_disable() can be used | ||
89 | as this hook. | ||
90 | </para> | ||
91 | <para> | ||
92 | Called from ata_bus_probe() on a failed probe. | ||
93 | Called from ata_bus_reset() on a failed bus reset. | ||
94 | Called from ata_scsi_release(). | ||
87 | </para> | 95 | </para> |
88 | 96 | ||
89 | </sect2> | 97 | </sect2> |
@@ -98,6 +106,13 @@ void (*dev_config) (struct ata_port *, struct ata_device *); | |||
98 | found. Typically used to apply device-specific fixups prior to | 106 | found. Typically used to apply device-specific fixups prior to |
99 | issue of SET FEATURES - XFER MODE, and prior to operation. | 107 | issue of SET FEATURES - XFER MODE, and prior to operation. |
100 | </para> | 108 | </para> |
109 | <para> | ||
110 | Called by ata_device_add() after ata_dev_identify() determines | ||
111 | a device is present. | ||
112 | </para> | ||
113 | <para> | ||
114 | This entry may be specified as NULL in ata_port_operations. | ||
115 | </para> | ||
101 | 116 | ||
102 | </sect2> | 117 | </sect2> |
103 | 118 | ||
@@ -135,6 +150,8 @@ void (*tf_read) (struct ata_port *ap, struct ata_taskfile *tf); | |||
135 | registers / DMA buffers. ->tf_read() is called to read the | 150 | registers / DMA buffers. ->tf_read() is called to read the |
136 | hardware registers / DMA buffers, to obtain the current set of | 151 | hardware registers / DMA buffers, to obtain the current set of |
137 | taskfile register values. | 152 | taskfile register values. |
153 | Most drivers for taskfile-based hardware (PIO or MMIO) use | ||
154 | ata_tf_load() and ata_tf_read() for these hooks. | ||
138 | </para> | 155 | </para> |
139 | 156 | ||
140 | </sect2> | 157 | </sect2> |
@@ -147,6 +164,8 @@ void (*exec_command)(struct ata_port *ap, struct ata_taskfile *tf); | |||
147 | <para> | 164 | <para> |
148 | causes an ATA command, previously loaded with | 165 | causes an ATA command, previously loaded with |
149 | ->tf_load(), to be initiated in hardware. | 166 | ->tf_load(), to be initiated in hardware. |
167 | Most drivers for taskfile-based hardware use ata_exec_command() | ||
168 | for this hook. | ||
150 | </para> | 169 | </para> |
151 | 170 | ||
152 | </sect2> | 171 | </sect2> |
@@ -161,6 +180,10 @@ Allow low-level driver to filter ATA PACKET commands, returning a status | |||
161 | indicating whether or not it is OK to use DMA for the supplied PACKET | 180 | indicating whether or not it is OK to use DMA for the supplied PACKET |
162 | command. | 181 | command. |
163 | </para> | 182 | </para> |
183 | <para> | ||
184 | This hook may be specified as NULL, in which case libata will | ||
185 | assume that atapi dma can be supported. | ||
186 | </para> | ||
164 | 187 | ||
165 | </sect2> | 188 | </sect2> |
166 | 189 | ||
@@ -175,6 +198,14 @@ u8 (*check_err)(struct ata_port *ap); | |||
175 | Reads the Status/AltStatus/Error ATA shadow register from | 198 | Reads the Status/AltStatus/Error ATA shadow register from |
176 | hardware. On some hardware, reading the Status register has | 199 | hardware. On some hardware, reading the Status register has |
177 | the side effect of clearing the interrupt condition. | 200 | the side effect of clearing the interrupt condition. |
201 | Most drivers for taskfile-based hardware use | ||
202 | ata_check_status() for this hook. | ||
203 | </para> | ||
204 | <para> | ||
205 | Note that because this is called from ata_device_add(), at | ||
206 | least a dummy function that clears device interrupts must be | ||
207 | provided for all drivers, even if the controller doesn't | ||
208 | actually have a taskfile status register. | ||
178 | </para> | 209 | </para> |
179 | 210 | ||
180 | </sect2> | 211 | </sect2> |
@@ -188,7 +219,13 @@ void (*dev_select)(struct ata_port *ap, unsigned int device); | |||
188 | Issues the low-level hardware command(s) that causes one of N | 219 | Issues the low-level hardware command(s) that causes one of N |
189 | hardware devices to be considered 'selected' (active and | 220 | hardware devices to be considered 'selected' (active and |
190 | available for use) on the ATA bus. This generally has no | 221 | available for use) on the ATA bus. This generally has no |
191 | meaning on FIS-based devices. | 222 | meaning on FIS-based devices. |
223 | </para> | ||
224 | <para> | ||
225 | Most drivers for taskfile-based hardware use | ||
226 | ata_std_dev_select() for this hook. Controllers which do not | ||
227 | support second drives on a port (such as SATA contollers) will | ||
228 | use ata_noop_dev_select(). | ||
192 | </para> | 229 | </para> |
193 | 230 | ||
194 | </sect2> | 231 | </sect2> |
@@ -204,6 +241,8 @@ void (*phy_reset) (struct ata_port *ap); | |||
204 | for device presence (PATA and SATA), typically a soft reset | 241 | for device presence (PATA and SATA), typically a soft reset |
205 | (SRST) will be performed. Drivers typically use the helper | 242 | (SRST) will be performed. Drivers typically use the helper |
206 | functions ata_bus_reset() or sata_phy_reset() for this hook. | 243 | functions ata_bus_reset() or sata_phy_reset() for this hook. |
244 | Many SATA drivers use sata_phy_reset() or call it from within | ||
245 | their own phy_reset() functions. | ||
207 | </para> | 246 | </para> |
208 | 247 | ||
209 | </sect2> | 248 | </sect2> |
@@ -227,6 +266,25 @@ PCI IDE DMA Status register. | |||
227 | These hooks are typically either no-ops, or simply not implemented, in | 266 | These hooks are typically either no-ops, or simply not implemented, in |
228 | FIS-based drivers. | 267 | FIS-based drivers. |
229 | </para> | 268 | </para> |
269 | <para> | ||
270 | Most legacy IDE drivers use ata_bmdma_setup() for the bmdma_setup() | ||
271 | hook. ata_bmdma_setup() will write the pointer to the PRD table to | ||
272 | the IDE PRD Table Address register, enable DMA in the DMA Command | ||
273 | register, and call exec_command() to begin the transfer. | ||
274 | </para> | ||
275 | <para> | ||
276 | Most legacy IDE drivers use ata_bmdma_start() for the bmdma_start() | ||
277 | hook. ata_bmdma_start() will write the ATA_DMA_START flag to the DMA | ||
278 | Command register. | ||
279 | </para> | ||
280 | <para> | ||
281 | Many legacy IDE drivers use ata_bmdma_stop() for the bmdma_stop() | ||
282 | hook. ata_bmdma_stop() clears the ATA_DMA_START flag in the DMA | ||
283 | command register. | ||
284 | </para> | ||
285 | <para> | ||
286 | Many legacy IDE drivers use ata_bmdma_status() as the bmdma_status() hook. | ||
287 | </para> | ||
230 | 288 | ||
231 | </sect2> | 289 | </sect2> |
232 | 290 | ||
@@ -250,6 +308,10 @@ int (*qc_issue) (struct ata_queued_cmd *qc); | |||
250 | helper function ata_qc_issue_prot() for taskfile protocol-based | 308 | helper function ata_qc_issue_prot() for taskfile protocol-based |
251 | dispatch. More advanced drivers implement their own ->qc_issue. | 309 | dispatch. More advanced drivers implement their own ->qc_issue. |
252 | </para> | 310 | </para> |
311 | <para> | ||
312 | ata_qc_issue_prot() calls ->tf_load(), ->bmdma_setup(), and | ||
313 | ->bmdma_start() as necessary to initiate a transfer. | ||
314 | </para> | ||
253 | 315 | ||
254 | </sect2> | 316 | </sect2> |
255 | 317 | ||
@@ -279,6 +341,21 @@ void (*irq_clear) (struct ata_port *); | |||
279 | before the interrupt handler is registered, to be sure hardware | 341 | before the interrupt handler is registered, to be sure hardware |
280 | is quiet. | 342 | is quiet. |
281 | </para> | 343 | </para> |
344 | <para> | ||
345 | The second argument, dev_instance, should be cast to a pointer | ||
346 | to struct ata_host_set. | ||
347 | </para> | ||
348 | <para> | ||
349 | Most legacy IDE drivers use ata_interrupt() for the | ||
350 | irq_handler hook, which scans all ports in the host_set, | ||
351 | determines which queued command was active (if any), and calls | ||
352 | ata_host_intr(ap,qc). | ||
353 | </para> | ||
354 | <para> | ||
355 | Most legacy IDE drivers use ata_bmdma_irq_clear() for the | ||
356 | irq_clear() hook, which simply clears the interrupt and error | ||
357 | flags in the DMA status register. | ||
358 | </para> | ||
282 | 359 | ||
283 | </sect2> | 360 | </sect2> |
284 | 361 | ||
@@ -292,6 +369,7 @@ void (*scr_write) (struct ata_port *ap, unsigned int sc_reg, | |||
292 | <para> | 369 | <para> |
293 | Read and write standard SATA phy registers. Currently only used | 370 | Read and write standard SATA phy registers. Currently only used |
294 | if ->phy_reset hook called the sata_phy_reset() helper function. | 371 | if ->phy_reset hook called the sata_phy_reset() helper function. |
372 | sc_reg is one of SCR_STATUS, SCR_CONTROL, SCR_ERROR, or SCR_ACTIVE. | ||
295 | </para> | 373 | </para> |
296 | 374 | ||
297 | </sect2> | 375 | </sect2> |
@@ -307,17 +385,29 @@ void (*host_stop) (struct ata_host_set *host_set); | |||
307 | ->port_start() is called just after the data structures for each | 385 | ->port_start() is called just after the data structures for each |
308 | port are initialized. Typically this is used to alloc per-port | 386 | port are initialized. Typically this is used to alloc per-port |
309 | DMA buffers / tables / rings, enable DMA engines, and similar | 387 | DMA buffers / tables / rings, enable DMA engines, and similar |
310 | tasks. | 388 | tasks. Some drivers also use this entry point as a chance to |
389 | allocate driver-private memory for ap->private_data. | ||
390 | </para> | ||
391 | <para> | ||
392 | Many drivers use ata_port_start() as this hook or call | ||
393 | it from their own port_start() hooks. ata_port_start() | ||
394 | allocates space for a legacy IDE PRD table and returns. | ||
311 | </para> | 395 | </para> |
312 | <para> | 396 | <para> |
313 | ->port_stop() is called after ->host_stop(). It's sole function | 397 | ->port_stop() is called after ->host_stop(). It's sole function |
314 | is to release DMA/memory resources, now that they are no longer | 398 | is to release DMA/memory resources, now that they are no longer |
315 | actively being used. | 399 | actively being used. Many drivers also free driver-private |
400 | data from port at this time. | ||
401 | </para> | ||
402 | <para> | ||
403 | Many drivers use ata_port_stop() as this hook, which frees the | ||
404 | PRD table. | ||
316 | </para> | 405 | </para> |
317 | <para> | 406 | <para> |
318 | ->host_stop() is called after all ->port_stop() calls | 407 | ->host_stop() is called after all ->port_stop() calls |
319 | have completed. The hook must finalize hardware shutdown, release DMA | 408 | have completed. The hook must finalize hardware shutdown, release DMA |
320 | and other resources, etc. | 409 | and other resources, etc. |
410 | This hook may be specified as NULL, in which case it is not called. | ||
321 | </para> | 411 | </para> |
322 | 412 | ||
323 | </sect2> | 413 | </sect2> |
diff --git a/Documentation/SubmittingDrivers b/Documentation/SubmittingDrivers index de3b252e717d..c3cca924e94b 100644 --- a/Documentation/SubmittingDrivers +++ b/Documentation/SubmittingDrivers | |||
@@ -13,13 +13,14 @@ Allocating Device Numbers | |||
13 | ------------------------- | 13 | ------------------------- |
14 | 14 | ||
15 | Major and minor numbers for block and character devices are allocated | 15 | Major and minor numbers for block and character devices are allocated |
16 | by the Linux assigned name and number authority (currently better | 16 | by the Linux assigned name and number authority (currently this is |
17 | known as H Peter Anvin). The site is http://www.lanana.org/. This | 17 | Torben Mathiasen). The site is http://www.lanana.org/. This |
18 | also deals with allocating numbers for devices that are not going to | 18 | also deals with allocating numbers for devices that are not going to |
19 | be submitted to the mainstream kernel. | 19 | be submitted to the mainstream kernel. |
20 | See Documentation/devices.txt for more information on this. | ||
20 | 21 | ||
21 | If you don't use assigned numbers then when you device is submitted it will | 22 | If you don't use assigned numbers then when your device is submitted it will |
22 | get given an assigned number even if that is different from values you may | 23 | be given an assigned number even if that is different from values you may |
23 | have shipped to customers before. | 24 | have shipped to customers before. |
24 | 25 | ||
25 | Who To Submit Drivers To | 26 | Who To Submit Drivers To |
@@ -32,7 +33,8 @@ Linux 2.2: | |||
32 | If the code area has a general maintainer then please submit it to | 33 | If the code area has a general maintainer then please submit it to |
33 | the maintainer listed in MAINTAINERS in the kernel file. If the | 34 | the maintainer listed in MAINTAINERS in the kernel file. If the |
34 | maintainer does not respond or you cannot find the appropriate | 35 | maintainer does not respond or you cannot find the appropriate |
35 | maintainer then please contact Alan Cox <alan@lxorguk.ukuu.org.uk> | 36 | maintainer then please contact the 2.2 kernel maintainer: |
37 | Marc-Christian Petersen <m.c.p@wolk-project.de>. | ||
36 | 38 | ||
37 | Linux 2.4: | 39 | Linux 2.4: |
38 | The same rules apply as 2.2. The final contact point for Linux 2.4 | 40 | The same rules apply as 2.2. The final contact point for Linux 2.4 |
@@ -48,7 +50,7 @@ What Criteria Determine Acceptance | |||
48 | 50 | ||
49 | Licensing: The code must be released to us under the | 51 | Licensing: The code must be released to us under the |
50 | GNU General Public License. We don't insist on any kind | 52 | GNU General Public License. We don't insist on any kind |
51 | of exclusively GPL licensing, and if you wish the driver | 53 | of exclusive GPL licensing, and if you wish the driver |
52 | to be useful to other communities such as BSD you may well | 54 | to be useful to other communities such as BSD you may well |
53 | wish to release under multiple licenses. | 55 | wish to release under multiple licenses. |
54 | 56 | ||
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches index 4d1f41b84ebc..6761a7b241a5 100644 --- a/Documentation/SubmittingPatches +++ b/Documentation/SubmittingPatches | |||
@@ -35,7 +35,7 @@ not in any lower subdirectory. | |||
35 | 35 | ||
36 | To create a patch for a single file, it is often sufficient to do: | 36 | To create a patch for a single file, it is often sufficient to do: |
37 | 37 | ||
38 | SRCTREE= linux-2.4 | 38 | SRCTREE= linux-2.6 |
39 | MYFILE= drivers/net/mydriver.c | 39 | MYFILE= drivers/net/mydriver.c |
40 | 40 | ||
41 | cd $SRCTREE | 41 | cd $SRCTREE |
@@ -48,17 +48,18 @@ To create a patch for multiple files, you should unpack a "vanilla", | |||
48 | or unmodified kernel source tree, and generate a diff against your | 48 | or unmodified kernel source tree, and generate a diff against your |
49 | own source tree. For example: | 49 | own source tree. For example: |
50 | 50 | ||
51 | MYSRC= /devel/linux-2.4 | 51 | MYSRC= /devel/linux-2.6 |
52 | 52 | ||
53 | tar xvfz linux-2.4.0-test11.tar.gz | 53 | tar xvfz linux-2.6.12.tar.gz |
54 | mv linux linux-vanilla | 54 | mv linux-2.6.12 linux-2.6.12-vanilla |
55 | wget http://www.moses.uklinux.net/patches/dontdiff | 55 | diff -uprN -X linux-2.6.12-vanilla/Documentation/dontdiff \ |
56 | diff -uprN -X dontdiff linux-vanilla $MYSRC > /tmp/patch | 56 | linux-2.6.12-vanilla $MYSRC > /tmp/patch |
57 | rm -f dontdiff | ||
58 | 57 | ||
59 | "dontdiff" is a list of files which are generated by the kernel during | 58 | "dontdiff" is a list of files which are generated by the kernel during |
60 | the build process, and should be ignored in any diff(1)-generated | 59 | the build process, and should be ignored in any diff(1)-generated |
61 | patch. dontdiff is maintained by Tigran Aivazian <tigran@veritas.com> | 60 | patch. The "dontdiff" file is included in the kernel tree in |
61 | 2.6.12 and later. For earlier kernel versions, you can get it | ||
62 | from <http://www.xenotime.net/linux/doc/dontdiff>. | ||
62 | 63 | ||
63 | Make sure your patch does not include any extra files which do not | 64 | Make sure your patch does not include any extra files which do not |
64 | belong in a patch submission. Make sure to review your patch -after- | 65 | belong in a patch submission. Make sure to review your patch -after- |
@@ -66,18 +67,20 @@ generated it with diff(1), to ensure accuracy. | |||
66 | 67 | ||
67 | If your changes produce a lot of deltas, you may want to look into | 68 | If your changes produce a lot of deltas, you may want to look into |
68 | splitting them into individual patches which modify things in | 69 | splitting them into individual patches which modify things in |
69 | logical stages, this will facilitate easier reviewing by other | 70 | logical stages. This will facilitate easier reviewing by other |
70 | kernel developers, very important if you want your patch accepted. | 71 | kernel developers, very important if you want your patch accepted. |
71 | There are a number of scripts which can aid in this; | 72 | There are a number of scripts which can aid in this: |
72 | 73 | ||
73 | Quilt: | 74 | Quilt: |
74 | http://savannah.nongnu.org/projects/quilt | 75 | http://savannah.nongnu.org/projects/quilt |
75 | 76 | ||
76 | Randy Dunlap's patch scripts: | 77 | Randy Dunlap's patch scripts: |
77 | http://developer.osdl.org/rddunlap/scripts/patching-scripts.tgz | 78 | http://www.xenotime.net/linux/scripts/patching-scripts-002.tar.gz |
78 | 79 | ||
79 | Andrew Morton's patch scripts: | 80 | Andrew Morton's patch scripts: |
80 | http://www.zip.com.au/~akpm/linux/patches/patch-scripts-0.16 | 81 | http://www.zip.com.au/~akpm/linux/patches/patch-scripts-0.20 |
82 | |||
83 | |||
81 | 84 | ||
82 | 2) Describe your changes. | 85 | 2) Describe your changes. |
83 | 86 | ||
@@ -163,6 +166,8 @@ patches. Trivial patches must qualify for one of the following rules: | |||
163 | since people copy, as long as it's trivial) | 166 | since people copy, as long as it's trivial) |
164 | Any fix by the author/maintainer of the file. (ie. patch monkey | 167 | Any fix by the author/maintainer of the file. (ie. patch monkey |
165 | in re-transmission mode) | 168 | in re-transmission mode) |
169 | URL: <http://www.kernel.org/pub/linux/kernel/people/rusty/trivial/> | ||
170 | |||
166 | 171 | ||
167 | 172 | ||
168 | 173 | ||
@@ -291,6 +296,17 @@ now, but you can do this to mark internal company procedures or just | |||
291 | point out some special detail about the sign-off. | 296 | point out some special detail about the sign-off. |
292 | 297 | ||
293 | 298 | ||
299 | |||
300 | 12) More references for submitting patches | ||
301 | |||
302 | Andrew Morton, "The perfect patch" (tpp). | ||
303 | <http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt> | ||
304 | |||
305 | Jeff Garzik, "Linux kernel patch submission format." | ||
306 | <http://linux.yyz.us/patch-format.html> | ||
307 | |||
308 | |||
309 | |||
294 | ----------------------------------- | 310 | ----------------------------------- |
295 | SECTION 2 - HINTS, TIPS, AND TRICKS | 311 | SECTION 2 - HINTS, TIPS, AND TRICKS |
296 | ----------------------------------- | 312 | ----------------------------------- |
@@ -359,7 +375,5 @@ and 'extern __inline__'. | |||
359 | 4) Don't over-design. | 375 | 4) Don't over-design. |
360 | 376 | ||
361 | Don't try to anticipate nebulous future cases which may or may not | 377 | Don't try to anticipate nebulous future cases which may or may not |
362 | be useful: "Make it as simple as you can, and no simpler" | 378 | be useful: "Make it as simple as you can, and no simpler." |
363 | |||
364 | |||
365 | 379 | ||
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 89cd417651e0..4ec75c06bca4 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -622,6 +622,17 @@ running once the system is up. | |||
622 | ips= [HW,SCSI] Adaptec / IBM ServeRAID controller | 622 | ips= [HW,SCSI] Adaptec / IBM ServeRAID controller |
623 | See header of drivers/scsi/ips.c. | 623 | See header of drivers/scsi/ips.c. |
624 | 624 | ||
625 | irqfixup [HW] | ||
626 | When an interrupt is not handled search all handlers | ||
627 | for it. Intended to get systems with badly broken | ||
628 | firmware running. | ||
629 | |||
630 | irqpoll [HW] | ||
631 | When an interrupt is not handled search all handlers | ||
632 | for it. Also check all handlers each timer | ||
633 | interrupt. Intended to get systems with badly broken | ||
634 | firmware running. | ||
635 | |||
625 | isapnp= [ISAPNP] | 636 | isapnp= [ISAPNP] |
626 | Format: <RDP>, <reset>, <pci_scan>, <verbosity> | 637 | Format: <RDP>, <reset>, <pci_scan>, <verbosity> |
627 | 638 | ||
@@ -1030,6 +1041,10 @@ running once the system is up. | |||
1030 | irqmask=0xMMMM [IA-32] Set a bit mask of IRQs allowed to be assigned | 1041 | irqmask=0xMMMM [IA-32] Set a bit mask of IRQs allowed to be assigned |
1031 | automatically to PCI devices. You can make the kernel | 1042 | automatically to PCI devices. You can make the kernel |
1032 | exclude IRQs of your ISA cards this way. | 1043 | exclude IRQs of your ISA cards this way. |
1044 | pirqaddr=0xAAAAA [IA-32] Specify the physical address | ||
1045 | of the PIRQ table (normally generated | ||
1046 | by the BIOS) if it is outside the | ||
1047 | F0000h-100000h range. | ||
1033 | lastbus=N [IA-32] Scan all buses till bus #N. Can be useful | 1048 | lastbus=N [IA-32] Scan all buses till bus #N. Can be useful |
1034 | if the kernel is unable to find your secondary buses | 1049 | if the kernel is unable to find your secondary buses |
1035 | and you want to tell it explicitly which ones they are. | 1050 | and you want to tell it explicitly which ones they are. |
diff --git a/Documentation/networking/fib_trie.txt b/Documentation/networking/fib_trie.txt new file mode 100644 index 000000000000..f50d0c673c57 --- /dev/null +++ b/Documentation/networking/fib_trie.txt | |||
@@ -0,0 +1,145 @@ | |||
1 | LC-trie implementation notes. | ||
2 | |||
3 | Node types | ||
4 | ---------- | ||
5 | leaf | ||
6 | An end node with data. This has a copy of the relevant key, along | ||
7 | with 'hlist' with routing table entries sorted by prefix length. | ||
8 | See struct leaf and struct leaf_info. | ||
9 | |||
10 | trie node or tnode | ||
11 | An internal node, holding an array of child (leaf or tnode) pointers, | ||
12 | indexed through a subset of the key. See Level Compression. | ||
13 | |||
14 | A few concepts explained | ||
15 | ------------------------ | ||
16 | Bits (tnode) | ||
17 | The number of bits in the key segment used for indexing into the | ||
18 | child array - the "child index". See Level Compression. | ||
19 | |||
20 | Pos (tnode) | ||
21 | The position (in the key) of the key segment used for indexing into | ||
22 | the child array. See Path Compression. | ||
23 | |||
24 | Path Compression / skipped bits | ||
25 | Any given tnode is linked to from the child array of its parent, using | ||
26 | a segment of the key specified by the parent's "pos" and "bits" | ||
27 | In certain cases, this tnode's own "pos" will not be immediately | ||
28 | adjacent to the parent (pos+bits), but there will be some bits | ||
29 | in the key skipped over because they represent a single path with no | ||
30 | deviations. These "skipped bits" constitute Path Compression. | ||
31 | Note that the search algorithm will simply skip over these bits when | ||
32 | searching, making it necessary to save the keys in the leaves to | ||
33 | verify that they actually do match the key we are searching for. | ||
34 | |||
35 | Level Compression / child arrays | ||
36 | the trie is kept level balanced moving, under certain conditions, the | ||
37 | children of a full child (see "full_children") up one level, so that | ||
38 | instead of a pure binary tree, each internal node ("tnode") may | ||
39 | contain an arbitrarily large array of links to several children. | ||
40 | Conversely, a tnode with a mostly empty child array (see empty_children) | ||
41 | may be "halved", having some of its children moved downwards one level, | ||
42 | in order to avoid ever-increasing child arrays. | ||
43 | |||
44 | empty_children | ||
45 | the number of positions in the child array of a given tnode that are | ||
46 | NULL. | ||
47 | |||
48 | full_children | ||
49 | the number of children of a given tnode that aren't path compressed. | ||
50 | (in other words, they aren't NULL or leaves and their "pos" is equal | ||
51 | to this tnode's "pos"+"bits"). | ||
52 | |||
53 | (The word "full" here is used more in the sense of "complete" than | ||
54 | as the opposite of "empty", which might be a tad confusing.) | ||
55 | |||
56 | Comments | ||
57 | --------- | ||
58 | |||
59 | We have tried to keep the structure of the code as close to fib_hash as | ||
60 | possible to allow verification and help up reviewing. | ||
61 | |||
62 | fib_find_node() | ||
63 | A good start for understanding this code. This function implements a | ||
64 | straightforward trie lookup. | ||
65 | |||
66 | fib_insert_node() | ||
67 | Inserts a new leaf node in the trie. This is bit more complicated than | ||
68 | fib_find_node(). Inserting a new node means we might have to run the | ||
69 | level compression algorithm on part of the trie. | ||
70 | |||
71 | trie_leaf_remove() | ||
72 | Looks up a key, deletes it and runs the level compression algorithm. | ||
73 | |||
74 | trie_rebalance() | ||
75 | The key function for the dynamic trie after any change in the trie | ||
76 | it is run to optimize and reorganize. Tt will walk the trie upwards | ||
77 | towards the root from a given tnode, doing a resize() at each step | ||
78 | to implement level compression. | ||
79 | |||
80 | resize() | ||
81 | Analyzes a tnode and optimizes the child array size by either inflating | ||
82 | or shrinking it repeatedly until it fullfills the criteria for optimal | ||
83 | level compression. This part follows the original paper pretty closely | ||
84 | and there may be some room for experimentation here. | ||
85 | |||
86 | inflate() | ||
87 | Doubles the size of the child array within a tnode. Used by resize(). | ||
88 | |||
89 | halve() | ||
90 | Halves the size of the child array within a tnode - the inverse of | ||
91 | inflate(). Used by resize(); | ||
92 | |||
93 | fn_trie_insert(), fn_trie_delete(), fn_trie_select_default() | ||
94 | The route manipulation functions. Should conform pretty closely to the | ||
95 | corresponding functions in fib_hash. | ||
96 | |||
97 | fn_trie_flush() | ||
98 | This walks the full trie (using nextleaf()) and searches for empty | ||
99 | leaves which have to be removed. | ||
100 | |||
101 | fn_trie_dump() | ||
102 | Dumps the routing table ordered by prefix length. This is somewhat | ||
103 | slower than the corresponding fib_hash function, as we have to walk the | ||
104 | entire trie for each prefix length. In comparison, fib_hash is organized | ||
105 | as one "zone"/hash per prefix length. | ||
106 | |||
107 | Locking | ||
108 | ------- | ||
109 | |||
110 | fib_lock is used for an RW-lock in the same way that this is done in fib_hash. | ||
111 | However, the functions are somewhat separated for other possible locking | ||
112 | scenarios. It might conceivably be possible to run trie_rebalance via RCU | ||
113 | to avoid read_lock in the fn_trie_lookup() function. | ||
114 | |||
115 | Main lookup mechanism | ||
116 | --------------------- | ||
117 | fn_trie_lookup() is the main lookup function. | ||
118 | |||
119 | The lookup is in its simplest form just like fib_find_node(). We descend the | ||
120 | trie, key segment by key segment, until we find a leaf. check_leaf() does | ||
121 | the fib_semantic_match in the leaf's sorted prefix hlist. | ||
122 | |||
123 | If we find a match, we are done. | ||
124 | |||
125 | If we don't find a match, we enter prefix matching mode. The prefix length, | ||
126 | starting out at the same as the key length, is reduced one step at a time, | ||
127 | and we backtrack upwards through the trie trying to find a longest matching | ||
128 | prefix. The goal is always to reach a leaf and get a positive result from the | ||
129 | fib_semantic_match mechanism. | ||
130 | |||
131 | Inside each tnode, the search for longest matching prefix consists of searching | ||
132 | through the child array, chopping off (zeroing) the least significant "1" of | ||
133 | the child index until we find a match or the child index consists of nothing but | ||
134 | zeros. | ||
135 | |||
136 | At this point we backtrack (t->stats.backtrack++) up the trie, continuing to | ||
137 | chop off part of the key in order to find the longest matching prefix. | ||
138 | |||
139 | At this point we will repeatedly descend subtries to look for a match, and there | ||
140 | are some optimizations available that can provide us with "shortcuts" to avoid | ||
141 | descending into dead ends. Look for "HL_OPTIMIZE" sections in the code. | ||
142 | |||
143 | To alleviate any doubts about the correctness of the route selection process, | ||
144 | a new netlink operation has been added. Look for NETLINK_FIB_LOOKUP, which | ||
145 | gives userland access to fib_lookup(). | ||
diff --git a/Documentation/pcmcia/devicetable.txt b/Documentation/pcmcia/devicetable.txt index 045511acafc9..3351c0355143 100644 --- a/Documentation/pcmcia/devicetable.txt +++ b/Documentation/pcmcia/devicetable.txt | |||
@@ -19,9 +19,8 @@ PCMCIA_DEVICE_PROD_ID1("some_string", 0x(hash_of_some_string)), | |||
19 | If the hash is incorrect, the kernel will inform you about this in "dmesg" | 19 | If the hash is incorrect, the kernel will inform you about this in "dmesg" |
20 | upon module initialization, and tell you of the correct hash. | 20 | upon module initialization, and tell you of the correct hash. |
21 | 21 | ||
22 | You can determine the hash of the product ID strings by running | 22 | You can determine the hash of the product ID strings by catting the file |
23 | "pcmcia-modalias %n.%m" [%n being replaced with the socket number and %m being | 23 | "modalias" in the sysfs directory of the PCMCIA device. It generates a string |
24 | replaced with the device function] from pcmciautils. It generates a string | ||
25 | in the following form: | 24 | in the following form: |
26 | pcmcia:m0149cC1ABf06pfn00fn00pa725B842DpbF1EFEE84pc0877B627pd00000000 | 25 | pcmcia:m0149cC1ABf06pfn00fn00pa725B842DpbF1EFEE84pc0877B627pd00000000 |
27 | 26 | ||
diff --git a/Documentation/serial/driver b/Documentation/serial/driver index e9c0178cd202..ac7eabbf662a 100644 --- a/Documentation/serial/driver +++ b/Documentation/serial/driver | |||
@@ -107,8 +107,8 @@ hardware. | |||
107 | indicate that the signal is permanently active. If RI is | 107 | indicate that the signal is permanently active. If RI is |
108 | not available, the signal should not be indicated as active. | 108 | not available, the signal should not be indicated as active. |
109 | 109 | ||
110 | Locking: none. | 110 | Locking: port->lock taken. |
111 | Interrupts: caller dependent. | 111 | Interrupts: locally disabled. |
112 | This call must not sleep | 112 | This call must not sleep |
113 | 113 | ||
114 | stop_tx(port,tty_stop) | 114 | stop_tx(port,tty_stop) |
diff --git a/Documentation/video4linux/API.html b/Documentation/video4linux/API.html index 4b3d8f640a4a..441407b12a9f 100644 --- a/Documentation/video4linux/API.html +++ b/Documentation/video4linux/API.html | |||
@@ -1,399 +1,16 @@ | |||
1 | <HTML><HEAD> | 1 | <TITLE>V4L API</TITLE> |
2 | <TITLE>Video4Linux Kernel API Reference v0.1:19990430</TITLE> | 2 | <H1>Video For Linux APIs</H1> |
3 | </HEAD> | 3 | <table border=0> |
4 | <! Revision History: > | 4 | <tr> |
5 | <! 4/30/1999 - Fred Gleason (fredg@wava.com)> | 5 | <td> |
6 | <! Documented extensions for the Radio Data System (RDS) extensions > | 6 | <A HREF=http://www.linuxtv.org/downloads/video4linux/API/V4L1_API.html> |
7 | <BODY bgcolor="#ffffff"> | 7 | V4L original API</a> |
8 | <H3>Devices</H3> | 8 | </td><td> |
9 | Video4Linux provides the following sets of device files. These live on the | 9 | Obsoleted by V4L2 API |
10 | character device formerly known as "/dev/bttv". /dev/bttv should be a | 10 | </td></tr><tr><td> |
11 | symlink to /dev/video0 for most people. | 11 | <A HREF=http://www.linuxtv.org/downloads/video4linux/API/V4L2_API.html> |
12 | <P> | 12 | V4L2 API</a> |
13 | <TABLE> | 13 | </td><td> |
14 | <TR><TH>Device Name</TH><TH>Minor Range</TH><TH>Function</TH> | 14 | Should be used for new projects |
15 | <TR><TD>/dev/video</TD><TD>0-63</TD><TD>Video Capture Interface</TD> | 15 | </td></tr> |
16 | <TR><TD>/dev/radio</TD><TD>64-127</TD><TD>AM/FM Radio Devices</TD> | 16 | </table> |
17 | <TR><TD>/dev/vtx</TD><TD>192-223</TD><TD>Teletext Interface Chips</TD> | ||
18 | <TR><TD>/dev/vbi</TD><TD>224-239</TD><TD>Raw VBI Data (Intercast/teletext)</TD> | ||
19 | </TABLE> | ||
20 | <P> | ||
21 | Video4Linux programs open and scan the devices to find what they are looking | ||
22 | for. Capability queries define what each interface supports. The | ||
23 | described API is only defined for video capture cards. The relevant subset | ||
24 | applies to radio cards. Teletext interfaces talk the existing VTX API. | ||
25 | <P> | ||
26 | <H3>Capability Query Ioctl</H3> | ||
27 | The <B>VIDIOCGCAP</B> ioctl call is used to obtain the capability | ||
28 | information for a video device. The <b>struct video_capability</b> object | ||
29 | passed to the ioctl is completed and returned. It contains the following | ||
30 | information | ||
31 | <P> | ||
32 | <TABLE> | ||
33 | <TR><TD><b>name[32]</b><TD>Canonical name for this interface</TD> | ||
34 | <TR><TD><b>type</b><TD>Type of interface</TD> | ||
35 | <TR><TD><b>channels</b><TD>Number of radio/tv channels if appropriate</TD> | ||
36 | <TR><TD><b>audios</b><TD>Number of audio devices if appropriate</TD> | ||
37 | <TR><TD><b>maxwidth</b><TD>Maximum capture width in pixels</TD> | ||
38 | <TR><TD><b>maxheight</b><TD>Maximum capture height in pixels</TD> | ||
39 | <TR><TD><b>minwidth</b><TD>Minimum capture width in pixels</TD> | ||
40 | <TR><TD><b>minheight</b><TD>Minimum capture height in pixels</TD> | ||
41 | </TABLE> | ||
42 | <P> | ||
43 | The type field lists the capability flags for the device. These are | ||
44 | as follows | ||
45 | <P> | ||
46 | <TABLE> | ||
47 | <TR><TH>Name</TH><TH>Description</TH> | ||
48 | <TR><TD><b>VID_TYPE_CAPTURE</b><TD>Can capture to memory</TD> | ||
49 | <TR><TD><b>VID_TYPE_TUNER</b><TD>Has a tuner of some form</TD> | ||
50 | <TR><TD><b>VID_TYPE_TELETEXT</b><TD>Has teletext capability</TD> | ||
51 | <TR><TD><b>VID_TYPE_OVERLAY</b><TD>Can overlay its image onto the frame buffer</TD> | ||
52 | <TR><TD><b>VID_TYPE_CHROMAKEY</b><TD>Overlay is Chromakeyed</TD> | ||
53 | <TR><TD><b>VID_TYPE_CLIPPING</b><TD>Overlay clipping is supported</TD> | ||
54 | <TR><TD><b>VID_TYPE_FRAMERAM</b><TD>Overlay overwrites frame buffer memory</TD> | ||
55 | <TR><TD><b>VID_TYPE_SCALES</b><TD>The hardware supports image scaling</TD> | ||
56 | <TR><TD><b>VID_TYPE_MONOCHROME</b><TD>Image capture is grey scale only</TD> | ||
57 | <TR><TD><b>VID_TYPE_SUBCAPTURE</b><TD>Capture can be of only part of the image</TD> | ||
58 | </TABLE> | ||
59 | <P> | ||
60 | The minimum and maximum sizes listed for a capture device do not imply all | ||
61 | that all height/width ratios or sizes within the range are possible. A | ||
62 | request to set a size will be honoured by the largest available capture | ||
63 | size whose capture is no large than the requested rectangle in either | ||
64 | direction. For example the quickcam has 3 fixed settings. | ||
65 | <P> | ||
66 | <H3>Frame Buffer</H3> | ||
67 | Capture cards that drop data directly onto the frame buffer must be told the | ||
68 | base address of the frame buffer, its size and organisation. This is a | ||
69 | privileged ioctl and one that eventually X itself should set. | ||
70 | <P> | ||
71 | The <b>VIDIOCSFBUF</b> ioctl sets the frame buffer parameters for a capture | ||
72 | card. If the card does not do direct writes to the frame buffer then this | ||
73 | ioctl will be unsupported. The <b>VIDIOCGFBUF</b> ioctl returns the | ||
74 | currently used parameters. The structure used in both cases is a | ||
75 | <b>struct video_buffer</b>. | ||
76 | <P> | ||
77 | <TABLE> | ||
78 | <TR><TD><b>void *base</b></TD><TD>Base physical address of the buffer</TD> | ||
79 | <TR><TD><b>int height</b></TD><TD>Height of the frame buffer</TD> | ||
80 | <TR><TD><b>int width</b></TD><TD>Width of the frame buffer</TD> | ||
81 | <TR><TD><b>int depth</b></TD><TD>Depth of the frame buffer</TD> | ||
82 | <TR><TD><b>int bytesperline</b></TD><TD>Number of bytes of memory between the start of two adjacent lines</TD> | ||
83 | </TABLE> | ||
84 | <P> | ||
85 | Note that these values reflect the physical layout of the frame buffer. | ||
86 | The visible area may be smaller. In fact under XFree86 this is commonly the | ||
87 | case. XFree86 DGA can provide the parameters required to set up this ioctl. | ||
88 | Setting the base address to NULL indicates there is no physical frame buffer | ||
89 | access. | ||
90 | <P> | ||
91 | <H3>Capture Windows</H3> | ||
92 | The capture area is described by a <b>struct video_window</b>. This defines | ||
93 | a capture area and the clipping information if relevant. The | ||
94 | <b>VIDIOCGWIN</b> ioctl recovers the current settings and the | ||
95 | <b>VIDIOCSWIN</b> sets new values. A successful call to <b>VIDIOCSWIN</b> | ||
96 | indicates that a suitable set of parameters have been chosen. They do not | ||
97 | indicate that exactly what was requested was granted. The program should | ||
98 | call <b>VIDIOCGWIN</b> to check if the nearest match was suitable. The | ||
99 | <b>struct video_window</b> contains the following fields. | ||
100 | <P> | ||
101 | <TABLE> | ||
102 | <TR><TD><b>x</b><TD>The X co-ordinate specified in X windows format.</TD> | ||
103 | <TR><TD><b>y</b><TD>The Y co-ordinate specified in X windows format.</TD> | ||
104 | <TR><TD><b>width</b><TD>The width of the image capture.</TD> | ||
105 | <TR><TD><b>height</b><TD>The height of the image capture.</TD> | ||
106 | <TR><TD><b>chromakey</b><TD>A host order RGB32 value for the chroma key.</TD> | ||
107 | <TR><TD><b>flags</b><TD>Additional capture flags.</TD> | ||
108 | <TR><TD><b>clips</b><TD>A list of clipping rectangles. <em>(Set only)</em></TD> | ||
109 | <TR><TD><b>clipcount</b><TD>The number of clipping rectangles. <em>(Set only)</em></TD> | ||
110 | </TABLE> | ||
111 | <P> | ||
112 | Clipping rectangles are passed as an array. Each clip consists of the following | ||
113 | fields available to the user. | ||
114 | <P> | ||
115 | <TABLE> | ||
116 | <TR><TD><b>x</b></TD><TD>X co-ordinate of rectangle to skip</TD> | ||
117 | <TR><TD><b>y</b></TD><TD>Y co-ordinate of rectangle to skip</TD> | ||
118 | <TR><TD><b>width</b></TD><TD>Width of rectangle to skip</TD> | ||
119 | <TR><TD><b>height</b></TD><TD>Height of rectangle to skip</TD> | ||
120 | </TABLE> | ||
121 | <P> | ||
122 | Merely setting the window does not enable capturing. Overlay capturing | ||
123 | (i.e. PCI-PCI transfer to the frame buffer of the video card) | ||
124 | is activated by passing the <b>VIDIOCCAPTURE</b> ioctl a value of 1, and | ||
125 | disabled by passing it a value of 0. | ||
126 | <P> | ||
127 | Some capture devices can capture a subfield of the image they actually see. | ||
128 | This is indicated when VIDEO_TYPE_SUBCAPTURE is defined. | ||
129 | The video_capture describes the time and special subfields to capture. | ||
130 | The video_capture structure contains the following fields. | ||
131 | <P> | ||
132 | <TABLE> | ||
133 | <TR><TD><b>x</b></TD><TD>X co-ordinate of source rectangle to grab</TD> | ||
134 | <TR><TD><b>y</b></TD><TD>Y co-ordinate of source rectangle to grab</TD> | ||
135 | <TR><TD><b>width</b></TD><TD>Width of source rectangle to grab</TD> | ||
136 | <TR><TD><b>height</b></TD><TD>Height of source rectangle to grab</TD> | ||
137 | <TR><TD><b>decimation</b></TD><TD>Decimation to apply</TD> | ||
138 | <TR><TD><b>flags</b></TD><TD>Flag settings for grabbing</TD> | ||
139 | </TABLE> | ||
140 | The available flags are | ||
141 | <P> | ||
142 | <TABLE> | ||
143 | <TR><TH>Name</TH><TH>Description</TH> | ||
144 | <TR><TD><b>VIDEO_CAPTURE_ODD</b><TD>Capture only odd frames</TD> | ||
145 | <TR><TD><b>VIDEO_CAPTURE_EVEN</b><TD>Capture only even frames</TD> | ||
146 | </TABLE> | ||
147 | <P> | ||
148 | <H3>Video Sources</H3> | ||
149 | Each video4linux video or audio device captures from one or more | ||
150 | source <b>channels</b>. Each channel can be queries with the | ||
151 | <b>VDIOCGCHAN</b> ioctl call. Before invoking this function the caller | ||
152 | must set the channel field to the channel that is being queried. On return | ||
153 | the <b>struct video_channel</b> is filled in with information about the | ||
154 | nature of the channel itself. | ||
155 | <P> | ||
156 | The <b>VIDIOCSCHAN</b> ioctl takes an integer argument and switches the | ||
157 | capture to this input. It is not defined whether parameters such as colour | ||
158 | settings or tuning are maintained across a channel switch. The caller should | ||
159 | maintain settings as desired for each channel. (This is reasonable as | ||
160 | different video inputs may have different properties). | ||
161 | <P> | ||
162 | The <b>struct video_channel</b> consists of the following | ||
163 | <P> | ||
164 | <TABLE> | ||
165 | <TR><TD><b>channel</b></TD><TD>The channel number</TD> | ||
166 | <TR><TD><b>name</b></TD><TD>The input name - preferably reflecting the label | ||
167 | on the card input itself</TD> | ||
168 | <TR><TD><b>tuners</b></TD><TD>Number of tuners for this input</TD> | ||
169 | <TR><TD><b>flags</b></TD><TD>Properties the tuner has</TD> | ||
170 | <TR><TD><b>type</b></TD><TD>Input type (if known)</TD> | ||
171 | <TR><TD><b>norm</b><TD>The norm for this channel</TD> | ||
172 | </TABLE> | ||
173 | <P> | ||
174 | The flags defined are | ||
175 | <P> | ||
176 | <TABLE> | ||
177 | <TR><TD><b>VIDEO_VC_TUNER</b><TD>Channel has tuners.</TD> | ||
178 | <TR><TD><b>VIDEO_VC_AUDIO</b><TD>Channel has audio.</TD> | ||
179 | <TR><TD><b>VIDEO_VC_NORM</b><TD>Channel has norm setting.</TD> | ||
180 | </TABLE> | ||
181 | <P> | ||
182 | The types defined are | ||
183 | <P> | ||
184 | <TABLE> | ||
185 | <TR><TD><b>VIDEO_TYPE_TV</b><TD>The input is a TV input.</TD> | ||
186 | <TR><TD><b>VIDEO_TYPE_CAMERA</b><TD>The input is a camera.</TD> | ||
187 | </TABLE> | ||
188 | <P> | ||
189 | <H3>Image Properties</H3> | ||
190 | The image properties of the picture can be queried with the <b>VIDIOCGPICT</b> | ||
191 | ioctl which fills in a <b>struct video_picture</b>. The <b>VIDIOCSPICT</b> | ||
192 | ioctl allows values to be changed. All values except for the palette type | ||
193 | are scaled between 0-65535. | ||
194 | <P> | ||
195 | The <b>struct video_picture</b> consists of the following fields | ||
196 | <P> | ||
197 | <TABLE> | ||
198 | <TR><TD><b>brightness</b><TD>Picture brightness</TD> | ||
199 | <TR><TD><b>hue</b><TD>Picture hue (colour only)</TD> | ||
200 | <TR><TD><b>colour</b><TD>Picture colour (colour only)</TD> | ||
201 | <TR><TD><b>contrast</b><TD>Picture contrast</TD> | ||
202 | <TR><TD><b>whiteness</b><TD>The whiteness (greyscale only)</TD> | ||
203 | <TR><TD><b>depth</b><TD>The capture depth (may need to match the frame buffer depth)</TD> | ||
204 | <TR><TD><b>palette</b><TD>Reports the palette that should be used for this image</TD> | ||
205 | </TABLE> | ||
206 | <P> | ||
207 | The following palettes are defined | ||
208 | <P> | ||
209 | <TABLE> | ||
210 | <TR><TD><b>VIDEO_PALETTE_GREY</b><TD>Linear intensity grey scale (255 is brightest).</TD> | ||
211 | <TR><TD><b>VIDEO_PALETTE_HI240</b><TD>The BT848 8bit colour cube.</TD> | ||
212 | <TR><TD><b>VIDEO_PALETTE_RGB565</b><TD>RGB565 packed into 16 bit words.</TD> | ||
213 | <TR><TD><b>VIDEO_PALETTE_RGB555</b><TD>RGV555 packed into 16 bit words, top bit undefined.</TD> | ||
214 | <TR><TD><b>VIDEO_PALETTE_RGB24</b><TD>RGB888 packed into 24bit words.</TD> | ||
215 | <TR><TD><b>VIDEO_PALETTE_RGB32</b><TD>RGB888 packed into the low 3 bytes of 32bit words. The top 8bits are undefined.</TD> | ||
216 | <TR><TD><b>VIDEO_PALETTE_YUV422</b><TD>Video style YUV422 - 8bits packed 4bits Y 2bits U 2bits V</TD> | ||
217 | <TR><TD><b>VIDEO_PALETTE_YUYV</b><TD>Describe me</TD> | ||
218 | <TR><TD><b>VIDEO_PALETTE_UYVY</b><TD>Describe me</TD> | ||
219 | <TR><TD><b>VIDEO_PALETTE_YUV420</b><TD>YUV420 capture</TD> | ||
220 | <TR><TD><b>VIDEO_PALETTE_YUV411</b><TD>YUV411 capture</TD> | ||
221 | <TR><TD><b>VIDEO_PALETTE_RAW</b><TD>RAW capture (BT848)</TD> | ||
222 | <TR><TD><b>VIDEO_PALETTE_YUV422P</b><TD>YUV 4:2:2 Planar</TD> | ||
223 | <TR><TD><b>VIDEO_PALETTE_YUV411P</b><TD>YUV 4:1:1 Planar</TD> | ||
224 | </TABLE> | ||
225 | <P> | ||
226 | <H3>Tuning</H3> | ||
227 | Each video input channel can have one or more tuners associated with it. Many | ||
228 | devices will not have tuners. TV cards and radio cards will have one or more | ||
229 | tuners attached. | ||
230 | <P> | ||
231 | Tuners are described by a <b>struct video_tuner</b> which can be obtained by | ||
232 | the <b>VIDIOCGTUNER</b> ioctl. Fill in the tuner number in the structure | ||
233 | then pass the structure to the ioctl to have the data filled in. The | ||
234 | tuner can be switched using <b>VIDIOCSTUNER</b> which takes an integer argument | ||
235 | giving the tuner to use. A struct tuner has the following fields | ||
236 | <P> | ||
237 | <TABLE> | ||
238 | <TR><TD><b>tuner</b><TD>Number of the tuner</TD> | ||
239 | <TR><TD><b>name</b><TD>Canonical name for this tuner (eg FM/AM/TV)</TD> | ||
240 | <TR><TD><b>rangelow</b><TD>Lowest tunable frequency</TD> | ||
241 | <TR><TD><b>rangehigh</b><TD>Highest tunable frequency</TD> | ||
242 | <TR><TD><b>flags</b><TD>Flags describing the tuner</TD> | ||
243 | <TR><TD><b>mode</b><TD>The video signal mode if relevant</TD> | ||
244 | <TR><TD><b>signal</b><TD>Signal strength if known - between 0-65535</TD> | ||
245 | </TABLE> | ||
246 | <P> | ||
247 | The following flags exist | ||
248 | <P> | ||
249 | <TABLE> | ||
250 | <TR><TD><b>VIDEO_TUNER_PAL</b><TD>PAL tuning is supported</TD> | ||
251 | <TR><TD><b>VIDEO_TUNER_NTSC</b><TD>NTSC tuning is supported</TD> | ||
252 | <TR><TD><b>VIDEO_TUNER_SECAM</b><TD>SECAM tuning is supported</TD> | ||
253 | <TR><TD><b>VIDEO_TUNER_LOW</b><TD>Frequency is in a lower range</TD> | ||
254 | <TR><TD><b>VIDEO_TUNER_NORM</b><TD>The norm for this tuner is settable</TD> | ||
255 | <TR><TD><b>VIDEO_TUNER_STEREO_ON</b><TD>The tuner is seeing stereo audio</TD> | ||
256 | <TR><TD><b>VIDEO_TUNER_RDS_ON</b><TD>The tuner is seeing a RDS datastream</TD> | ||
257 | <TR><TD><b>VIDEO_TUNER_MBS_ON</b><TD>The tuner is seeing a MBS datastream</TD> | ||
258 | </TABLE> | ||
259 | <P> | ||
260 | The following modes are defined | ||
261 | <P> | ||
262 | <TABLE> | ||
263 | <TR><TD><b>VIDEO_MODE_PAL</b><TD>The tuner is in PAL mode</TD> | ||
264 | <TR><TD><b>VIDEO_MODE_NTSC</b><TD>The tuner is in NTSC mode</TD> | ||
265 | <TR><TD><b>VIDEO_MODE_SECAM</b><TD>The tuner is in SECAM mode</TD> | ||
266 | <TR><TD><b>VIDEO_MODE_AUTO</b><TD>The tuner auto switches, or mode does not apply</TD> | ||
267 | </TABLE> | ||
268 | <P> | ||
269 | Tuning frequencies are an unsigned 32bit value in 1/16th MHz or if the | ||
270 | <b>VIDEO_TUNER_LOW</b> flag is set they are in 1/16th KHz. The current | ||
271 | frequency is obtained as an unsigned long via the <b>VIDIOCGFREQ</b> ioctl and | ||
272 | set by the <b>VIDIOCSFREQ</b> ioctl. | ||
273 | <P> | ||
274 | <H3>Audio</H3> | ||
275 | TV and Radio devices have one or more audio inputs that may be selected. | ||
276 | The audio properties are queried by passing a <b>struct video_audio</b> to <b>VIDIOCGAUDIO</b> ioctl. The | ||
277 | <b>VIDIOCSAUDIO</b> ioctl sets audio properties. | ||
278 | <P> | ||
279 | The structure contains the following fields | ||
280 | <P> | ||
281 | <TABLE> | ||
282 | <TR><TD><b>audio</b><TD>The channel number</TD> | ||
283 | <TR><TD><b>volume</b><TD>The volume level</TD> | ||
284 | <TR><TD><b>bass</b><TD>The bass level</TD> | ||
285 | <TR><TD><b>treble</b><TD>The treble level</TD> | ||
286 | <TR><TD><b>flags</b><TD>Flags describing the audio channel</TD> | ||
287 | <TR><TD><b>name</b><TD>Canonical name for the audio input</TD> | ||
288 | <TR><TD><b>mode</b><TD>The mode the audio input is in</TD> | ||
289 | <TR><TD><b>balance</b><TD>The left/right balance</TD> | ||
290 | <TR><TD><b>step</b><TD>Actual step used by the hardware</TD> | ||
291 | </TABLE> | ||
292 | <P> | ||
293 | The following flags are defined | ||
294 | <P> | ||
295 | <TABLE> | ||
296 | <TR><TD><b>VIDEO_AUDIO_MUTE</b><TD>The audio is muted</TD> | ||
297 | <TR><TD><b>VIDEO_AUDIO_MUTABLE</b><TD>Audio muting is supported</TD> | ||
298 | <TR><TD><b>VIDEO_AUDIO_VOLUME</b><TD>The volume is controllable</TD> | ||
299 | <TR><TD><b>VIDEO_AUDIO_BASS</b><TD>The bass is controllable</TD> | ||
300 | <TR><TD><b>VIDEO_AUDIO_TREBLE</b><TD>The treble is controllable</TD> | ||
301 | <TR><TD><b>VIDEO_AUDIO_BALANCE</b><TD>The balance is controllable</TD> | ||
302 | </TABLE> | ||
303 | <P> | ||
304 | The following decoding modes are defined | ||
305 | <P> | ||
306 | <TABLE> | ||
307 | <TR><TD><b>VIDEO_SOUND_MONO</b><TD>Mono signal</TD> | ||
308 | <TR><TD><b>VIDEO_SOUND_STEREO</b><TD>Stereo signal (NICAM for TV)</TD> | ||
309 | <TR><TD><b>VIDEO_SOUND_LANG1</b><TD>European TV alternate language 1</TD> | ||
310 | <TR><TD><b>VIDEO_SOUND_LANG2</b><TD>European TV alternate language 2</TD> | ||
311 | </TABLE> | ||
312 | <P> | ||
313 | <H3>Reading Images</H3> | ||
314 | Each call to the <b>read</b> syscall returns the next available image | ||
315 | from the device. It is up to the caller to set format and size (using | ||
316 | the VIDIOCSPICT and VIDIOCSWIN ioctls) and then to pass a suitable | ||
317 | size buffer and length to the function. Not all devices will support | ||
318 | read operations. | ||
319 | <P> | ||
320 | A second way to handle image capture is via the mmap interface if supported. | ||
321 | To use the mmap interface a user first sets the desired image size and depth | ||
322 | properties. Next the VIDIOCGMBUF ioctl is issued. This reports the size | ||
323 | of buffer to mmap and the offset within the buffer for each frame. The | ||
324 | number of frames supported is device dependent and may only be one. | ||
325 | <P> | ||
326 | The video_mbuf structure contains the following fields | ||
327 | <P> | ||
328 | <TABLE> | ||
329 | <TR><TD><b>size</b><TD>The number of bytes to map</TD> | ||
330 | <TR><TD><b>frames</b><TD>The number of frames</TD> | ||
331 | <TR><TD><b>offsets</b><TD>The offset of each frame</TD> | ||
332 | </TABLE> | ||
333 | <P> | ||
334 | Once the mmap has been made the VIDIOCMCAPTURE ioctl starts the | ||
335 | capture to a frame using the format and image size specified in the | ||
336 | video_mmap (which should match or be below the initial query size). | ||
337 | When the VIDIOCMCAPTURE ioctl returns the frame is <em>not</em> | ||
338 | captured yet, the driver just instructed the hardware to start the | ||
339 | capture. The application has to use the VIDIOCSYNC ioctl to wait | ||
340 | until the capture of a frame is finished. VIDIOCSYNC takes the frame | ||
341 | number you want to wait for as argument. | ||
342 | <p> | ||
343 | It is allowed to call VIDIOCMCAPTURE multiple times (with different | ||
344 | frame numbers in video_mmap->frame of course) and thus have multiple | ||
345 | outstanding capture requests. A simple way do to double-buffering | ||
346 | using this feature looks like this: | ||
347 | <pre> | ||
348 | /* setup everything */ | ||
349 | VIDIOCMCAPTURE(0) | ||
350 | while (whatever) { | ||
351 | VIDIOCMCAPTURE(1) | ||
352 | VIDIOCSYNC(0) | ||
353 | /* process frame 0 while the hardware captures frame 1 */ | ||
354 | VIDIOCMCAPTURE(0) | ||
355 | VIDIOCSYNC(1) | ||
356 | /* process frame 1 while the hardware captures frame 0 */ | ||
357 | } | ||
358 | </pre> | ||
359 | Note that you are <em>not</em> limited to only two frames. The API | ||
360 | allows up to 32 frames, the VIDIOCGMBUF ioctl returns the number of | ||
361 | frames the driver granted. Thus it is possible to build deeper queues | ||
362 | to avoid loosing frames on load peaks. | ||
363 | <p> | ||
364 | While capturing to memory the driver will make a "best effort" attempt | ||
365 | to capture to screen as well if requested. This normally means all | ||
366 | frames that "miss" memory mapped capture will go to the display. | ||
367 | <P> | ||
368 | A final ioctl exists to allow a device to obtain related devices if a | ||
369 | driver has multiple components (for example video0 may not be associated | ||
370 | with vbi0 which would cause an intercast display program to make a bad | ||
371 | mistake). The VIDIOCGUNIT ioctl reports the unit numbers of the associated | ||
372 | devices if any exist. The video_unit structure has the following fields. | ||
373 | <P> | ||
374 | <TABLE> | ||
375 | <TR><TD><b>video</b><TD>Video capture device</TD> | ||
376 | <TR><TD><b>vbi</b><TD>VBI capture device</TD> | ||
377 | <TR><TD><b>radio</b><TD>Radio device</TD> | ||
378 | <TR><TD><b>audio</b><TD>Audio mixer</TD> | ||
379 | <TR><TD><b>teletext</b><TD>Teletext device</TD> | ||
380 | </TABLE> | ||
381 | <P> | ||
382 | <H3>RDS Datastreams</H3> | ||
383 | For radio devices that support it, it is possible to receive Radio Data | ||
384 | System (RDS) data by means of a read() on the device. The data is packed in | ||
385 | groups of three, as follows: | ||
386 | <TABLE> | ||
387 | <TR><TD>First Octet</TD><TD>Least Significant Byte of RDS Block</TD></TR> | ||
388 | <TR><TD>Second Octet</TD><TD>Most Significant Byte of RDS Block | ||
389 | <TR><TD>Third Octet</TD><TD>Bit 7:</TD><TD>Error bit. Indicates that | ||
390 | an uncorrectable error occurred during reception of this block.</TD></TR> | ||
391 | <TR><TD> </TD><TD>Bit 6:</TD><TD>Corrected bit. Indicates that | ||
392 | an error was corrected for this data block.</TD></TR> | ||
393 | <TR><TD> </TD><TD>Bits 5-3:</TD><TD>Received Offset. Indicates the | ||
394 | offset received by the sync system.</TD></TR> | ||
395 | <TR><TD> </TD><TD>Bits 2-0:</TD><TD>Offset Name. Indicates the | ||
396 | offset applied to this data.</TD></TR> | ||
397 | </TABLE> | ||
398 | </BODY> | ||
399 | </HTML> | ||
diff --git a/Documentation/video4linux/CARDLIST.cx88 b/Documentation/video4linux/CARDLIST.cx88 index 216f705495cc..4377aa11f567 100644 --- a/Documentation/video4linux/CARDLIST.cx88 +++ b/Documentation/video4linux/CARDLIST.cx88 | |||
@@ -13,17 +13,17 @@ card=11 - Prolink PlayTV PVR | |||
13 | card=12 - ASUS PVR-416 | 13 | card=12 - ASUS PVR-416 |
14 | card=13 - MSI TV-@nywhere | 14 | card=13 - MSI TV-@nywhere |
15 | card=14 - KWorld/VStream XPert DVB-T | 15 | card=14 - KWorld/VStream XPert DVB-T |
16 | card=15 - DVICO FusionHDTV DVB-T1 | 16 | card=15 - DViCO FusionHDTV DVB-T1 |
17 | card=16 - KWorld LTV883RF | 17 | card=16 - KWorld LTV883RF |
18 | card=17 - DViCO - FusionHDTV 3 Gold | 18 | card=17 - DViCO FusionHDTV 3 Gold-Q |
19 | card=18 - Hauppauge Nova-T DVB-T | 19 | card=18 - Hauppauge Nova-T DVB-T |
20 | card=19 - Conexant DVB-T reference design | 20 | card=19 - Conexant DVB-T reference design |
21 | card=20 - Provideo PV259 | 21 | card=20 - Provideo PV259 |
22 | card=21 - DVICO FusionHDTV DVB-T Plus | 22 | card=21 - DViCO FusionHDTV DVB-T Plus |
23 | card=22 - digitalnow DNTV Live! DVB-T | 23 | card=22 - digitalnow DNTV Live! DVB-T |
24 | card=23 - pcHDTV HD3000 HDTV | 24 | card=23 - pcHDTV HD3000 HDTV |
25 | card=24 - Hauppauge WinTV 28xxx (Roslyn) models | 25 | card=24 - Hauppauge WinTV 28xxx (Roslyn) models |
26 | card=25 - Digital-Logic MICROSPACE Entertainment Center (MEC) | 26 | card=25 - Digital-Logic MICROSPACE Entertainment Center (MEC) |
27 | card=26 - IODATA GV/BCTV7E | 27 | card=26 - IODATA GV/BCTV7E |
28 | card=27 - PixelView PlayTV Ultra Pro (Stereo) | 28 | card=27 - PixelView PlayTV Ultra Pro (Stereo) |
29 | card=28 - DViCO - FusionHDTV 3 Gold-T | 29 | card=28 - DViCO FusionHDTV 3 Gold-T |
diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134 index d5ed95d28500..735e8ba02d9f 100644 --- a/Documentation/video4linux/CARDLIST.saa7134 +++ b/Documentation/video4linux/CARDLIST.saa7134 | |||
@@ -54,3 +54,9 @@ | |||
54 | 55 -> LifeView FlyDVB-T DUO [5168:0306] | 54 | 55 -> LifeView FlyDVB-T DUO [5168:0306] |
55 | 56 -> Avermedia AVerTV 307 [1461:a70a] | 55 | 56 -> Avermedia AVerTV 307 [1461:a70a] |
56 | 57 -> Avermedia AVerTV GO 007 FM [1461:f31f] | 56 | 57 -> Avermedia AVerTV GO 007 FM [1461:f31f] |
57 | 58 -> ADS Tech Instant TV (saa7135) [1421:0350,1421:0370] | ||
58 | 59 -> Kworld/Tevion V-Stream Xpert TV PVR7134 | ||
59 | 60 -> Typhoon DVB-T Duo Digital/Analog Cardbus | ||
60 | 61 -> Philips TOUGH DVB-T reference design | ||
61 | 62 -> Compro VideoMate TV Gold+II | ||
62 | 63 -> Kworld Xpert TV PVR7134 | ||
diff --git a/Documentation/video4linux/CARDLIST.tuner b/Documentation/video4linux/CARDLIST.tuner index aeb8df8ce890..e78020f68b2e 100644 --- a/Documentation/video4linux/CARDLIST.tuner +++ b/Documentation/video4linux/CARDLIST.tuner | |||
@@ -59,3 +59,6 @@ tuner=57 - Philips FQ1236A MK4 | |||
59 | tuner=58 - Ymec TVision TVF-8531MF | 59 | tuner=58 - Ymec TVision TVF-8531MF |
60 | tuner=59 - Ymec TVision TVF-5533MF | 60 | tuner=59 - Ymec TVision TVF-5533MF |
61 | tuner=60 - Thomson DDT 7611 (ATSC/NTSC) | 61 | tuner=60 - Thomson DDT 7611 (ATSC/NTSC) |
62 | tuner=61 - Tena TNF9533-D/IF | ||
63 | tuner=62 - Philips TEA5767HN FM Radio | ||
64 | tuner=63 - Philips FMD1216ME MK3 Hybrid Tuner | ||
diff --git a/Documentation/video4linux/README.saa7134 b/Documentation/video4linux/README.saa7134 index 1a446c65365e..1f788e498eff 100644 --- a/Documentation/video4linux/README.saa7134 +++ b/Documentation/video4linux/README.saa7134 | |||
@@ -57,6 +57,15 @@ Cards can use either of these two crystals (xtal): | |||
57 | - 24.576MHz -> .audio_clock=0x200000 | 57 | - 24.576MHz -> .audio_clock=0x200000 |
58 | (xtal * .audio_clock = 51539600) | 58 | (xtal * .audio_clock = 51539600) |
59 | 59 | ||
60 | Some details about 30/34/35: | ||
61 | |||
62 | - saa7130 - low-price chip, doesn't have mute, that is why all those | ||
63 | cards should have .mute field defined in their tuner structure. | ||
64 | |||
65 | - saa7134 - usual chip | ||
66 | |||
67 | - saa7133/35 - saa7135 is probably a marketing decision, since all those | ||
68 | chips identifies itself as 33 on pci. | ||
60 | 69 | ||
61 | Credits | 70 | Credits |
62 | ======= | 71 | ======= |