philips.rst 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. Philips webcams (pwc driver)
  2. ============================
  3. This file contains some additional information for the Philips and OEM webcams.
  4. E-mail: webcam@smcc.demon.nl Last updated: 2004-01-19
  5. Site: http://www.smcc.demon.nl/webcam/
  6. As of this moment, the following cameras are supported:
  7. * Philips PCA645
  8. * Philips PCA646
  9. * Philips PCVC675
  10. * Philips PCVC680
  11. * Philips PCVC690
  12. * Philips PCVC720/40
  13. * Philips PCVC730
  14. * Philips PCVC740
  15. * Philips PCVC750
  16. * Askey VC010
  17. * Creative Labs Webcam 5
  18. * Creative Labs Webcam Pro Ex
  19. * Logitech QuickCam 3000 Pro
  20. * Logitech QuickCam 4000 Pro
  21. * Logitech QuickCam Notebook Pro
  22. * Logitech QuickCam Zoom
  23. * Logitech QuickCam Orbit
  24. * Logitech QuickCam Sphere
  25. * Samsung MPC-C10
  26. * Samsung MPC-C30
  27. * Sotec Afina Eye
  28. * AME CU-001
  29. * Visionite VCS-UM100
  30. * Visionite VCS-UC300
  31. The main webpage for the Philips driver is at the address above. It contains
  32. a lot of extra information, a FAQ, and the binary plugin 'PWCX'. This plugin
  33. contains decompression routines that allow you to use higher image sizes and
  34. framerates; in addition the webcam uses less bandwidth on the USB bus (handy
  35. if you want to run more than 1 camera simultaneously). These routines fall
  36. under a NDA, and may therefore not be distributed as source; however, its use
  37. is completely optional.
  38. You can build this code either into your kernel, or as a module. I recommend
  39. the latter, since it makes troubleshooting a lot easier. The built-in
  40. microphone is supported through the USB Audio class.
  41. When you load the module you can set some default settings for the
  42. camera; some programs depend on a particular image-size or -format and
  43. don't know how to set it properly in the driver. The options are:
  44. size
  45. Can be one of 'sqcif', 'qsif', 'qcif', 'sif', 'cif' or
  46. 'vga', for an image size of resp. 128x96, 160x120, 176x144,
  47. 320x240, 352x288 and 640x480 (of course, only for those cameras that
  48. support these resolutions).
  49. fps
  50. Specifies the desired framerate. Is an integer in the range of 4-30.
  51. fbufs
  52. This parameter specifies the number of internal buffers to use for storing
  53. frames from the cam. This will help if the process that reads images from
  54. the cam is a bit slow or momentarily busy. However, on slow machines it
  55. only introduces lag, so choose carefully. The default is 3, which is
  56. reasonable. You can set it between 2 and 5.
  57. mbufs
  58. This is an integer between 1 and 10. It will tell the module the number of
  59. buffers to reserve for mmap(), VIDIOCCGMBUF, VIDIOCMCAPTURE and friends.
  60. The default is 2, which is adequate for most applications (double
  61. buffering).
  62. Should you experience a lot of 'Dumping frame...' messages during
  63. grabbing with a tool that uses mmap(), you might want to increase if.
  64. However, it doesn't really buffer images, it just gives you a bit more
  65. slack when your program is behind. But you need a multi-threaded or
  66. forked program to really take advantage of these buffers.
  67. The absolute maximum is 10, but don't set it too high! Every buffer takes
  68. up 460 KB of RAM, so unless you have a lot of memory setting this to
  69. something more than 4 is an absolute waste. This memory is only
  70. allocated during open(), so nothing is wasted when the camera is not in
  71. use.
  72. power_save
  73. When power_save is enabled (set to 1), the module will try to shut down
  74. the cam on close() and re-activate on open(). This will save power and
  75. turn off the LED. Not all cameras support this though (the 645 and 646
  76. don't have power saving at all), and some models don't work either (they
  77. will shut down, but never wake up). Consider this experimental. By
  78. default this option is disabled.
  79. compression (only useful with the plugin)
  80. With this option you can control the compression factor that the camera
  81. uses to squeeze the image through the USB bus. You can set the
  82. parameter between 0 and 3::
  83. 0 = prefer uncompressed images; if the requested mode is not available
  84. in an uncompressed format, the driver will silently switch to low
  85. compression.
  86. 1 = low compression.
  87. 2 = medium compression.
  88. 3 = high compression.
  89. High compression takes less bandwidth of course, but it could also
  90. introduce some unwanted artefacts. The default is 2, medium compression.
  91. See the FAQ on the website for an overview of which modes require
  92. compression.
  93. The compression parameter does not apply to the 645 and 646 cameras
  94. and OEM models derived from those (only a few). Most cams honour this
  95. parameter.
  96. leds
  97. This settings takes 2 integers, that define the on/off time for the LED
  98. (in milliseconds). One of the interesting things that you can do with
  99. this is let the LED blink while the camera is in use. This::
  100. leds=500,500
  101. will blink the LED once every second. But with::
  102. leds=0,0
  103. the LED never goes on, making it suitable for silent surveillance.
  104. By default the camera's LED is on solid while in use, and turned off
  105. when the camera is not used anymore.
  106. This parameter works only with the ToUCam range of cameras (720, 730, 740,
  107. 750) and OEMs. For other cameras this command is silently ignored, and
  108. the LED cannot be controlled.
  109. Finally: this parameters does not take effect UNTIL the first time you
  110. open the camera device. Until then, the LED remains on.
  111. dev_hint
  112. A long standing problem with USB devices is their dynamic nature: you
  113. never know what device a camera gets assigned; it depends on module load
  114. order, the hub configuration, the order in which devices are plugged in,
  115. and the phase of the moon (i.e. it can be random). With this option you
  116. can give the driver a hint as to what video device node (/dev/videoX) it
  117. should use with a specific camera. This is also handy if you have two
  118. cameras of the same model.
  119. A camera is specified by its type (the number from the camera model,
  120. like PCA645, PCVC750VC, etc) and optionally the serial number (visible
  121. in /sys/kernel/debug/usb/devices). A hint consists of a string with the
  122. following format::
  123. [type[.serialnumber]:]node
  124. The square brackets mean that both the type and the serialnumber are
  125. optional, but a serialnumber cannot be specified without a type (which
  126. would be rather pointless). The serialnumber is separated from the type
  127. by a '.'; the node number by a ':'.
  128. This somewhat cryptic syntax is best explained by a few examples::
  129. dev_hint=3,5 The first detected cam gets assigned
  130. /dev/video3, the second /dev/video5. Any
  131. other cameras will get the first free
  132. available slot (see below).
  133. dev_hint=645:1,680:2 The PCA645 camera will get /dev/video1,
  134. and a PCVC680 /dev/video2.
  135. dev_hint=645.0123:3,645.4567:0 The PCA645 camera with serialnumber
  136. 0123 goes to /dev/video3, the same
  137. camera model with the 4567 serial
  138. gets /dev/video0.
  139. dev_hint=750:1,4,5,6 The PCVC750 camera will get /dev/video1, the
  140. next 3 Philips cams will use /dev/video4
  141. through /dev/video6.
  142. Some points worth knowing:
  143. - Serialnumbers are case sensitive and must be written full, including
  144. leading zeroes (it's treated as a string).
  145. - If a device node is already occupied, registration will fail and
  146. the webcam is not available.
  147. - You can have up to 64 video devices; be sure to make enough device
  148. nodes in /dev if you want to spread the numbers.
  149. After /dev/video9 comes /dev/video10 (not /dev/videoA).
  150. - If a camera does not match any dev_hint, it will simply get assigned
  151. the first available device node, just as it used to be.
  152. trace
  153. In order to better detect problems, it is now possible to turn on a
  154. 'trace' of some of the calls the module makes; it logs all items in your
  155. kernel log at debug level.
  156. The trace variable is a bitmask; each bit represents a certain feature.
  157. If you want to trace something, look up the bit value(s) in the table
  158. below, add the values together and supply that to the trace variable.
  159. ====== ======= ================================================ =======
  160. Value Value Description Default
  161. (dec) (hex)
  162. ====== ======= ================================================ =======
  163. 1 0x1 Module initialization; this will log messages On
  164. while loading and unloading the module
  165. 2 0x2 probe() and disconnect() traces On
  166. 4 0x4 Trace open() and close() calls Off
  167. 8 0x8 read(), mmap() and associated ioctl() calls Off
  168. 16 0x10 Memory allocation of buffers, etc. Off
  169. 32 0x20 Showing underflow, overflow and Dumping frame On
  170. messages
  171. 64 0x40 Show viewport and image sizes Off
  172. 128 0x80 PWCX debugging Off
  173. ====== ======= ================================================ =======
  174. For example, to trace the open() & read() functions, sum 8 + 4 = 12,
  175. so you would supply trace=12 during insmod or modprobe. If
  176. you want to turn the initialization and probing tracing off, set trace=0.
  177. The default value for trace is 35 (0x23).
  178. Example::
  179. # modprobe pwc size=cif fps=15 power_save=1
  180. The fbufs, mbufs and trace parameters are global and apply to all connected
  181. cameras. Each camera has its own set of buffers.
  182. size and fps only specify defaults when you open() the device; this is to
  183. accommodate some tools that don't set the size. You can change these
  184. settings after open() with the Video4Linux ioctl() calls. The default of
  185. defaults is QCIF size at 10 fps.
  186. The compression parameter is semiglobal; it sets the initial compression
  187. preference for all camera's, but this parameter can be set per camera with
  188. the VIDIOCPWCSCQUAL ioctl() call.
  189. All parameters are optional.