aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorLuca Risolia <luca.risolia@studio.unibo.it>2006-01-05 13:14:04 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-01-31 20:23:38 -0500
commita966f3e7512084f916049579067f532908ba3a49 (patch)
treeadc4bc3a3b781f4ebc8b169a286f8e60ab3e7e32 /Documentation
parentec7dc8d254985dc4a31858c2c7c7029290e223dd (diff)
[PATCH] USB: SN9C10x driver updates and bugfixes
SN9C10x driver updates and bugfixes. Changes: + new, - removed, * cleanup, @ bugfix: @ fix poll() @ Remove bad get_ctrl()'s * Reduce ioctl stack usage * Remove final ";" from some macro definitions * Better support for SN9C103 + Add sn9c102_write_regs() + Add 0x0c45/0x602d to the list of SN9C10x based devices + Add support for OV7630 image sensors + Provide support for the built-in microphone interface of the SN9C103 + Documentation updates + Add 0x0c45/0x602e to the list of SN9C10x based devices Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/usb/sn9c102.txt86
1 files changed, 51 insertions, 35 deletions
diff --git a/Documentation/usb/sn9c102.txt b/Documentation/usb/sn9c102.txt
index 3f8a119db31b..541b17fd27f6 100644
--- a/Documentation/usb/sn9c102.txt
+++ b/Documentation/usb/sn9c102.txt
@@ -17,16 +17,15 @@ Index
177. Module parameters 177. Module parameters
188. Optional device control through "sysfs" 188. Optional device control through "sysfs"
199. Supported devices 199. Supported devices
2010. How to add plug-in's for new image sensors 2010. Notes for V4L2 application developers
2111. Notes for V4L2 application developers 2111. Video frame formats
2212. Video frame formats 2212. Contact information
2313. Contact information 2313. Credits
2414. Credits
25 24
26 25
271. Copyright 261. Copyright
28============ 27============
29Copyright (C) 2004-2005 by Luca Risolia <luca.risolia@studio.unibo.it> 28Copyright (C) 2004-2006 by Luca Risolia <luca.risolia@studio.unibo.it>
30 29
31 30
322. Disclaimer 312. Disclaimer
@@ -54,9 +53,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
54 53
554. Overview and features 544. Overview and features
56======================== 55========================
57This driver attempts to support the video and audio streaming capabilities of 56This driver attempts to support the video interface of the devices mounting the
58the devices mounting the SONiX SN9C101, SN9C102 and SN9C103 PC Camera 57SONiX SN9C101, SN9C102 and SN9C103 PC Camera Controllers.
59Controllers.
60 58
61It's worth to note that SONiX has never collaborated with the author during the 59It's worth to note that SONiX has never collaborated with the author during the
62development of this project, despite several requests for enough detailed 60development of this project, despite several requests for enough detailed
@@ -78,6 +76,7 @@ Some of the features of the driver are:
78- available mmap or read/poll methods for video streaming through isochronous 76- available mmap or read/poll methods for video streaming through isochronous
79 data transfers; 77 data transfers;
80- automatic detection of image sensor; 78- automatic detection of image sensor;
79- support for built-in microphone interface;
81- support for any window resolutions and optional panning within the maximum 80- support for any window resolutions and optional panning within the maximum
82 pixel area of image sensor; 81 pixel area of image sensor;
83- image downscaling with arbitrary scaling factors from 1, 2 and 4 in both 82- image downscaling with arbitrary scaling factors from 1, 2 and 4 in both
@@ -96,7 +95,7 @@ Some of the features of the driver are:
96 parameters" paragraph); 95 parameters" paragraph);
97- up to 64 cameras can be handled at the same time; they can be connected and 96- up to 64 cameras can be handled at the same time; they can be connected and
98 disconnected from the host many times without turning off the computer, if 97 disconnected from the host many times without turning off the computer, if
99 your system supports hotplugging; 98 the system supports hotplugging;
100- no known bugs. 99- no known bugs.
101 100
102 101
@@ -125,6 +124,21 @@ necessary:
125 CONFIG_USB_UHCI_HCD=m 124 CONFIG_USB_UHCI_HCD=m
126 CONFIG_USB_OHCI_HCD=m 125 CONFIG_USB_OHCI_HCD=m
127 126
127The SN9C103 controller also provides a built-in microphone interface. It is
128supported by the USB Audio driver thanks to the ALSA API:
129
130 # Sound
131 #
132 CONFIG_SOUND=y
133
134 # Advanced Linux Sound Architecture
135 #
136 CONFIG_SND=m
137
138 # USB devices
139 #
140 CONFIG_SND_USB_AUDIO=m
141
128And finally: 142And finally:
129 143
130 # USB Multimedia devices 144 # USB Multimedia devices
@@ -153,7 +167,7 @@ analyze kernel messages and verify that the loading process has gone well:
153Module parameters are listed below: 167Module parameters are listed below:
154------------------------------------------------------------------------------- 168-------------------------------------------------------------------------------
155Name: video_nr 169Name: video_nr
156Type: int array (min = 0, max = 64) 170Type: short array (min = 0, max = 64)
157Syntax: <-1|n[,...]> 171Syntax: <-1|n[,...]>
158Description: Specify V4L2 minor mode number: 172Description: Specify V4L2 minor mode number:
159 -1 = use next available 173 -1 = use next available
@@ -165,19 +179,19 @@ Description: Specify V4L2 minor mode number:
165 other camera. 179 other camera.
166Default: -1 180Default: -1
167------------------------------------------------------------------------------- 181-------------------------------------------------------------------------------
168Name: force_munmap; 182Name: force_munmap
169Type: bool array (min = 0, max = 64) 183Type: bool array (min = 0, max = 64)
170Syntax: <0|1[,...]> 184Syntax: <0|1[,...]>
171Description: Force the application to unmap previously mapped buffer memory 185Description: Force the application to unmap previously mapped buffer memory
172 before calling any VIDIOC_S_CROP or VIDIOC_S_FMT ioctl's. Not 186 before calling any VIDIOC_S_CROP or VIDIOC_S_FMT ioctl's. Not
173 all the applications support this feature. This parameter is 187 all the applications support this feature. This parameter is
174 specific for each detected camera. 188 specific for each detected camera.
175 0 = do not force memory unmapping" 189 0 = do not force memory unmapping
176 1 = force memory unmapping (save memory)" 190 1 = force memory unmapping (save memory)
177Default: 0 191Default: 0
178------------------------------------------------------------------------------- 192-------------------------------------------------------------------------------
179Name: debug 193Name: debug
180Type: int 194Type: ushort
181Syntax: <n> 195Syntax: <n>
182Description: Debugging information level, from 0 to 3: 196Description: Debugging information level, from 0 to 3:
183 0 = none (use carefully) 197 0 = none (use carefully)
@@ -187,7 +201,7 @@ Description: Debugging information level, from 0 to 3:
187 Level 3 is useful for testing only, when only one device 201 Level 3 is useful for testing only, when only one device
188 is used. It also shows some more informations about the 202 is used. It also shows some more informations about the
189 hardware being detected. This parameter can be changed at 203 hardware being detected. This parameter can be changed at
190 runtime thanks to the /sys filesystem. 204 runtime thanks to the /sys filesystem interface.
191Default: 2 205Default: 2
192------------------------------------------------------------------------------- 206-------------------------------------------------------------------------------
193 207
@@ -236,7 +250,7 @@ serialized.
236 250
237The sysfs interface also provides the "frame_header" entry, which exports the 251The sysfs interface also provides the "frame_header" entry, which exports the
238frame header of the most recent requested and captured video frame. The header 252frame header of the most recent requested and captured video frame. The header
239is 12-bytes long and is appended to every video frame by the SN9C10x 253is always 18-bytes long and is appended to every video frame by the SN9C10x
240controllers. As an example, this additional information can be used by the user 254controllers. As an example, this additional information can be used by the user
241application for implementing auto-exposure features via software. 255application for implementing auto-exposure features via software.
242 256
@@ -250,7 +264,8 @@ Byte # Value Description
2500x03 0xC4 Frame synchronisation pattern. 2640x03 0xC4 Frame synchronisation pattern.
2510x04 0xC4 Frame synchronisation pattern. 2650x04 0xC4 Frame synchronisation pattern.
2520x05 0x96 Frame synchronisation pattern. 2660x05 0x96 Frame synchronisation pattern.
2530x06 0x00 or 0x01 Unknown meaning. The exact value depends on the chip. 2670x06 0xXX Unknown meaning. The exact value depends on the chip;
268 possible values are 0x00, 0x01 and 0x20.
2540x07 0xXX Variable value, whose bits are ff00uzzc, where ff is a 2690x07 0xXX Variable value, whose bits are ff00uzzc, where ff is a
255 frame counter, u is unknown, zz is a size indicator 270 frame counter, u is unknown, zz is a size indicator
256 (00 = VGA, 01 = SIF, 10 = QSIF) and c stands for 271 (00 = VGA, 01 = SIF, 10 = QSIF) and c stands for
@@ -267,12 +282,23 @@ Byte # Value Description
267 times the area outside of the specified AE area. For 282 times the area outside of the specified AE area. For
268 images that are not pure white, the value scales down 283 images that are not pure white, the value scales down
269 according to relative whiteness. 284 according to relative whiteness.
285 according to relative whiteness.
286
287The following bytes are used by the SN9C103 bridge only:
288
2890x0C 0xXX Unknown meaning
2900x0D 0xXX Unknown meaning
2910x0E 0xXX Unknown meaning
2920x0F 0xXX Unknown meaning
2930x10 0xXX Unknown meaning
2940x11 0xXX Unknown meaning
270 295
271The AE area (sx, sy, ex, ey) in the active window can be set by programming the 296The AE area (sx, sy, ex, ey) in the active window can be set by programming the
272registers 0x1c, 0x1d, 0x1e and 0x1f of the SN9C10x controllers, where one unit 297registers 0x1c, 0x1d, 0x1e and 0x1f of the SN9C10x controllers, where one unit
273corresponds to 32 pixels. 298corresponds to 32 pixels.
274 299
275[1] The frame header has been documented by Bertrik Sikken. 300[1] Part of the meaning of the frame header has been documented by Bertrik
301 Sikken.
276 302
277 303
2789. Supported devices 3049. Supported devices
@@ -298,6 +324,7 @@ Vendor ID Product ID
2980x0c45 0x602b 3240x0c45 0x602b
2990x0c45 0x602c 3250x0c45 0x602c
3000x0c45 0x602d 3260x0c45 0x602d
3270x0c45 0x602e
3010x0c45 0x6030 3280x0c45 0x6030
3020x0c45 0x6080 3290x0c45 0x6080
3030x0c45 0x6082 3300x0c45 0x6082
@@ -348,18 +375,7 @@ appreciated. Non-available hardware will not be supported by the author of this
348driver. 375driver.
349 376
350 377
35110. How to add plug-in's for new image sensors 37810. Notes for V4L2 application developers
352==============================================
353It should be easy to write plug-in's for new sensors by using the small API
354that has been created for this purpose, which is present in "sn9c102_sensor.h"
355(documentation is included there). As an example, have a look at the code in
356"sn9c102_pas106b.c", which uses the mentioned interface.
357
358At the moment, possible unsupported image sensors are: CIS-VF10 (VGA),
359OV7620 (VGA), OV7630 (VGA).
360
361
36211. Notes for V4L2 application developers
363========================================= 379=========================================
364This driver follows the V4L2 API specifications. In particular, it enforces two 380This driver follows the V4L2 API specifications. In particular, it enforces two
365rules: 381rules:
@@ -394,7 +410,7 @@ initialized (as described in the documentation of the API for the image sensors
394supplied by this driver). 410supplied by this driver).
395 411
396 412
39712. Video frame formats [1] 41311. Video frame formats [1]
398======================= 414=======================
399The SN9C10x PC Camera Controllers can send images in two possible video 415The SN9C10x PC Camera Controllers can send images in two possible video
400formats over the USB: either native "Sequential RGB Bayer" or Huffman 416formats over the USB: either native "Sequential RGB Bayer" or Huffman
@@ -455,7 +471,7 @@ The following Huffman codes have been found:
455 documented by Bertrik Sikken. 471 documented by Bertrik Sikken.
456 472
457 473
45813. Contact information 47412. Contact information
459======================= 475=======================
460The author may be contacted by e-mail at <luca.risolia@studio.unibo.it>. 476The author may be contacted by e-mail at <luca.risolia@studio.unibo.it>.
461 477
@@ -464,7 +480,7 @@ GPG/PGP encrypted e-mail's are accepted. The GPG key ID of the author is
464the fingerprint is: '88E8 F32F 7244 68BA 3958 5D40 99DA 5D2A FCE6 35A4'. 480the fingerprint is: '88E8 F32F 7244 68BA 3958 5D40 99DA 5D2A FCE6 35A4'.
465 481
466 482
46714. Credits 48313. Credits
468=========== 484===========
469Many thanks to following persons for their contribute (listed in alphabetical 485Many thanks to following persons for their contribute (listed in alphabetical
470order): 486order):
@@ -480,5 +496,5 @@ order):
480- Bertrik Sikken, who reverse-engineered and documented the Huffman compression 496- Bertrik Sikken, who reverse-engineered and documented the Huffman compression
481 algorithm used in the SN9C10x controllers and implemented the first decoder; 497 algorithm used in the SN9C10x controllers and implemented the first decoder;
482- Mizuno Takafumi for the donation of a webcam; 498- Mizuno Takafumi for the donation of a webcam;
483- An "anonymous" donator (who didn't want his name to be revealed) for the 499- an "anonymous" donator (who didn't want his name to be revealed) for the
484 donation of a webcam. 500 donation of a webcam.