philips.rst 9.7 KB

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