diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index 30e54bb..280c63a 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -145,6 +145,13 @@ BOARD_SUPPORTS_SOUND_TRIGGER := true # Bluetooth BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(COMMON_PATH)/bluetooth/include +# Camera +SOONG_CONFIG_NAMESPACES += samsung_sm7125CameraVars +SOONG_CONFIG_samsung_sm7125CameraVars += \ + samsung_sm7125_model + +SOONG_CONFIG_samsung_sm7125CameraVars_samsung_sm7125_model := $(TARGET_DEVICE) + # Keymaster TARGET_KEYMASTER_VARIANT := samsung diff --git a/hidl/camera/provider/Android.bp b/hidl/camera/provider/Android.bp index 4e31fb9..26847b2 100644 --- a/hidl/camera/provider/Android.bp +++ b/hidl/camera/provider/Android.bp @@ -13,11 +13,28 @@ // See the License for the specific language governing permissions and // limitations under the License. +soong_config_module_type { + name: "samsung_sm7125_model", + module_type: "cc_defaults", + config_namespace: "samsung_sm7125CameraVars", + value_variables: ["samsung_sm7125_model"], + properties: ["cppflags"], +} + +samsung_sm7125_model { + name: "samsung_sm7125_model_defaults", + soong_config_variables: { + samsung_sm7125_model: { + cppflags: ["-DSAMSUNG_SM7125_MODEL_%s"], + }, + }, +} cc_binary { name: "android.hardware.camera.provider@2.6-service.sm7125", defaults: [ "hidl_defaults", + "samsung_sm7125_model_defaults", ], compile_multilib: "both", proprietary: true, diff --git a/hidl/camera/provider/SamsungCameraProvider.cpp b/hidl/camera/provider/SamsungCameraProvider.cpp index 1eea916..a6537ff 100644 --- a/hidl/camera/provider/SamsungCameraProvider.cpp +++ b/hidl/camera/provider/SamsungCameraProvider.cpp @@ -26,6 +26,15 @@ using ::android::OK; const int kMaxCameraIdLen = 16; SamsungCameraProvider::SamsungCameraProvider() : LegacyCameraProviderImpl_2_5() { + +#ifdef SAMSUNG_SM7125_MODEL_a72q + // tele + mExtraIDs.push_back(52); +#endif + + // macro + mExtraIDs.push_back(54); + if (!mInitFailed) { for (int i : mExtraIDs) { struct camera_info info; diff --git a/proprietary-files.txt b/proprietary-files.txt index 6acb8b1..a9d57be 100644 --- a/proprietary-files.txt +++ b/proprietary-files.txt @@ -206,7 +206,6 @@ vendor/lib/libcamxfdengine.so vendor/lib/libarcsoft_super_night_raw.so vendor/lib/libjpegencoder_sw.unifunc.so vendor/lib/hw/camera.unihal.default.so -vendor/lib/hw/camera.qcom.so vendor/lib/libbeautyshot.arcsoft.so vendor/lib/libvideobeauty.arcsoft.so vendor/lib/libHpr_RecGAE_cvFeature_v1.0.camera.samsung.so @@ -348,7 +347,6 @@ vendor/lib64/libcamxfdengine.so vendor/lib64/libarcsoft_super_night_raw.so vendor/lib64/libjpegencoder_sw.unifunc.so vendor/lib64/hw/camera.unihal.default.so -vendor/lib64/hw/camera.qcom.so vendor/lib64/libbeautyshot.arcsoft.so vendor/lib64/libvideobeauty.arcsoft.so vendor/lib64/libHpr_RecGAE_cvFeature_v1.0.camera.samsung.so