USB webcam support in Nougat Camera API

Viewed 1191

I am building a Nougat AOSP image for Raspberry Pi 3 following these instructions: https://github.com/tab-pi/platform_manifest. And I have a UVC-compatible USB webcam (Logitech C525) that I would like to access through Android Camera API.

So far the webcam is visible in UsbManager.getDeviceList() but Camera.getNumberOfCameras() returns 0.

I have customized the kernel so that there's a /dev/video0 appearing with the appropriate permissions when plugging the webcam:

$ adb shell ls -l /dev/video0
crw-rw---- 1 system camera 81,   0 2018-09-20 10:16 /dev/video0

I've tried to build the following HALs against my AOSP tree but they all fail:

To put it in a nutshell, how can I access a USB camera through the Android Camera API on the Raspberry Pi ?

2 Answers

You can try checking the init.rc file at location /device/fsl/. And set back_camera_name uvc . While booting up it looks for the specified default camera and it fails to initialize the camera driver when the mentioned camera is missing. I was facing the same issue in technexion imx6 boards. Also you find a board specific file which in case of technexion is init.i.MX6DL.rc which specifies the back_camera parameter.

Related