Android Camera
Overview
i.MX6 platforms are capable of handling multiple cameras.(With some restriction)
See page: 20 - 30 http://cache.freescale.com/files/training/doc/ftf/2014/FTF-CON-F0119.pdf
Android Application can leverage the use of multiple cameras for capturing the video frames.
VAR-SOM-MX6 / DART-MX6 / Solo-Dual have MIPI / Parallel camera support, available on the development board.
Hardware Availability and Setup=
- VAR-SOM-MX6 Custom board:
CSI1 - MIPI Clock + 4 Data lanes are accessible via Carrier board header.
J17: MIPI - 4 Lane + CLK + I2C + GPIOs
CSI0 - Parallel camera pins are accesible via carrier board header.
J18: Parallel - 8 bit + I2C
For more details refer to: https://www.variscite.com/wp-content/uploads/2017/12/V2_VAR-MX6CustomBoard-Schematics.pdf
MIPI Camera Accessories Required: https://www.variscite.com/products/accessories/i-mx6-camera-board/
- VAR-DT6CustomBoard:
CSI1 - MIPI Clock + 2 Data lanes are accessible via carrier board header.
J13: MIPI - 2 Lane + CLK + I2C
CSI0 - Parallel camera pins are accesible via carrier board header.
J11: Parallel - 16 bit + I2C
For more details refer to: https://www.variscite.com/wp-content/uploads/2017/11/VAR-DT6CustomBoard-Schematics.pdf
- VAR-SOLOCustomBoard:
CSI1 - MIPI Clock +4 Data lanes are accessible via carrier board Headers.
J12: MIPI 2 Lane + CLK + I2C
CSI0 - Parallel camera 8 bit pins are accesible via carrier board header.
J8: Parallel - 8 bit + I2C
For more details refer to: https://www.variscite.com/wp-content/uploads/2017/12/VAR-SOLOCustomBoard-Schematics.pdf
MIPI Camera Accessories Required: https://www.variscite.com/products/accessories/426-vcam-ov5640-v5/
For maximum, supported resolution and combinations refer to http://cache.freescale.com/files/training/doc/ftf/2014/FTF-CON-F0119.pdf
page no 21 for more details and combination.
Note: i.MX6 platform doesn't have the SOC based Image Signal Processing (ISP) unit to convert bayer data to RGB and YUV.
i.MX6 platform relies on MIPI camera to convert the Bayer data to YUV format.
Connect the relevant camera accessories to the right connector.
Software Setup
Make sure you have the required hardware as per above.
MIPI Cameras
By default, MIPI cameras are supported out of the box.
Android System / Vendor images contain Camera HAL already support for OV5640 5MP support available.
You don't need to do any special build/addition below HAL if you are using the standard camera.
- For Android 7.1.1 and 7.1.2:
Source Path: <android_build>/hardware/imx/libcamera3/
- For Android 8.0.0:
Source Path: <android_build>/vendor/nxp-opensource/imx/libcamera3/
UVC Camera Setup
Change android_build/device/variscite/var_mx6/init.rc
$ setprop back_camera_name uvc
Change android_build/device/variscite/var_mx6/BoardConfig.mk
BOARD_HAVE_USB_CAMERA := true
Make sure your kernel have
$ CONFIG_USB_VIDEO_CLASS=y or add CONFIG_USB_VIDEO_CLASS=y
For that add CONFIG_USB_VIDEO_CLASS=y to arch/arm/configs/ and make sure you have UVC / USB WebCam driver enabled. Refer to: Customizing the Linux kernel for detailed steps about kernel customization. You may be able to find the UVC class USB drivers here:https://github.com/varigit//tree//drivers/media/usb