[libcamera-devel] [PATCH] libcamera Android Enhancements

Nicholas Roth nicholas at rothemail.net
Sun Oct 23 03:16:13 CEST 2022


All,

For your review, I propose a series of changes that make libcamera more
accessible for projects and individuals that wish to use it in Android.

These are the major changes:
* Adds Makefiles that allow mainline libcamera to build in-place with
Android distributions, including Waydroid
* Fixes Bug 159 (see Bugzilla), an LLVM bug that breaks libcamera on
Android 11 and below, which Waydroid uses
* Adds a flag that allows unsigned IPAs to run in-process with a stern
warning, because openssl and gnutls do not have mainiline Android builds
* Adds log messages to help people identify and fix issues (e.g., HAL
configuration file IDs)
* Adds thread-safety annotations for the raspberry pi IPA to allow it to
build for Android
* Adds metadata to the rkisp1 IPA that make it compatible with the HAL
implementation
* Adds metadata for the PinePhone Pro's image sensors based on mainline
Linux drivers

Attachments:
* patch_logcat.log: Android logcat validating the changes on real HW
* 0001-libcamera-Android-enhancements.patch: Patch file with the proposed
changes

Additional Android Notes:
On my test setup, my cameras appear correctly in Android settings /
diagnostic apps as I would expect. However, Android's Java-side camera
implementation throws an error when I try to get a picture from either
camera. I suspect that either the rkisp1 IPA needs additional work to play
nice with libcamera's Android HAL or the Android HAL itself needs work. I
plan to ask for feedback from other Waydroid users who want to use their
(Linux) phones or laptops with a camera on Android apps on GitHub to assist
with further debugging.

My full validation setup is documented here:
https://docs.google.com/document/d/1Sly_VH3w6wFIdE72WXijQegoHZh8IxEnJ9m0hH7GodU/edit

The "[WIP] Camera Support for PinePhone Pro" section contains details
specific to how I validate libcamera.

Thanks all, and I look forward to reading your thoughts!
-Nicholas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20221022/39e16ee1/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-libcamera-Android-enhancements.patch
Type: text/x-patch
Size: 42237 bytes
Desc: not available
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20221022/39e16ee1/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch_logcat.log
Type: text/x-log
Size: 3938014 bytes
Desc: not available
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20221022/39e16ee1/attachment-0003.bin>


More information about the libcamera-devel mailing list