cafe_ccic 2.4 KB

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