Camera: Update AON Service to 1.3 for FD DeliverMode Config API
- AON service is updated to 1.3 version
- Expose FD time based & motion based config APIs to AON HIDL v1.3
CRs-Fixed: 3114468
Change-Id: I9d54e8e36e26d0633381a29c85f54fd93e53c9d1
diff --git a/camera/aon/1.3/Android.bp b/camera/aon/1.3/Android.bp
new file mode 100644
index 0000000..6430357
--- /dev/null
+++ b/camera/aon/1.3/Android.bp
@@ -0,0 +1,17 @@
+hidl_interface {
+ name: "vendor.qti.hardware.camera.aon@1.3",
+ root: "vendor.qti.hardware.camera",
+ system_ext_specific: true,
+ srcs: [
+ "types.hal",
+ "IAONService.hal",
+ "IAONServiceCallBack.hal",
+ ],
+ interfaces: [
+ "vendor.qti.hardware.camera.aon@1.2",
+ "vendor.qti.hardware.camera.aon@1.1",
+ "vendor.qti.hardware.camera.aon@1.0",
+ "android.hidl.base@1.0",
+ ],
+ gen_java: true,
+}
diff --git a/camera/aon/1.3/IAONService.hal b/camera/aon/1.3/IAONService.hal
new file mode 100644
index 0000000..a71d9d2
--- /dev/null
+++ b/camera/aon/1.3/IAONService.hal
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 2020-2021 The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation. nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * Changes from Qualcomm Innovation Center are provided under the following license:
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted (subject to the limitations in the
+ * disclaimer below) provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * * Neither the name of Qualcomm Innovation Center, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
+ * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
+ * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package vendor.qti.hardware.camera.aon@1.3;
+
+import vendor.qti.hardware.camera.aon@1.0;
+import vendor.qti.hardware.camera.aon@1.1;
+import vendor.qti.hardware.camera.aon@1.2;
+
+import @1.3::types;
+import @1.3::IAONServiceCallBack;
+
+interface IAONService extends @1.2::IAONService {
+ /**
+ * Get capabilities supported by AON Service.
+ *
+ * @return serviceCapabilities list of AON service types supported by service.
+ *
+ */
+ getCapabilities_v3() generates (vec<AONServiceType> serviceCapabilities);
+
+ /**
+ * Get supported fd algo modes of a specific FD service type.
+ *
+ * @param srvType The service type to be queried.
+ * Only FaceDetect & FaceDetectPro are applicable.
+ * @return fdAlgoModes List of AONFDAlgoMode supported by the queried FD service type.
+ *
+ */
+ getFDAlgoModes(AONServiceType srvType) generates (vec<AONFDAlgoMode> fdAlgoModes);
+
+ /**
+ * Registers for AON service events.
+ *
+ * @param callback callback function that gets called during AON event
+ * @param regInfo Register information filled by client
+ * @return status Returns status of function.
+ * Returns 0 in case of success; non-zero otherwise
+ * @return clientHandle AON Service assigns a valid client handle upon successfull return
+ * Any value greater than 0 in case of success.
+ * 0 in case of failure
+ *
+ */
+ registerClient_v3(IAONServiceCallBack callback, AONRegInfo regInfo)
+ generates (Status status, uint64_t clientHandle);
+};
diff --git a/camera/aon/1.3/IAONServiceCallBack.hal b/camera/aon/1.3/IAONServiceCallBack.hal
new file mode 100644
index 0000000..30bb26b
--- /dev/null
+++ b/camera/aon/1.3/IAONServiceCallBack.hal
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2020-2021 The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation. nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * Changes from Qualcomm Innovation Center are provided under the following license:
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted (subject to the limitations in the
+ * disclaimer below) provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * * Neither the name of Qualcomm Innovation Center, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
+ * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
+ * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package vendor.qti.hardware.camera.aon@1.3;
+
+import @1.3::types;
+import vendor.qti.hardware.camera.aon@1.2;
+
+/** AON Service callback interface.
+ * This callback will be invoked when any client registers for AON Service
+ * and specific AON event triggered by hardware/lower layers */
+interface IAONServiceCallBack extends @1.2::IAONServiceCallBack {
+ // No new APIs are added in 1.3 callback
+};
diff --git a/camera/aon/1.3/types.hal b/camera/aon/1.3/types.hal
new file mode 100644
index 0000000..ede91bc
--- /dev/null
+++ b/camera/aon/1.3/types.hal
@@ -0,0 +1,201 @@
+/*
+ * Copyright (c) 2020-2021 The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation. nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * Changes from Qualcomm Innovation Center are provided under the following license:
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted (subject to the limitations in the
+ * disclaimer below) provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * * Neither the name of Qualcomm Innovation Center, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
+ * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
+ * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package vendor.qti.hardware.camera.aon@1.3;
+
+import vendor.qti.hardware.camera.aon@1.2;
+
+enum AONServiceType : @1.2::AONServiceType
+{
+ // No new ServiceType are added in 1.3
+};
+
+/**
+ * The delivery mode of FD event
+ */
+enum FDDeliveryMode : int32_t
+{
+ /**
+ * Invalid value
+ */
+ Invalid = -1,
+
+ /**
+ * Face detection is triggered to run based on motion detected by sensor.
+ */
+ Motion_Based = 0,
+
+ /**
+ * Face detection is triggered to run periodically
+ */
+ Time_Based = 1
+};
+
+/**
+ * The FD algo mode capability
+ */
+enum FDAlgoModeCap : int32_t
+{
+ /**
+ * Invalid value
+ */
+ Invalid = -1,
+
+ /**
+ * FD algo mode run under non-island-mode
+ */
+ Non_Island_Mode = 0,
+
+ /**
+ * FD algo mode is island-capable
+ */
+ Island_Mode_Capable = 1
+};
+
+/**
+ * The FD engine of fd algo
+ */
+enum FDEngine : uint32_t
+{
+ /**
+ * CADL engine (Lower power, lower memory usage engine).
+ */
+ Fd_Engine_CADL = 0,
+
+ /**
+ * eNPU engine (Higher power, higher memory usage engine).
+ */
+ Fd_Engine_ENPU = 1
+};
+
+/**
+ * The available modes for the fd algo type
+ */
+struct AONFDAlgoMode {
+ /**
+ * Image resolution used for FD processing in this FD algo mode.
+ */
+ uint32_t width;
+
+ /**
+ * Image resolution used for FD processing in this FD algo mode.
+ */
+ uint32_t height;
+
+ /**
+ * Indicates capability of FD algo mode
+ */
+ FDAlgoModeCap capability;
+
+ /**
+ * Indicates whether this FD algo mode supports the following
+ */
+ FDEngine fd_engine;
+
+ /**
+ * The native streaming rate of the image sensor
+ */
+ uint32_t fps;
+};
+
+/**
+ * The FD register information filled by client
+ */
+struct AONFDRegInfo {
+ /**
+ * Algo mode index of fd algo.
+ * The index to the vector returned in getFDAlgoModes
+ * in which the client would like the fd algo to be run under.
+ * Only applicable when service type is FaceDetect or FaceDetectPro
+ */
+ int32_t fd_algo_mode_idx;
+
+ /**
+ * The delivery mode of FD event
+ * Only applicable when service type is FaceDetect or FaceDetectPro
+ */
+ FDDeliveryMode fd_delivery_mode;
+
+ /**
+ * Period in ms of FD event call back.
+ * Only applicable when delivery mode is Time_Based
+ */
+ uint32_t delivery_period_ms;
+};
+
+/**
+ * The register information filled by client
+ */
+struct AONRegInfo {
+ /**
+ * Service type registered by client.
+ */
+ AONServiceType srv_type;
+
+ /**
+ * The FD register information filled by client.
+ * Only applicable when service type is FaceDetect or FaceDetectPro
+ */
+ AONFDRegInfo fd_reg_info;
+};
\ No newline at end of file
diff --git a/camera/current.txt b/camera/current.txt
index db5d2c1..d141215 100644
--- a/camera/current.txt
+++ b/camera/current.txt
@@ -42,4 +42,8 @@
afa7eb61656ef6806a373aaae88b664425e08e3f57bc9bae04f7b63acfa48c8d vendor.qti.hardware.camera.aon@1.2::types
87c4b087b037f9a3dd6d50513c45ee54450a7a2ca8cc3af2a6d2c939d6d9dda5 vendor.qti.hardware.camera.aon@1.2::IAONService
-3ff06912b21fd0b0f0efc5621eab1e3af03c1219716ceada54ae01650b04d78c vendor.qti.hardware.camera.aon@1.2::IAONServiceCallBack
\ No newline at end of file
+3ff06912b21fd0b0f0efc5621eab1e3af03c1219716ceada54ae01650b04d78c vendor.qti.hardware.camera.aon@1.2::IAONServiceCallBack
+
+54dd29871acf91ca52acdd3d95e92b4a9ec90a5d9af4ddea83f589d2613982c0 vendor.qti.hardware.camera.aon@1.3::types
+614adcae054e8f6486e0c1fbe9fc6502d210bdba646e3079f5b61ea130eeec1f vendor.qti.hardware.camera.aon@1.3::IAONService
+e07e6264400f6cfd226c7a95287c56a23f1deaaf07b51b8c4b605982760906ff vendor.qti.hardware.camera.aon@1.3::IAONServiceCallBack
\ No newline at end of file