X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=Documentation%2Fusb%2Fsn9c102.txt;h=3999069b94bcf90be9607108770d60ff41e9a202;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=65018c8c992042b3b264810f4ff26cf23d826ccf;hpb=a2c21200f1c81b08cb55e417b68150bba439b646;p=linux-2.6.git diff --git a/Documentation/usb/sn9c102.txt b/Documentation/usb/sn9c102.txt index 65018c8c9..3999069b9 100644 --- a/Documentation/usb/sn9c102.txt +++ b/Documentation/usb/sn9c102.txt @@ -14,10 +14,10 @@ Index 4. Module dependencies 5. Module loading 6. Module parameters -7. Device control through "sysfs" +7. Optional device control through "sysfs" 8. Supported devices 9. How to add support for new image sensors -10. Note for V4L2 developers +10. Notes for V4L2 application developers 11. Contact information 12. Credits @@ -142,23 +142,21 @@ Description: Debugging information level, from 0 to 3: 1 = critical errors 2 = significant informations 3 = more verbose messages - Level 3 is useful for testing only, when just one device + Level 3 is useful for testing only, when only one device is used. Default: 2 ------------------------------------------------------------------------------- -7. Device control through "sysfs" -================================= +7. Optional device control through "sysfs" +========================================== It is possible to read and write both the SN9C10[12] and the image sensor registers by using the "sysfs" filesystem interface. -Every time a supported device is recognized, read-only files named "redblue" -and "green" are created in the /sys/class/video4linux/videoX directory. You can -set the red, blue and green channel's gain by writing the desired value to -them. The value may range from 0 to 15 for each channel; this means that -"redblue" accepts 8-bit values, where the low 4 bits are reserved for red and -the others for blue. +Every time a supported device is recognized, a read-only file named "green" is +created in the /sys/class/video4linux/videoX directory. You can set the green +channel's gain by writing the desired value to it. The value may range from 0 +to 15. There are other four entries in the directory above for each registered camera: "reg", "val", "i2c_reg" and "i2c_val". The first two files control the @@ -208,7 +206,7 @@ Vendor ID Product ID 0xc45 0x6029 0xc45 0x602a 0xc45 0x602c -0xc45 0x8001 +0xc45 0x6030 The list above does NOT imply that all those devices work with this driver: up until now only the ones that mount the following image sensors are supported. @@ -217,6 +215,7 @@ Kernel messages will always tell you whether this is the case: Model Manufacturer ----- ------------ PAS106B PixArt Imaging Inc. +PAS202BCB PixArt Imaging Inc. TAS5110C1B Taiwan Advanced Sensor Corporation TAS5130D1B Taiwan Advanced Sensor Corporation @@ -239,23 +238,31 @@ have created for this purpose, which is present in "sn9c102_sensor.h" (documentation is included there). As an example, have a look at the code in "sn9c102_pas106b.c", which uses the mentioned interface. -At the moment, not yet supported image sensors are: PAS202B (VGA), -HV7131[D|E1] (VGA), MI03 (VGA), OV7620 (VGA). +At the moment, not yet supported image sensors are: HV7131[D|E1] (VGA), +MI03 (VGA), OV7620 (VGA). -10. Note for V4L2 developers -============================ +10. Notes for V4L2 application developers +========================================= This driver follows the V4L2 API specifications. In particular, it enforces two rules: -1) Exactly one I/O method, either "mmap" or "read", is associated with each +- exactly one I/O method, either "mmap" or "read", is associated with each file descriptor. Once it is selected, the application must close and reopen the -device to switch to the other I/O method. +device to switch to the other I/O method; -2) Previously mapped buffer memory must always be unmapped before calling any -of the "VIDIOC_S_CROP", "VIDIOC_TRY_FMT" and "VIDIOC_S_FMT" ioctl's. In case, -the same number of buffers as before will be allocated again to match the size -of the new video frames, so you have to map them again before any I/O attempts. +- previously mapped buffer memory must always be unmapped before calling any +of the "VIDIOC_S_CROP", "VIDIOC_TRY_FMT" and "VIDIOC_S_FMT" ioctl's. The same +number of buffers as before will be allocated again to match the size of the +new video frames, so you have to map them again before any I/O attempts. + +Consistently with the hardware limits, this driver also supports image +downscaling with arbitrary scaling factors from 1, 2 and 4 in both directions. +However the V4L2 API specifications don't correctly define how the scaling +factor can be choosen arbitrarily by the "negotiation" of the "source" and +"target" rectangles. To work around this flaw, we have added the convention +that, during the negotiation, whenever the "VIDIOC_S_CROP" ioctl is issued, the +scaling factor is restored to 1. 11. Contact information @@ -273,4 +280,6 @@ I would thank the following persons: - Stefano Mozzi, who donated 45 EU; - Luca Capello for the donation of a webcam; -- Mizuno Takafumi for the donation of a webcam. +- Mizuno Takafumi for the donation of a webcam; +- Carlos Eduardo Medaglia Dyonisio, who added the support for the PAS202BCB + image sensor.