Can I use the D3 Camera on Dragonboard410c?

I have a question
can i use the D3 Camera on Dragonboard410c?
camera sensor is ov5640
OS is Android 5.0.1

The hardware works together but only the GNU/Linux operating systems (Debian or OE/RPB) have documentation and drivers.

Is there a way to convert a Linux driver to an Android driver?

For example, replace the driver under the “cameraV2” folder.

It is certainly possible to do this (although you might be better off finding and enabling the code to run the camera that is already in the Android release). However, in either cases, there is no documentation to help you learn how to do this. AFAIK the only application note Qualcomm published for their Android release was based on using a USB webcam.

It isn’t really a question of converting the driver from Linux to Android. Android is Linux, and thus uses Linux drivers. Android implements abstraction layers for access to most hardware in order that the hardware can be accessed in a standard way independent of the implementation of the driver for that hardware.

For example, you may have a camera on Linux with a v4l2 driver, or you may have a camera that uses a completely proprietary driver, or you may just have a video stream over the network. The HAL (hardware abstraction layer) is there to convert from whatever that original source happens to be, into what is expected by all the different Android applications.

So what you would need to do isn’t convert the driver, but write a HAL to USE the existing driver.

I quickly skimmed over their usb camera application note, and the instruction they give is to use an application that is specific to usb cameras. This suggests to me that they are NOT implementing a HAL at all, and are using the camera directly over the v4l2 interface.

Yes, it is not connected properly to the HAL APIs. Not sure its based on v4l2 though… I think the application might be providing a userspace UVC driver. I think that’s how most of the exotic hardware control apps from that era used to work.

Sort of.

Android 5 for DB410C uses the Qualcomm vendor kernel (based on v3.10 IIRC) whilst Debian for DB410C uses a v4.14 LTS kernel and is based on on upstream and backported mainline drivers. In the case of camera I believe the kernel drivers have diverged a lot.

It’s a good point about the HAL though. For cameras on Android a lot of the work is done in userspace within the HAL (to the extent I sometimes think of it as being a userspace driver with a kernel shim).