This page describes how to use GR-Peach Audiocamera Shield within Linux.
For instructions on how to run mainline Linux on GR-Peach please refer to RZ-A/Boards/GR-PEACH-mainline
The audiocamera shield is better described by its official website, where schematics and other resources are available.
The shield is said not to come with any camera module, and mt9m111-based modules seems to be the suggested ones.
Some vendors (eg. Digikey) ships the shield with a camera module which has a connector compatible with CN15, but uses a sensor not currently supported by mainline Linux (mt9v111).
Several camera modules exist on the market with image sensors supported by Linux, just make sure their pin out is compatible with CN15 connector on camera module, or make your own adapter to use other modules.
Camera modules with on-board oscillator do not need any external reference clock. Most of the camera modules on the market ship with no oscillator installed and need an external clock source to work properly.
Audiocamera shield allows to install an oscillator with a frequency that matches the one required by the selected image sensor. The oscillator can be soldered on the bottom side of the board, indicated with 'X1' silk-screen label.
To use GR-Peach audiocamera shield on top of a mainline Linux release the following not yet merged components are required:
- A driver for GR-Pach Capture Engine Unit (CEU)
- Device tree updates to make use of the CEU interface
- A device tree source file for the audiocamera shield and the camera module
All of these components can be found at git://jmondi.org/linux gr-peach-ceu-elinux-v1
The tag includes a not-yet-upstream driver for CEU interface replacing the existing sh_mobile_ceu one, adds a new CEU sub-node entry to r7s72100.dtsi and creates a gr-peach-audiocamerashield.dtsi file which describes the audiocamera shield used in conjunction with a OV7670 camera module.
The new CEU driver supports capturing images in 3 different formats, two planar formats (NV12/NV16 and NV21/NV61 variants) and one non-planar YUYV format. The image resolution is limited by the image sensor capabilities (VGA sizes, 640x480).
It is possible to capture images using standard V4L2 tools, such as yavta.
Due to the limited amount of available memory in GR-Peach only a few buffers can be reserved for capturing images, even if with limited resolution.
An example command line to capture images in NV12 or YUYV formats are
yavta /dev/video0 -c 2 -n 2 -f YUYV -s 640x480 -F"yuyv#.bin" yavta /dev/video0 -c 2 -n 2 -f NV12 -s 320x240 -F"nv12#.bin"