diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/usb/sn9c102.txt | 86 |
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 | |||
17 | 7. Module parameters | 17 | 7. Module parameters |
18 | 8. Optional device control through "sysfs" | 18 | 8. Optional device control through "sysfs" |
19 | 9. Supported devices | 19 | 9. Supported devices |
20 | 10. How to add plug-in's for new image sensors | 20 | 10. Notes for V4L2 application developers |
21 | 11. Notes for V4L2 application developers | 21 | 11. Video frame formats |
22 | 12. Video frame formats | 22 | 12. Contact information |
23 | 13. Contact information | 23 | 13. Credits |
24 | 14. Credits | ||
25 | 24 | ||
26 | 25 | ||
27 | 1. Copyright | 26 | 1. Copyright |
28 | ============ | 27 | ============ |
29 | Copyright (C) 2004-2005 by Luca Risolia <luca.risolia@studio.unibo.it> | 28 | Copyright (C) 2004-2006 by Luca Risolia <luca.risolia@studio.unibo.it> |
30 | 29 | ||
31 | 30 | ||
32 | 2. Disclaimer | 31 | 2. Disclaimer |
@@ -54,9 +53,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |||
54 | 53 | ||
55 | 4. Overview and features | 54 | 4. Overview and features |
56 | ======================== | 55 | ======================== |
57 | This driver attempts to support the video and audio streaming capabilities of | 56 | This driver attempts to support the video interface of the devices mounting the |
58 | the devices mounting the SONiX SN9C101, SN9C102 and SN9C103 PC Camera | 57 | SONiX SN9C101, SN9C102 and SN9C103 PC Camera Controllers. |
59 | Controllers. | ||
60 | 58 | ||
61 | It's worth to note that SONiX has never collaborated with the author during the | 59 | It's worth to note that SONiX has never collaborated with the author during the |
62 | development of this project, despite several requests for enough detailed | 60 | development 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 | ||
127 | The SN9C103 controller also provides a built-in microphone interface. It is | ||
128 | supported 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 | |||
128 | And finally: | 142 | And 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: | |||
153 | Module parameters are listed below: | 167 | Module parameters are listed below: |
154 | ------------------------------------------------------------------------------- | 168 | ------------------------------------------------------------------------------- |
155 | Name: video_nr | 169 | Name: video_nr |
156 | Type: int array (min = 0, max = 64) | 170 | Type: short array (min = 0, max = 64) |
157 | Syntax: <-1|n[,...]> | 171 | Syntax: <-1|n[,...]> |
158 | Description: Specify V4L2 minor mode number: | 172 | Description: 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. |
166 | Default: -1 | 180 | Default: -1 |
167 | ------------------------------------------------------------------------------- | 181 | ------------------------------------------------------------------------------- |
168 | Name: force_munmap; | 182 | Name: force_munmap |
169 | Type: bool array (min = 0, max = 64) | 183 | Type: bool array (min = 0, max = 64) |
170 | Syntax: <0|1[,...]> | 184 | Syntax: <0|1[,...]> |
171 | Description: Force the application to unmap previously mapped buffer memory | 185 | Description: 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) |
177 | Default: 0 | 191 | Default: 0 |
178 | ------------------------------------------------------------------------------- | 192 | ------------------------------------------------------------------------------- |
179 | Name: debug | 193 | Name: debug |
180 | Type: int | 194 | Type: ushort |
181 | Syntax: <n> | 195 | Syntax: <n> |
182 | Description: Debugging information level, from 0 to 3: | 196 | Description: 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. |
191 | Default: 2 | 205 | Default: 2 |
192 | ------------------------------------------------------------------------------- | 206 | ------------------------------------------------------------------------------- |
193 | 207 | ||
@@ -236,7 +250,7 @@ serialized. | |||
236 | 250 | ||
237 | The sysfs interface also provides the "frame_header" entry, which exports the | 251 | The sysfs interface also provides the "frame_header" entry, which exports the |
238 | frame header of the most recent requested and captured video frame. The header | 252 | frame header of the most recent requested and captured video frame. The header |
239 | is 12-bytes long and is appended to every video frame by the SN9C10x | 253 | is always 18-bytes long and is appended to every video frame by the SN9C10x |
240 | controllers. As an example, this additional information can be used by the user | 254 | controllers. As an example, this additional information can be used by the user |
241 | application for implementing auto-exposure features via software. | 255 | application for implementing auto-exposure features via software. |
242 | 256 | ||
@@ -250,7 +264,8 @@ Byte # Value Description | |||
250 | 0x03 0xC4 Frame synchronisation pattern. | 264 | 0x03 0xC4 Frame synchronisation pattern. |
251 | 0x04 0xC4 Frame synchronisation pattern. | 265 | 0x04 0xC4 Frame synchronisation pattern. |
252 | 0x05 0x96 Frame synchronisation pattern. | 266 | 0x05 0x96 Frame synchronisation pattern. |
253 | 0x06 0x00 or 0x01 Unknown meaning. The exact value depends on the chip. | 267 | 0x06 0xXX Unknown meaning. The exact value depends on the chip; |
268 | possible values are 0x00, 0x01 and 0x20. | ||
254 | 0x07 0xXX Variable value, whose bits are ff00uzzc, where ff is a | 269 | 0x07 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 | |||
287 | The following bytes are used by the SN9C103 bridge only: | ||
288 | |||
289 | 0x0C 0xXX Unknown meaning | ||
290 | 0x0D 0xXX Unknown meaning | ||
291 | 0x0E 0xXX Unknown meaning | ||
292 | 0x0F 0xXX Unknown meaning | ||
293 | 0x10 0xXX Unknown meaning | ||
294 | 0x11 0xXX Unknown meaning | ||
270 | 295 | ||
271 | The AE area (sx, sy, ex, ey) in the active window can be set by programming the | 296 | The AE area (sx, sy, ex, ey) in the active window can be set by programming the |
272 | registers 0x1c, 0x1d, 0x1e and 0x1f of the SN9C10x controllers, where one unit | 297 | registers 0x1c, 0x1d, 0x1e and 0x1f of the SN9C10x controllers, where one unit |
273 | corresponds to 32 pixels. | 298 | corresponds 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 | ||
278 | 9. Supported devices | 304 | 9. Supported devices |
@@ -298,6 +324,7 @@ Vendor ID Product ID | |||
298 | 0x0c45 0x602b | 324 | 0x0c45 0x602b |
299 | 0x0c45 0x602c | 325 | 0x0c45 0x602c |
300 | 0x0c45 0x602d | 326 | 0x0c45 0x602d |
327 | 0x0c45 0x602e | ||
301 | 0x0c45 0x6030 | 328 | 0x0c45 0x6030 |
302 | 0x0c45 0x6080 | 329 | 0x0c45 0x6080 |
303 | 0x0c45 0x6082 | 330 | 0x0c45 0x6082 |
@@ -348,18 +375,7 @@ appreciated. Non-available hardware will not be supported by the author of this | |||
348 | driver. | 375 | driver. |
349 | 376 | ||
350 | 377 | ||
351 | 10. How to add plug-in's for new image sensors | 378 | 10. Notes for V4L2 application developers |
352 | ============================================== | ||
353 | It should be easy to write plug-in's for new sensors by using the small API | ||
354 | that 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 | |||
358 | At the moment, possible unsupported image sensors are: CIS-VF10 (VGA), | ||
359 | OV7620 (VGA), OV7630 (VGA). | ||
360 | |||
361 | |||
362 | 11. Notes for V4L2 application developers | ||
363 | ========================================= | 379 | ========================================= |
364 | This driver follows the V4L2 API specifications. In particular, it enforces two | 380 | This driver follows the V4L2 API specifications. In particular, it enforces two |
365 | rules: | 381 | rules: |
@@ -394,7 +410,7 @@ initialized (as described in the documentation of the API for the image sensors | |||
394 | supplied by this driver). | 410 | supplied by this driver). |
395 | 411 | ||
396 | 412 | ||
397 | 12. Video frame formats [1] | 413 | 11. Video frame formats [1] |
398 | ======================= | 414 | ======================= |
399 | The SN9C10x PC Camera Controllers can send images in two possible video | 415 | The SN9C10x PC Camera Controllers can send images in two possible video |
400 | formats over the USB: either native "Sequential RGB Bayer" or Huffman | 416 | formats 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 | ||
458 | 13. Contact information | 474 | 12. Contact information |
459 | ======================= | 475 | ======================= |
460 | The author may be contacted by e-mail at <luca.risolia@studio.unibo.it>. | 476 | The 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 | |||
464 | the fingerprint is: '88E8 F32F 7244 68BA 3958 5D40 99DA 5D2A FCE6 35A4'. | 480 | the fingerprint is: '88E8 F32F 7244 68BA 3958 5D40 99DA 5D2A FCE6 35A4'. |
465 | 481 | ||
466 | 482 | ||
467 | 14. Credits | 483 | 13. Credits |
468 | =========== | 484 | =========== |
469 | Many thanks to following persons for their contribute (listed in alphabetical | 485 | Many thanks to following persons for their contribute (listed in alphabetical |
470 | order): | 486 | order): |
@@ -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. |