2 ZC0301 Image Processor and Control Chip
4 =======================================
14 4. Overview and features
15 5. Module dependencies
19 9. Notes for V4L2 application developers
20 10. Contact information
26 Copyright (C) 2006 by Luca Risolia <luca.risolia@studio.unibo.it>
31 This software is not developed or sponsored by Z-Star Microelectronics Corp.
32 Trademarks are property of their respective owner.
37 This program is free software; you can redistribute it and/or modify
38 it under the terms of the GNU General Public License as published by
39 the Free Software Foundation; either version 2 of the License, or
40 (at your option) any later version.
42 This program is distributed in the hope that it will be useful,
43 but WITHOUT ANY WARRANTY; without even the implied warranty of
44 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45 GNU General Public License for more details.
47 You should have received a copy of the GNU General Public License
48 along with this program; if not, write to the Free Software
49 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
52 4. Overview and features
53 ========================
54 This driver supports the video interface of the devices mounting the ZC0301
55 Image Processor and Control Chip.
57 The driver relies on the Video4Linux2 and USB core modules. It has been
58 designed to run properly on SMP systems as well.
60 The latest version of the ZC0301 driver can be found at the following URL:
61 http://www.linux-projects.org/
63 Some of the features of the driver are:
65 - full compliance with the Video4Linux2 API (see also "Notes for V4L2
66 application developers" paragraph);
67 - available mmap or read/poll methods for video streaming through isochronous
69 - automatic detection of image sensor;
70 - video format is standard JPEG;
71 - dynamic driver control thanks to various module parameters (see "Module
72 parameters" paragraph);
73 - up to 64 cameras can be handled at the same time; they can be connected and
74 disconnected from the host many times without turning off the computer, if
75 the system supports hotplugging;
78 5. Module dependencies
79 ======================
80 For it to work properly, the driver needs kernel support for Video4Linux and
83 The following options of the kernel configuration file must be enabled and
84 corresponding modules must be compiled:
94 In addition, depending on the hardware being used, the modules below are
97 # USB Host Controller Drivers
100 CONFIG_USB_UHCI_HCD=m
101 CONFIG_USB_OHCI_HCD=m
103 The ZC0301 controller also provides a built-in microphone interface. It is
104 supported by the USB Audio driver thanks to the ALSA API:
110 # Advanced Linux Sound Architecture
116 CONFIG_SND_USB_AUDIO=m
120 # USB Multimedia devices
127 To use the driver, it is necessary to load the "zc0301" module into memory
128 after every other module required: "videodev", "usbcore" and, depending on
129 the USB host controller you have, "ehci-hcd", "uhci-hcd" or "ohci-hcd".
131 Loading can be done as shown below:
133 [root@localhost home]# modprobe zc0301
135 At this point the devices should be recognized. You can invoke "dmesg" to
136 analyze kernel messages and verify that the loading process has gone well:
138 [user@localhost home]$ dmesg
143 Module parameters are listed below:
144 -------------------------------------------------------------------------------
146 Type: short array (min = 0, max = 64)
148 Description: Specify V4L2 minor mode number:
149 -1 = use next available
150 n = use minor number n
151 You can specify up to 64 cameras this way.
153 video_nr=-1,2,-1 would assign minor number 2 to the second
154 registered camera and use auto for the first one and for every
157 -------------------------------------------------------------------------------
159 Type: bool array (min = 0, max = 64)
161 Description: Force the application to unmap previously mapped buffer memory
162 before calling any VIDIOC_S_CROP or VIDIOC_S_FMT ioctl's. Not
163 all the applications support this feature. This parameter is
164 specific for each detected camera.
165 0 = do not force memory unmapping
166 1 = force memory unmapping (save memory)
168 -------------------------------------------------------------------------------
170 Type: uint array (min = 0, max = 64)
172 Description: Timeout for a video frame in seconds. This parameter is
173 specific for each detected camera. This parameter can be
174 changed at runtime thanks to the /sys filesystem interface.
176 -------------------------------------------------------------------------------
180 Description: Debugging information level, from 0 to 3:
181 0 = none (use carefully)
183 2 = significant informations
184 3 = more verbose messages
185 Level 3 is useful for testing only, when only one device
186 is used at the same time. It also shows some more informations
187 about the hardware being detected. This module parameter can be
188 changed at runtime thanks to the /sys filesystem interface.
190 -------------------------------------------------------------------------------
195 None of the names of the companies as well as their products will be mentioned
196 here. They have never collaborated with the author, so no advertising.
198 From the point of view of a driver, what unambiguously identify a device are
199 its vendor and product USB identifiers. Below is a list of known identifiers of
200 devices mounting the ZC0301 Image Processor and Control Chips:
213 The list above does not imply that all those devices work with this driver: up
214 until now only the ones that mount the following image sensors are supported;
215 kernel messages will always tell you whether this is the case:
219 PAS202BCB PixArt Imaging, Inc.
222 9. Notes for V4L2 application developers
223 ========================================
224 This driver follows the V4L2 API specifications. In particular, it enforces two
227 - exactly one I/O method, either "mmap" or "read", is associated with each
228 file descriptor. Once it is selected, the application must close and reopen the
229 device to switch to the other I/O method;
231 - although it is not mandatory, previously mapped buffer memory should always
232 be unmapped before calling any "VIDIOC_S_CROP" or "VIDIOC_S_FMT" ioctl's.
233 The same number of buffers as before will be allocated again to match the size
234 of the new video frames, so you have to map the buffers again before any I/O
238 10. Contact information
239 =======================
240 The author may be contacted by e-mail at <luca.risolia@studio.unibo.it>.
242 GPG/PGP encrypted e-mail's are accepted. The GPG key ID of the author is
243 'FCE635A4'; the public 1024-bit key should be available at any keyserver;
244 the fingerprint is: '88E8 F32F 7244 68BA 3958 5D40 99DA 5D2A FCE6 35A4'.
249 - Informations about the chip internals needed to enable the I2C protocol have
250 been taken from the documentation of the ZC030x Video4Linux1 driver written
251 by Andrew Birkett <andy@nobugs.org>;
252 - The initialization values of the ZC0301 controller connected to the PAS202BCB
253 image sensor have been taken from the SPCA5XX driver maintained by
254 Michel Xhaard <mxhaard@magic.fr>.