]> bbs.cooldavid.org Git - net-next-2.6.git/blame - Documentation/video4linux/README.cpia
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[net-next-2.6.git] / Documentation / video4linux / README.cpia
CommitLineData
1da177e4
LT
1This is a driver for the CPiA PPC2 driven parallel connected
2Camera. For example the Creative WebcamII is CPiA driven.
3
4 ) [1]Peter Pregler, Linz 2000, published under the [2]GNU GPL
5
6---------------------------------------------------------------------------
7
8USAGE:
9
10General:
11========
12
131) 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
18cd /dev
19mknod video0 c 81 0
20ln -s video0 video
21
222) Compile the kernel (see below for the list of options to use),
23 configure your parport and reboot.
24
253) If all worked well you should get messages similar
26 to the following (your versions may be different) on the console:
27
28V4L-Driver for Vision CPiA based cameras v0.7.4
29parport0: read2 timeout.
30parport0: Multimedia device, VLSI Vision Ltd PPC2
31Parallel 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
38As modules:
39===========
40
41Make sure you have selected the following kernel options (you can
42select all stuff as modules):
43
44The cpia-stuff is in the section 'Character devices -> Video For Linux'.
45
46CONFIG_PARPORT=m
47CONFIG_PARPORT_PC=m
48CONFIG_PARPORT_PC_FIFO=y
49CONFIG_PARPORT_1284=y
50CONFIG_VIDEO_DEV=m
51CONFIG_VIDEO_CPIA=m
52CONFIG_VIDEO_CPIA_PP=m
53
54For autoloading of all those modules you need to tell module-init-tools
55some 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
57stuff):
58
59options parport_pc io=0x378 irq=7 dma=3
60alias char-major-81 cpia_pp
61
62The first line tells the dma/irq channels to use. Those _must_ match
63the settings of your BIOS. Do NOT simply use the values above. See
64Documentation/parport.txt for more information about this. The second
65line associates the video-device file with the driver. Of cause you
66can also load the modules once upon boot (usually done in /etc/modules).
67
68Linked into the kernel:
69=======================
70
71Make sure you have selected the following kernel options. Note that
72you cannot compile the parport-stuff as modules and the cpia-driver
73statically (the other way round is okay though).
74
75The cpia-stuff is in the section 'Character devices -> Video For Linux'.
76
77CONFIG_PARPORT=y
78CONFIG_PARPORT_PC=y
79CONFIG_PARPORT_PC_FIFO=y
80CONFIG_PARPORT_1284=y
81CONFIG_VIDEO_DEV=y
82CONFIG_VIDEO_CPIA=y
83CONFIG_VIDEO_CPIA_PP=y
84
85To use DMA/irq you will need to tell the kernel upon boot time the
86hardware configuration of the parport. You can give the boot-parameter
87at the LILO-prompt or specify it in lilo.conf. I use the following
88append-line in lilo.conf:
89
48773e68 90 append="parport=0x378,7,3"
1da177e4
LT
91
92See Documentation/parport.txt for more information about the
93configuration of the parport and the values given above. Do not simply
94use the values given above.
95
96---------------------------------------------------------------------------
97FEATURES:
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---------------------------------------------------------------------------
115TESTED 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
129See [3] for pointers to v4l-applications.
130
131---------------------------------------------------------------------------
132KNOWN 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---------------------------------------------------------------------------
148TODO:
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---------------------------------------------------------------------------
158IMPLEMENTATION NOTES:
159
160The camera can act in two modes, streaming or grabbing. Right now a
161polling grab-scheme is used. Maybe interrupt driven streaming will be
162used for a asynchronous mmap interface in the next major release of the
163driver. This might give a better frame rate.
164
165---------------------------------------------------------------------------
166THANKS (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
48773e68 178- Jarl Totland <Jarl.Totland@bdc.no> for setting up the mailing list
1da177e4
LT
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---------------------------------------------------------------------------
186REFERENCES
187
0ea6e611 188 1. http://www.risc.uni-linz.ac.at/
1da177e4
LT
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/