Mauro Carvalho Chehab | 8f6174a | 2016-07-17 16:32:50 -0300 | [diff] [blame] | 1 | The cafe_ccic driver |
| 2 | ==================== |
| 3 | |
| 4 | Author: Jonathan Corbet <corbet@lwn.net> |
| 5 | |
| 6 | Introdution |
| 7 | ----------- |
| 8 | |
Jonathan Corbet | d905b38 | 2006-11-04 09:25:53 -0300 | [diff] [blame] | 9 | "cafe_ccic" is a driver for the Marvell 88ALP01 "cafe" CMOS camera |
| 10 | controller. This is the controller found in first-generation OLPC systems, |
| 11 | and this driver was written with support from the OLPC project. |
| 12 | |
| 13 | Current status: the core driver works. It can generate data in YUV422, |
| 14 | RGB565, and RGB444 formats. (Anybody looking at the code will see RGB32 as |
| 15 | well, but that is a debugging aid which will be removed shortly). VGA and |
| 16 | QVGA modes work; CIF is there but the colors remain funky. Only the OV7670 |
| 17 | sensor is known to work with this controller at this time. |
| 18 | |
| 19 | To try it out: either of these commands will work: |
| 20 | |
Mauro Carvalho Chehab | 8f6174a | 2016-07-17 16:32:50 -0300 | [diff] [blame] | 21 | .. code-block:: none |
| 22 | |
| 23 | $ mplayer tv:// -tv driver=v4l2:width=640:height=480 -nosound |
| 24 | $ mplayer tv:// -tv driver=v4l2:width=640:height=480:outfmt=bgr16 -nosound |
Jonathan Corbet | d905b38 | 2006-11-04 09:25:53 -0300 | [diff] [blame] | 25 | |
| 26 | The "xawtv" utility also works; gqcam does not, for unknown reasons. |
| 27 | |
Mauro Carvalho Chehab | 8f6174a | 2016-07-17 16:32:50 -0300 | [diff] [blame] | 28 | Load time options |
| 29 | ----------------- |
| 30 | |
Jonathan Corbet | d905b38 | 2006-11-04 09:25:53 -0300 | [diff] [blame] | 31 | There are a few load-time options, most of which can be changed after |
| 32 | loading via sysfs as well: |
| 33 | |
| 34 | - alloc_bufs_at_load: Normally, the driver will not allocate any DMA |
| 35 | buffers until the time comes to transfer data. If this option is set, |
| 36 | then worst-case-sized buffers will be allocated at module load time. |
| 37 | This option nails down the memory for the life of the module, but |
| 38 | perhaps decreases the chances of an allocation failure later on. |
| 39 | |
| 40 | - dma_buf_size: The size of DMA buffers to allocate. Note that this |
| 41 | option is only consulted for load-time allocation; when buffers are |
| 42 | allocated at run time, they will be sized appropriately for the current |
| 43 | camera settings. |
| 44 | |
| 45 | - n_dma_bufs: The controller can cycle through either two or three DMA |
| 46 | buffers. Normally, the driver tries to use three buffers; on faster |
| 47 | systems, however, it will work well with only two. |
| 48 | |
| 49 | - min_buffers: The minimum number of streaming I/O buffers that the driver |
| 50 | will consent to work with. Default is one, but, on slower systems, |
| 51 | better behavior with mplayer can be achieved by setting to a higher |
| 52 | value (like six). |
| 53 | |
| 54 | - max_buffers: The maximum number of streaming I/O buffers; default is |
| 55 | ten. That number was carefully picked out of a hat and should not be |
| 56 | assumed to actually mean much of anything. |
| 57 | |
| 58 | - flip: If this boolean parameter is set, the sensor will be instructed to |
| 59 | invert the video image. Whether it makes sense is determined by how |
| 60 | your particular camera is mounted. |