Compare commits
10 commits
ba33c37b07
...
250739971e
Author | SHA1 | Date | |
---|---|---|---|
|
250739971e | ||
|
de40ec9a0c | ||
|
c69c85fcad | ||
|
5206a0f0a5 | ||
|
a723dd3d79 | ||
|
543ade588a | ||
|
00551f44d6 | ||
|
201615cf7c | ||
|
1522a475d9 | ||
|
353e696c1b |
10 changed files with 212 additions and 20 deletions
87
Android.bp
87
Android.bp
|
@ -263,6 +263,24 @@ cc_library {
|
|||
vendor: true
|
||||
}
|
||||
|
||||
cc_prebuilt_library_shared {
|
||||
name: "libbase-v33",
|
||||
vendor: true,
|
||||
strip: {
|
||||
none: true,
|
||||
},
|
||||
target: {
|
||||
android_arm: {
|
||||
srcs: ["vndk/v33/arm/libbase-v33.so"],
|
||||
},
|
||||
android_arm64: {
|
||||
srcs: ["vndk/v33/arm64/libbase-v33.so"],
|
||||
},
|
||||
},
|
||||
compile_multilib: "both",
|
||||
check_elf_files: false,
|
||||
}
|
||||
|
||||
cc_library {
|
||||
name: "libbinder_shim",
|
||||
shared_libs: ["libbinder", "libutils"],
|
||||
|
@ -296,6 +314,42 @@ cc_library {
|
|||
vendor: true
|
||||
}
|
||||
|
||||
cc_library_shared {
|
||||
name: "libcamera_provider_shim",
|
||||
shared_libs: [
|
||||
"camera.device@1.0-impl",
|
||||
"camera.device@3.2-impl",
|
||||
"camera.device@3.3-impl",
|
||||
"camera.device@3.4-impl",
|
||||
"camera.device@3.5-impl",
|
||||
"libcamera_metadata",
|
||||
],
|
||||
include_dirs: [
|
||||
"hardware/interfaces/camera/common/default/include/",
|
||||
"hardware/libhardware/include",
|
||||
],
|
||||
srcs: ["libcamera_provider/camera_provider.cpp"],
|
||||
vendor: true,
|
||||
}
|
||||
|
||||
cc_prebuilt_library_shared {
|
||||
name: "libcrypto-v33",
|
||||
vendor: true,
|
||||
strip: {
|
||||
none: true,
|
||||
},
|
||||
target: {
|
||||
android_arm: {
|
||||
srcs: ["vndk/v33/arm/libcrypto-v33.so"],
|
||||
},
|
||||
android_arm64: {
|
||||
srcs: ["vndk/v33/arm64/libcrypto-v33.so"],
|
||||
},
|
||||
},
|
||||
compile_multilib: "both",
|
||||
check_elf_files: false,
|
||||
}
|
||||
|
||||
cc_library {
|
||||
name: "libcutils_shim",
|
||||
shared_libs: [
|
||||
|
@ -356,24 +410,11 @@ cc_library_shared {
|
|||
vendor: true,
|
||||
}
|
||||
|
||||
cc_library_shared {
|
||||
name: "libprotobuf-cpp-lite-3.9.1-vendorcompat",
|
||||
stem: "libprotobuf-cpp-lite-3.9.1",
|
||||
target: {
|
||||
android_arm: {
|
||||
shared_libs: ["libprotobuf-cpp-full-3.9.1-vendorcompat"],
|
||||
},
|
||||
android_arm64: {
|
||||
shared_libs: ["libprotobuf-cpp-full-3.9.1-vendorcompat"],
|
||||
},
|
||||
},
|
||||
vendor: true,
|
||||
}
|
||||
|
||||
cc_library_shared {
|
||||
name: "libui_shim",
|
||||
shared_libs: [
|
||||
"libui",
|
||||
"libsync",
|
||||
"libutils",
|
||||
],
|
||||
srcs: [
|
||||
|
@ -467,3 +508,21 @@ cc_prebuilt_library_shared {
|
|||
compile_multilib: "both",
|
||||
check_elf_files: false,
|
||||
}
|
||||
|
||||
cc_prebuilt_library_shared {
|
||||
name: "libstagefright_foundation-v33",
|
||||
vendor: true,
|
||||
strip: {
|
||||
none: true,
|
||||
},
|
||||
target: {
|
||||
android_arm: {
|
||||
srcs: ["vndk/v33/arm/libstagefright_foundation-v33.so"],
|
||||
},
|
||||
android_arm64: {
|
||||
srcs: ["vndk/v33/arm64/libstagefright_foundation-v33.so"],
|
||||
},
|
||||
},
|
||||
compile_multilib: "both",
|
||||
check_elf_files: false,
|
||||
}
|
||||
|
|
42
interfaces/_backend/radio/config/Android.mk
Normal file
42
interfaces/_backend/radio/config/Android.mk
Normal file
|
@ -0,0 +1,42 @@
|
|||
#
|
||||
# Copyright (C) 2024 The LineageOS Project
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
_shim_hidl_library_name := android.hardware.radio.c_shim
|
||||
_frontend_hidl_package_name := android.hardware.radio.config
|
||||
_backend_hidl_package_name := lineage.hardware.radio.config
|
||||
_frontend_hidl_interface_name := IRadioConfig
|
||||
_backend_hidl_interface_name := $(_frontend_hidl_interface_name)
|
||||
|
||||
ifeq ($(TARGET_IS_64_BIT),true)
|
||||
_lib_dir := lib64
|
||||
else
|
||||
_lib_dir := lib
|
||||
endif
|
||||
|
||||
define _shim_hidl_library_template
|
||||
_version := $(1)
|
||||
_sed_pattern := "s|$$(_frontend_hidl_package_name)@$$(_version)::$$(_frontend_hidl_interface_name)|$$(_backend_hidl_package_name)@$$(_version)::$$(_backend_hidl_interface_name)|g;s|$$(_frontend_hidl_package_name)(@[0-9]+\.[0-9]+\.so)|$$(_shim_hidl_library_name)\1|g"
|
||||
|
||||
include $$(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := $$(_shim_hidl_library_name)@$$(_version)
|
||||
|
||||
LOCAL_MODULE_STEM := $$(LOCAL_MODULE).so
|
||||
LOCAL_MODULE_CLASS := DATA
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_MODULE_PATH := $$(TARGET_OUT_VENDOR)/$$(_lib_dir)
|
||||
LOCAL_REQUIRED_MODULES := $$(_frontend_hidl_package_name)@$$(_version).vendor
|
||||
LOCAL_PREBUILT_MODULE_FILE := $$(TARGET_OUT_VENDOR)/$$(_lib_dir)/$$(_frontend_hidl_package_name)@$$(_version).so
|
||||
LOCAL_POST_INSTALL_CMD := /usr/bin/sed -E -i $$(_sed_pattern) $$(LOCAL_MODULE_PATH)/$$(LOCAL_MODULE_STEM)
|
||||
include $$(BUILD_PREBUILT)
|
||||
endef
|
||||
|
||||
$(eval $(call _shim_hidl_library_template,1.0))
|
||||
$(eval $(call _shim_hidl_library_template,1.1))
|
||||
$(eval $(call _shim_hidl_library_template,1.2))
|
||||
$(eval $(call _shim_hidl_library_template,1.3))
|
81
libcamera_provider/camera_provider.cpp
Normal file
81
libcamera_provider/camera_provider.cpp
Normal file
|
@ -0,0 +1,81 @@
|
|||
/*
|
||||
* Copyright (C) 2024 The LineageOS Project
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "CameraModule.h"
|
||||
|
||||
using android::SortedVector;
|
||||
using android::sp;
|
||||
using android::hardware::camera::common::helper::CameraModule;
|
||||
|
||||
// android::hardare::camera::device::V1_0
|
||||
extern "C" void*
|
||||
_ZN7android8hardware6camera6device4V1_014implementation12CameraDeviceC1ENS_2spINS1_6common6helper12CameraModuleEEERKNSt3__112basic_stringIcNSB_11char_traitsIcEENSB_9allocatorIcEEEERKNS_12SortedVectorINSB_4pairISH_SH_EEEE(
|
||||
void* thisptr, const sp<CameraModule>& cameraModule, const std::string& str,
|
||||
const SortedVector<std::pair<std::string, std::string>>& sortedVector);
|
||||
|
||||
extern "C" void*
|
||||
_ZN7android8hardware6camera6device4V1_014implementation12CameraDeviceC1ENS_2spINS1_6common4V1_06helper12CameraModuleEEERKNSt3__112basic_stringIcNSC_11char_traitsIcEENSC_9allocatorIcEEEERKNS_12SortedVectorINSC_4pairISI_SI_EEEE(
|
||||
void* thisptr, const sp<CameraModule>& cameraModule, const std::string& str,
|
||||
const SortedVector<std::pair<std::string, std::string>>& sortedVector) {
|
||||
return _ZN7android8hardware6camera6device4V1_014implementation12CameraDeviceC1ENS_2spINS1_6common6helper12CameraModuleEEERKNSt3__112basic_stringIcNSB_11char_traitsIcEENSB_9allocatorIcEEEERKNS_12SortedVectorINSB_4pairISH_SH_EEEE(
|
||||
thisptr, cameraModule, str, sortedVector);
|
||||
}
|
||||
|
||||
// android::hardware::camera::device::V3_2
|
||||
extern "C" void*
|
||||
_ZN7android8hardware6camera6device4V3_214implementation12CameraDeviceC1ENS_2spINS1_6common6helper12CameraModuleEEERKNSt3__112basic_stringIcNSB_11char_traitsIcEENSB_9allocatorIcEEEERKNS_12SortedVectorINSB_4pairISH_SH_EEEE(
|
||||
void* thisptr, const sp<CameraModule>& cameraModule, const std::string& str,
|
||||
const SortedVector<std::pair<std::string, std::string>>& sortedVector);
|
||||
|
||||
extern "C" void*
|
||||
_ZN7android8hardware6camera6device4V3_214implementation12CameraDeviceC1ENS_2spINS1_6common4V1_06helper12CameraModuleEEERKNSt3__112basic_stringIcNSC_11char_traitsIcEENSC_9allocatorIcEEEERKNS_12SortedVectorINSC_4pairISI_SI_EEEE(
|
||||
void* thisptr, const sp<CameraModule>& cameraModule, const std::string& str,
|
||||
const SortedVector<std::pair<std::string, std::string>>& sortedVector) {
|
||||
return _ZN7android8hardware6camera6device4V3_214implementation12CameraDeviceC1ENS_2spINS1_6common6helper12CameraModuleEEERKNSt3__112basic_stringIcNSB_11char_traitsIcEENSB_9allocatorIcEEEERKNS_12SortedVectorINSB_4pairISH_SH_EEEE(
|
||||
thisptr, cameraModule, str, sortedVector);
|
||||
}
|
||||
|
||||
// android::hardware::camera::device::V3_3
|
||||
extern "C" void*
|
||||
_ZN7android8hardware6camera6device4V3_314implementation12CameraDeviceC1ENS_2spINS1_6common6helper12CameraModuleEEERKNSt3__112basic_stringIcNSB_11char_traitsIcEENSB_9allocatorIcEEEERKNS_12SortedVectorINSB_4pairISH_SH_EEEE(
|
||||
void* thisptr, const sp<CameraModule>& cameraModule, const std::string& str,
|
||||
const SortedVector<std::pair<std::string, std::string>>& sortedVector);
|
||||
|
||||
extern "C" void*
|
||||
_ZN7android8hardware6camera6device4V3_314implementation12CameraDeviceC1ENS_2spINS1_6common4V1_06helper12CameraModuleEEERKNSt3__112basic_stringIcNSC_11char_traitsIcEENSC_9allocatorIcEEEERKNS_12SortedVectorINSC_4pairISI_SI_EEEE(
|
||||
void* thisptr, const sp<CameraModule>& cameraModule, const std::string& str,
|
||||
const SortedVector<std::pair<std::string, std::string>>& sortedVector) {
|
||||
return _ZN7android8hardware6camera6device4V3_314implementation12CameraDeviceC1ENS_2spINS1_6common6helper12CameraModuleEEERKNSt3__112basic_stringIcNSB_11char_traitsIcEENSB_9allocatorIcEEEERKNS_12SortedVectorINSB_4pairISH_SH_EEEE(
|
||||
thisptr, cameraModule, str, sortedVector);
|
||||
}
|
||||
|
||||
// android::hardware::camera::device::V3_4
|
||||
extern "C" void*
|
||||
_ZN7android8hardware6camera6device4V3_414implementation12CameraDeviceC1ENS_2spINS1_6common6helper12CameraModuleEEERKNSt3__112basic_stringIcNSB_11char_traitsIcEENSB_9allocatorIcEEEERKNS_12SortedVectorINSB_4pairISH_SH_EEEE(
|
||||
void* thisptr, const sp<CameraModule>& cameraModule, const std::string& str,
|
||||
const SortedVector<std::pair<std::string, std::string>>& sortedVector);
|
||||
|
||||
extern "C" void*
|
||||
_ZN7android8hardware6camera6device4V3_414implementation12CameraDeviceC1ENS_2spINS1_6common4V1_06helper12CameraModuleEEERKNSt3__112basic_stringIcNSC_11char_traitsIcEENSC_9allocatorIcEEEERKNS_12SortedVectorINSC_4pairISI_SI_EEEE(
|
||||
void* thisptr, const sp<CameraModule>& cameraModule, const std::string& str,
|
||||
const SortedVector<std::pair<std::string, std::string>>& sortedVector) {
|
||||
return _ZN7android8hardware6camera6device4V3_414implementation12CameraDeviceC1ENS_2spINS1_6common6helper12CameraModuleEEERKNSt3__112basic_stringIcNSB_11char_traitsIcEENSB_9allocatorIcEEEERKNS_12SortedVectorINSB_4pairISH_SH_EEEE(
|
||||
thisptr, cameraModule, str, sortedVector);
|
||||
}
|
||||
|
||||
// android::hardware::camera::device::V3_5
|
||||
extern "C" void*
|
||||
_ZN7android8hardware6camera6device4V3_514implementation12CameraDeviceC1ENS_2spINS1_6common6helper12CameraModuleEEERKNSt3__112basic_stringIcNSB_11char_traitsIcEENSB_9allocatorIcEEEERKNS_12SortedVectorINSB_4pairISH_SH_EEEE(
|
||||
void* thisptr, const sp<CameraModule>& cameraModule, const std::string& str,
|
||||
const SortedVector<std::pair<std::string, std::string>>& sortedVector);
|
||||
|
||||
extern "C" void*
|
||||
_ZN7android8hardware6camera6device4V3_514implementation12CameraDeviceC1ENS_2spINS1_6common4V1_06helper12CameraModuleEEERKNSt3__112basic_stringIcNSC_11char_traitsIcEENSC_9allocatorIcEEEERKNS_12SortedVectorINSC_4pairISI_SI_EEEE(
|
||||
void* thisptr, const sp<CameraModule>& cameraModule, const std::string& str,
|
||||
const SortedVector<std::pair<std::string, std::string>>& sortedVector) {
|
||||
return _ZN7android8hardware6camera6device4V3_514implementation12CameraDeviceC1ENS_2spINS1_6common6helper12CameraModuleEEERKNSt3__112basic_stringIcNSB_11char_traitsIcEENSB_9allocatorIcEEEERKNS_12SortedVectorINSB_4pairISH_SH_EEEE(
|
||||
thisptr, cameraModule, str, sortedVector);
|
||||
}
|
|
@ -1,10 +1,11 @@
|
|||
/*
|
||||
* Copyright (C) 2023 The LineageOS Project
|
||||
* Copyright (C) 2024 The LineageOS Project
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <sync/sync.h>
|
||||
#include <ui/GraphicBufferMapper.h>
|
||||
#include <ui/Rect.h>
|
||||
#include <utils/Errors.h>
|
||||
|
@ -15,11 +16,20 @@ using android::status_t;
|
|||
extern "C" {
|
||||
status_t _ZN7android19GraphicBufferMapper4lockEPK13native_handlejRKNS_4RectEPPvPiS9_(
|
||||
void* thisptr, buffer_handle_t handle, uint32_t usage, const Rect& bounds, void** vaddr,
|
||||
int32_t* outBytesPerPixel, int32_t* outBytesPerStride);
|
||||
int32_t* /*outBytesPerPixel*/, int32_t* /*outBytesPerStride*/) {
|
||||
auto* gpm = static_cast<android::GraphicBufferMapper*>(thisptr);
|
||||
return gpm->lock(handle, usage, bounds, vaddr);
|
||||
}
|
||||
|
||||
status_t _ZN7android19GraphicBufferMapper4lockEPK13native_handlejRKNS_4RectEPPv(
|
||||
void* thisptr, buffer_handle_t handle, uint32_t usage, const Rect& bounds, void** vaddr) {
|
||||
return _ZN7android19GraphicBufferMapper4lockEPK13native_handlejRKNS_4RectEPPvPiS9_(
|
||||
thisptr, handle, usage, bounds, vaddr, nullptr, nullptr);
|
||||
status_t _ZN7android19GraphicBufferMapper6unlockEPK13native_handle(void* thisptr,
|
||||
buffer_handle_t handle) {
|
||||
android::base::unique_fd outFence;
|
||||
auto* gpm = static_cast<android::GraphicBufferMapper*>(thisptr);
|
||||
status_t status = gpm->unlock(handle, &outFence);
|
||||
if (status == android::OK && outFence.get() >= 0) {
|
||||
sync_wait(outFence.get(), -1);
|
||||
outFence.reset();
|
||||
}
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
|
BIN
vndk/v33/arm/libbase-v33.so
Executable file
BIN
vndk/v33/arm/libbase-v33.so
Executable file
Binary file not shown.
BIN
vndk/v33/arm/libcrypto-v33.so
Executable file
BIN
vndk/v33/arm/libcrypto-v33.so
Executable file
Binary file not shown.
BIN
vndk/v33/arm/libstagefright_foundation-v33.so
Executable file
BIN
vndk/v33/arm/libstagefright_foundation-v33.so
Executable file
Binary file not shown.
BIN
vndk/v33/arm64/libbase-v33.so
Executable file
BIN
vndk/v33/arm64/libbase-v33.so
Executable file
Binary file not shown.
BIN
vndk/v33/arm64/libcrypto-v33.so
Executable file
BIN
vndk/v33/arm64/libcrypto-v33.so
Executable file
Binary file not shown.
BIN
vndk/v33/arm64/libstagefright_foundation-v33.so
Executable file
BIN
vndk/v33/arm64/libstagefright_foundation-v33.so
Executable file
Binary file not shown.
Loading…
Reference in a new issue