philips.txt 9.4 KB

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