From 9f56322d0d34547f0b2b73a6732b72efa55551eb Mon Sep 17 00:00:00 2001 From: Konsta Date: Sun, 22 Jun 2025 01:59:36 +0300 Subject: [PATCH] libcamera: switch to aidl hal * https://gitlab.baylibre.com/baylibre/ti/android/aosp/device/ti/am62x/-/commit/20c227e0c3b7499341c1d3e13ca10ade6a2bc464 --- ...roid.hardware.camera.provider@2.5-service_64.rpi.rc | 10 ---------- device.mk | 5 +---- framework_compatibility_matrix.xml | 9 --------- manifest.xml | 10 +--------- sepolicy/file_contexts | 3 +++ sepolicy/service_contexts | 4 ++++ 6 files changed, 9 insertions(+), 32 deletions(-) delete mode 100644 camera/android.hardware.camera.provider@2.5-service_64.rpi.rc diff --git a/camera/android.hardware.camera.provider@2.5-service_64.rpi.rc b/camera/android.hardware.camera.provider@2.5-service_64.rpi.rc deleted file mode 100644 index a36f1c5..0000000 --- a/camera/android.hardware.camera.provider@2.5-service_64.rpi.rc +++ /dev/null @@ -1,10 +0,0 @@ -service vendor.camera-provider-2-5 /vendor/bin/hw/android.hardware.camera.provider@2.5-service_64 - class hal - user cameraserver - group audio camera input drmrpc - ioprio rt 4 - capabilities SYS_NICE - task_profiles CameraServiceCapacity MaxPerformance - override - setenv LIBCAMERA_LOG_LEVELS *:WARN - setenv LIBCAMERA_LOG_FILE syslog diff --git a/device.mk b/device.mk index 658a13e..a40a508 100644 --- a/device.mk +++ b/device.mk @@ -62,13 +62,10 @@ PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.camera.external.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.external.xml PRODUCT_PACKAGES += \ - android.hardware.camera.provider@2.5-service_64 \ + android.hardware.camera.provider-V1-libcamera-service \ camera.libcamera \ ipa_rpi_vc4 -PRODUCT_COPY_FILES += \ - $(DEVICE_PATH)/camera/android.hardware.camera.provider@2.5-service_64.rpi.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/android.hardware.camera.provider@2.5-service_64.rpi.rc - PRODUCT_COPY_FILES += \ $(DEVICE_PATH)/camera/camera_hal.yaml:$(TARGET_COPY_OUT_VENDOR)/etc/libcamera/camera_hal.yaml \ external/libcamera/src/ipa/rpi/vc4/data/imx219.json:$(TARGET_COPY_OUT_VENDOR)/etc/libcamera/ipa/rpi/vc4/imx219.json \ diff --git a/framework_compatibility_matrix.xml b/framework_compatibility_matrix.xml index 21068cf..e2a73b5 100644 --- a/framework_compatibility_matrix.xml +++ b/framework_compatibility_matrix.xml @@ -1,13 +1,4 @@ - - android.hardware.camera.provider - hwbinder - 2.5 - - ICameraProvider - legacy/0 - - android.hardware.media.c2 hwbinder diff --git a/manifest.xml b/manifest.xml index fcf2f80..397d516 100644 --- a/manifest.xml +++ b/manifest.xml @@ -23,15 +23,7 @@ ICameraProvider external/0 - - - - android.hardware.camera.provider - hwbinder - 2.5 - - ICameraProvider - legacy/0 + libcamera/0 diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts index bf37843..7d1ed02 100644 --- a/sepolicy/file_contexts +++ b/sepolicy/file_contexts @@ -1,3 +1,6 @@ +# Camera +/vendor/bin/hw/android\.hardware\.camera\.provider-V1-libcamera-service u:object_r:hal_camera_default_exec:s0 + # CEC /dev/cec0 u:object_r:cec_device:s0 /dev/cec1 u:object_r:cec_device:s0 diff --git a/sepolicy/service_contexts b/sepolicy/service_contexts index 123bed2..9d6f3bf 100644 --- a/sepolicy/service_contexts +++ b/sepolicy/service_contexts @@ -1,3 +1,7 @@ +# Camera +android.hardware.camera.provider.ICameraProvider/external/0 u:object_r:hal_camera_service:s0 +android.hardware.camera.provider.ICameraProvider/libcamera/0 u:object_r:hal_camera_service:s0 + # DRM android.hardware.drm.IDrmFactory/widevine u:object_r:hal_drm_service:s0