<div dir="ltr"><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div style="font-size:12.8px"><div style="font-size:12.8px"><div style="color:rgb(136,136,136);font-size:small"><font face="arial, helvetica, sans-serif" color="#000000">All,</font></div><div style="color:rgb(136,136,136);font-size:small"><font face="arial, helvetica, sans-serif" color="#000000"><br></font></div><div style="color:rgb(136,136,136);font-size:small"><font face="arial, helvetica, sans-serif" color="#000000">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.</font></div><div style="color:rgb(136,136,136);font-size:small"><font face="arial, helvetica, sans-serif" color="#000000"><br></font></div><div style="color:rgb(136,136,136);font-size:small"><font face="arial, helvetica, sans-serif" color="#000000">These are the major changes:</font></div><div style="color:rgb(136,136,136);font-size:small"><font face="arial, helvetica, sans-serif" color="#000000">* Adds Makefiles that allow mainline libcamera to build in-place with Android distributions, including Waydroid</font></div><div style="font-size:small"><font color="#000000" face="arial, helvetica, sans-serif">* Fixes Bug 159 (see Bugzilla), an LLVM bug that breaks libcamera on Android 11 and below, which Waydroid uses</font></div><div style="font-size:small"><font color="#000000" face="arial, helvetica, sans-serif">* 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<br>* Adds log messages to help people identify and fix issues (e.g., HAL configuration file IDs)</font></div><div style="font-size:small"><font color="#000000" face="arial, helvetica, sans-serif">* Adds thread-safety annotations for the raspberry pi IPA to allow it to build for Android</font></div><div style="font-size:small"><font color="#000000" face="arial, helvetica, sans-serif">* Adds metadata to the rkisp1 IPA that make it compatible with the HAL implementation</font></div><div style="font-size:small"><font color="#000000" face="arial, helvetica, sans-serif">* Adds metadata for the PinePhone Pro's image sensors based on mainline Linux drivers<br></font></div><div style="font-size:small"><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div style="font-size:small"><font color="#000000" face="arial, helvetica, sans-serif">Attachments:</font></div><div style="font-size:small"><font color="#000000" face="arial, helvetica, sans-serif">* patch_logcat.log: Android logcat validating the changes on real HW</font></div><div style="font-size:small"><font color="#000000" face="arial, helvetica, sans-serif">* </font><span style="font-size:12.8px">0001-libcamera-Android-enhancements.patch: Patch file with the proposed changes</span></div><div style="font-size:small"><span style="font-size:12.8px"><br></span></div><div style="font-size:small"><span style="font-size:12.8px">Additional Android Notes:</span></div><div style="font-size:small"><span style="font-size:12.8px">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.</span></div><div style="font-size:small"><span style="font-size:12.8px"><br></span></div><div style="font-size:small"><span style="font-size:12.8px">My full validation setup is documented here: </span><span style="font-size:12.8px"><a href="https://docs.google.com/document/d/1Sly_VH3w6wFIdE72WXijQegoHZh8IxEnJ9m0hH7GodU/edit">https://docs.google.com/document/d/1Sly_VH3w6wFIdE72WXijQegoHZh8IxEnJ9m0hH7GodU/edit</a></span></div><div style="font-size:small"><br></div><div style="font-size:small">The "[WIP] Camera Support for PinePhone Pro" section contains details specific to how I validate libcamera.</div><div style="font-size:small"><br></div><div style="font-size:small">Thanks all, and I look forward to reading your thoughts!</div><div style="font-size:small">-Nicholas</div><div style="font-size:small"><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div></div></div></div></div></div></div>