diff --git a/klte.mk b/klte.mk index 3e0764b..28838ab 100644 --- a/klte.mk +++ b/klte.mk @@ -80,6 +80,7 @@ PRODUCT_PACKAGES += \ # Camera PRODUCT_PACKAGES += \ camera.msm8974 \ + libshim_camera \ libstlport \ libxml2 \ Snap diff --git a/libshims/Android.mk b/libshims/Android.mk new file mode 100644 index 0000000..37483e0 --- /dev/null +++ b/libshims/Android.mk @@ -0,0 +1,17 @@ +# +# Copyright (C) 2017 The LineageOS Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +include $(call first-makefiles-under,$(call my-dir)) diff --git a/libshims/libshim_camera/Android.mk b/libshims/libshim_camera/Android.mk new file mode 100644 index 0000000..238e965 --- /dev/null +++ b/libshims/libshim_camera/Android.mk @@ -0,0 +1,9 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_SRC_FILES := camera_shim.c +LOCAL_MODULE := libshim_camera +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_CLASS := SHARED_LIBRARIES +LOCAL_PROPRIETARY_MODULE := true +include $(BUILD_SHARED_LIBRARY) diff --git a/libshims/libshim_camera/camera_shim.c b/libshims/libshim_camera/camera_shim.c new file mode 100644 index 0000000..d0c4929 --- /dev/null +++ b/libshims/libshim_camera/camera_shim.c @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2017 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// rt hdr +const char *_ZN7android16CameraParameters10KEY_RT_HDRE = "rt-hdr"; +const char *_ZN7android16CameraParameters20KEY_SUPPORTED_RT_HDRE = "rt-hdr-values"; +const char *_ZN7android16CameraParameters9RTHDR_OFFE = "off"; +const char *_ZN7android16CameraParameters8RTHDR_ONE = "on"; + +// phase af +const char *_ZN7android16CameraParameters12KEY_PHASE_AFE = "phase-af"; +const char *_ZN7android16CameraParameters22KEY_SUPPORTED_PHASE_AFE = "phase-af-values"; +const char *_ZN7android16CameraParameters7PAF_OFFE = "off"; +const char *_ZN7android16CameraParameters6PAF_ONE = "on"; + +// dynamic range control +const char *_ZN7android16CameraParameters25KEY_DYNAMIC_RANGE_CONTROLE = "dynamic-range-control"; +const char *_ZN7android16CameraParameters35KEY_SUPPORTED_DYNAMIC_RANGE_CONTROLE = "dynamic-range-control-values"; +const char *_ZN7android16CameraParameters7DRC_OFFE = "off"; +const char *_ZN7android16CameraParameters6DRC_ONE = "on"; diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc index 2820c1c..5547901 100644 --- a/rootdir/etc/init.qcom.rc +++ b/rootdir/etc/init.qcom.rc @@ -1,4 +1,5 @@ # Copyright (c) 2009-2012, Code Aurora Forum. All rights reserved. +# 2017, The LineageOS Project. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: @@ -29,6 +30,8 @@ import init.qcom.usb.rc import init.target.rc on early-init + export LD_SHIM_LIBS /system/lib/hw/camera.vendor.msm8974.so|libshim_camera.so + mount debugfs debugfs /sys/kernel/debug chmod 0755 /sys/kernel/debug @@ -46,7 +49,6 @@ on early-init symlink /data/tombstones /tombstones on init - # Support legacy paths symlink /sdcard /storage/sdcard0