README.cpia 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. This is a driver for the CPiA PPC2 driven parallel connected
  2. Camera. For example the Creative WebcamII is CPiA driven.
  3. ) [1]Peter Pregler, Linz 2000, published under the [2]GNU GPL
  4. ---------------------------------------------------------------------------
  5. USAGE:
  6. General:
  7. ========
  8. 1) Make sure you have created the video devices (/dev/video*):
  9. - if you have a recent MAKEDEV do a 'cd /dev;./MAKEDEV video'
  10. - otherwise do a:
  11. cd /dev
  12. mknod video0 c 81 0
  13. ln -s video0 video
  14. 2) Compile the kernel (see below for the list of options to use),
  15. configure your parport and reboot.
  16. 3) If all worked well you should get messages similar
  17. to the following (your versions may be different) on the console:
  18. V4L-Driver for Vision CPiA based cameras v0.7.4
  19. parport0: read2 timeout.
  20. parport0: Multimedia device, VLSI Vision Ltd PPC2
  21. Parallel port driver for Vision CPiA based camera
  22. CPIA Version: 1.20 (2.0)
  23. CPIA PnP-ID: 0553:0002:0100
  24. VP-Version: 1.0 0100
  25. 1 camera(s) found
  26. As modules:
  27. ===========
  28. Make sure you have selected the following kernel options (you can
  29. select all stuff as modules):
  30. The cpia-stuff is in the section 'Character devices -> Video For Linux'.
  31. CONFIG_PARPORT=m
  32. CONFIG_PARPORT_PC=m
  33. CONFIG_PARPORT_PC_FIFO=y
  34. CONFIG_PARPORT_1284=y
  35. CONFIG_VIDEO_DEV=m
  36. CONFIG_VIDEO_CPIA=m
  37. CONFIG_VIDEO_CPIA_PP=m
  38. For autoloading of all those modules you need to tell module-init-tools
  39. some stuff. Add the following line to your module-init-tools config-file
  40. (e.g. /etc/modprobe.conf or wherever your distribution does store that
  41. stuff):
  42. options parport_pc io=0x378 irq=7 dma=3
  43. alias char-major-81 cpia_pp
  44. The first line tells the dma/irq channels to use. Those _must_ match
  45. the settings of your BIOS. Do NOT simply use the values above. See
  46. Documentation/parport.txt for more information about this. The second
  47. line associates the video-device file with the driver. Of cause you
  48. can also load the modules once upon boot (usually done in /etc/modules).
  49. Linked into the kernel:
  50. =======================
  51. Make sure you have selected the following kernel options. Note that
  52. you cannot compile the parport-stuff as modules and the cpia-driver
  53. statically (the other way round is okay though).
  54. The cpia-stuff is in the section 'Character devices -> Video For Linux'.
  55. CONFIG_PARPORT=y
  56. CONFIG_PARPORT_PC=y
  57. CONFIG_PARPORT_PC_FIFO=y
  58. CONFIG_PARPORT_1284=y
  59. CONFIG_VIDEO_DEV=y
  60. CONFIG_VIDEO_CPIA=y
  61. CONFIG_VIDEO_CPIA_PP=y
  62. To use DMA/irq you will need to tell the kernel upon boot time the
  63. hardware configuration of the parport. You can give the boot-parameter
  64. at the LILO-prompt or specify it in lilo.conf. I use the following
  65. append-line in lilo.conf:
  66. append="parport=0x378,7,3"
  67. See Documentation/parport.txt for more information about the
  68. configuration of the parport and the values given above. Do not simply
  69. use the values given above.
  70. ---------------------------------------------------------------------------
  71. FEATURES:
  72. - mmap/read v4l-interface (but no overlay)
  73. - image formats: CIF/QCIF, SIF/QSIF, various others used by isabel;
  74. note: all sizes except CIF/QCIF are implemented by clipping, i.e.
  75. pixels are not uploaded from the camera
  76. - palettes: VIDEO_PALETTE_GRAY, VIDEO_PALETTE_RGB565, VIDEO_PALETTE_RGB555,
  77. VIDEO_PALETTE_RGB24, VIDEO_PALETTE_RGB32, VIDEO_PALETTE_YUYV,
  78. VIDEO_PALETTE_UYVY, VIDEO_PALETTE_YUV422
  79. - state information (color balance, exposure, ...) is preserved between
  80. device opens
  81. - complete control over camera via proc-interface (_all_ camera settings are
  82. supported), there is also a python-gtk application available for this [3]
  83. - works under SMP (but the driver is completely serialized and synchronous)
  84. so you get no benefit from SMP, but at least it does not crash your box
  85. - might work for non-Intel architecture, let us know about this
  86. ---------------------------------------------------------------------------
  87. TESTED APPLICATIONS:
  88. - a simple test application based on Xt is available at [3]
  89. - another test-application based on gqcam-0.4 (uses GTK)
  90. - gqcam-0.6 should work
  91. - xawtv-3.x (also the webcam software)
  92. - xawtv-2.46
  93. - w3cam (cgi-interface and vidcat, e.g. you may try out 'vidcat |xv
  94. -maxpect -root -quit +noresetroot -rmode 5 -')
  95. - vic, the MBONE video conferencing tool (version 2.8ucl4-1)
  96. - isabel 3R4beta (barely working, but AFAICT all the problems are on
  97. their side)
  98. - camserv-0.40
  99. See [3] for pointers to v4l-applications.
  100. ---------------------------------------------------------------------------
  101. KNOWN PROBLEMS:
  102. - some applications do not handle the image format correctly, you will
  103. see strange horizontal stripes instead of a nice picture -> make sure
  104. your application does use a supported image size or queries the driver
  105. for the actually used size (reason behind this: the camera cannot
  106. provide any image format, so if size NxM is requested the driver will
  107. use a format to the closest fitting N1xM1, the application should now
  108. query for this granted size, most applications do not).
  109. - all the todo ;)
  110. - if there is not enough light and the picture is too dark try to
  111. adjust the SetSensorFPS setting, automatic frame rate adjustment
  112. has its price
  113. - do not try out isabel 3R4beta (built 135), you will be disappointed
  114. ---------------------------------------------------------------------------
  115. TODO:
  116. - multiple camera support (struct camera or something) - This should work,
  117. but hasn't been tested yet.
  118. - architecture independence?
  119. - SMP-safe asynchronous mmap interface
  120. - nibble mode for old parport interfaces
  121. - streaming capture, this should give a performance gain
  122. ---------------------------------------------------------------------------
  123. IMPLEMENTATION NOTES:
  124. The camera can act in two modes, streaming or grabbing. Right now a
  125. polling grab-scheme is used. Maybe interrupt driven streaming will be
  126. used for a asynchronous mmap interface in the next major release of the
  127. driver. This might give a better frame rate.
  128. ---------------------------------------------------------------------------
  129. THANKS (in no particular order):
  130. - Scott J. Bertin <sbertin@mindspring.com> for cleanups, the proc-filesystem
  131. and much more
  132. - Henry Bruce <whb@vvl.co.uk> for providing developers information about
  133. the CPiA chip, I wish all companies would treat Linux as seriously
  134. - Karoly Erdei <Karoly.Erdei@risc.uni-linz.ac.at> and RISC-Linz for being
  135. my boss ;) resp. my employer and for providing me the hardware and
  136. allow me to devote some working time to this project
  137. - Manuel J. Petit de Gabriel <mpetit@dit.upm.es> for providing help
  138. with Isabel (http://isabel.dit.upm.es/)
  139. - Bas Huisman <bhuism@cs.utwente.nl> for writing the initial parport code
  140. - Jarl Totland <Jarl.Totland@bdc.no> for setting up the mailing list
  141. and maintaining the web-server[3]
  142. - Chris Whiteford <Chris@informinteractive.com> for fixes related to the
  143. 1.02 firmware
  144. - special kudos to all the tester whose machines crashed and/or
  145. will crash. :)
  146. ---------------------------------------------------------------------------
  147. REFERENCES
  148. 1. http://www.risc.uni-linz.ac.at/people/ppregler
  149. mailto:Peter_Pregler@email.com
  150. 2. see the file COPYING in the top directory of the kernel tree
  151. 3. http://webcam.sourceforge.net/