From 903b35c31a69cd5e63a850f24f5ff1d8f2831e62 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Fri, 2 Oct 2015 19:22:22 +0200 Subject: [PATCH 001/139] g2: configs: mixer_paths: Lower speaker volume --- configs/mixer_paths.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/mixer_paths.xml b/configs/mixer_paths.xml index 37c8b80a..252ce6d1 100644 --- a/configs/mixer_paths.xml +++ b/configs/mixer_paths.xml @@ -461,7 +461,7 @@ - + From 5489a2416786025aa7bca951a03d81491916c418 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Sat, 3 Oct 2015 20:49:56 +0200 Subject: [PATCH 002/139] Revert "g2: configs: audio_effects: Setup audio output session configurations" This reverts commit 07736388af996b82e546af414c587846a8ac1737. --- configs/audio_effects.conf | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/configs/audio_effects.conf b/configs/audio_effects.conf index 9ce1535c..91f33cfa 100644 --- a/configs/audio_effects.conf +++ b/configs/audio_effects.conf @@ -278,30 +278,3 @@ effects { # # TODO: add default audio pre processor configurations after debug and tuning phase # - -# Audio output session configurations. -# New for L, similar to above but for playback streams -# Enables FX settings for a given stream type. Valid stream types are: -# "default", "voice_call", "system", "ring", "music", "alarm", "notification", -# "bluetooth_sco", "enforced_audible", "dtmf", "tts" - -output_session_processing { - music { - music_helper { } - } - ring { - ring_helper { } - } - alarm { - ring_helper { } - } - voice_call { - voice_helper { } - } - tts { - tts_helper { } - } - notification { - notification_helper { } - } -} From c0d2287a124eb77c6d3757ffe7d6f1cfee381aa3 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Sat, 3 Oct 2015 20:50:01 +0200 Subject: [PATCH 003/139] Revert "g2: Disable AV offload (for now)" This reverts commit ccc47c366c8a15b561bd65d9421435f17805a37f. --- configs/audio_policy.conf | 7 +++++++ system_prop.mk | 10 +++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/configs/audio_policy.conf b/configs/audio_policy.conf index 37badcd2..2b1ad967 100644 --- a/configs/audio_policy.conf +++ b/configs/audio_policy.conf @@ -43,6 +43,13 @@ audio_hw_modules { devices AUDIO_DEVICE_OUT_AUX_DIGITAL flags AUDIO_OUTPUT_FLAG_DIRECT } + compress_offload { + sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000|64000|88200|96000|176400|192000 + channel_masks AUDIO_CHANNEL_OUT_STEREO + formats AUDIO_FORMAT_MP3|AUDIO_FORMAT_AAC|AUDIO_FORMAT_PCM_24_BIT_OFFLOAD + devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE + flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING + } voip_rx { sampling_rates 8000|16000 channel_masks AUDIO_CHANNEL_OUT_MONO diff --git a/system_prop.mk b/system_prop.mk index 9617754d..f7ec3c13 100644 --- a/system_prop.mk +++ b/system_prop.mk @@ -10,9 +10,17 @@ PRODUCT_PROPERTY_OVERRIDES += \ PRODUCT_PROPERTY_OVERRIDES += \ media.aac_51_output_enabled=true +# Audio offload +PRODUCT_PROPERTY_OVERRIDES += \ + audio.offload.buffer.size.kb=32 \ + audio.offload.gapless.enabled=true \ + audio.offload.multiple.enabled=false \ + audio.offload.pcm.24bit.enable=true + # AV offload PRODUCT_PROPERTY_OVERRIDES += \ - av.offload.enable=false + av.offload.enable=true \ + av.streaming.offload.enable=true # Smooth streaming Stagefright PRODUCT_PROPERTY_OVERRIDES += \ From 856f18b686f41e3e180a97fed34863be9a2429d0 Mon Sep 17 00:00:00 2001 From: cyanogen Date: Sat, 3 Oct 2015 21:18:30 +0200 Subject: [PATCH 004/139] g2: init: power: Enable low power on boot Signed-off-by: Zdrowy Gosciu --- rootdir/etc/init.g2.power.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rootdir/etc/init.g2.power.rc b/rootdir/etc/init.g2.power.rc index 3e069794..99f91b77 100644 --- a/rootdir/etc/init.g2.power.rc +++ b/rootdir/etc/init.g2.power.rc @@ -117,7 +117,7 @@ on charger write /sys/devices/system/cpu/cpu3/online 0 write /sys/module/msm_thermal/core_control/enabled 1 -on class_start:late_start +on boot trigger enable-low-power on property:init.svc.recovery=running From 6429c3b3215105cc7c15e9876b6fb105329b231a Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Sat, 3 Oct 2015 22:06:37 +0200 Subject: [PATCH 005/139] g2: init: power: Remove MP-Decision service stop --- rootdir/etc/init.g2.power.rc | 1 - 1 file changed, 1 deletion(-) diff --git a/rootdir/etc/init.g2.power.rc b/rootdir/etc/init.g2.power.rc index 99f91b77..4d1e0eb8 100644 --- a/rootdir/etc/init.g2.power.rc +++ b/rootdir/etc/init.g2.power.rc @@ -96,7 +96,6 @@ on charger write /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled 1 write /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled 1 - stop mpdecision write /sys/module/msm_thermal/core_control/enabled 0 write /sys/devices/system/cpu/cpu0/online 1 write /sys/devices/system/cpu/cpu1/online 1 From a1afd7d332076b3667c6c7971a853757a57097b4 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Sun, 4 Oct 2015 12:03:36 +0200 Subject: [PATCH 006/139] Revert "g2: configs: mixer_paths: Lower speaker volume" This reverts commit 903b35c31a69cd5e63a850f24f5ff1d8f2831e62. --- configs/mixer_paths.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/mixer_paths.xml b/configs/mixer_paths.xml index 252ce6d1..37c8b80a 100644 --- a/configs/mixer_paths.xml +++ b/configs/mixer_paths.xml @@ -461,7 +461,7 @@ - + From d90e365fe69c4cf8f7fc67faee419779f132d1bb Mon Sep 17 00:00:00 2001 From: Ethan Chen Date: Fri, 2 Oct 2015 13:20:55 -0700 Subject: [PATCH 007/139] g2-common: Remove dependency on qcom/msm8x74 * We already declare the hwcomposer package Change-Id: I1f41b5ecea0de9a2869d62f153e2a2ecbb6b54bd --- g2.mk | 2 -- 1 file changed, 2 deletions(-) diff --git a/g2.mk b/g2.mk index c6991fc9..1246eb63 100644 --- a/g2.mk +++ b/g2.mk @@ -220,5 +220,3 @@ PRODUCT_PACKAGES += \ librecovery_updater_g2 $(call inherit-product-if-exists, hardware/broadcom/wlan/bcmdhd/config/config-bcm.mk) - -$(call inherit-product-if-exists, hardware/qcom/msm8x74/msm8x74.mk) From 9cd5282628e9c09e425758abd5c02a250e338af5 Mon Sep 17 00:00:00 2001 From: Ethan Chen Date: Fri, 2 Oct 2015 13:42:42 -0700 Subject: [PATCH 008/139] g2-common: Clean up * Remove deprecated and duplicated entries * Remove unused entries Change-Id: I8cad82c71f82b5c4e1a5b40bd2eef03186149992 Signed-off-by: Zdrowy Gosciu Conflicts: overlay/frameworks/base/core/res/res/values/config.xml --- BoardConfigCommon.mk | 9 --------- g2.mk | 8 -------- nfc/nfcee_access_debug.xml | 17 ----------------- .../base/core/res/res/values/config.xml | 13 ------------- .../packages/SystemUI/res/values/config.xml | 6 ------ system_prop.mk | 3 --- 6 files changed, 56 deletions(-) delete mode 100644 nfc/nfcee_access_debug.xml diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index 518ca7c5..9790cbbd 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -20,7 +20,6 @@ TARGET_CPU_ABI2 := armeabi TARGET_ARCH := arm TARGET_ARCH_VARIANT := armv7-a-neon TARGET_CPU_VARIANT := krait -#TARGET_USE_QCOM_BIONIC_OPTIMIZATION := true TARGET_NO_RADIOIMAGE := true TARGET_NO_BOOTLOADER := true @@ -43,13 +42,11 @@ BOARD_KERNEL_SEPARATED_DT := true BOARD_CUSTOM_BOOTIMG := true BOARD_CUSTOM_BOOTIMG_MK := device/lge/g2-common/releasetools/mkbootimg.mk TARGET_KERNEL_SOURCE := kernel/lge/msm8974 -TARGET_KERNEL_ARCH := arm # Audio BOARD_USES_ALSA_AUDIO:= true AUDIO_FEATURE_LOW_LATENCY_PRIMARY := true - # Wi-Fi BOARD_WPA_SUPPLICANT_DRIVER := NL80211 WPA_SUPPLICANT_VERSION := VER_0_8_X @@ -64,8 +61,6 @@ WIFI_DRIVER_FW_PATH_AP := "/system/etc/firmware/fw_bcmdhd_apsta.bin" # Display USE_OPENGL_RENDERER := true TARGET_USES_ION := true -#TARGET_USES_OVERLAY := true -TARGET_USES_C2D_COMPOSITION := true HAVE_ADRENO_SOURCE := false OVERRIDE_RS_DRIVER := libRSDriver_adreno.so NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3 @@ -86,17 +81,13 @@ TARGET_PROVIDES_LIBLIGHT := true # Camera USE_DEVICE_SPECIFIC_CAMERA := true COMMON_GLOBAL_CFLAGS += -DLG_CAMERA_HARDWARE -#COMMON_GLOBAL_CFLAGS += -DLPA_DEFAULT_BUFFER_SIZE=512 # Flags -#TARGET_RELEASE_CPPFLAGS += -DNEEDS_VECTORIMPL_SYMBOLS COMMON_GLOBAL_CFLAGS += -DNO_SECURE_DISCARD -RECOVERY_FSTAB_VERSION = 2 TARGET_RECOVERY_FSTAB = device/lge/g2-common/rootdir/etc/fstab.g2 BOARD_USE_CUSTOM_RECOVERY_FONT := \"roboto_23x41.h\" TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888" -BOARD_HAS_NO_SELECT_BUTTON := true COMMON_GLOBAL_CFLAGS += -DNO_SECURE_DISCARD TARGET_USERIMAGES_USE_EXT4 := true diff --git a/g2.mk b/g2.mk index 1246eb63..cdc8cc16 100644 --- a/g2.mk +++ b/g2.mk @@ -118,13 +118,6 @@ PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \ charger_res_images -# Live Wallpapers -PRODUCT_PACKAGES += \ - LiveWallpapers \ - LiveWallpapersPicker \ - VisualizationWallpapers \ - librs_jni - # NFC packages PRODUCT_PACKAGES += \ Tag \ @@ -147,7 +140,6 @@ PRODUCT_PACKAGES += \ com.android.future.usb.accessory PRODUCT_PACKAGES += \ - libgenlock \ liboverlay \ hwcomposer.msm8974 \ gralloc.msm8974 \ diff --git a/nfc/nfcee_access_debug.xml b/nfc/nfcee_access_debug.xml deleted file mode 100644 index a96a2d1d..00000000 --- a/nfc/nfcee_access_debug.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index fd6ad55c..e65ed7f3 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -19,9 +19,6 @@ - - false - #ffffffff @@ -324,22 +321,12 @@ 0 - - true - sys.perf.profile 1 true - - - - true - 7 - - false diff --git a/system_prop.mk b/system_prop.mk index f7ec3c13..a72c7bf1 100644 --- a/system_prop.mk +++ b/system_prop.mk @@ -92,9 +92,6 @@ PRODUCT_PROPERTY_OVERRIDES += \ wlan.chip.vendor=brcm \ wlan.chip.version=bcm4335 -PRODUCT_PROPERTY_OVERRIDES += \ - debug.egl.recordable.rgba8888=1 - # Sensors PRODUCT_PROPERTY_OVERRIDES += \ ro.qti.sdk.sensors.gestures=true \ From f7b4f66de07bb91c075f6d3d14b00b44e5af28da Mon Sep 17 00:00:00 2001 From: Ethan Chen Date: Fri, 2 Oct 2015 13:55:57 -0700 Subject: [PATCH 009/139] g2-common: Reorganize boardconfig * Save no_underclock kernel command and custom Power HAL * Revert console kernel command Change-Id: Ica3221f6281e4dff14e18087748442498ba100ab Signed-off-by: Zdrowy Gosciu Conflicts: BoardConfigCommon.mk --- BoardConfigCommon.mk | 155 ++++++++++++++++++++----------------------- 1 file changed, 72 insertions(+), 83 deletions(-) diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index 9790cbbd..a3325037 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -14,127 +14,116 @@ # limitations under the License. # -# CPU -TARGET_CPU_ABI := armeabi-v7a -TARGET_CPU_ABI2 := armeabi +TARGET_SPECIFIC_HEADER_PATH := device/lge/g2-common/include + +# Architecture TARGET_ARCH := arm TARGET_ARCH_VARIANT := armv7-a-neon +TARGET_BOARD_PLATFORM := msm8974 +TARGET_BOARD_PLATFORM_GPU := qcom-adreno330 +TARGET_CPU_ABI := armeabi-v7a +TARGET_CPU_ABI2 := armeabi TARGET_CPU_VARIANT := krait -TARGET_NO_RADIOIMAGE := true -TARGET_NO_BOOTLOADER := true - # Assertions TARGET_BOARD_INFO_FILE ?= device/lge/g2-common/board-info.txt +# Bootloader TARGET_BOOTLOADER_BOARD_NAME := galbi +TARGET_NO_BOOTLOADER := true +TARGET_NO_RADIOIMAGE := true -# Platform -TARGET_BOARD_PLATFORM := msm8974 -TARGET_BOARD_PLATFORM_GPU := qcom-adreno330 - -# Kernel information -BOARD_KERNEL_BASE := 0x00000000 -BOARD_KERNEL_CMDLINE := no_underclock=0 console=none androidboot.hardware=g2 androidboot.bootdevice=msm_sdcc.1 user_debug=31 msm_rtb.filter=0x0 mdss_mdp.panel=1:dsi:0:qcom,mdss_dsi_g2_lgd_cmd -BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x05000000 --tags_offset 0x04800000 -BOARD_KERNEL_PAGESIZE := 2048 -BOARD_KERNEL_SEPARATED_DT := true +# Kernel BOARD_CUSTOM_BOOTIMG := true BOARD_CUSTOM_BOOTIMG_MK := device/lge/g2-common/releasetools/mkbootimg.mk +BOARD_KERNEL_BASE := 0x00000000 +BOARD_KERNEL_CMDLINE := no_underclock=0 console=ttyHSL0,115200,n8 androidboot.hardware=g2 androidboot.bootdevice=msm_sdcc.1 user_debug=31 msm_rtb.filter=0x0 mdss_mdp.panel=1:dsi:0:qcom,mdss_dsi_g2_lgd_cmd +BOARD_KERNEL_PAGESIZE := 2048 +BOARD_KERNEL_SEPARATED_DT := true +BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x05000000 --tags_offset 0x04800000 TARGET_KERNEL_SOURCE := kernel/lge/msm8974 # Audio -BOARD_USES_ALSA_AUDIO:= true AUDIO_FEATURE_LOW_LATENCY_PRIMARY := true +BOARD_USES_ALSA_AUDIO:= true -# Wi-Fi -BOARD_WPA_SUPPLICANT_DRIVER := NL80211 -WPA_SUPPLICANT_VERSION := VER_0_8_X -BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_bcmdhd -BOARD_HOSTAPD_DRIVER := NL80211 -BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_bcmdhd -BOARD_WLAN_DEVICE := bcmdhd -WIFI_DRIVER_FW_PATH_PARAM := "/sys/module/bcmdhd/parameters/firmware_path" -WIFI_DRIVER_FW_PATH_STA := "/system/etc/firmware/fw_bcmdhd.bin" -WIFI_DRIVER_FW_PATH_AP := "/system/etc/firmware/fw_bcmdhd_apsta.bin" +# Bluetooth +BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/lge/g2-common/bluetooth +BOARD_BLUEDROID_VENDOR_CONF := device/lge/g2-common/bluetooth/vnd_g2.txt +BOARD_HAVE_BLUETOOTH := true +BOARD_HAVE_BLUETOOTH_BCM := true + +# Camera +COMMON_GLOBAL_CFLAGS += -DLG_CAMERA_HARDWARE +USE_DEVICE_SPECIFIC_CAMERA := true + +# Charger +BOARD_CHARGER_ENABLE_SUSPEND := true +COMMON_GLOBAL_CFLAGS += \ + -DBOARD_CHARGING_CMDLINE_NAME='"androidboot.mode"' \ + -DBOARD_CHARGING_CMDLINE_VALUE='"chargerlogo"' + +# CMHW +BOARD_HARDWARE_CLASS := device/lge/g2-common/cmhw/ # Display -USE_OPENGL_RENDERER := true -TARGET_USES_ION := true HAVE_ADRENO_SOURCE := false -OVERRIDE_RS_DRIVER := libRSDriver_adreno.so -NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3 - -# EGL MAX_EGL_CACHE_KEY_SIZE := 12*1024 MAX_EGL_CACHE_SIZE := 2048*1024 +NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3 +OVERRIDE_RS_DRIVER := libRSDriver_adreno.so +TARGET_USES_ION := true +USE_OPENGL_RENDERER := true -# Qualcomm HALs -BOARD_USES_QCOM_HARDWARE := true - -# QCOM PowerHAL -TARGET_POWERHAL_VARIANT := g2 +# Fonts +EXTENDED_FONT_FOOTPRINT := true # Lights TARGET_PROVIDES_LIBLIGHT := true -# Camera -USE_DEVICE_SPECIFIC_CAMERA := true -COMMON_GLOBAL_CFLAGS += -DLG_CAMERA_HARDWARE - -# Flags -COMMON_GLOBAL_CFLAGS += -DNO_SECURE_DISCARD - -TARGET_RECOVERY_FSTAB = device/lge/g2-common/rootdir/etc/fstab.g2 -BOARD_USE_CUSTOM_RECOVERY_FONT := \"roboto_23x41.h\" -TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888" -COMMON_GLOBAL_CFLAGS += -DNO_SECURE_DISCARD - -TARGET_USERIMAGES_USE_EXT4 := true -TARGET_USERIMAGES_USE_F2FS := true +# Partitions +BOARD_FLASH_BLOCK_SIZE := 131072 BOARD_BOOTIMAGE_PARTITION_SIZE := 23068672 # 22M +BOARD_CACHEIMAGE_PARTITION_SIZE := 734003200 #700M BOARD_RECOVERYIMAGE_PARTITION_SIZE := 23068672 # 22M BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2684354560 # 2.5G (actually 2.75, but leave room for model variation) BOARD_USERDATAIMAGE_PARTITION_SIZE := 13725837312 # 12.8G (its much larger, but this is enough for now) -BOARD_CACHEIMAGE_PARTITION_SIZE := 734003200 #700M -BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 -BOARD_FLASH_BLOCK_SIZE := 131072 # (BOARD_KERNEL_PAGESIZE * 64) -# Bluetooth -BOARD_HAVE_BLUETOOTH := true -BOARD_HAVE_BLUETOOTH_BCM := true -BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/lge/g2-common/bluetooth -BOARD_BLUEDROID_VENDOR_CONF := device/lge/g2-common/bluetooth/vnd_g2.txt - -# Fonts -EXTENDED_FONT_FOOTPRINT := true - -# Offmode Charging -BOARD_CHARGER_ENABLE_SUSPEND := true -COMMON_GLOBAL_CFLAGS += \ - -DBOARD_CHARGING_CMDLINE_NAME='"androidboot.mode"' \ - -DBOARD_CHARGING_CMDLINE_VALUE='"chargerlogo"' +# Power +TARGET_POWERHAL_VARIANT := g2 -# CM Hardware -BOARD_HARDWARE_CLASS := device/lge/g2-common/cmhw/ +# Qualcomm support +BOARD_USES_QCOM_HARDWARE := true +BOARD_USES_QC_TIME_SERVICES := true -# SELinux policies -# QCOM sepolicy -include device/qcom/sepolicy/sepolicy.mk +# Recovery +COMMON_GLOBAL_CFLAGS += -DNO_SECURE_DISCARD +TARGET_RECOVERY_FSTAB = device/lge/g2-common/rootdir/etc/fstab.g2 +TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888" +TARGET_RECOVERY_UPDATER_LIBS := librecovery_updater_g2 +TARGET_USERIMAGES_USE_EXT4 := true +TARGET_USERIMAGES_USE_F2FS := true -BOARD_SEPOLICY_DIRS += \ - device/lge/g2-common/sepolicy +# Releasetools +TARGET_RELEASETOOLS_EXTENSIONS := device/lge/g2-common/releasetools # RIL BOARD_RIL_CLASS := ../../../device/lge/g2-common/ril/ TARGET_RELEASE_CPPFLAGS += -DNEEDS_LGE_RIL_SYMBOLS -# Releasetools -TARGET_RECOVERY_UPDATER_LIBS := librecovery_updater_g2 -TARGET_RELEASETOOLS_EXTENSIONS := device/lge/g2-common/releasetools +# SELinux policies +include device/qcom/sepolicy/sepolicy.mk -# Qualcomm time -BOARD_USES_QC_TIME_SERVICES := true +BOARD_SEPOLICY_DIRS += \ + device/lge/g2-common/sepolicy -# Device headers -TARGET_SPECIFIC_HEADER_PATH := device/lge/g2-common/include +# Wi-Fi +BOARD_WPA_SUPPLICANT_DRIVER := NL80211 +WPA_SUPPLICANT_VERSION := VER_0_8_X +BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_bcmdhd +BOARD_HOSTAPD_DRIVER := NL80211 +BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_bcmdhd +BOARD_WLAN_DEVICE := bcmdhd +WIFI_DRIVER_FW_PATH_PARAM := "/sys/module/bcmdhd/parameters/firmware_path" +WIFI_DRIVER_FW_PATH_STA := "/system/etc/firmware/fw_bcmdhd.bin" +WIFI_DRIVER_FW_PATH_AP := "/system/etc/firmware/fw_bcmdhd_apsta.bin" From 91b45d7483e8ca7389db41ccdd4ef16408fcbe59 Mon Sep 17 00:00:00 2001 From: Ethan Chen Date: Fri, 2 Oct 2015 14:13:31 -0700 Subject: [PATCH 010/139] g2-common: Reorganize g2.mk * Save ART watchdog * Save Google Client ID * Remove HWUI/Dalvik CM settings (we are using values from system_prop.mk) * Cleaned up redundant \ Change-Id: Idfadbb40afd5a3c4db1907a866b02fc61d363e1e Signed-off-by: Zdrowy Gosciu Conflicts: g2.mk --- g2.mk | 242 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 122 insertions(+), 120 deletions(-) diff --git a/g2.mk b/g2.mk index cdc8cc16..c57e08ee 100644 --- a/g2.mk +++ b/g2.mk @@ -23,148 +23,118 @@ DEVICE_PACKAGE_OVERLAYS := $(LOCAL_PATH)/overlay # Google Client ID PRODUCT_GMS_CLIENTID_BASE := android-lge +# Permissions +PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/android.hardware.audio.low_latency.xml:system/etc/permissions/android.hardware.audio.low_latency.xml \ + frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml \ + frameworks/native/data/etc/android.hardware.camera.autofocus.xml:system/etc/permissions/android.hardware.camera.autofocus.xml \ + frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:system/etc/permissions/android.hardware.camera.flash-autofocus.xml \ + frameworks/native/data/etc/android.hardware.camera.front.xml:system/etc/permissions/android.hardware.camera.front.xml \ + frameworks/native/data/etc/android.hardware.camera.xml:system/etc/permissions/android.hardware.camera.xml \ + frameworks/native/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \ + frameworks/native/data/etc/android.hardware.nfc.xml:system/etc/permissions/android.hardware.nfc.xml \ + frameworks/native/data/etc/android.hardware.sensor.barometer.xml:system/etc/permissions/android.hardware.sensor.barometer.xml \ + frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:system/etc/permissions/android.hardware.sensor.gyroscope.xml \ + frameworks/native/data/etc/android.hardware.sensor.light.xml:system/etc/permissions/android.hardware.sensor.light.xml \ + frameworks/native/data/etc/android.hardware.sensor.proximity.xml:system/etc/permissions/android.hardware.sensor.proximity.xml \ + frameworks/native/data/etc/android.hardware.sensor.stepcounter.xml:system/etc/permissions/android.hardware.sensor.stepcounter.xml \ + frameworks/native/data/etc/android.hardware.sensor.stepdetector.xml:system/etc/permissions/android.hardware.sensor.stepdetector.xml \ + frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml \ + frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \ + frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml \ + frameworks/native/data/etc/android.hardware.wifi.direct.xml:system/etc/permissions/android.hardware.wifi.direct.xml \ + frameworks/native/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \ + frameworks/native/data/etc/com.android.nfc_extras.xml:system/etc/permissions/com.android.nfc_extras.xml \ + frameworks/native/data/etc/handheld_core_hardware.xml:system/etc/permissions/handheld_core_hardware.xml + # System properties -include $(LOCAL_PATH)/system_prop.mk -# Fall back to lower resolution if xxhdpi bitmaps dont exist +# Screen density PRODUCT_AAPT_CONFIG := normal hdpi xhdpi xxhdpi PRODUCT_AAPT_PREF_CONFIG := xxhdpi -# Media and audio -PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/configs/audio_policy.conf:system/etc/audio_policy.conf \ - $(LOCAL_PATH)/configs/audio_effects.conf:system/vendor/etc/audio_effects.conf \ - $(LOCAL_PATH)/configs/media_profiles.xml:system/etc/media_profiles.xml \ - $(LOCAL_PATH)/configs/media_codecs.xml:system/etc/media_codecs.xml \ - $(LOCAL_PATH)/configs/mixer_paths.xml:system/etc/mixer_paths.xml \ - frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:system/etc/media_codecs_google_audio.xml \ - frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:system/etc/media_codecs_google_telephony.xml \ - frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:system/etc/media_codecs_google_video.xml - -# Thermal configuration -PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/configs/thermal-engine-8974.conf:system/etc/thermal-engine-8974.conf \ - $(LOCAL_PATH)/configs/thermal-engine-default.conf:system/etc/thermal-engine-default.conf - -# Sensors -PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/configs/sensor_def_common.conf:system/etc/sensor_def_common.conf +# Boot animation +TARGET_SCREEN_HEIGHT := 1920 +TARGET_SCREEN_WIDTH := 1080 -# Touchscreen configuration -PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/configs/gpio-keys.kl:system/usr/keylayout/gpio-keys.kl \ - $(LOCAL_PATH)/configs/synaptics_rmi4_i2c.kl:system/usr/keylayout/synaptics_rmi4_i2c.kl \ - $(LOCAL_PATH)/configs/touch_dev.idc:system/usr/idc/touch_dev.idc - -# These are the hardware-specific features -PRODUCT_COPY_FILES += \ - frameworks/native/data/etc/handheld_core_hardware.xml:system/etc/permissions/handheld_core_hardware.xml \ - frameworks/native/data/etc/android.hardware.camera.autofocus.xml:system/etc/permissions/android.hardware.camera.autofocus.xml \ - frameworks/native/data/etc/android.hardware.camera.xml:system/etc/permissions/android.hardware.camera.xml \ - frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:system/etc/permissions/android.hardware.camera.flash-autofocus.xml \ - frameworks/native/data/etc/android.hardware.camera.front.xml:system/etc/permissions/android.hardware.camera.front.xml \ - frameworks/native/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \ - frameworks/native/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \ - frameworks/native/data/etc/android.hardware.wifi.direct.xml:system/etc/permissions/android.hardware.wifi.direct.xml \ - frameworks/native/data/etc/android.hardware.sensor.proximity.xml:system/etc/permissions/android.hardware.sensor.proximity.xml \ - frameworks/native/data/etc/android.hardware.sensor.light.xml:system/etc/permissions/android.hardware.sensor.light.xml \ - frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:system/etc/permissions/android.hardware.sensor.gyroscope.xml \ - frameworks/native/data/etc/android.hardware.sensor.barometer.xml:system/etc/permissions/android.hardware.sensor.barometer.xml \ - frameworks/native/data/etc/android.hardware.sensor.stepcounter.xml:system/etc/permissions/android.hardware.sensor.stepcounter.xml \ - frameworks/native/data/etc/android.hardware.sensor.stepdetector.xml:system/etc/permissions/android.hardware.sensor.stepdetector.xml \ - frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \ - frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml \ - frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml \ - frameworks/native/data/etc/android.hardware.audio.low_latency.xml:system/etc/permissions/android.hardware.audio.low_latency.xml \ - frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml - -# Prepatch to fix BT/WiFi bus lockups -PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/bluetooth/bcm4335_prepatch.hcd:system/vendor/firmware/bcm4335_prepatch.hcd +# Audio +PRODUCT_PACKAGES += \ + audio.a2dp.default \ + audio.primary.msm8974 \ + audio.r_submix.default \ + audio.usb.default \ + audiod \ + libaudio-resampler \ + libqcompostprocbundle \ + libqcomvisualizer \ + libqcomvoiceprocessing \ + libqcomvoiceprocessingdescriptors -# GPS configuration PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/gps/etc/gps.conf:system/etc/gps.conf \ - $(LOCAL_PATH)/gps/etc/flp.conf:system/etc/flp.conf \ - $(LOCAL_PATH)/gps/etc/izat.conf:system/etc/izat.conf \ - $(LOCAL_PATH)/gps/etc/quipc.conf:system/etc/quipc.conf \ - $(LOCAL_PATH)/gps/etc/sap.conf:system/etc/sap.conf + $(LOCAL_PATH)/configs/audio_effects.conf:system/vendor/etc/audio_effects.conf \ + $(LOCAL_PATH)/configs/audio_policy.conf:system/etc/audio_policy.conf \ + $(LOCAL_PATH)/configs/mixer_paths.xml:system/etc/mixer_paths.xml -# IPv6 tethering +# Bluetooth PRODUCT_PACKAGES += \ - ebtables \ - ethertypes + hwaddrs -# IRSC PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/configs/sec_config:system/etc/sec_config - -# Init -PRODUCT_PACKAGES += \ - init.g2.rc \ - init.g2.usb.rc \ - init.g2.power.rc \ - init.qcom.sh \ - ueventd.g2.rc \ - fstab.g2 + $(LOCAL_PATH)/bluetooth/bcm4335_prepatch.hcd:system/vendor/firmware/bcm4335_prepatch.hcd +# Camera PRODUCT_PACKAGES += \ - libwpa_client \ - hostapd \ - dhcpcd.conf \ - wpa_supplicant \ - wpa_supplicant.conf + camera.msm8974 +# Charger PRODUCT_PACKAGES += \ charger_res_images -# NFC packages +# Display PRODUCT_PACKAGES += \ - Tag \ - com.android.nfc_extras + copybit.msm8974 \ + gralloc.msm8974 \ + hwcomposer.msm8974 \ + memtrack.msm8974 -# NFC access control + feature files + configuration -PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/nfc/libnfc-brcm.conf:system/etc/libnfc-brcm.conf \ - $(LOCAL_PATH)/nfc/nfcee_access.xml:system/etc/nfcee_access.xml \ - frameworks/native/data/etc/com.android.nfc_extras.xml:system/etc/permissions/com.android.nfc_extras.xml \ - frameworks/native/data/etc/android.hardware.nfc.xml:system/etc/permissions/android.hardware.nfc.xml +# GPS +PRODUCT_PACKAGES += \ + gps.msm8974 # ART PRODUCT_PROPERTY_OVERRIDES += \ dalvik.vm.dex2oat-flags=--no-watch-dog -PRODUCT_TAGS += dalvik.gc.type-precise - -PRODUCT_PACKAGES += \ - com.android.future.usb.accessory +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/gps/etc/flp.conf:system/etc/flp.conf \ + $(LOCAL_PATH)/gps/etc/gps.conf:system/etc/gps.conf \ + $(LOCAL_PATH)/gps/etc/izat.conf:system/etc/izat.conf \ + $(LOCAL_PATH)/gps/etc/quipc.conf:system/etc/quipc.conf \ + $(LOCAL_PATH)/gps/etc/sap.conf:system/etc/sap.conf +# Init PRODUCT_PACKAGES += \ - liboverlay \ - hwcomposer.msm8974 \ - gralloc.msm8974 \ - copybit.msm8974 \ - memtrack.msm8974 + fstab.g2 \ + init.g2.rc \ + init.g2.usb.rc \ + init.qcom.sh \ + panel.sh \ + ueventd.g2.rc \ + init.g2.power.rc -# Local wrapper for fixups +# IPv6 tethering PRODUCT_PACKAGES += \ - camera.msm8974 + ebtables \ + ethertypes -PRODUCT_PACKAGES += \ - power.msm8974 +# IRSC +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/configs/sec_config:system/etc/sec_config +# Lights PRODUCT_PACKAGES += \ - audiod \ - audio_policy.default \ - audio.primary.msm8974 \ - audio.a2dp.default \ - audio.usb.default \ - audio.r_submix.default \ - libaudio-resampler \ - libqcomvisualizer \ - libqcomvoiceprocessing \ - libqcomvoiceprocessingdescriptors \ - libqcompostprocbundle + lights.msm8974 # Media PRODUCT_PACKAGES += \ @@ -184,31 +154,63 @@ PRODUCT_PACKAGES += \ PRODUCT_BOOT_JARS += qcmediaplayer -# GPS +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/configs/media_codecs.xml:system/etc/media_codecs.xml \ + $(LOCAL_PATH)/configs/media_profiles.xml:system/etc/media_profiles.xml \ + frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:system/etc/media_codecs_google_audio.xml \ + frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:system/etc/media_codecs_google_telephony.xml \ + frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:system/etc/media_codecs_google_video.xml + +# NFC PRODUCT_PACKAGES += \ - gps.msm8974 + Tag \ + com.android.nfc_extras + +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/nfc/libnfc-brcm.conf:system/etc/libnfc-brcm.conf \ + $(LOCAL_PATH)/nfc/nfcee_access.xml:system/etc/nfcee_access.xml +# Power PRODUCT_PACKAGES += \ - hwaddrs + power.msm8974 +# Qualcomm PRODUCT_PACKAGES += \ + libcnefeatureconfig \ libxml2 +# Recovery PRODUCT_PACKAGES += \ - libcnefeatureconfig + librecovery_updater_g2 -PRODUCT_PACKAGES += \ - lights.msm8974 +# Sensors +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/configs/sensor_def_common.conf:system/etc/sensor_def_common.conf +# Thermal PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/configs/bcmdhd.cal:system/etc/wifi/bcmdhd.cal + $(LOCAL_PATH)/configs/thermal-engine-8974.conf:system/etc/thermal-engine-8974.conf \ + $(LOCAL_PATH)/configs/thermal-engine-default.conf:system/etc/thermal-engine-default.conf + +# Touchscreen +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/configs/gpio-keys.kl:system/usr/keylayout/gpio-keys.kl \ + $(LOCAL_PATH)/configs/synaptics_rmi4_i2c.kl:system/usr/keylayout/synaptics_rmi4_i2c.kl \ + $(LOCAL_PATH)/configs/touch_dev.idc:system/usr/idc/touch_dev.idc -# Panel detection script +# USB PRODUCT_PACKAGES += \ - panel.sh + com.android.future.usb.accessory -# Recovery +# Wifi PRODUCT_PACKAGES += \ - librecovery_updater_g2 + libwpa_client \ + hostapd \ + dhcpcd.conf \ + wpa_supplicant \ + wpa_supplicant.conf + +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/configs/bcmdhd.cal:system/etc/wifi/bcmdhd.cal $(call inherit-product-if-exists, hardware/broadcom/wlan/bcmdhd/config/config-bcm.mk) From 48845fd31db033064bbe2d0529887e2d8480404a Mon Sep 17 00:00:00 2001 From: Ethan Chen Date: Fri, 2 Oct 2015 14:14:55 -0700 Subject: [PATCH 011/139] g2-common: Separate keylayouts Change-Id: Ic7fdbb65f87e508cbee0846f1597e46650ccf554 --- g2.mk | 6 +++--- {configs => keylayout}/gpio-keys.kl | 0 {configs => keylayout}/synaptics_rmi4_i2c.kl | 0 {configs => keylayout}/touch_dev.idc | 0 4 files changed, 3 insertions(+), 3 deletions(-) rename {configs => keylayout}/gpio-keys.kl (100%) rename {configs => keylayout}/synaptics_rmi4_i2c.kl (100%) rename {configs => keylayout}/touch_dev.idc (100%) diff --git a/g2.mk b/g2.mk index c57e08ee..960fe790 100644 --- a/g2.mk +++ b/g2.mk @@ -194,9 +194,9 @@ PRODUCT_COPY_FILES += \ # Touchscreen PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/configs/gpio-keys.kl:system/usr/keylayout/gpio-keys.kl \ - $(LOCAL_PATH)/configs/synaptics_rmi4_i2c.kl:system/usr/keylayout/synaptics_rmi4_i2c.kl \ - $(LOCAL_PATH)/configs/touch_dev.idc:system/usr/idc/touch_dev.idc + $(LOCAL_PATH)/keylayout/gpio-keys.kl:system/usr/keylayout/gpio-keys.kl \ + $(LOCAL_PATH)/keylayout/synaptics_rmi4_i2c.kl:system/usr/keylayout/synaptics_rmi4_i2c.kl \ + $(LOCAL_PATH)/keylayout/touch_dev.idc:system/usr/idc/touch_dev.idc # USB PRODUCT_PACKAGES += \ diff --git a/configs/gpio-keys.kl b/keylayout/gpio-keys.kl similarity index 100% rename from configs/gpio-keys.kl rename to keylayout/gpio-keys.kl diff --git a/configs/synaptics_rmi4_i2c.kl b/keylayout/synaptics_rmi4_i2c.kl similarity index 100% rename from configs/synaptics_rmi4_i2c.kl rename to keylayout/synaptics_rmi4_i2c.kl diff --git a/configs/touch_dev.idc b/keylayout/touch_dev.idc similarity index 100% rename from configs/touch_dev.idc rename to keylayout/touch_dev.idc From c6380fda1750c543b0fa38914fc2e3aeaa2c3dba Mon Sep 17 00:00:00 2001 From: Ethan Chen Date: Fri, 2 Oct 2015 14:38:28 -0700 Subject: [PATCH 012/139] g2-common: Remove unused synaptics keylayout Change-Id: Idb8d1d9db81ddfa253094bc68fe1bd9403b7242a --- g2.mk | 1 - keylayout/synaptics_rmi4_i2c.kl | 31 ------------------------------- 2 files changed, 32 deletions(-) delete mode 100644 keylayout/synaptics_rmi4_i2c.kl diff --git a/g2.mk b/g2.mk index 960fe790..b91ec79d 100644 --- a/g2.mk +++ b/g2.mk @@ -195,7 +195,6 @@ PRODUCT_COPY_FILES += \ # Touchscreen PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/keylayout/gpio-keys.kl:system/usr/keylayout/gpio-keys.kl \ - $(LOCAL_PATH)/keylayout/synaptics_rmi4_i2c.kl:system/usr/keylayout/synaptics_rmi4_i2c.kl \ $(LOCAL_PATH)/keylayout/touch_dev.idc:system/usr/idc/touch_dev.idc # USB diff --git a/keylayout/synaptics_rmi4_i2c.kl b/keylayout/synaptics_rmi4_i2c.kl deleted file mode 100644 index eda99fb6..00000000 --- a/keylayout/synaptics_rmi4_i2c.kl +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (c) 2012, 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. - -key 139 MENU -key 102 HOME -key 158 BACK -key 217 SEARCH From 0700bc59c7429d1bcf85e0c10d649a975ae7a7c0 Mon Sep 17 00:00:00 2001 From: Ethan Chen Date: Fri, 2 Oct 2015 14:40:13 -0700 Subject: [PATCH 013/139] g2-common: Remove unused keycodes Change-Id: I943e22407dfed735a3ac525f90b11730f99ed882 --- keylayout/gpio-keys.kl | 3 --- 1 file changed, 3 deletions(-) diff --git a/keylayout/gpio-keys.kl b/keylayout/gpio-keys.kl index d7b70cf0..39ea17d8 100644 --- a/keylayout/gpio-keys.kl +++ b/keylayout/gpio-keys.kl @@ -27,6 +27,3 @@ key 115 VOLUME_UP key 114 VOLUME_DOWN -key 102 HOME -key 528 FOCUS -key 766 CAMERA From ca1c9fa75ca5efc08d9b2028e473226a57adff95 Mon Sep 17 00:00:00 2001 From: Ethan Chen Date: Fri, 2 Oct 2015 14:52:18 -0700 Subject: [PATCH 014/139] g2-common: Remove unused thermal config Change-Id: I1456aca7677b896e9677be4b1ce48a4144ed0726 --- configs/thermal-engine-default.conf | 38 ----------------------------- g2.mk | 3 +-- 2 files changed, 1 insertion(+), 40 deletions(-) delete mode 100644 configs/thermal-engine-default.conf diff --git a/configs/thermal-engine-default.conf b/configs/thermal-engine-default.conf deleted file mode 100644 index 88b26b48..00000000 --- a/configs/thermal-engine-default.conf +++ /dev/null @@ -1,38 +0,0 @@ -sampling 5000 - -[CPU0_MONITOR] -algo_type monitor -sensor cpu0 -sampling 65 -thresholds 115000 -thresholds_clr 110000 -actions shutdown -action_info 0 - -[CPU1_MONITOR] -algo_type monitor -sensor cpu1 -sampling 65 -thresholds 115000 -thresholds_clr 110000 -actions shutdown -action_info 0 - -[CPU2_MONITOR] -algo_type monitor -sensor cpu2 -sampling 65 -thresholds 115000 -thresholds_clr 110000 -actions shutdown -action_info 0 - -[CPU3_MONITOR] -algo_type monitor -sensor cpu3 -sampling 65 -thresholds 115000 -thresholds_clr 110000 -actions shutdown -action_info 0 - diff --git a/g2.mk b/g2.mk index b91ec79d..270c1916 100644 --- a/g2.mk +++ b/g2.mk @@ -189,8 +189,7 @@ PRODUCT_COPY_FILES += \ # Thermal PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/configs/thermal-engine-8974.conf:system/etc/thermal-engine-8974.conf \ - $(LOCAL_PATH)/configs/thermal-engine-default.conf:system/etc/thermal-engine-default.conf + $(LOCAL_PATH)/configs/thermal-engine-8974.conf:system/etc/thermal-engine-8974.conf # Touchscreen PRODUCT_COPY_FILES += \ From f050e6112b1b2a100e8937c73d04d895d6d9e075 Mon Sep 17 00:00:00 2001 From: Ethan Chen Date: Fri, 2 Oct 2015 15:02:17 -0700 Subject: [PATCH 015/139] g2-common: Clean up permissions * Declare telephony permissions * Declare USB host permission * Remove duplicate camera permissions Change-Id: I81dc07d8f8a67dc8b87b53b84986e8900830ec4d --- g2.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/g2.mk b/g2.mk index 270c1916..a22a1781 100644 --- a/g2.mk +++ b/g2.mk @@ -27,10 +27,8 @@ PRODUCT_GMS_CLIENTID_BASE := android-lge PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.audio.low_latency.xml:system/etc/permissions/android.hardware.audio.low_latency.xml \ frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml \ - frameworks/native/data/etc/android.hardware.camera.autofocus.xml:system/etc/permissions/android.hardware.camera.autofocus.xml \ frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:system/etc/permissions/android.hardware.camera.flash-autofocus.xml \ frameworks/native/data/etc/android.hardware.camera.front.xml:system/etc/permissions/android.hardware.camera.front.xml \ - frameworks/native/data/etc/android.hardware.camera.xml:system/etc/permissions/android.hardware.camera.xml \ frameworks/native/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \ frameworks/native/data/etc/android.hardware.nfc.xml:system/etc/permissions/android.hardware.nfc.xml \ frameworks/native/data/etc/android.hardware.sensor.barometer.xml:system/etc/permissions/android.hardware.sensor.barometer.xml \ @@ -40,8 +38,11 @@ PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.sensor.stepcounter.xml:system/etc/permissions/android.hardware.sensor.stepcounter.xml \ frameworks/native/data/etc/android.hardware.sensor.stepdetector.xml:system/etc/permissions/android.hardware.sensor.stepdetector.xml \ frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml \ + frameworks/native/data/etc/android.hardware.telephony.cdma.xml:system/etc/permissions/android.hardware.telephony.cdma.xml \ + frameworks/native/data/etc/android.hardware.telephony.gsm.xml:system/etc/permissions/android.hardware.telephony.gsm.xml \ frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \ frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml \ + frameworks/native/data/etc/android.hardware.usb.host.xml:system/etc/permissions/android.hardware.usb.host.xml \ frameworks/native/data/etc/android.hardware.wifi.direct.xml:system/etc/permissions/android.hardware.wifi.direct.xml \ frameworks/native/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \ frameworks/native/data/etc/com.android.nfc_extras.xml:system/etc/permissions/com.android.nfc_extras.xml \ From a2596b66eedab8a1c32d34c9192267f1fb23e379 Mon Sep 17 00:00:00 2001 From: Ethan Chen Date: Fri, 2 Oct 2015 15:49:24 -0700 Subject: [PATCH 016/139] g2-common: Add proprietary file extraction scripts Change-Id: I2c636300f678a115f2c00b57ad5507a8e6b687b8 --- extract-files.sh | 62 +++++++++ setup-makefiles.sh | 312 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 374 insertions(+) create mode 100755 extract-files.sh create mode 100755 setup-makefiles.sh diff --git a/extract-files.sh b/extract-files.sh new file mode 100755 index 00000000..364dbb86 --- /dev/null +++ b/extract-files.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +#set -e +export FAMILY=g2-common +export VENDOR=lge + +function extract() { + for FILE in `egrep -v '(^#|^$)' $1`; do + OLDIFS=$IFS IFS=":" PARSING_ARRAY=($FILE) IFS=$OLDIFS + FILE=`echo ${PARSING_ARRAY[0]} | sed -e "s/^-//g"` + DEST=${PARSING_ARRAY[1]} + if [ -z $DEST ]; then + DEST=$FILE + fi + DIR=`dirname $FILE` + if [ ! -d $2/$DIR ]; then + mkdir -p $2/$DIR + fi + if [ "$SRC" = "adb" ]; then + # Try CM target first + adb pull /system/$DEST $2/$DEST + # if file does not exist try OEM target + if [ "$?" != "0" ]; then + adb pull /system/$FILE $2/$DEST + fi + else + cp $SRC/system/$FILE $2/$DEST + # if file dot not exist try destination + if [ "$?" != "0" ] + then + cp $SRC/system/$DEST $2/$DEST + fi + fi + done +} + +if [ $# -eq 0 ]; then + SRC=adb +else + if [ $# -eq 1 ]; then + SRC=$1 + else + echo "$0: bad number of arguments" + echo "" + echo "usage: $0 [PATH_TO_EXPANDED_ROM]" + echo "" + echo "If PATH_TO_EXPANDED_ROM is not specified, blobs will be extracted from" + echo "the device using adb pull." + exit 1 + fi +fi + +BASE=../../../vendor/$VENDOR/$FAMILY/proprietary +rm -rf $BASE/* + +DEVBASE=../../../vendor/$VENDOR/$DEVICE/proprietary +rm -rf $DEVBASE/* + +extract ../../$VENDOR/$FAMILY/proprietary-files.txt $BASE +extract ../../$VENDOR/$DEVICE/proprietary-files.txt $DEVBASE + +./setup-makefiles.sh diff --git a/setup-makefiles.sh b/setup-makefiles.sh new file mode 100755 index 00000000..840583c0 --- /dev/null +++ b/setup-makefiles.sh @@ -0,0 +1,312 @@ +#!/bin/bash + +OUTDIR=vendor/$VENDOR/$DEVICE +MAKEFILE=../../../$OUTDIR/$DEVICE-vendor-blobs.mk + +(cat << EOF) > $MAKEFILE +# Copyright (C) 2015 The CyanogenMod 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. + +# This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh + +PRODUCT_COPY_FILES += \\ +EOF + +LINEEND=" \\" +COUNT=`wc -l proprietary-files.txt | awk {'print $1'}` +DISM=`egrep -c '(^#|^$)' proprietary-files.txt` +COUNT=`expr $COUNT - $DISM` +for FILE in `egrep -v '(^#|^$)' proprietary-files.txt`; do + COUNT=`expr $COUNT - 1` + if [ $COUNT = "0" ]; then + LINEEND="" + fi + # Split the file from the destination (format is "file[:destination]") + OLDIFS=$IFS IFS=":" PARSING_ARRAY=($FILE) IFS=$OLDIFS + if [[ ! "$FILE" =~ ^-.* ]]; then + FILE=`echo ${PARSING_ARRAY[0]} | sed -e "s/^-//g"` + DEST=${PARSING_ARRAY[1]} + if [ -n "$DEST" ]; then + FILE=$DEST + fi + echo " $OUTDIR/proprietary/$FILE:system/$FILE$LINEEND" >> $MAKEFILE + fi +done + +(cat << EOF) > ../../../$OUTDIR/$DEVICE-vendor.mk +# Copyright (C) 2015 The CyanogenMod 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. + +# This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh + +# Pick up overlay for features that depend on non-open-source files + +\$(call inherit-product, vendor/$VENDOR/$DEVICE/$DEVICE-vendor-blobs.mk) +EOF + +(cat << EOF) > ../../../$OUTDIR/BoardConfigVendor.mk +# Copyright (C) 2015 The CyanogenMod 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. + +# This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh +EOF + +export DEVICE=g2-common + +OUTDIR=vendor/$VENDOR/$DEVICE +MAKEFILE=../../../$OUTDIR/$DEVICE-vendor-blobs.mk + +(cat << EOF) > $MAKEFILE +# Copyright (C) 2015 The CyanogenMod 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. + +# This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh + +PRODUCT_COPY_FILES += \\ +EOF + +LINEEND=" \\" +COUNT=`wc -l ../$DEVICE/proprietary-files.txt | awk {'print $1'}` +DISM=`egrep -c '(^#|^$)' ../$DEVICE/proprietary-files.txt` +COUNT=`expr $COUNT - $DISM` +for FILE in `egrep -v '(^#|^$)' ../$DEVICE/proprietary-files.txt`; do + COUNT=`expr $COUNT - 1` + if [ $COUNT = "0" ]; then + LINEEND="" + fi + # Split the file from the destination (format is "file[:destination]") + OLDIFS=$IFS IFS=":" PARSING_ARRAY=($FILE) IFS=$OLDIFS + if [[ ! "$FILE" =~ ^-.* ]]; then + FILE=`echo ${PARSING_ARRAY[0]} | sed -e "s/^-//g"` + DEST=${PARSING_ARRAY[1]} + if [ -n "$DEST" ]; then + FILE=$DEST + fi + echo " $OUTDIR/proprietary/$FILE:system/$FILE$LINEEND" >> $MAKEFILE + fi +done + +(cat << EOF) > ../../../$OUTDIR/$DEVICE-vendor.mk +# Copyright (C) 2015 The CyanogenMod 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. + +# This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh + +# Pick up overlay for features that depend on non-open-source files +PRODUCT_PACKAGES += \\ + TimeService \\ + shutdownlistener \\ + qcnvitems \\ + libtime_genoff \\ + libTimeService \\ + libHevcSwDecoder + +\$(call inherit-product, vendor/$VENDOR/$DEVICE/$DEVICE-vendor-blobs.mk) +EOF + +(cat << EOF) > ../../../$OUTDIR/BoardConfigVendor.mk +# Copyright (C) 2015 The CyanogenMod 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. + +# This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh +EOF + +(cat << EOF) > ../../../$OUTDIR/Android.mk +# Copyright (C) 2015 The CyanogenMod 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. + +# This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh + +LOCAL_PATH := \$(call my-dir) + +ifneq (\$(filter g2 d800 d801 d802 d803 f320 l01f ls980 vs980,\$(TARGET_DEVICE)),) + +include \$(CLEAR_VARS) +LOCAL_MODULE := PPPreference +LOCAL_MODULE_OWNER := $VENDOR +LOCAL_SRC_FILES := proprietary/app/PPPreference/PPPreference.apk +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_SUFFIX := \$(COMMON_ANDROID_PACKAGE_SUFFIX) +LOCAL_MODULE_CLASS := APPS +LOCAL_CERTIFICATE := platform +include \$(BUILD_PREBUILT) + +include \$(CLEAR_VARS) +LOCAL_MODULE := TimeService +LOCAL_MODULE_OWNER := $VENDOR +LOCAL_SRC_FILES := proprietary/app/TimeService/TimeService.apk +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_SUFFIX := \$(COMMON_ANDROID_PACKAGE_SUFFIX) +LOCAL_MODULE_CLASS := APPS +LOCAL_CERTIFICATE := platform +include \$(BUILD_PREBUILT) + +include \$(CLEAR_VARS) +LOCAL_MODULE := qcrilmsgtunnel +LOCAL_MODULE_OWNER := $VENDOR +LOCAL_SRC_FILES := proprietary/app/qcrilmsgtunnel/qcrilmsgtunnel.apk +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_SUFFIX := \$(COMMON_ANDROID_PACKAGE_SUFFIX) +LOCAL_MODULE_CLASS := APPS +LOCAL_CERTIFICATE := platform +include \$(BUILD_PREBUILT) + +include \$(CLEAR_VARS) +LOCAL_MODULE := shutdownlistener +LOCAL_MODULE_OWNER := $VENDOR +LOCAL_SRC_FILES := proprietary/app/shutdownlistener/shutdownlistener.apk +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_SUFFIX := \$(COMMON_ANDROID_PACKAGE_SUFFIX) +LOCAL_MODULE_CLASS := APPS +LOCAL_CERTIFICATE := platform +include \$(BUILD_PREBUILT) + +include \$(CLEAR_VARS) +LOCAL_MODULE := qcnvitems +LOCAL_MODULE_OWNER := $VENDOR +LOCAL_SRC_FILES := proprietary/framework/qcnvitems.jar +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_SUFFIX := \$(COMMON_JAVA_PACKAGE_SUFFIX) +LOCAL_MODULE_CLASS := JAVA_LIBRARIES +LOCAL_CERTIFICATE := PRESIGNED +include \$(BUILD_PREBUILT) + +include \$(CLEAR_VARS) +LOCAL_MODULE := qcrilhook +LOCAL_MODULE_OWNER := $VENDOR +LOCAL_SRC_FILES := proprietary/framework/qcrilhook.jar +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_SUFFIX := \$(COMMON_JAVA_PACKAGE_SUFFIX) +LOCAL_MODULE_CLASS := JAVA_LIBRARIES +LOCAL_CERTIFICATE := PRESIGNED +include \$(BUILD_PREBUILT) + +include \$(CLEAR_VARS) +LOCAL_MODULE := com.qualcomm.location +LOCAL_MODULE_OWNER := $VENDOR +LOCAL_SRC_FILES := proprietary/priv-app/com.qualcomm.location/com.qualcomm.location.apk +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_SUFFIX := \$(COMMON_ANDROID_PACKAGE_SUFFIX) +LOCAL_MODULE_CLASS := APPS +LOCAL_CERTIFICATE := platform +include \$(BUILD_PREBUILT) + +include \$(CLEAR_VARS) +LOCAL_MODULE := com.qualcomm.services.location +LOCAL_MODULE_OWNER := $VENDOR +LOCAL_SRC_FILES := proprietary/priv-app/com.qualcomm.services.location/com.qualcomm.services.location.apk +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_SUFFIX := \$(COMMON_ANDROID_PACKAGE_SUFFIX) +LOCAL_MODULE_CLASS := APPS +LOCAL_CERTIFICATE := platform +include \$(BUILD_PREBUILT) + +include \$(CLEAR_VARS) +LOCAL_MODULE := libtime_genoff +LOCAL_MODULE_OWNER := $VENDOR +LOCAL_SRC_FILES := proprietary/vendor/lib/libtime_genoff.so +LOCAL_MODULE_PATH := \$(TARGET_OUT_VENDOR_SHARED_LIBRARIES) +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_SUFFIX := .so +LOCAL_MODULE_CLASS := SHARED_LIBRARIES +include \$(BUILD_PREBUILT) + +include \$(CLEAR_VARS) +LOCAL_MODULE := libHevcSwDecoder +LOCAL_MODULE_OWNER := $VENDOR +LOCAL_SRC_FILES := proprietary/vendor/lib/libHevcSwDecoder.so +LOCAL_MODULE_PATH := \$(TARGET_OUT_VENDOR_SHARED_LIBRARIES) +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_SUFFIX := .so +LOCAL_MODULE_CLASS := SHARED_LIBRARIES +include \$(BUILD_PREBUILT) + +include \$(CLEAR_VARS) +LOCAL_MODULE := libTimeService +LOCAL_MODULE_OWNER := $VENDOR +LOCAL_SRC_FILES := proprietary/vendor/lib/libTimeService.so +LOCAL_MODULE_PATH := \$(TARGET_OUT_VENDOR_SHARED_LIBRARIES) +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_SUFFIX := .so +LOCAL_MODULE_CLASS := SHARED_LIBRARIES +include \$(BUILD_PREBUILT) + +endif +EOF From 86710eade592c3003cef5620447f4c388e81ae33 Mon Sep 17 00:00:00 2001 From: Ethan Chen Date: Sat, 3 Oct 2015 16:59:14 -0700 Subject: [PATCH 017/139] g2-common: Add common NFC config * All variants except LS980 use this, keep it common here. Change-Id: Idf2cb204adf645725abd9799d88dbb4e9bcf2160 --- nfc.mk | 27 ++++++++++++++ nfc/libnfc-brcm-20791b05.conf | 68 +++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 nfc.mk create mode 100644 nfc/libnfc-brcm-20791b05.conf diff --git a/nfc.mk b/nfc.mk new file mode 100644 index 00000000..0e46f14c --- /dev/null +++ b/nfc.mk @@ -0,0 +1,27 @@ +# +# Copyright (C) 2015 The CyanogenMod 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. +# + +# Permissions +PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/android.hardware.nfc.hce.xml:system/etc/permissions/android.hardware.nfc.hce.xml + +# NFC +PRODUCT_PACKAGES += \ + nfc_nci.bcm2079x.default \ + NfcNci + +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/nfc/libnfc-brcm-20791b05.conf:system/etc/libnfc-brcm-20791b05.conf diff --git a/nfc/libnfc-brcm-20791b05.conf b/nfc/libnfc-brcm-20791b05.conf new file mode 100644 index 00000000..e8be9d3b --- /dev/null +++ b/nfc/libnfc-brcm-20791b05.conf @@ -0,0 +1,68 @@ +############################################################################### +# Firmware patch file +# If the value is not set then patch download is disabled. +#FW_PATCH="/vendor/firmware/BCM20791B5_002.006.013.0011.0074_Generic_I2C_NCD_Signed_configdata.ncd" +FW_PATCH="/vendor/firmware/BCM20791B5_002.006.013.0011.0098_Generic_I2C_NCD_Signed_configdata.ncd" + +############################################################################### +# Firmware pre-patch file (sent before the above patch file) +# If the value is not set then pre-patch is not used. +#FW_PRE_PATCH="/vendor/firmware/BCM20791B5_002.006.013.0011.0074_Generic_PreI2C_NCD_Signed_configdata.ncd" +FW_PRE_PATCH="/vendor/firmware/BCM20791B5_002.006.013.0011.0098_Generic_PreI2C_NCD_Signed_configdata.ncd" + +############################################################################### +# LPTD mode configuration +# byte[0] is the length of the remaining bytes in this value +# if set to 0, LPTD params will NOT be sent to NFCC (i.e. disabled). +# byte[1] is the param id it should be set to B9. +# byte[2] is the length of the LPTD parameters +# byte[3] indicates if LPTD is enabled +# if set to 0, LPTD will be disabled (parameters will still be sent). +# byte[4-n] are the LPTD parameters. +# By default, LPTD is enabled and default settings are used. +# See nfc_hal_dm_cfg.c for defaults +LPTD_CFG={38:B9:36:01:00:FF:FF:06:00:00:00:A0:0F:40:00:00:12:02:10:00:00:00:2D:0B:30:00:00:00:00:00:00:00:00:00:00:00:00:00:00:03:00:D0:07:00:00:08:07:00:00:C8:00:00:00:00:00:00:00} + +############################################################################### +# Startup Configuration (256 bytes maximum) +# +# This is applied at stack startup. +# +NFA_DM_START_UP_CFG={4A:CB:01:01:A5:01:01:CA:1C:00:00:00:00:0E:F0:55:00:00:0F:00:00:00:00:20:A1:07:00:14:01:00:00:10:B8:0B:06:00:02:B5:03:01:03:FF:80:01:01:C9:03:03:0F:AB:5B:01:00:B2:04:E8:03:00:00:CF:02:02:08:B1:06:00:20:00:00:40:12:AD:02:05:01} + +############################################################################### +# Pre-Discovery Startup Configuration (256 bytes maximum) +# +# This is applied before starting Discovery the first time. +NFA_DM_PRE_DISCOVERY_CFG={0A:C2:08:01:08:00:04:40:4B:4C:00} + +############################################################################### +# Antenna Configuration - This data is used when setting 0xC8 config item +# at startup (before discovery is started). If not used, no value is sent. +# +# The settings for this value are documented here: +# http://wcgbu.broadcom.com/wpan/PM/Project%20Document%20Library/bcm20791B0/ +# Design/Doc/PHY%20register%20settings/BCM20791-B2-1027-02_PHY_Recommended_Reg_Settings.xlsx +# +# The values marked as ?? should be tweaked per antenna or customer/app: +# {20:C8:1E:06:??:00:??:??:??:00:??:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:??:01:00:00:40:04} +# array[0] = 0x20 is length of the payload from array[1] to the end +# array[1] = 0xC8 is PREINIT_DSP_CFG +PREINIT_DSP_CFG={20:C8:1E:06:1F:00:0A:03:30:00:04:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:4C:01:00:00:40:04} + +############################################################################### +# Snooze Mode Settings +# +# By default snooze mode is enabled. Set SNOOZE_MODE_CFG byte[0] to 0 +# to disable. +# +# If SNOOZE_MODE_CFG is not provided, the default settings are used: +# They are as follows: +# 8 Sleep Mode (0=Disabled 1=UART 8=SPI/I2C) +# 0 Idle Threshold Host +# 0 Idle Threshold HC +# 0 NFC Wake active mode (0=ActiveLow 1=ActiveHigh) +# 1 Host Wake active mode (0=ActiveLow 1=ActiveHigh) +# +#SNOOZE_MODE_CFG={08:00:00:00:01} + From 3c172f3136f92567eda5f1a50ae65ea0127f032f Mon Sep 17 00:00:00 2001 From: Ethan Chen Date: Fri, 2 Oct 2015 16:04:26 -0700 Subject: [PATCH 018/139] g2-common: Add proprietary-files listing Change-Id: Ibf1f64e2844db62f0c209890af0df7377c65e7d3 --- proprietary-files.txt | 337 ++++++++++++++++++++++++++++++++++++++++++ setup-makefiles.sh | 3 - 2 files changed, 337 insertions(+), 3 deletions(-) create mode 100644 proprietary-files.txt diff --git a/proprietary-files.txt b/proprietary-files.txt new file mode 100644 index 00000000..55d51faf --- /dev/null +++ b/proprietary-files.txt @@ -0,0 +1,337 @@ +bin/bridgemgrd +bin/btnvtool +bin/diag_klog +bin/diag_mdlog +bin/gsiff_daemon +bin/hci_qcomm_init +bin/hvdcp +bin/irsc_util +bin/location-mq +bin/loc_launcher +bin/lowi-server +bin/mm-pp-daemon +bin/mm-qcamera-app +bin/mm-qcamera-daemon +bin/mpdecision +bin/netmgrd +bin/qmuxd +bin/qseecomd +bin/radish +bin/rmt_storage +bin/sensors.qcom +bin/thermal-engine +bin/time_daemon +bin/usbhub +bin/usbhub_init +etc/acdbdata/Fluid/Fluid_Bluetooth_cal.acdb +etc/acdbdata/Fluid/Fluid_General_cal.acdb +etc/acdbdata/Fluid/Fluid_Global_cal.acdb +etc/acdbdata/Fluid/Fluid_Handset_cal.acdb +etc/acdbdata/Fluid/Fluid_Hdmi_cal.acdb +etc/acdbdata/Fluid/Fluid_Headset_cal.acdb +etc/acdbdata/Fluid/Fluid_Speaker_cal.acdb +etc/acdbdata/Liquid/Liquid_Bluetooth_cal.acdb +etc/acdbdata/Liquid/Liquid_General_cal.acdb +etc/acdbdata/Liquid/Liquid_Global_cal.acdb +etc/acdbdata/Liquid/Liquid_Handset_cal.acdb +etc/acdbdata/Liquid/Liquid_Hdmi_cal.acdb +etc/acdbdata/Liquid/Liquid_Headset_cal.acdb +etc/acdbdata/Liquid/Liquid_Speaker_cal.acdb +etc/acdbdata/MTP/MTP_Bluetooth_cal.acdb +etc/acdbdata/MTP/MTP_General_cal.acdb +etc/acdbdata/MTP/MTP_Global_cal.acdb +etc/acdbdata/MTP/MTP_Handset_cal.acdb +etc/acdbdata/MTP/MTP_Hdmi_cal.acdb +etc/acdbdata/MTP/MTP_Headset_cal.acdb +etc/acdbdata/MTP/MTP_Speaker_cal.acdb +etc/acdbdata/Bluetooth_cal.acdb +etc/acdbdata/General_cal.acdb +etc/acdbdata/Global_cal.acdb +etc/acdbdata/Handset_cal.acdb +etc/acdbdata/Hdmi_cal.acdb +etc/acdbdata/Headset_cal.acdb +etc/acdbdata/Speaker_cal.acdb +etc/firmware/a225_pfp.fw +etc/firmware/a225_pm4.fw +etc/firmware/a225p5_pm4.fw +etc/firmware/a300_pfp.fw +etc/firmware/a300_pm4.fw +etc/firmware/a330_pfp.fw +etc/firmware/a330_pm4.fw +etc/firmware/cpp_firmware_v1_1_1.fw +etc/firmware/cpp_firmware_v1_1_6.fw +etc/firmware/cpp_firmware_v1_2_0.fw +etc/firmware/cpp_firmware_v1_2_1.fw +etc/firmware/fw_bcmdhd_apsta.bin +etc/firmware/fw_bcmdhd.bin +etc/firmware/fw_bcmdhd_mfg.bin +etc/firmware/leia_pfp_470.fw +etc/firmware/leia_pm4_470.fw +etc/firmware/venus.b00 +etc/firmware/venus.b01 +etc/firmware/venus.b02 +etc/firmware/venus.b03 +etc/firmware/venus.b04 +etc/firmware/venus.mbn +etc/firmware/venus.mdt +etc/permissions/qcrilhook.xml +etc/permissions/qcnvitems.xml +etc/permissions/com.qualcomm.location.xml +lib/drm/libdrmwvmplugin.so +lib/hw/camera.vendor.msm8974.so +lib/libchromatix_imx135_liveshot.so +lib/libdivxdrm_jni.so +lib/libdivxdrmdecrypt.so +lib/libdrmframework.so +lib/libdrmframework_jni.so +lib/libHDR.so +lib/libloc_api_v02.so +lib/libloc_ds_api.so +lib/libmdmdetect.so +lib/libmmcamera_interface.so +lib/libmmjpeg_interface.so +lib/libmm-qcamera.so +lib/libmorphoimageconverter_4.so +lib/libmorpho_image_stab31.so +lib/libmorpho_memory_allocator.so +lib/libmorpho_noise_reduction.so +lib/libmorpho_panorama_gp.so +lib/libmorpho_panorama_wa_4.so +lib/libmorpho_panorama_wa_viewer.so +lib/libmorpho_sensor_fusion_4.so +lib/libmorpho_video_denoiser.so +lib/libqomx_core.so +lib/libril.so +lib/libuicc.so +lib/libVDObjectTrackerAPI.so +lib/libvss_common_core.so +lib/libvss_common_idl.so +lib/libvss_common_iface.so +lib/libvss_dmi_qcci.so +lib/libvss_ims_qcci.so +lib/libvss_nv_core.so +lib/libvss_nv_idl.so +lib/libvss_nv_iface.so +lib/libvss_bsp_qcci.so +lib/libvss_gnss_qcci.so +lib/libvss_resim_core.so +lib/libvss_resim_idl.so +lib/libvss_resim_iface.so +lib/libvss_sar_qcci.so +vendor/bin/slim_ap_daemon +vendor/firmware/BCM4335B0_002.001.006.0191.0201_ORC.hcd +vendor/lib/drm/libdrmwvmplugin.so +vendor/lib/egl/eglsubAndroid.so +vendor/lib/egl/libEGL_adreno.so +vendor/lib/egl/libGLESv1_CM_adreno.so +vendor/lib/egl/libGLESv2_adreno.so +vendor/lib/egl/libq3dtools_adreno.so +vendor/lib/hw/activity_recognition.msm8974.so +vendor/lib/hw/flp.default.so +vendor/lib/hw/sensors.msm8974.so +vendor/lib/libacdbloader.so +vendor/lib/libacdbmapper.so +vendor/lib/libacdbrtac.so +vendor/lib/libactuator_dw9714.so +vendor/lib/libactuator_dw9714_camcorder.so +vendor/lib/libactuator_dw9714_camera.so +vendor/lib/libactuator_dw9714_lgaf_1.so +vendor/lib/libactuator_dw9714_lgaf_1_camcorder.so +vendor/lib/libactuator_dw9714_lgaf_1_camera.so +vendor/lib/libactuator_dw9716.so +vendor/lib/libactuator_dw9716_camcorder.so +vendor/lib/libactuator_dw9716_camera.so +vendor/lib/libactuator_iu074.so +vendor/lib/libactuator_iu074_camcorder.so +vendor/lib/libactuator_iu074_camera.so +vendor/lib/libactuator_ov12830.so +vendor/lib/libactuator_ov12830_camcorder.so +vendor/lib/libactuator_ov12830_camera.so +vendor/lib/libactuator_ov8825.so +vendor/lib/libactuator_ov8825_camcorder.so +vendor/lib/libactuator_ov8825_camera.so +vendor/lib/libactuator_rohm_bu64243gwz.so +vendor/lib/libactuator_rohm_bu64243gwz_camcorder.so +vendor/lib/libactuator_rohm_bu64243gwz_camera.so +vendor/lib/libadiertac.so +vendor/lib/libadreno_utils.so +vendor/lib/libadsprpc.so +vendor/lib/libalarmservice_jni.so +vendor/lib/libaudcal.so +vendor/lib/libaudioalsa.so +vendor/lib/libbccQTI.so +vendor/lib/libbtnv.so +vendor/lib/libC2D2.so +vendor/lib/libc2d30-a3xx.so +vendor/lib/libc2d30-a4xx.so +vendor/lib/libCB.so +vendor/lib/libchromatix_imx132_common.so +vendor/lib/libchromatix_imx132_default_video.so +vendor/lib/libchromatix_imx132_mms_video.so +vendor/lib/libchromatix_imx132_preview.so +vendor/lib/libchromatix_imx132_vt.so +vendor/lib/libchromatix_imx135_common.so +vendor/lib/libchromatix_imx135_default_video.so +vendor/lib/libchromatix_imx135_hfr_120.so +vendor/lib/libchromatix_imx135_hfr_60.so +vendor/lib/libchromatix_imx135_mms_video.so +vendor/lib/libchromatix_imx135_preview.so +vendor/lib/libchromatix_imx135_snapshot.so +vendor/lib/libchromatix_imx135_uhd_video.so +vendor/lib/libchromatix_imx135_video_dualrec.so +vendor/lib/libchromatix_imx135_video_hdr.so +vendor/lib/libchromatix_imx135_video_hd.so +vendor/lib/libchromatix_imx135_video_qtr.so +vendor/lib/libchromaflash.so +vendor/lib/libcneapiclient.so +vendor/lib/libcneconn.so +vendor/lib/libcneqmiutils.so +vendor/lib/libCommandSvc.so +vendor/lib/libconfigdb.so +vendor/lib/libdiag.so +vendor/lib/libdisp-aba.so +vendor/lib/libDivxDrm.so +vendor/lib/libdrmdecrypt.so +vendor/lib/libdrmdiag.so +vendor/lib/libdrmfs.so +vendor/lib/libdrmtime.so +vendor/lib/libdsi_netctrl.so +vendor/lib/libdsucsd.so +vendor/lib/libdsutils.so +vendor/lib/libExtendedExtractor.so +vendor/lib/libfastcvadsp_stub.so +vendor/lib/libfastcvopt.so +vendor/lib/libFileMux.so +vendor/lib/libgeofence.so +vendor/lib/libgsl.so +vendor/lib/libI420colorconvert.so +vendor/lib/libidl.so +vendor/lib/libizat_core.so +vendor/lib/libjpegdhw.so +vendor/lib/libjpegehw.so +vendor/lib/liblbs_core.so +vendor/lib/libllvm-qcom.so +vendor/lib/liblocationservice.so +vendor/lib/liblowi_client.so +vendor/lib/libmm-abl-oem.so +vendor/lib/libmm-abl.so +vendor/lib/libmmcamera2_c2d_module.so +vendor/lib/libmmcamera2_cpp_module.so +vendor/lib/libmmcamera2_frame_algorithm.so +vendor/lib/libmmcamera2_iface_modules.so +vendor/lib/libmmcamera2_imglib_modules.so +vendor/lib/libmmcamera2_isp_modules.so +vendor/lib/libmmcamera2_is.so +vendor/lib/libmmcamera2_pproc_modules.so +vendor/lib/libmmcamera2_sensor_modules.so +vendor/lib/libmmcamera2_stats_algorithm.so +vendor/lib/libmmcamera2_stats_modules.so +vendor/lib/libmmcamera2_vpe_module.so +vendor/lib/libmmcamera2_wnr_module.so +vendor/lib/libmmcamera_chromaflash_lib.so +vendor/lib/libmmcamera_faceproc.so +vendor/lib/libmmcamera_hdr_gb_lib.so +vendor/lib/libmmcamera_hdr_lib.so +vendor/lib/libmmcamera_imglib.so +vendor/lib/libmmcamera_imx132.so +vendor/lib/libmmcamera_imx135.so +vendor/lib/libmmcamera_sonyimx135_eeprom.so +vendor/lib/libmmcamera_tintless_algo.so +vendor/lib/libmmcamera_tintless_bg_pca_algo.so +vendor/lib/libmmcamera_tuning.so +vendor/lib/libmmcamera_ubifocus_lib.so +vendor/lib/libmmcamera_wavelet_lib.so +vendor/lib/libmm-color-convertor.so +vendor/lib/libmm-hdcpmgr.so +vendor/lib/libmmipl.so +vendor/lib/libmmipstreamaal.so +vendor/lib/libmmipstreamnetwork.so +vendor/lib/libmmipstreamsourcehttp.so +vendor/lib/libmmipstreamutils.so +vendor/lib/libmmjpeg.so +vendor/lib/libmmosal.so +vendor/lib/libmmparser.so +vendor/lib/libmmqjpeg_codec.so +vendor/lib/libmsapm_jni.so +vendor/lib/libnetmgr.so +vendor/lib/liboemcamera.so +vendor/lib/liboemcrypto.so +vendor/lib/libOmxAacDec.so +vendor/lib/libOmxAmrwbplusDec.so +vendor/lib/libOmxEvrcDec.so +vendor/lib/libOmxMux.so +vendor/lib/libOmxQcelp13Dec.so +vendor/lib/libOmxWmaDec.so +vendor/lib/libOpenCL.so +vendor/lib/libperipheral_client.so +vendor/lib/libqcci_legacy.so +vendor/lib/libqdi.so +vendor/lib/libqdp.so +vendor/lib/libqmi_cci.so +vendor/lib/libqmi_client_helper.so +vendor/lib/libqmi_client_qmux.so +vendor/lib/libqmi_common_so.so +vendor/lib/libqmi_csi.so +vendor/lib/libqmi_csvt_srvc.so +vendor/lib/libqmi_encdec.so +vendor/lib/libqmiservices.so +vendor/lib/libqmi.so +vendor/lib/libqomx_jpegdec.so +vendor/lib/libqomx_jpegenc.so +vendor/lib/libQSEEComAPI.so +vendor/lib/libqti-perfd-client.so +vendor/lib/libquipc_os_api.so +vendor/lib/libquipc_ulp_adapter.so +vendor/lib/libril-qc-qmi-1.so +vendor/lib/libril-qcril-hook-oem.so +vendor/lib/librpmb.so +vendor/lib/librs_adreno_sha1.so +vendor/lib/librs_adreno.so +vendor/lib/libRSDriver_adreno.so +vendor/lib/libscale.so +vendor/lib/libscve.so +vendor/lib/libscve_stub.so +vendor/lib/libsc-a2xx.so +vendor/lib/libsc-a3xx.so +vendor/lib/libSecureUILib.so +vendor/lib/libsecureui.so +vendor/lib/libsecureui_svcsock.so +vendor/lib/libsecureuisvc_jni.so +vendor/lib/libsensor1.so +vendor/lib/libsensor_reg.so +vendor/lib/libsensor_test.so +vendor/lib/libsensor_thresh.so +vendor/lib/libsensor_user_cal.so +vendor/lib/libSHIMDivxDrm.so +vendor/lib/libsmemlog.so +vendor/lib/libssd.so +vendor/lib/libSSEPKCS11.so +vendor/lib/libStDrvInt.so +vendor/lib/libstlport_sh_521.so +vendor/lib/libsystem_health_mon.so +vendor/lib/lib-sec-disp.so +vendor/lib/libthermalclient.so +vendor/lib/libthermalioctl.so +vendor/lib/libtime_genoff.so +vendor/lib/libubifocus.so +vendor/lib/libulp2.so +vendor/lib/libvendorconn.so +vendor/lib/libwifiscanner.so +vendor/lib/libwvdrm_L1.so +vendor/lib/libwvm.so +vendor/lib/libWVphoneAPI.so +vendor/lib/libWVStreamControlAPI_L1.so +vendor/lib/libxml.so +vendor/lib/libxt_native.so +vendor/lib/libxtadapter.so +vendor/lib/libxtwifi_ulp_adaptor.so +vendor/lib/libxtwifi_zpp_adaptor.so +vendor/lib/mediadrm/libwvdrmengine.so +vendor/lib/rfsa/adsp/libapps_mem_heap.so +vendor/lib/rfsa/adsp/libdspCV_skel.so +vendor/lib/rfsa/adsp/libfastcvadsp_skel.so +vendor/lib/rfsa/adsp/libfastcvadsp.so +vendor/lib/rfsa/adsp/libscveT2T_skel.so +vendor/lib/soundfx/libqcbassboost.so +vendor/lib/soundfx/libqcreverb.so +vendor/lib/soundfx/libqcvirt.so diff --git a/setup-makefiles.sh b/setup-makefiles.sh index 840583c0..569cbecc 100755 --- a/setup-makefiles.sh +++ b/setup-makefiles.sh @@ -61,8 +61,6 @@ done # This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh -# Pick up overlay for features that depend on non-open-source files - \$(call inherit-product, vendor/$VENDOR/$DEVICE/$DEVICE-vendor-blobs.mk) EOF @@ -147,7 +145,6 @@ done # This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh -# Pick up overlay for features that depend on non-open-source files PRODUCT_PACKAGES += \\ TimeService \\ shutdownlistener \\ From 617310539c87a7ecf7cbf336f841ff554bd72d09 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Sun, 4 Oct 2015 23:36:35 +0200 Subject: [PATCH 019/139] g2: Cleanup (and sync struct with CM 12.1) system props * Move custom values to custom_prop.mk * Remove useless Fluence props * Save custom audio settings (in custom_prop.mk) * Save useless Wi-Fi props ;) Based on https://github.com/CyanogenMod/android_device_lge_g2-common/commit/79aa3f9c5087d36097f3a405c51cbc679c1a9e19 Signed-off-by: Zdrowy Gosciu --- custom_prop.mk | 113 +++++++++++++++++++++++++++++++++++++++++ g2.mk | 10 ++-- system_prop.mk | 134 +++++++------------------------------------------ 3 files changed, 134 insertions(+), 123 deletions(-) create mode 100644 custom_prop.mk diff --git a/custom_prop.mk b/custom_prop.mk new file mode 100644 index 00000000..a693a129 --- /dev/null +++ b/custom_prop.mk @@ -0,0 +1,113 @@ +# +# Custom System Properties for G2 +# + +# Google Client ID +PRODUCT_GMS_CLIENTID_BASE := android-lge +PRODUCT_PROPERTY_OVERRIDES += \ + ro.com.google.clientidbase.ms=android-lge \ + ro.com.google.clientidbase.am=android-lge \ + ro.com.google.clientidbase.gmm=android-lge \ + ro.com.google.clientidbase.yt=android-lge + +# ART +PRODUCT_PROPERTY_OVERRIDES += \ + dalvik.vm.dex2oat-flags=--no-watch-dog + +# Wi-Fi +PRODUCT_PROPERTY_OVERRIDES += \ + wifi.supplicant_scan_interval=180 \ + wlan.chip.vendor=brcm \ + wlan.chip.version=bcm4335 + +# +# Audio/Video +# + +# AAC Stagefright +PRODUCT_PROPERTY_OVERRIDES += \ + media.aac_51_output_enabled=true + +# Audio offload +PRODUCT_PROPERTY_OVERRIDES += \ + audio.offload.buffer.size.kb=32 \ + audio.offload.gapless.enabled=true \ + audio.offload.multiple.enabled=false \ + audio.offload.pcm.24bit.enable=true + +# AV offload +PRODUCT_PROPERTY_OVERRIDES += \ + av.offload.enable=true \ + av.streaming.offload.enable=true + +# Smooth streaming Stagefright +PRODUCT_PROPERTY_OVERRIDES += \ + mm.enable.smoothstreaming=true + +# ALSA +PRODUCT_PROPERTY_OVERRIDES += \ + persist.audio.handset.mic.type=digital + +# Platform +PRODUCT_PROPERTY_OVERRIDES += \ + persist.audio.dualmic.config=endfire + +# MM parser +PRODUCT_PROPERTY_OVERRIDES += \ + mm.enable.qcom_parser=3310129 + +# VoIP and Direct output for PCM format +PRODUCT_PROPERTY_OVERRIDES += \ + use.dedicated.device.for.voip=false \ + use.voice.path.for.pcm.voip=true + +# Surround sound recording +PRODUCT_PROPERTY_OVERRIDES += \ + ro.qc.sdk.audio.ssr=false + +# Stagefright recorder compress offload +PRODUCT_PROPERTY_OVERRIDES += \ + tunnel.audio.encode=false + +# HW Composer debug level +PRODUCT_PROPERTY_OVERRIDES += \ + debug.mdpcomp.logs=0 + +# VIDC debug level +PRODUCT_PROPERTY_OVERRIDES += \ + vidc.debug.level=0 + +# +# Memory +# + +# Memory +PRODUCT_PROPERTY_OVERRIDES += \ + dalvik.vm.heapstartsize=8m \ + dalvik.vm.heapgrowthlimit=256m \ + dalvik.vm.heapsize=512m \ + dalvik.vm.heaptargetutilization=0.5 \ + dalvik.vm.heapminfree=2m \ + dalvik.vm.heapmaxfree=8m + +# HWUI +PRODUCT_PROPERTY_OVERRIDES += \ + ro.hwui.texture_cache_size=76 \ + ro.hwui.layer_cache_size=52 \ + ro.hwui.r_buffer_cache_size=8 \ + ro.hwui.path_cache_size=32 \ + ro.hwui.gradient_cache_size=1 \ + ro.hwui.drop_shadow_cache_size=6 \ + ro.hwui.texture_cache_flushrate=0.4 \ + ro.hwui.text_small_cache_width=1024 \ + ro.hwui.text_small_cache_height=1024 \ + ro.hwui.text_large_cache_width=2048 \ + ro.hwui.text_large_cache_height=1024 + +# +# HotPlug +# + +# MP-Decision +PRODUCT_PROPERTY_OVERRIDES += \ + ro.qualcomm.perf.cores_online=2 diff --git a/g2.mk b/g2.mk index a22a1781..fb0d1838 100644 --- a/g2.mk +++ b/g2.mk @@ -20,9 +20,6 @@ $(call inherit-product-if-exists, vendor/lge/g2-common/g2-common-vendor.mk) # Overlays DEVICE_PACKAGE_OVERLAYS := $(LOCAL_PATH)/overlay -# Google Client ID -PRODUCT_GMS_CLIENTID_BASE := android-lge - # Permissions PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.audio.low_latency.xml:system/etc/permissions/android.hardware.audio.low_latency.xml \ @@ -103,10 +100,6 @@ PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \ gps.msm8974 -# ART -PRODUCT_PROPERTY_OVERRIDES += \ - dalvik.vm.dex2oat-flags=--no-watch-dog - PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/gps/etc/flp.conf:system/etc/flp.conf \ $(LOCAL_PATH)/gps/etc/gps.conf:system/etc/gps.conf \ @@ -213,3 +206,6 @@ PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/configs/bcmdhd.cal:system/etc/wifi/bcmdhd.cal $(call inherit-product-if-exists, hardware/broadcom/wlan/bcmdhd/config/config-bcm.mk) + +# System properties +-include $(LOCAL_PATH)/custom_prop.mk diff --git a/system_prop.mk b/system_prop.mk index a72c7bf1..d47ce187 100644 --- a/system_prop.mk +++ b/system_prop.mk @@ -2,96 +2,37 @@ # System Properties for G2 # +# Bluetooth PRODUCT_PROPERTY_OVERRIDES += \ - ro.sf.lcd_density=380 \ - ro.opengles.version=196608 - -# AAC Stagefright -PRODUCT_PROPERTY_OVERRIDES += \ - media.aac_51_output_enabled=true - -# Audio offload -PRODUCT_PROPERTY_OVERRIDES += \ - audio.offload.buffer.size.kb=32 \ - audio.offload.gapless.enabled=true \ - audio.offload.multiple.enabled=false \ - audio.offload.pcm.24bit.enable=true - -# AV offload -PRODUCT_PROPERTY_OVERRIDES += \ - av.offload.enable=true \ - av.streaming.offload.enable=true - -# Smooth streaming Stagefright -PRODUCT_PROPERTY_OVERRIDES += \ - mm.enable.smoothstreaming=true - -# ALSA -PRODUCT_PROPERTY_OVERRIDES += \ - persist.audio.handset.mic.type=digital - -# Platform -PRODUCT_PROPERTY_OVERRIDES += \ - persist.audio.dualmic.config=endfire - -# Fluence -PRODUCT_PROPERTY_OVERRIDES += \ - persist.audio.fluence.voicecall=true \ - persist.audio.fluence.voicerec=false \ - persist.audio.fluence.speaker=false - -# MM parser -PRODUCT_PROPERTY_OVERRIDES += \ - mm.enable.qcom_parser=3310129 + ro.bt.bdaddr_path=/data/misc/bdaddr -# VoIP and Direct output for PCM format +# Camera PRODUCT_PROPERTY_OVERRIDES += \ - use.dedicated.device.for.voip=false \ - use.voice.path.for.pcm.voip=true + camera2.portability.force_api=1 -# Surround sound recording +# Display PRODUCT_PROPERTY_OVERRIDES += \ - ro.qc.sdk.audio.ssr=false + persist.hwc.mdpcomp.enable=true \ + ro.opengles.version=196608 \ + ro.sf.lcd_density=380 -# Stagefright recorder compress offload +# DRM PRODUCT_PROPERTY_OVERRIDES += \ - tunnel.audio.encode=false + drm.service.enabled=true -# Do not power down SIM card when modem is sent to Low Power Mode. +# Perf PRODUCT_PROPERTY_OVERRIDES += \ - persist.radio.apm_sim_not_pwdn=1 + ro.vendor.extension_library=/vendor/lib/libqti-perfd-client.so -# Ril sends only one RIL_UNSOL_CALL_RING, so set call_ring.multiple to false +# Radio PRODUCT_PROPERTY_OVERRIDES += \ + persist.radio.apm_sim_not_pwdn=1 \ ro.telephony.call_ring.multiple=0 PRODUCT_PROPERTY_OVERRIDES += \ + rild.libpath=/vendor/lib/libril-qc-qmi-1.so \ ro.telephony.ril_class=LgeLteRIL -# HW Composer -PRODUCT_PROPERTY_OVERRIDES += \ - persist.hwc.mdpcomp.enable=true \ - debug.mdpcomp.logs=0 - -# Camera -PRODUCT_PROPERTY_OVERRIDES += \ - camera2.portability.force_api=1 - -PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ - rild.libpath=/vendor/lib/libril-qc-qmi-1.so - -PRODUCT_PROPERTY_OVERRIDES += \ - drm.service.enabled=true - -PRODUCT_PROPERTY_OVERRIDES += \ - ro.bt.bdaddr_path=/data/misc/bdaddr - -PRODUCT_PROPERTY_OVERRIDES += \ - wifi.interface=wlan0 \ - wifi.supplicant_scan_interval=180 \ - wlan.chip.vendor=brcm \ - wlan.chip.version=bcm4335 - # Sensors PRODUCT_PROPERTY_OVERRIDES += \ ro.qti.sdk.sensors.gestures=true \ @@ -130,50 +71,11 @@ PRODUCT_PROPERTY_OVERRIDES += \ persist.debug.sensors.hal=e \ persist.debug.ar.hal=e -# MTP and USB-OTG +# USB PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ persist.sys.usb.config=mtp \ persist.sys.isUsbOtgEnabled=true -# QC vendor extension -PRODUCT_PROPERTY_OVERRIDES += \ - ro.vendor.extension_library=/vendor/lib/libqti-perfd-client.so - -# Google Client ID -PRODUCT_PROPERTY_OVERRIDES += \ - ro.com.google.clientidbase.ms=android-lge \ - ro.com.google.clientidbase.am=android-lge \ - ro.com.google.clientidbase.gmm=android-lge \ - ro.com.google.clientidbase.yt=android-lge - -# VIDC debug_levels -# 1:ERROR 2:HIGH 4:LOW 0:NOLOGS 7:AllLOGS -PRODUCT_PROPERTY_OVERRIDES += \ - vidc.debug.level=1 - -# Memory -PRODUCT_PROPERTY_OVERRIDES += \ - dalvik.vm.heapstartsize=8m \ - dalvik.vm.heapgrowthlimit=256m \ - dalvik.vm.heapsize=512m \ - dalvik.vm.heaptargetutilization=0.5 \ - dalvik.vm.heapminfree=2m \ - dalvik.vm.heapmaxfree=8m - -# HWUI -PRODUCT_PROPERTY_OVERRIDES += \ - ro.hwui.texture_cache_size=76 \ - ro.hwui.layer_cache_size=52 \ - ro.hwui.r_buffer_cache_size=8 \ - ro.hwui.path_cache_size=32 \ - ro.hwui.gradient_cache_size=1 \ - ro.hwui.drop_shadow_cache_size=6 \ - ro.hwui.texture_cache_flushrate=0.4 \ - ro.hwui.text_small_cache_width=1024 \ - ro.hwui.text_small_cache_height=1024 \ - ro.hwui.text_large_cache_width=2048 \ - ro.hwui.text_large_cache_height=1024 - -# MP-Decision +# Wifi PRODUCT_PROPERTY_OVERRIDES += \ - ro.qualcomm.perf.cores_online=2 + wifi.interface=wlan0 From bcb5fc75a512aee8747458837f0ba0c744405aa3 Mon Sep 17 00:00:00 2001 From: Ethan Chen Date: Sun, 4 Oct 2015 15:43:39 -0700 Subject: [PATCH 020/139] g2-common: Update media codec profiles * Remove unused LG entries * Add limits * Enable WMA decoders * Enable HEVC decoders * Remove secure codecs Change-Id: I0c067a01d653d382b35c4a886008eb0a31e3fd64 --- configs/media_codecs.xml | 148 ++++++++++++++++++++++++++++----------- 1 file changed, 107 insertions(+), 41 deletions(-) diff --git a/configs/media_codecs.xml b/configs/media_codecs.xml index b04090fa..2b658710 100644 --- a/configs/media_codecs.xml +++ b/configs/media_codecs.xml @@ -15,6 +15,38 @@ See the License for the specific language governing permissions and limitations under the License. --> + + + @@ -28,34 +60,51 @@ - - + + + + + + + + + + + + + + + + + + + + - - - - - - - @@ -90,84 +127,113 @@ + + + + + - - - - - - + + + + + - - - - - - + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + - From 19a6e057220e105a6f3d496409f8c6661f4d27ff Mon Sep 17 00:00:00 2001 From: Ethan Chen Date: Sun, 4 Oct 2015 19:24:54 -0700 Subject: [PATCH 021/139] g2-common: Reorganize init script makefile Change-Id: If21186b4e48bba15d3d77a59e191867eb9274f66 --- rootdir/Android.mk | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/rootdir/Android.mk b/rootdir/Android.mk index ea468dd7..29bb407c 100644 --- a/rootdir/Android.mk +++ b/rootdir/Android.mk @@ -1,17 +1,15 @@ LOCAL_PATH := $(call my-dir) -# Device init files +# Init scripts include $(CLEAR_VARS) -LOCAL_MODULE := fstab.g2 -LOCAL_MODULE_TAGS := optional eng -LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := etc/fstab.g2 -LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) +LOCAL_MODULE := fstab.g2 +LOCAL_MODULE_TAGS := optional eng +LOCAL_MODULE_CLASS := ETC +LOCAL_SRC_FILES := etc/fstab.g2 +LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) include $(BUILD_PREBUILT) -# Init scripts - include $(CLEAR_VARS) LOCAL_MODULE := init.g2.rc LOCAL_MODULE_TAGS := optional eng From aac004c826d72e8500d159bf6702f8c9c7f29636 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Mon, 5 Oct 2015 12:53:11 +0200 Subject: [PATCH 022/139] g2: Move g2.init.power.rc include to custom_prop.mk --- custom_prop.mk | 4 ++++ g2.mk | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/custom_prop.mk b/custom_prop.mk index a693a129..319c8131 100644 --- a/custom_prop.mk +++ b/custom_prop.mk @@ -20,6 +20,10 @@ PRODUCT_PROPERTY_OVERRIDES += \ wlan.chip.vendor=brcm \ wlan.chip.version=bcm4335 +# Init +PRODUCT_PACKAGES += \ + init.g2.power.rc + # # Audio/Video # diff --git a/g2.mk b/g2.mk index fb0d1838..af3de578 100644 --- a/g2.mk +++ b/g2.mk @@ -114,8 +114,7 @@ PRODUCT_PACKAGES += \ init.g2.usb.rc \ init.qcom.sh \ panel.sh \ - ueventd.g2.rc \ - init.g2.power.rc + ueventd.g2.rc # IPv6 tethering PRODUCT_PACKAGES += \ From 6e500a43095a867898659959ccc1f5c2dab51055 Mon Sep 17 00:00:00 2001 From: Ethan Chen Date: Sun, 4 Oct 2015 19:26:26 -0700 Subject: [PATCH 023/139] g2-common: Convert init.qcom.sh to set_baseband.sh * Stripping unnecessary items from init.qcom.sh leaves only the baseband hack. Rename the file to reflect it's new purpose. Change-Id: I55e026b240165542c9cb30c2d563daa7f8830798 Signed-off-by: Zdrowy Gosciu Conflicts: rootdir/Android.mk --- g2.mk | 2 +- rootdir/Android.mk | 17 +-- rootdir/etc/init.g2.rc | 2 +- rootdir/etc/init.qcom.sh | 230 ------------------------------------ rootdir/etc/set_baseband.sh | 12 ++ 5 files changed, 23 insertions(+), 240 deletions(-) delete mode 100755 rootdir/etc/init.qcom.sh create mode 100755 rootdir/etc/set_baseband.sh diff --git a/g2.mk b/g2.mk index af3de578..a8e1f5f7 100644 --- a/g2.mk +++ b/g2.mk @@ -112,8 +112,8 @@ PRODUCT_PACKAGES += \ fstab.g2 \ init.g2.rc \ init.g2.usb.rc \ - init.qcom.sh \ panel.sh \ + set_baseband.sh \ ueventd.g2.rc # IPv6 tethering diff --git a/rootdir/Android.mk b/rootdir/Android.mk index 29bb407c..4b932990 100644 --- a/rootdir/Android.mk +++ b/rootdir/Android.mk @@ -1,5 +1,14 @@ LOCAL_PATH := $(call my-dir) +# Configuration scripts + +include $(CLEAR_VARS) +LOCAL_MODULE := set_baseband.sh +LOCAL_MODULE_TAGS := optional eng +LOCAL_MODULE_CLASS := ETC +LOCAL_SRC_FILES := etc/set_baseband.sh +include $(BUILD_PREBUILT) + # Init scripts include $(CLEAR_VARS) @@ -34,14 +43,6 @@ LOCAL_SRC_FILES := etc/init.g2.power.rc LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) include $(BUILD_PREBUILT) -include $(CLEAR_VARS) -LOCAL_MODULE := init.qcom.sh -LOCAL_MODULE_TAGS := optional eng -LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := etc/init.qcom.sh -LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) -include $(BUILD_PREBUILT) - include $(CLEAR_VARS) LOCAL_MODULE := ueventd.g2.rc LOCAL_MODULE_TAGS := optional eng diff --git a/rootdir/etc/init.g2.rc b/rootdir/etc/init.g2.rc index ffcb9010..982de5a5 100644 --- a/rootdir/etc/init.g2.rc +++ b/rootdir/etc/init.g2.rc @@ -556,7 +556,7 @@ service qseecomd /system/bin/qseecomd user root group root -service qcom-sh /system/bin/sh /init.qcom.sh +service set_baseband /system/bin/sh /system/etc/set_baseband.sh class late_start user root oneshot diff --git a/rootdir/etc/init.qcom.sh b/rootdir/etc/init.qcom.sh deleted file mode 100755 index 68c567ce..00000000 --- a/rootdir/etc/init.qcom.sh +++ /dev/null @@ -1,230 +0,0 @@ -#!/system/bin/sh -# Copyright (c) 2009-2014, 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 BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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. -# - -target=`getprop ro.board.platform` -if [ -f /sys/devices/soc0/soc_id ]; then - platformid=`cat /sys/devices/soc0/soc_id` -else - platformid=`cat /sys/devices/system/soc/soc0/id` -fi - -product=`getprop ro.build.product` -# grep the modem partition for baseband version and set it -case "$product" in - "ls980" | "vs980") - setprop gsm.version.baseband `strings /firmware/image/modem.b18 | grep "^MPSS.DI" | head -1` - ;; - "d800" | "d801" | "d802" | "d803" | "f320" | "l01f") - setprop gsm.version.baseband `strings /firmware/image/modem.b21 | grep "^M8974A-" | head -1` - ;; -esac - -# -# Function to start sensors for DSPS enabled platforms -# -start_sensors() -{ - if [ -c /dev/msm_dsps -o -c /dev/sensors ]; then - chmod -h 775 /persist/sensors - chmod -h 664 /persist/sensors/sensors_settings - chown -h system.root /persist/sensors/sensors_settings - - mkdir -p /data/misc/sensors - chmod -h 775 /data/misc/sensors - - # LGE_START, make /sns/cal folder for save sensor registy - # If the sns directory exists, make sns/cal/ directory - if [ -d /sns ]; then - mkdir -p /sns/cal - fi - # LGE_END, make /sns/cal folder for save sensor registy - - start sensors - fi -} - -start_battery_monitor() -{ - if ls /sys/bus/spmi/devices/qpnp-bms-*/fcc_data ; then - chown -h root.system /sys/module/pm8921_bms/parameters/* - chown -h root.system /sys/module/qpnp_bms/parameters/* - chown -h root.system /sys/bus/spmi/devices/qpnp-bms-*/fcc_data - chown -h root.system /sys/bus/spmi/devices/qpnp-bms-*/fcc_temp - chown -h root.system /sys/bus/spmi/devices/qpnp-bms-*/fcc_chgcyl - chmod 0660 /sys/module/qpnp_bms/parameters/* - chmod 0660 /sys/module/pm8921_bms/parameters/* - mkdir -p /data/bms - chown -h root.system /data/bms - chmod 0770 /data/bms - start battery_monitor - fi -} - -start_charger_monitor() -{ - if ls /sys/module/qpnp_charger/parameters/charger_monitor; then - chown -h root.system /sys/module/qpnp_charger/parameters/* - chown -h root.system /sys/class/power_supply/battery/input_current_max - chown -h root.system /sys/class/power_supply/battery/input_current_trim - chown -h root.system /sys/class/power_supply/battery/input_current_settled - chown -h root.system /sys/class/power_supply/battery/voltage_min - chmod 0664 /sys/class/power_supply/battery/input_current_max - chmod 0664 /sys/class/power_supply/battery/input_current_trim - chmod 0664 /sys/class/power_supply/battery/input_current_settled - chmod 0664 /sys/class/power_supply/battery/voltage_min - chmod 0664 /sys/module/qpnp_charger/parameters/charger_monitor - start charger_monitor - fi -} - -start_vm_bms() -{ - if [ -e /dev/vm_bms ]; then - chown -h root.system /sys/class/power_supply/bms/current_now - chown -h root.system /sys/class/power_supply/bms/voltage_ocv - chmod 0664 /sys/class/power_supply/bms/current_now - chmod 0664 /sys/class/power_supply/bms/voltage_ocv - start vm_bms - fi -} - -start_msm_irqbalance_8939() -{ - if [ -f /system/bin/msm_irqbalance ]; then - case "$platformid" in - "239") - start msm_irqbalance;; - esac - fi -} - -start_msm_irqbalance() -{ - if [ -f /system/bin/msm_irqbalance ]; then - start msm_irqbalance - fi -} - -baseband=`getprop ro.baseband` -# -# Suppress default route installation during RA for IPV6; user space will take -# care of this -# exception default ifc -for file in /proc/sys/net/ipv6/conf/* -do - echo 0 > $file/accept_ra_defrtr -done -echo 1 > /proc/sys/net/ipv6/conf/default/accept_ra_defrtr - -case "$baseband" in - "svlte2a") - start bridgemgrd - ;; -esac - -start_sensors - -case "$target" in - "msm7630_surf" | "msm7630_1x" | "msm7630_fusion") - if [ -f /sys/devices/soc0/hw_platform ]; then - value=`cat /sys/devices/soc0/hw_platform` - else - value=`cat /sys/devices/system/soc/soc0/hw_platform` - fi - case "$value" in - "Fluid") - start profiler_daemon;; - esac - ;; - "msm8660" ) - if [ -f /sys/devices/soc0/hw_platform ]; then - platformvalue=`cat /sys/devices/soc0/hw_platform` - else - platformvalue=`cat /sys/devices/system/soc/soc0/hw_platform` - fi - case "$platformvalue" in - "Fluid") - start profiler_daemon;; - esac - ;; - "msm8960") - case "$baseband" in - "msm") - start_battery_monitor;; - esac - - if [ -f /sys/devices/soc0/hw_platform ]; then - platformvalue=`cat /sys/devices/soc0/hw_platform` - else - platformvalue=`cat /sys/devices/system/soc/soc0/hw_platform` - fi - case "$platformvalue" in - "Fluid") - start profiler_daemon;; - "Liquid") - start profiler_daemon;; - esac - ;; - "msm8974") - platformvalue=`cat /sys/devices/soc0/hw_platform` - case "$platformvalue" in - "Fluid") - start profiler_daemon;; - "Liquid") - start profiler_daemon;; - esac - case "$baseband" in - "msm") - start_battery_monitor - ;; - esac - start_charger_monitor - ;; - "apq8084") - platformvalue=`cat /sys/devices/soc0/hw_platform` - case "$platformvalue" in - "Fluid") - start profiler_daemon;; - "Liquid") - start profiler_daemon;; - esac - ;; - "msm8226") - start_charger_monitor - ;; - "msm8610") - start_charger_monitor - ;; - "msm8916") - start_vm_bms - start_msm_irqbalance_8939 - ;; - "msm8994") - start_msm_irqbalance - ;; -esac diff --git a/rootdir/etc/set_baseband.sh b/rootdir/etc/set_baseband.sh new file mode 100755 index 00000000..cd721507 --- /dev/null +++ b/rootdir/etc/set_baseband.sh @@ -0,0 +1,12 @@ +#!/system/bin/sh + +product=`getprop ro.build.product` +# grep the modem partition for baseband version and set it +case "$product" in + "ls980" | "vs980") + setprop gsm.version.baseband `strings /firmware/image/modem.b18 | grep "^MPSS.DI" | head -1` + ;; + "d800" | "d801" | "d802" | "d803" | "f320" | "l01f") + setprop gsm.version.baseband `strings /firmware/image/modem.b21 | grep "^M8974A-" | head -1` + ;; +esac From d440be57946923ac4ce877f00adde2a7f084cae5 Mon Sep 17 00:00:00 2001 From: Ethan Chen Date: Sun, 4 Oct 2015 19:30:44 -0700 Subject: [PATCH 024/139] g2-common: Remove unused init items * Fix tabs * Remove sreadhead entry (service does not exist) * Remove CNE LD_PRELOAD (CNE is not used) * Remove cnd service (service does not exist) * Remove bugreport (covered by CM init script) Change-Id: I2b17ff2aa29b2a538ec82fcc49633042d6ea4992 --- rootdir/etc/init.g2.rc | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/rootdir/etc/init.g2.rc b/rootdir/etc/init.g2.rc index 982de5a5..84080763 100644 --- a/rootdir/etc/init.g2.rc +++ b/rootdir/etc/init.g2.rc @@ -46,7 +46,7 @@ on init mkdir /sns 0775 system system # Create directory for sensordaemon mkdir /sns/cal 0644 system system - + mkdir /mnt/media_rw 0700 media_rw media_rw # See storage config details at http://source.android.com/tech/storage/ mkdir /mnt/shell/emulated 0700 shell shell @@ -87,13 +87,6 @@ on fs restorecon_recursive /mpt setprop ro.crypto.fuse_sdcard true -on post-fs - # Execute sreadahead daemon to reduce boot-time - start sreadahead - -# import cne init file -# export LD_PRELOAD /vendor/lib/libNimsWrap.so - on early-boot # set RLIMIT_MEMLOCK to 64MB setrlimit 8 67108864 67108864 @@ -103,7 +96,7 @@ on early-boot write /sys/kernel/boot_adsp/boot 1 # disable lmk_fast_run - write /sys/module/lowmemorykiller/parameters/lmk_fast_run 0 + write /sys/module/lowmemorykiller/parameters/lmk_fast_run 0 on boot # bluetooth @@ -168,8 +161,8 @@ on boot setprop bluetooth.chip.vendor brcm # SCMS-T property set during phone Booting - setprop persist.service.bdroid.a2dp_con 0 - setprop persist.service.bdroid.scms_t 0 + setprop persist.service.bdroid.a2dp_con 0 + setprop persist.service.bdroid.scms_t 0 chown bluetooth net_bt_stack /dev/btlock chmod 0600 /dev/btlock @@ -465,10 +458,6 @@ service sensors /system/bin/sensors.qcom on property:ro.data.large_tcp_window_size=true write /proc/sys/net/ipv4/tcp_adv_win_scale 2 -service cnd /system/bin/cnd - class late_start - socket cnd stream 660 root inet - service irsc_util /system/bin/irsc_util "/etc/sec_config" class main user root @@ -584,14 +573,6 @@ service qcamerasvr /system/bin/mm-qcamera-daemon user camera group camera system inet input graphics -# bugreport is triggered by holding down volume down, volume up and power -service bugreport /system/bin/dumpstate -d -p -B \ - -o /data/data/com.android.shell/files/bugreports/bugreport - class main - disabled - oneshot - keycodes 114 115 116 - service mpdecision /system/bin/mpdecision --avg_comp class late_start user root From 69a073dead81466d2fca1697e8f36672aaa5668a Mon Sep 17 00:00:00 2001 From: Ethan Chen Date: Sun, 4 Oct 2015 13:07:04 -0700 Subject: [PATCH 025/139] g2-common: More proprietary file cleanup * libHevcSwDecoder is only used to build libOmxVdecHevc on QC proprietary builds - ship both as binaries * Remove unused PPPreference APK - this was never even copied * Remove shutdown listener - G2 stock does not use this * liboemcrypto is only used for Widevine L1 * 8974 does not use leia * 8974 does not have adreno 2xx/300 * G2 does not use Fluid/MTP/etc ACDB data * mm-qcamera-app is used for testing * Remove diag binaries - for debugging * Remove usbhub binaries - used by msm7630 * libTimeService.so does not need to have a target * libtime_genoff should be excluded from PRODUCT_COPY_FILES * Sort by target location * Add targets for location packages, qcrilmsgtunnel * Fix proprietary file ordering Change-Id: Ia0d3c70747d585fa06313ddb7684646547634de0 --- g2.mk | 1 - proprietary-files.txt | 45 +++++--------------------------- setup-makefiles.sh | 60 ++++++++++--------------------------------- 3 files changed, 21 insertions(+), 85 deletions(-) diff --git a/g2.mk b/g2.mk index a8e1f5f7..2e5751b7 100644 --- a/g2.mk +++ b/g2.mk @@ -140,7 +140,6 @@ PRODUCT_PACKAGES += \ libOmxEvrcEnc \ libOmxQcelp13Enc \ libOmxVdec \ - libOmxVdecHevc \ libOmxVenc \ libstagefrighthw \ qcmediaplayer diff --git a/proprietary-files.txt b/proprietary-files.txt index 55d51faf..3b379e94 100644 --- a/proprietary-files.txt +++ b/proprietary-files.txt @@ -1,7 +1,5 @@ bin/bridgemgrd bin/btnvtool -bin/diag_klog -bin/diag_mdlog bin/gsiff_daemon bin/hci_qcomm_init bin/hvdcp @@ -10,7 +8,6 @@ bin/location-mq bin/loc_launcher bin/lowi-server bin/mm-pp-daemon -bin/mm-qcamera-app bin/mm-qcamera-daemon bin/mpdecision bin/netmgrd @@ -21,29 +18,6 @@ bin/rmt_storage bin/sensors.qcom bin/thermal-engine bin/time_daemon -bin/usbhub -bin/usbhub_init -etc/acdbdata/Fluid/Fluid_Bluetooth_cal.acdb -etc/acdbdata/Fluid/Fluid_General_cal.acdb -etc/acdbdata/Fluid/Fluid_Global_cal.acdb -etc/acdbdata/Fluid/Fluid_Handset_cal.acdb -etc/acdbdata/Fluid/Fluid_Hdmi_cal.acdb -etc/acdbdata/Fluid/Fluid_Headset_cal.acdb -etc/acdbdata/Fluid/Fluid_Speaker_cal.acdb -etc/acdbdata/Liquid/Liquid_Bluetooth_cal.acdb -etc/acdbdata/Liquid/Liquid_General_cal.acdb -etc/acdbdata/Liquid/Liquid_Global_cal.acdb -etc/acdbdata/Liquid/Liquid_Handset_cal.acdb -etc/acdbdata/Liquid/Liquid_Hdmi_cal.acdb -etc/acdbdata/Liquid/Liquid_Headset_cal.acdb -etc/acdbdata/Liquid/Liquid_Speaker_cal.acdb -etc/acdbdata/MTP/MTP_Bluetooth_cal.acdb -etc/acdbdata/MTP/MTP_General_cal.acdb -etc/acdbdata/MTP/MTP_Global_cal.acdb -etc/acdbdata/MTP/MTP_Handset_cal.acdb -etc/acdbdata/MTP/MTP_Hdmi_cal.acdb -etc/acdbdata/MTP/MTP_Headset_cal.acdb -etc/acdbdata/MTP/MTP_Speaker_cal.acdb etc/acdbdata/Bluetooth_cal.acdb etc/acdbdata/General_cal.acdb etc/acdbdata/Global_cal.acdb @@ -51,11 +25,6 @@ etc/acdbdata/Handset_cal.acdb etc/acdbdata/Hdmi_cal.acdb etc/acdbdata/Headset_cal.acdb etc/acdbdata/Speaker_cal.acdb -etc/firmware/a225_pfp.fw -etc/firmware/a225_pm4.fw -etc/firmware/a225p5_pm4.fw -etc/firmware/a300_pfp.fw -etc/firmware/a300_pm4.fw etc/firmware/a330_pfp.fw etc/firmware/a330_pm4.fw etc/firmware/cpp_firmware_v1_1_1.fw @@ -65,8 +34,6 @@ etc/firmware/cpp_firmware_v1_2_1.fw etc/firmware/fw_bcmdhd_apsta.bin etc/firmware/fw_bcmdhd.bin etc/firmware/fw_bcmdhd_mfg.bin -etc/firmware/leia_pfp_470.fw -etc/firmware/leia_pm4_470.fw etc/firmware/venus.b00 etc/firmware/venus.b01 etc/firmware/venus.b02 @@ -100,20 +67,21 @@ lib/libmorpho_panorama_wa_4.so lib/libmorpho_panorama_wa_viewer.so lib/libmorpho_sensor_fusion_4.so lib/libmorpho_video_denoiser.so +lib/libOmxVdecHevc.so lib/libqomx_core.so lib/libril.so lib/libuicc.so lib/libVDObjectTrackerAPI.so +lib/libvss_bsp_qcci.so lib/libvss_common_core.so lib/libvss_common_idl.so lib/libvss_common_iface.so lib/libvss_dmi_qcci.so +lib/libvss_gnss_qcci.so lib/libvss_ims_qcci.so lib/libvss_nv_core.so lib/libvss_nv_idl.so lib/libvss_nv_iface.so -lib/libvss_bsp_qcci.so -lib/libvss_gnss_qcci.so lib/libvss_resim_core.so lib/libvss_resim_idl.so lib/libvss_resim_iface.so @@ -165,6 +133,7 @@ vendor/lib/libC2D2.so vendor/lib/libc2d30-a3xx.so vendor/lib/libc2d30-a4xx.so vendor/lib/libCB.so +vendor/lib/libchromaflash.so vendor/lib/libchromatix_imx132_common.so vendor/lib/libchromatix_imx132_default_video.so vendor/lib/libchromatix_imx132_mms_video.so @@ -182,7 +151,6 @@ vendor/lib/libchromatix_imx135_video_dualrec.so vendor/lib/libchromatix_imx135_video_hdr.so vendor/lib/libchromatix_imx135_video_hd.so vendor/lib/libchromatix_imx135_video_qtr.so -vendor/lib/libchromaflash.so vendor/lib/libcneapiclient.so vendor/lib/libcneconn.so vendor/lib/libcneqmiutils.so @@ -204,6 +172,7 @@ vendor/lib/libfastcvopt.so vendor/lib/libFileMux.so vendor/lib/libgeofence.so vendor/lib/libgsl.so +vendor/lib/libHevcSwDecoder.so vendor/lib/libI420colorconvert.so vendor/lib/libidl.so vendor/lib/libizat_core.so @@ -255,7 +224,6 @@ vendor/lib/libmmqjpeg_codec.so vendor/lib/libmsapm_jni.so vendor/lib/libnetmgr.so vendor/lib/liboemcamera.so -vendor/lib/liboemcrypto.so vendor/lib/libOmxAacDec.so vendor/lib/libOmxAmrwbplusDec.so vendor/lib/libOmxEvrcDec.so @@ -312,7 +280,8 @@ vendor/lib/libsystem_health_mon.so vendor/lib/lib-sec-disp.so vendor/lib/libthermalclient.so vendor/lib/libthermalioctl.so -vendor/lib/libtime_genoff.so +-vendor/lib/libtime_genoff.so +vendor/lib/libTimeService.so vendor/lib/libubifocus.so vendor/lib/libulp2.so vendor/lib/libvendorconn.so diff --git a/setup-makefiles.sh b/setup-makefiles.sh index 569cbecc..48ca68d9 100755 --- a/setup-makefiles.sh +++ b/setup-makefiles.sh @@ -146,12 +146,20 @@ done # This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh PRODUCT_PACKAGES += \\ - TimeService \\ - shutdownlistener \\ + qcrilmsgtunnel \\ + TimeService + +PRODUCT_PACKAGES += \\ qcnvitems \\ + qcrilhook + +PRODUCT_PACKAGES += \\ + com.qualcomm.location \\ + com.qualcomm.services.location + +PRODUCT_PACKAGES += \\ libtime_genoff \\ - libTimeService \\ - libHevcSwDecoder + libTimeService \$(call inherit-product, vendor/$VENDOR/$DEVICE/$DEVICE-vendor-blobs.mk) EOF @@ -195,26 +203,6 @@ LOCAL_PATH := \$(call my-dir) ifneq (\$(filter g2 d800 d801 d802 d803 f320 l01f ls980 vs980,\$(TARGET_DEVICE)),) -include \$(CLEAR_VARS) -LOCAL_MODULE := PPPreference -LOCAL_MODULE_OWNER := $VENDOR -LOCAL_SRC_FILES := proprietary/app/PPPreference/PPPreference.apk -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_SUFFIX := \$(COMMON_ANDROID_PACKAGE_SUFFIX) -LOCAL_MODULE_CLASS := APPS -LOCAL_CERTIFICATE := platform -include \$(BUILD_PREBUILT) - -include \$(CLEAR_VARS) -LOCAL_MODULE := TimeService -LOCAL_MODULE_OWNER := $VENDOR -LOCAL_SRC_FILES := proprietary/app/TimeService/TimeService.apk -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_SUFFIX := \$(COMMON_ANDROID_PACKAGE_SUFFIX) -LOCAL_MODULE_CLASS := APPS -LOCAL_CERTIFICATE := platform -include \$(BUILD_PREBUILT) - include \$(CLEAR_VARS) LOCAL_MODULE := qcrilmsgtunnel LOCAL_MODULE_OWNER := $VENDOR @@ -226,9 +214,9 @@ LOCAL_CERTIFICATE := platform include \$(BUILD_PREBUILT) include \$(CLEAR_VARS) -LOCAL_MODULE := shutdownlistener +LOCAL_MODULE := TimeService LOCAL_MODULE_OWNER := $VENDOR -LOCAL_SRC_FILES := proprietary/app/shutdownlistener/shutdownlistener.apk +LOCAL_SRC_FILES := proprietary/app/TimeService/TimeService.apk LOCAL_MODULE_TAGS := optional LOCAL_MODULE_SUFFIX := \$(COMMON_ANDROID_PACKAGE_SUFFIX) LOCAL_MODULE_CLASS := APPS @@ -285,25 +273,5 @@ LOCAL_MODULE_SUFFIX := .so LOCAL_MODULE_CLASS := SHARED_LIBRARIES include \$(BUILD_PREBUILT) -include \$(CLEAR_VARS) -LOCAL_MODULE := libHevcSwDecoder -LOCAL_MODULE_OWNER := $VENDOR -LOCAL_SRC_FILES := proprietary/vendor/lib/libHevcSwDecoder.so -LOCAL_MODULE_PATH := \$(TARGET_OUT_VENDOR_SHARED_LIBRARIES) -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_SUFFIX := .so -LOCAL_MODULE_CLASS := SHARED_LIBRARIES -include \$(BUILD_PREBUILT) - -include \$(CLEAR_VARS) -LOCAL_MODULE := libTimeService -LOCAL_MODULE_OWNER := $VENDOR -LOCAL_SRC_FILES := proprietary/vendor/lib/libTimeService.so -LOCAL_MODULE_PATH := \$(TARGET_OUT_VENDOR_SHARED_LIBRARIES) -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_SUFFIX := .so -LOCAL_MODULE_CLASS := SHARED_LIBRARIES -include \$(BUILD_PREBUILT) - endif EOF From 2c2eb7a6c895af97b59055ea9894f965b11a802f Mon Sep 17 00:00:00 2001 From: Ethan Chen Date: Sun, 4 Oct 2015 20:09:13 -0700 Subject: [PATCH 026/139] g2-common: Clean up init scripts * Reorganize by trigger order * Sort services alphabetically * Move properties to system_prop.mk * Remove unused items * Save MP-Decision late start * Save VM tweaks * Don't duplicate init.g2.power.rc code Change-Id: I908dbaf8da2dbeee88989a1f3b6026208a821010 Signed-off-by: Zdrowy Gosciu Conflicts: rootdir/etc/init.g2.rc --- rootdir/etc/init.g2.rc | 481 ++++++++++++++++---------------------- rootdir/etc/ueventd.g2.rc | 4 +- system_prop.mk | 10 + 3 files changed, 207 insertions(+), 288 deletions(-) diff --git a/rootdir/etc/init.g2.rc b/rootdir/etc/init.g2.rc index 84080763..24204824 100644 --- a/rootdir/etc/init.g2.rc +++ b/rootdir/etc/init.g2.rc @@ -30,25 +30,29 @@ import init.g2.power.rc on early-init symlink /dev/diag_lge /dev/diag + mkdir /sys 0771 system system mkdir /firmware 0771 system system + mount debugfs debugfs /sys/kernel/debug - write /sys/class/leds/lcd-backlight/brightness 100 chown system system /sys/kernel/debug/kgsl/proc + symlink /data/tombstones /tombstones + write /sys/class/leds/lcd-backlight/brightness 130 + on init - # Set permissions for persist partition mkdir /persist 0771 system system mkdir /factory 0775 system system mkdir /persist-lg 0755 system system mkdir /mpt 0755 system system mkdir /sns 0775 system system + # Create directory for sensordaemon mkdir /sns/cal 0644 system system - mkdir /mnt/media_rw 0700 media_rw media_rw # See storage config details at http://source.android.com/tech/storage/ + mkdir /mnt/media_rw 0700 media_rw media_rw mkdir /mnt/shell/emulated 0700 shell shell mkdir /storage 0751 system sdcard_r mkdir /storage/emulated 0555 root root @@ -70,23 +74,89 @@ on init symlink /mnt/shell/emulated/0 /storage/emulated/legacy symlink /storage/usbdisk0 /storage/usb - # Setup custom emergency number list based on - # the MCC. This is needed by RIL. - setprop persist.radio.custom_ecc "1" - setprop persist.radio.custom_ecc_mcc "{234,235,424,426,427,430,431:999},{334:060,066},{422:9999},{730:133}" - setprop persist.radio.custom_ecc_mcc_ex "{450:111,112,113,119,122,125,127},{724:190},{440,441:110,118,119,112,911}" - setprop persist.radio.custom_ecc_voice "{515:117},{452:113,114,115}" - setprop persist.radio.custom_ecc_hard "911,*911,#911,112,999,000,08,118,120,122,110,119,995,111,113,125,127,133" - - # Prevents permission denied error for telephony - chmod 0644 /proc/cmdline - on fs mount_all ./fstab.g2 restorecon_recursive /sns restorecon_recursive /mpt setprop ro.crypto.fuse_sdcard true +on post-fs-data + mkdir /data/media 0770 media_rw media_rw + + # Create directory used by bluetooth + mkdir /data/misc/bluetooth 0770 bluetooth bluetooth + + # Create directory used by audio subsystem + mkdir /data/misc/audio 0770 audio audio + + # Create folder for camera sockets + mkdir /data/misc/camera 0770 camera camera + + # Create the directories used by CnE subsystem + mkdir /data/connectivity 0771 system system + chown system system /data/connectivity + + mkdir /data/dpm/nsrm 0771 system system + chown system system /data/dpm/nsrm + + # Create directory used by the DASH client + mkdir /data/misc/dash 0770 media audio + + # Create the directories used by DPM subsystem + mkdir /data/dpm 0771 system system + chown system system /data/dpm + + # Create directory used by display clients + mkdir /data/misc/display 0770 root system + + # Create directory for IMS services + mkdir /data/shared 0755 + chown system system /data/shared + + # Create directories for Location services + mkdir /data/misc/location 0770 gps gps + mkdir /data/misc/location/mq 0770 gps gps + mkdir /data/misc/location/xtwifi 0770 gps gps + mkdir /data/misc/location/gpsone_d 0770 system gps + mkdir /data/misc/location/quipc 0770 gps system + mkdir /data/misc/location/gsiff 0770 gps gps + + # NFC: create data/nfc for nv storage + mkdir /data/nfc 770 nfc nfc + mkdir /data/nfc/param 770 nfc nfc + + # Create directory used by sensor subsystem + mkdir /persist/sensors 0775 system root + write /persist/sensors/sensors_settings 1 + chmod 0644 /persist/sensors/sensors_settings + chown system root /persist/sensors/sensors_settings + mkdir /data/misc/sensors 0775 system system + restorecon_recursive /data/misc/sensors + + # Some blobs have a tendancy to reference the old sensor settings + # so create them here, just in case. + mkdir /data/system/sensors + chmod 665 /data/system/sensors + write /data/system/sensors/settings 1 + chmod 0775 /data/system/sensors + restorecon /data/system/sensors/settings + chmod 0664 /data/system/sensors/settings + chown system /data/system/sensors/settings + + # Create /data/time folder for time-services + mkdir /data/time/ 0700 system system + + # Create directory for TZ Apps + mkdir /data/misc/qsee 0770 system system + + # wifi + chown wifi system /persist/wifi + + # Make sure the default firmware is loaded + write /sys/module/bcmdhd/parameters/firmware_path "/system/etc/firmware/fw_bcmdhd.bin" + + setprop vold.post_fs_data_done 1 + on early-boot # set RLIMIT_MEMLOCK to 64MB setrlimit 8 67108864 67108864 @@ -99,38 +169,37 @@ on early-boot write /sys/module/lowmemorykiller/parameters/lmk_fast_run 0 on boot + # Create QMUX deamon socket area + mkdir /dev/socket/qmux_radio 0770 radio radio + chmod 2770 /dev/socket/qmux_radio + mkdir /dev/socket/qmux_audio 0770 media audio + chmod 2770 /dev/socket/qmux_audio + mkdir /dev/socket/qmux_bluetooth 0770 bluetooth bluetooth + chmod 2770 /dev/socket/qmux_bluetooth + mkdir /dev/socket/qmux_gps 0770 gps gps + chmod 2770 /dev/socket/qmux_gps + + # Allow QMUX daemon to assign port open wait time + chown radio radio /sys/devices/virtual/hsicctl/hsicctl0/modem_wait + + # communicate with mpdecision and thermald + mkdir /dev/socket/mpdecision 2770 system system + + # Prevents permission denied error for telephony + chmod 0644 /proc/cmdline + # bluetooth - chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state chown bluetooth net_bt_stack /proc/bluetooth/sleep/btwake chown bluetooth net_bt_stack /proc/bluetooth/sleep/proto - chown bluetooth bluetooth /proc/bluetooth/sleep/lpm chown bluetooth bluetooth /proc/bluetooth/sleep/btwrite - chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_lpm - chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_btwrite - chown system system /sys/module/sco/parameters/disable_esco - chown bluetooth bluetooth /sys/module/hci_smd/parameters/hcismd_set - chmod 0660 /sys/module/bluetooth_power/parameters/power - chmod 0660 /sys/module/hci_smd/parameters/hcismd_set + chown bluetooth bluetooth /proc/bluetooth/sleep/lpm chmod 0660 /sys/class/rfkill/rfkill0/state chmod 0660 /proc/bluetooth/sleep/btwake chmod 0660 /proc/bluetooth/sleep/proto chmod 0644 /proc/bluetooth/sleep/btwrite chmod 0644 /proc/bluetooth/sleep/lpm - chown bluetooth bluetooth /dev/ttyHS0 - chmod 0660 /sys/module/hci_uart/parameters/ath_lpm - chmod 0660 /sys/module/hci_uart/parameters/ath_btwrite - chown bluetooth net_bt_stack /dev/ttyHS99 - chmod 0660 /dev/ttyHS0 - chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/clock - chmod 0660 /sys/devices/platform/msm_serial_hs.0/clock - - chmod 0660 /dev/ttyHS2 - chown bluetooth bluetooth /dev/ttyHS2 - - chown bluetooth bluetooth /sys/class/rfkill/rfkill0/device/extldo - chmod 0660 /sys/class/rfkill/rfkill0/device/extldo # vibrator chown system system /sys/class/timed_output/vibrator/amp @@ -157,29 +226,6 @@ on boot chown system system /sys/devices/f9967000.i2c/i2c-0/0-0032/leds/G/led_current chown system system /sys/devices/f9967000.i2c/i2c-0/0-0032/leds/B/led_current - # Feature chip vendor: brcm, qct - setprop bluetooth.chip.vendor brcm - - # SCMS-T property set during phone Booting - setprop persist.service.bdroid.a2dp_con 0 - setprop persist.service.bdroid.scms_t 0 - - chown bluetooth net_bt_stack /dev/btlock - chmod 0600 /dev/btlock - - # Create QMUX deamon socket area - mkdir /dev/socket/qmux_radio 0770 radio radio - chmod 2770 /dev/socket/qmux_radio - mkdir /dev/socket/qmux_audio 0770 media audio - chmod 2770 /dev/socket/qmux_audio - mkdir /dev/socket/qmux_bluetooth 0770 bluetooth bluetooth - chmod 2770 /dev/socket/qmux_bluetooth - mkdir /dev/socket/qmux_gps 0770 gps gps - chmod 2770 /dev/socket/qmux_gps - - # Allow QMUX daemon to assign port open wait time - chown radio radio /sys/devices/virtual/hsicctl/hsicctl0/modem_wait - # Define TCP buffer sizes for various networks # ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax, setprop net.tcp.buffersize.wifi 524288,2097152,4194304,262144,524288,1048576 @@ -199,17 +245,9 @@ on boot write /proc/sys/net/core/rmem_max 2097152 write /proc/sys/net/core/wmem_max 2097152 - # Set SUID bit for usbhub - chmod 4755 /system/bin/usbhub - chmod 755 /system/bin/usbhub_init - # Remove SUID bit for iproute2 ip tool chmod 0755 /system/bin/ip - # port-bridge - chmod 0660 /dev/smd0 - chown system system /dev/smd0 - # Camera Recording mkdir /dev/video symlink /dev/video32 /dev/video/venus_dec @@ -261,9 +299,6 @@ on boot chmod 0664 /sys/devices/virtual/graphics/fb1/vendor_name chmod 0664 /sys/devices/virtual/graphics/fb1/product_description - chmod 660 /dev/rtc0 - chown system system /dev/rtc0 - chown root system /proc/net/ip_conntrack # Enable DEBUG_SUSPEND, DEBUG_EXIT_SUSPEND, and DEBUG_WAKEUP @@ -272,128 +307,6 @@ on boot chown system wifi /sys/module/bcmdhd/parameters/firmware_path chmod 0640 /sys/module/bcmdhd/parameters/firmware_path -# msm specific files that need to be created on /data -on post-fs-data - mkdir /data/media 0770 media_rw media_rw - - # NFC: create data/nfc for nv storage - mkdir /data/nfc 770 nfc nfc - mkdir /data/nfc/param 770 nfc nfc - - # Create directory for TZ Apps - mkdir /data/misc/qsee 0770 system system - - # bluetooth - mkdir /data/misc/bluetooth 0770 bluetooth bluetooth - - # Create directory used by audio subsystem - mkdir /data/misc/audio 0770 audio audio - - # Create directory used by sensor subsystem - mkdir /persist/sensors 0775 system root - write /persist/sensors/sensors_settings 1 - chmod 0644 /persist/sensors/sensors_settings - chown system root /persist/sensors/sensors_settings - mkdir /data/misc/sensors 0775 system system - restorecon_recursive /data/misc/sensors - - # Some blobs have a tendancy to reference the old sensor settings - # so create them here, just in case. - mkdir /data/system/sensors - chmod 665 /data/system/sensors - write /data/system/sensors/settings 1 - chmod 0775 /data/system/sensors - restorecon /data/system/sensors/settings - chmod 0664 /data/system/sensors/settings - chown system /data/system/sensors/settings - - # wifi - chown wifi system /persist/wifi - - # Create the directories used by the Wireless subsystem - mkdir /data/misc/wifi 0770 wifi wifi - mkdir /data/misc/wifi/sockets 0770 wifi wifi - mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi - mkdir /data/misc/dhcp 0770 dhcp dhcp - chown dhcp system /data/misc/dhcp - - # Create the directories used by CnE subsystem - mkdir /data/connectivity 0771 system system - chown system system /data/connectivity - - # Create the directories used by DPM subsystem - mkdir /data/dpm 0771 system system - chown system system /data/dpm - - mkdir /data/dpm/nsrm 0771 system system - chown system system /data/dpm/nsrm - - # Create directory used by the DASH client - mkdir /data/misc/dash 0770 media audio - - # Create directory used by display clients - mkdir /data/misc/display 0770 root system - - # Mounting of persist is moved to 'on emmc-fs' and 'on fs' sections - # We chown/chmod /persist again so because mount is run as root + defaults - chown system system /persist - chmod 0771 /persist - chmod 0664 /sys/devices/platform/msm_sdcc.1/polling - chmod 0664 /sys/devices/platform/msm_sdcc.2/polling - chmod 0664 /sys/devices/platform/msm_sdcc.3/polling - chmod 0664 /sys/devices/platform/msm_sdcc.4/polling - - # Chown polling nodes as needed from UI running on system server - chown system system /sys/devices/platform/msm_sdcc.1/polling - chown system system /sys/devices/platform/msm_sdcc.2/polling - chown system system /sys/devices/platform/msm_sdcc.3/polling - chown system system /sys/devices/platform/msm_sdcc.4/polling - - # Create the symlink to qcn wpa_supplicant folder for ar6000 wpa_supplicant - mkdir /data/system 0775 system system - #symlink /data/misc/wifi/wpa_supplicant /data/system/wpa_supplicant - - # Create directories for Location services - mkdir /data/misc/location 0770 gps gps - mkdir /data/misc/location/mq 0770 gps gps - mkdir /data/misc/location/xtwifi 0770 gps gps - mkdir /data/misc/location/gpsone_d 0770 system gps - mkdir /data/misc/location/quipc 0770 gps system - mkdir /data/misc/location/gsiff 0770 gps gps - - # Create directory for IMS services - mkdir /data/shared 0755 - chown system system /data/shared - - # Create /data/time folder for time-services - mkdir /data/time/ 0700 system system - - # Make sure the default firmware is loaded - write /sys/module/bcmdhd/parameters/firmware_path "/system/etc/firmware/fw_bcmdhd.bin" - - # Create directory for hostapd - mkdir /data/hostapd 0770 system wifi - - # Provide the access to hostapd.conf only to root and group - chmod 0660 /data/hostapd/hostapd.conf - - # Enable the setgid bit on the directory - mkdir /data/audio 2770 media audio - - setprop vold.post_fs_data_done 1 - - # communicate with mpdecision and thermald - mkdir /dev/socket/mpdecision 2770 system system - - # Create a folder for SRS to be able to create a usercfg file - mkdir /data/data/media 0770 media media - - # Create folder for mm-qcamera-daemon - mkdir /data/camera 0770 media camera - - # Create folder for camera sockets - mkdir /data/misc/camera 0770 camera camera - # Torch chown system camera /sys/class/leds/led:flash_torch/brightness chmod 0660 /sys/class/leds/led:flash_torch/brightness @@ -405,10 +318,6 @@ on post-fs-data chmod 0664 /sys/devices/platform/tspdrv/nforce_timed restorecon /sys/devices/platform/tspdrv/nforce_timed - # Display Calibration - chown system system /sys/devices/virtual/graphics/fb0/rgb - chmod 0660 /sys/devices/virtual/graphics/fb0/rgb - # Tap to wake chown system radio /sys/devices/virtual/input/lge_touch/touch_gesture chmod 0664 /sys/devices/virtual/input/lge_touch/touch_gesture @@ -423,12 +332,16 @@ on post-fs-data write /proc/sys/vm/vfs_cache_pressure 20 write /proc/sys/vm/drop_caches 3 -on property:init.svc.wpa_supplicant=stopped - stop dhcpcd +# Services start here -service rmt_storage /system/bin/rmt_storage - class core - user root +service adsprpcd /system/bin/adsprpcd + class main + user media + group media + +service audiod /system/bin/audiod + class late_start + user system group system service bridgemgrd /system/bin/bridgemgrd @@ -436,33 +349,92 @@ service bridgemgrd /system/bin/bridgemgrd user radio group radio -# QMUX must be in multiple groups to support external process connections -service qmuxd /system/bin/qmuxd +service charger /sbin/healthd -c + class charger + critical + seclabel u:r:healthd:s0 + +service irsc_util /system/bin/irsc_util "/etc/sec_config" class main - user radio - group radio audio bluetooth gps qcom_diag + user root + oneshot + +service loc_launcher /system/bin/loc_launcher + class late_start + group gps inet net_raw qcom_diag net_admin wifi + +service mpdecision /system/bin/mpdecision --avg_comp + class late_start + user root + group root system service netmgrd /system/bin/netmgrd class main user root group radio -# QCOM sensor +service ppd /system/bin/mm-pp-daemon + class late_start + disabled + user system + socket pps stream 0660 system system + group system graphics + +on property:init.svc.surfaceflinger=stopped + stop ppd + +on property:init.svc.surfaceflinger=running + start ppd + +service qcamerasvr /system/bin/mm-qcamera-daemon + class late_start + user camera + group camera system inet input graphics + +service qmuxd /system/bin/qmuxd + class main + user radio + group radio audio bluetooth gps qcom_diag + +service qseecomd /system/bin/qseecomd + class core + user root + group root + +service rmt_storage /system/bin/rmt_storage + class core + user root + group system + +# SD card +service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023 + class late_start + +service fuse_usbdisk0 /system/bin/sdcard -u 1023 -g 1023 -w 1023 /mnt/media_rw/usbdisk0 /storage/usbdisk0 + class late_start + disabled + service sensors /system/bin/sensors.qcom class late_start user root group root -# Adjust socket buffer to enlarge TCP receive window for high bandwidth -# but only if ro.data.large_tcp_window_size property is set. -on property:ro.data.large_tcp_window_size=true - write /proc/sys/net/ipv4/tcp_adv_win_scale 2 +service set_baseband /system/bin/sh /system/etc/set_baseband.sh + class late_start + user root + oneshot -service irsc_util /system/bin/irsc_util "/etc/sec_config" +service thermal-engine /system/bin/thermal-engine class main user root - oneshot + group root + +service time_daemon /system/bin/time_daemon + class late_start + user root + group root +# WiFi service p2p_supplicant /system/bin/wpa_supplicant \ -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ -I/system/etc/wifi/wpa_supplicant_overlay.conf -N \ @@ -502,16 +474,6 @@ service dhcpcd_p2p /system/bin/dhcpcd -aABKL disabled oneshot -service iprenew_wlan0 /system/bin/dhcpcd -n - class late_start - disabled - oneshot - -service iprenew_p2p /system/bin/dhcpcd -n - class late_start - disabled - oneshot - service dhcpcd_bnep0 /system/bin/dhcpcd -BKLG disabled oneshot @@ -536,77 +498,24 @@ service dhcpcd_bt-pan /system/bin/dhcpcd -BKLG disabled oneshot -service iprenew_bt-pan /system/bin/dhcpcd -n - disabled - oneshot - -service qseecomd /system/bin/qseecomd - class core - user root - group root - -service set_baseband /system/bin/sh /system/etc/set_baseband.sh +service iprenew_wlan0 /system/bin/dhcpcd -n class late_start - user root + disabled oneshot -service loc_launcher /system/bin/loc_launcher - #loc_launcher will start as root and set its uid to gps - class late_start - group gps inet net_raw qcom_diag net_admin wifi - -# virtual sdcard daemon running as media_rw (1023) -service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023 - class late_start - -service fuse_usbdisk0 /system/bin/sdcard -u 1023 -g 1023 -w 1023 /mnt/media_rw/usbdisk0 /storage/usbdisk0 +service iprenew_p2p /system/bin/dhcpcd -n class late_start disabled + oneshot -service charger /sbin/healthd -c - class charger - critical - seclabel u:r:healthd:s0 - -service qcamerasvr /system/bin/mm-qcamera-daemon - class late_start - user camera - group camera system inet input graphics - -service mpdecision /system/bin/mpdecision --avg_comp - class late_start - user root - group root system - -service thermal-engine /system/bin/thermal-engine - class main - user root - group root - -service time_daemon /system/bin/time_daemon - class late_start - user root - group root - -service adsprpcd /system/bin/adsprpcd - class main - user media - group media - -service audiod /system/bin/audiod - class late_start - user system - group system - -service ppd /system/bin/mm-pp-daemon - class late_start +service iprenew_bt-pan /system/bin/dhcpcd -n disabled - user system - socket pps stream 0660 system system - group system graphics + oneshot -on property:init.svc.surfaceflinger=stopped - stop ppd +on property:init.svc.wpa_supplicant=stopped + stop dhcpcd -on property:init.svc.surfaceflinger=running - start ppd +# Adjust socket buffer to enlarge TCP receive window for high bandwidth +# but only if ro.data.large_tcp_window_size property is set. +on property:ro.data.large_tcp_window_size=true + write /proc/sys/net/ipv4/tcp_adv_win_scale 2 diff --git a/rootdir/etc/ueventd.g2.rc b/rootdir/etc/ueventd.g2.rc index 3c7e44cf..63b190fb 100644 --- a/rootdir/etc/ueventd.g2.rc +++ b/rootdir/etc/ueventd.g2.rc @@ -35,7 +35,7 @@ /dev/kgsl-2d0 0666 root root /dev/kgsl-2d1 0666 root root /dev/ion 0664 system system -/dev/rtc0 0600 system system +/dev/rtc0 0660 system system /dev/smd0 0660 system system /dev/smd4 0660 system system /dev/smd_cxm_qmi 0640 radio radio @@ -243,5 +243,5 @@ /dev/lge_ddm_tty0 0660 system system /dev/block/mmcblk0p13 0660 system wifi -/dev/btlock 0660 bluetooth bluetooth +/dev/btlock 0660 bluetooth net_bt_stack /dev/rfkill 0660 wifi wifi diff --git a/system_prop.mk b/system_prop.mk index d47ce187..9c3cdcd5 100644 --- a/system_prop.mk +++ b/system_prop.mk @@ -4,6 +4,9 @@ # Bluetooth PRODUCT_PROPERTY_OVERRIDES += \ + bluetooth.chip.vendor=brcm \ + persist.service.bdroid.a2dp_con=0 \ + persist.service.bdroid.scms_t=0 \ ro.bt.bdaddr_path=/data/misc/bdaddr # Camera @@ -25,6 +28,13 @@ PRODUCT_PROPERTY_OVERRIDES += \ ro.vendor.extension_library=/vendor/lib/libqti-perfd-client.so # Radio +PRODUCT_PROPERTY_OVERRIDES += \ + persist.radio.custom_ecc=1 \ + persist.radio.custom_ecc_mcc={234,235,424,426,427,430,431:999},{334:060,066},{422:9999},{730:133} \ + persist.radio.custom_ecc_mcc_ex={450:111,112,113,119,122,125,127},{724:190},{440,441:110,118,119,112,911} \ + persist.radio.custom_ecc_voice={515:117},{452:113,114,115} \ + persist.radio.custom_ecc_hard=911,*911,#911,112,999,000,08,118,120,122,110,119,995,111,113,125,127,133 + PRODUCT_PROPERTY_OVERRIDES += \ persist.radio.apm_sim_not_pwdn=1 \ ro.telephony.call_ring.multiple=0 From 014267023c08070f82fe0009b7abc4bf5a4137f3 Mon Sep 17 00:00:00 2001 From: Ethan Chen Date: Sun, 4 Oct 2015 21:51:04 -0700 Subject: [PATCH 027/139] g2-common: Device does not have a barometer Change-Id: Ia78dd66b4f9d72661907e91dc0d588bca445d5d3 --- g2.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/g2.mk b/g2.mk index 2e5751b7..496de488 100644 --- a/g2.mk +++ b/g2.mk @@ -28,7 +28,6 @@ PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.camera.front.xml:system/etc/permissions/android.hardware.camera.front.xml \ frameworks/native/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \ frameworks/native/data/etc/android.hardware.nfc.xml:system/etc/permissions/android.hardware.nfc.xml \ - frameworks/native/data/etc/android.hardware.sensor.barometer.xml:system/etc/permissions/android.hardware.sensor.barometer.xml \ frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:system/etc/permissions/android.hardware.sensor.gyroscope.xml \ frameworks/native/data/etc/android.hardware.sensor.light.xml:system/etc/permissions/android.hardware.sensor.light.xml \ frameworks/native/data/etc/android.hardware.sensor.proximity.xml:system/etc/permissions/android.hardware.sensor.proximity.xml \ From 4a0c429e318d143c04573e17bd1ecf5401dfd4e5 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Mon, 5 Oct 2015 13:51:11 +0200 Subject: [PATCH 028/139] g2: Move back g2.init.power.rc include to g2.mk This reverts commit aac004c826d72e8500d159bf6702f8c9c7f29636. --- custom_prop.mk | 4 ---- g2.mk | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/custom_prop.mk b/custom_prop.mk index 319c8131..a693a129 100644 --- a/custom_prop.mk +++ b/custom_prop.mk @@ -20,10 +20,6 @@ PRODUCT_PROPERTY_OVERRIDES += \ wlan.chip.vendor=brcm \ wlan.chip.version=bcm4335 -# Init -PRODUCT_PACKAGES += \ - init.g2.power.rc - # # Audio/Video # diff --git a/g2.mk b/g2.mk index 496de488..524790c8 100644 --- a/g2.mk +++ b/g2.mk @@ -110,6 +110,7 @@ PRODUCT_COPY_FILES += \ PRODUCT_PACKAGES += \ fstab.g2 \ init.g2.rc \ + init.g2.power.rc \ init.g2.usb.rc \ panel.sh \ set_baseband.sh \ From 2c65464e2a7a09ab8d5e4c994bdc8257010c847f Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Mon, 5 Oct 2015 15:25:40 +0200 Subject: [PATCH 029/139] g2: Move back custom emergency number list Hash # is illegal ;) --- rootdir/etc/init.g2.rc | 8 ++++++++ system_prop.mk | 7 ------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/rootdir/etc/init.g2.rc b/rootdir/etc/init.g2.rc index 24204824..35455318 100644 --- a/rootdir/etc/init.g2.rc +++ b/rootdir/etc/init.g2.rc @@ -74,6 +74,14 @@ on init symlink /mnt/shell/emulated/0 /storage/emulated/legacy symlink /storage/usbdisk0 /storage/usb + # Setup custom emergency number list based on + # the MCC. This is needed by RIL. + setprop persist.radio.custom_ecc "1" + setprop persist.radio.custom_ecc_mcc "{234,235,424,426,427,430,431:999},{334:060,066},{422:9999},{730:133}" + setprop persist.radio.custom_ecc_mcc_ex "{450:111,112,113,119,122,125,127},{724:190},{440,441:110,118,119,112,911}" + setprop persist.radio.custom_ecc_voice "{515:117},{452:113,114,115}" + setprop persist.radio.custom_ecc_hard "911,*911,#911,112,999,000,08,118,120,122,110,119,995,111,113,125,127,133" + on fs mount_all ./fstab.g2 restorecon_recursive /sns diff --git a/system_prop.mk b/system_prop.mk index 9c3cdcd5..55b7791e 100644 --- a/system_prop.mk +++ b/system_prop.mk @@ -28,13 +28,6 @@ PRODUCT_PROPERTY_OVERRIDES += \ ro.vendor.extension_library=/vendor/lib/libqti-perfd-client.so # Radio -PRODUCT_PROPERTY_OVERRIDES += \ - persist.radio.custom_ecc=1 \ - persist.radio.custom_ecc_mcc={234,235,424,426,427,430,431:999},{334:060,066},{422:9999},{730:133} \ - persist.radio.custom_ecc_mcc_ex={450:111,112,113,119,122,125,127},{724:190},{440,441:110,118,119,112,911} \ - persist.radio.custom_ecc_voice={515:117},{452:113,114,115} \ - persist.radio.custom_ecc_hard=911,*911,#911,112,999,000,08,118,120,122,110,119,995,111,113,125,127,133 - PRODUCT_PROPERTY_OVERRIDES += \ persist.radio.apm_sim_not_pwdn=1 \ ro.telephony.call_ring.multiple=0 From d19485702dd9dde91eaa40ef4bdf8ff4a49f2311 Mon Sep 17 00:00:00 2001 From: Ethan Chen Date: Sun, 4 Oct 2015 20:44:43 -0700 Subject: [PATCH 030/139] g2-common: Introduce init.recovery.g2.rc Change-Id: I75296a8a89444ee1cfa0f83819183901d121d686 Signed-off-by: Zdrowy Gosciu Conflicts: rootdir/Android.mk rootdir/etc/init.g2.rc --- g2.mk | 1 + rootdir/Android.mk | 12 ++++++++++-- rootdir/etc/init.g2.rc | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/g2.mk b/g2.mk index 524790c8..e42831cb 100644 --- a/g2.mk +++ b/g2.mk @@ -112,6 +112,7 @@ PRODUCT_PACKAGES += \ init.g2.rc \ init.g2.power.rc \ init.g2.usb.rc \ + init.recovery.g2.rc \ panel.sh \ set_baseband.sh \ ueventd.g2.rc diff --git a/rootdir/Android.mk b/rootdir/Android.mk index 4b932990..1b1f6995 100644 --- a/rootdir/Android.mk +++ b/rootdir/Android.mk @@ -27,6 +27,14 @@ LOCAL_SRC_FILES := etc/init.g2.rc LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) include $(BUILD_PREBUILT) +include $(CLEAR_VARS) +LOCAL_MODULE := init.g2.power.rc +LOCAL_MODULE_TAGS := optional eng +LOCAL_MODULE_CLASS := ETC +LOCAL_SRC_FILES := etc/init.g2.power.rc +LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) +include $(BUILD_PREBUILT) + include $(CLEAR_VARS) LOCAL_MODULE := init.g2.usb.rc LOCAL_MODULE_TAGS := optional eng @@ -36,11 +44,11 @@ LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) include $(BUILD_PREBUILT) include $(CLEAR_VARS) -LOCAL_MODULE := init.g2.power.rc +LOCAL_MODULE := init.recovery.g2.rc LOCAL_MODULE_TAGS := optional eng LOCAL_MODULE_CLASS := ETC LOCAL_SRC_FILES := etc/init.g2.power.rc -LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) +LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT) include $(BUILD_PREBUILT) include $(CLEAR_VARS) diff --git a/rootdir/etc/init.g2.rc b/rootdir/etc/init.g2.rc index 35455318..0d8b26e1 100644 --- a/rootdir/etc/init.g2.rc +++ b/rootdir/etc/init.g2.rc @@ -25,8 +25,8 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -import init.g2.usb.rc import init.g2.power.rc +import init.g2.usb.rc on early-init symlink /dev/diag_lge /dev/diag From 792bd792873174a073a366a2a78a5d7c12440fb5 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Wed, 7 Oct 2015 12:59:23 +0200 Subject: [PATCH 031/139] g2: init: power: Clear default values at startup + remove useless cpu0 writes --- rootdir/etc/init.g2.power.rc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/rootdir/etc/init.g2.power.rc b/rootdir/etc/init.g2.power.rc index 4d1e0eb8..a23a4148 100644 --- a/rootdir/etc/init.g2.power.rc +++ b/rootdir/etc/init.g2.power.rc @@ -38,7 +38,6 @@ on enable-low-power write /sys/module/msm_pm/modes/cpu3/retention/idle_enabled 1 write /sys/module/msm_thermal/core_control/enabled 0 - write /sys/devices/system/cpu/cpu0/online 1 write /sys/devices/system/cpu/cpu1/online 1 write /sys/devices/system/cpu/cpu2/online 1 write /sys/devices/system/cpu/cpu3/online 1 @@ -72,6 +71,8 @@ on enable-low-power write /sys/class/devfreq/qcom,cpubw.42/governor cpubw_hwmon write /sys/class/devfreq/fdb00000.qcom,kgsl-3d0/governor msm-adreno-tz + rm /data/system/default_values + # Permission for Power HAL CM extension chown root system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load chmod 664 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load @@ -97,7 +98,6 @@ on charger write /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled 1 write /sys/module/msm_thermal/core_control/enabled 0 - write /sys/devices/system/cpu/cpu0/online 1 write /sys/devices/system/cpu/cpu1/online 1 write /sys/devices/system/cpu/cpu2/online 1 write /sys/devices/system/cpu/cpu3/online 1 @@ -126,7 +126,6 @@ on property:init.svc.recovery=running on property:sys.perf.profile=0 stop mpdecision write /sys/module/msm_thermal/core_control/enabled 0 - write /sys/devices/system/cpu/cpu0/online 1 write /sys/devices/system/cpu/cpu1/online 1 write /sys/devices/system/cpu/cpu2/online 1 write /sys/devices/system/cpu/cpu3/online 1 @@ -149,7 +148,6 @@ on property:sys.perf.profile=0 on property:sys.perf.profile=1 stop mpdecision write /sys/module/msm_thermal/core_control/enabled 0 - write /sys/devices/system/cpu/cpu0/online 1 write /sys/devices/system/cpu/cpu1/online 1 write /sys/devices/system/cpu/cpu2/online 1 write /sys/devices/system/cpu/cpu3/online 1 @@ -189,7 +187,6 @@ on property:sys.perf.profile=1 on property:sys.perf.profile=2 stop mpdecision write /sys/module/msm_thermal/core_control/enabled 0 - write /sys/devices/system/cpu/cpu0/online 1 write /sys/devices/system/cpu/cpu1/online 1 write /sys/devices/system/cpu/cpu2/online 1 write /sys/devices/system/cpu/cpu3/online 1 From d7f254003612530f9bfc90979a7b8ec189e55a90 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Wed, 7 Oct 2015 13:06:28 +0200 Subject: [PATCH 032/139] g2: init: power: Move CPU permissions from early init Signed-off-by: Zdrowy Gosciu --- rootdir/etc/init.g2.power.rc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/rootdir/etc/init.g2.power.rc b/rootdir/etc/init.g2.power.rc index a23a4148..405c8054 100644 --- a/rootdir/etc/init.g2.power.rc +++ b/rootdir/etc/init.g2.power.rc @@ -7,13 +7,6 @@ on early-init write /sys/kernel/sched/arch_power 0 write /sys/kernel/sched/gentle_fair_sleepers 0 - chown root system /sys/devices/system/cpu/cpu1/online - chown root system /sys/devices/system/cpu/cpu2/online - chown root system /sys/devices/system/cpu/cpu3/online - chmod 664 /sys/devices/system/cpu/cpu1/online - chmod 664 /sys/devices/system/cpu/cpu2/online - chmod 664 /sys/devices/system/cpu/cpu3/online - on enable-low-power write /sys/module/lpm_levels/enable_low_power/l2 4 write /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled 1 @@ -77,6 +70,13 @@ on enable-low-power chown root system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load chmod 664 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load + chown root system /sys/devices/system/cpu/cpu1/online + chown root system /sys/devices/system/cpu/cpu2/online + chown root system /sys/devices/system/cpu/cpu3/online + chmod 664 /sys/devices/system/cpu/cpu1/online + chmod 664 /sys/devices/system/cpu/cpu2/online + chmod 664 /sys/devices/system/cpu/cpu3/online + write /sys/devices/system/cpu/cpu1/online 0 write /sys/devices/system/cpu/cpu2/online 0 write /sys/devices/system/cpu/cpu3/online 0 From ebd09b0aba36bf087bd2536c5138a80e79f27a2b Mon Sep 17 00:00:00 2001 From: Dorimanx Date: Wed, 7 Oct 2015 23:09:32 +0200 Subject: [PATCH 033/139] g2: init: power: Entropy tuning Signed-off-by: Zdrowy Gosciu --- rootdir/etc/init.g2.power.rc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rootdir/etc/init.g2.power.rc b/rootdir/etc/init.g2.power.rc index 405c8054..5bf0b28d 100644 --- a/rootdir/etc/init.g2.power.rc +++ b/rootdir/etc/init.g2.power.rc @@ -7,6 +7,10 @@ on early-init write /sys/kernel/sched/arch_power 0 write /sys/kernel/sched/gentle_fair_sleepers 0 + # Tune entropy parameters + write /proc/sys/kernel/random/read_wakeup_threshold 512 + write /proc/sys/kernel/random/write_wakeup_threshold 256 + on enable-low-power write /sys/module/lpm_levels/enable_low_power/l2 4 write /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled 1 From 04c1904781d63953c20e3a1e7e8608bfe623b195 Mon Sep 17 00:00:00 2001 From: Ethan Chen Date: Thu, 8 Oct 2015 12:50:29 -0700 Subject: [PATCH 034/139] g2-common: Add IR blaster support Change-Id: I53f6146ed06c38f59249a9c8c70b900e8dc05d38 --- g2.mk | 1 + proprietary-files.txt | 2 ++ 2 files changed, 3 insertions(+) diff --git a/g2.mk b/g2.mk index e42831cb..180c99b2 100644 --- a/g2.mk +++ b/g2.mk @@ -26,6 +26,7 @@ PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml \ frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:system/etc/permissions/android.hardware.camera.flash-autofocus.xml \ frameworks/native/data/etc/android.hardware.camera.front.xml:system/etc/permissions/android.hardware.camera.front.xml \ + frameworks/native/data/etc/android.hardware.consumerir.xml:system/etc/permissions/android.hardware.consumerir.xml \ frameworks/native/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \ frameworks/native/data/etc/android.hardware.nfc.xml:system/etc/permissions/android.hardware.nfc.xml \ frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:system/etc/permissions/android.hardware.sensor.gyroscope.xml \ diff --git a/proprietary-files.txt b/proprietary-files.txt index 3b379e94..6920ef49 100644 --- a/proprietary-files.txt +++ b/proprietary-files.txt @@ -46,7 +46,9 @@ etc/permissions/qcnvitems.xml etc/permissions/com.qualcomm.location.xml lib/drm/libdrmwvmplugin.so lib/hw/camera.vendor.msm8974.so +lib/hw/consumerir.msm8974.so lib/libchromatix_imx135_liveshot.so +lib/libcir_driver.so lib/libdivxdrm_jni.so lib/libdivxdrmdecrypt.so lib/libdrmframework.so From 8e492cd95e49bdade05cb5232306115d0debfdda Mon Sep 17 00:00:00 2001 From: Ethan Chen Date: Fri, 9 Oct 2015 00:42:55 -0700 Subject: [PATCH 035/139] g2-common: Actually run hwaddrs binary to set BT MAC Change-Id: I1332db28bc1d844f0570a5f1f8555e22f88c57cf --- rootdir/etc/init.g2.rc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/rootdir/etc/init.g2.rc b/rootdir/etc/init.g2.rc index 0d8b26e1..e0c4c7b0 100644 --- a/rootdir/etc/init.g2.rc +++ b/rootdir/etc/init.g2.rc @@ -362,6 +362,15 @@ service charger /sbin/healthd -c critical seclabel u:r:healthd:s0 +service conn_init /system/bin/hwaddrs + class late_start + user system + group system wifi + oneshot + +on property:init.svc.conn_init=stopped + chmod 644 /data/misc/bdaddr + service irsc_util /system/bin/irsc_util "/etc/sec_config" class main user root From a8de02414feb0cf8a755ccb5d13e93faae8ffadd Mon Sep 17 00:00:00 2001 From: Ethan Chen Date: Fri, 9 Oct 2015 09:16:16 -0700 Subject: [PATCH 036/139] Revert "g2: bluetooth: Replace USE_AXI_BRIDGE_LOCK with UART_FORCE_TWO_STOPBITS" * All BCM4335 appear to require AXI_BRIDGE_LOCK for btwlancoex. This should not have been removed. This reverts commit c44091611c4c92436e8e68105881ec11c2b20a08. Change-Id: I2709d308683ab287f62c6eba5110f6e7b55c4b99 --- bluetooth/vnd_g2.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bluetooth/vnd_g2.txt b/bluetooth/vnd_g2.txt index 7e411b5f..d599767e 100644 --- a/bluetooth/vnd_g2.txt +++ b/bluetooth/vnd_g2.txt @@ -10,4 +10,4 @@ BTVND_DBG = FALSE BTHW_DBG = FALSE VNDUSERIAL_DBG = FALSE UPIO_DBG = FALSE -UART_FORCE_TWO_STOPBITS = TRUE +USE_AXI_BRIDGE_LOCK = TRUE From 089cfc3b496180040df7ea450e659fbd81f182a1 Mon Sep 17 00:00:00 2001 From: Ethan Chen Date: Fri, 9 Oct 2015 09:26:16 -0700 Subject: [PATCH 037/139] g2-common: Update Bluedroid config * Add FORCE_TWO_STOPBITS * Add SETTLEMENT_DELAY_MS of 100 * Remove duplicate debug items (these all default to off already) * Save BAUD_RATE Change-Id: I06015ff3f3f24f7d36c74069f10b56c7bed6f2cf Signed-off-by: Zdrowy Gosciu --- bluetooth/vnd_g2.txt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/bluetooth/vnd_g2.txt b/bluetooth/vnd_g2.txt index d599767e..56501914 100644 --- a/bluetooth/vnd_g2.txt +++ b/bluetooth/vnd_g2.txt @@ -1,13 +1,10 @@ BLUETOOTH_UART_DEVICE_PORT = "/dev/ttyHS99" FW_PATCHFILE_LOCATION = "/vendor/firmware/" FW_PRE_PATCH="/vendor/firmware/bcm4335_prepatch.hcd" +FW_PATCH_SETTLEMENT_DELAY_MS = 100 UART_TARGET_BAUD_RATE = 3000000 LPM_IDLE_TIMEOUT_MULTIPLE = 5 BT_WAKE_VIA_PROC = TRUE -SCO_USE_I2S_INTERFACE = FALSE SCO_I2SPCM_IF_ROLE = 0 -BTVND_DBG = FALSE -BTHW_DBG = FALSE -VNDUSERIAL_DBG = FALSE -UPIO_DBG = FALSE USE_AXI_BRIDGE_LOCK = TRUE +UART_FORCE_TWO_STOPBITS = TRUE From 608b91b91182dafb36dbef06433353e8d9bc772d Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Mon, 12 Oct 2015 11:02:21 +0200 Subject: [PATCH 038/139] g2: configs: Rebase audio policy (for now) * Picked from CM 11 and upgraded to CM 12.1 format --- configs/audio_policy.conf | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/configs/audio_policy.conf b/configs/audio_policy.conf index 2b1ad967..43a6e50a 100644 --- a/configs/audio_policy.conf +++ b/configs/audio_policy.conf @@ -5,7 +5,7 @@ global_configuration { attached_output_devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER default_output_device AUDIO_DEVICE_OUT_SPEAKER - attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_REMOTE_SUBMIX|AUDIO_DEVICE_IN_VOICE_CALL + attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BACK_MIC|AUDIO_DEVICE_IN_REMOTE_SUBMIX } # audio hardware module section: contains descriptors for all audio hw modules present on the @@ -26,15 +26,15 @@ audio_hw_modules { sampling_rates 44100|48000 channel_masks AUDIO_CHANNEL_OUT_STEREO formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_FM|AUDIO_DEVICE_OUT_FM_TX - flags AUDIO_OUTPUT_FLAG_PRIMARY|AUDIO_OUTPUT_FLAG_FAST + devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET + flags AUDIO_OUTPUT_FLAG_PRIMARY } deep_buffer { sampling_rates 44100|48000 channel_masks AUDIO_CHANNEL_OUT_STEREO formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_FM|AUDIO_DEVICE_OUT_FM_TX - flags AUDIO_OUTPUT_FLAG_DEEP_BUFFER + devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET + flags AUDIO_OUTPUT_FLAG_FAST } hdmi { sampling_rates 44100|48000 @@ -44,10 +44,10 @@ audio_hw_modules { flags AUDIO_OUTPUT_FLAG_DIRECT } compress_offload { - sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000|64000|88200|96000|176400|192000 - channel_masks AUDIO_CHANNEL_OUT_STEREO - formats AUDIO_FORMAT_MP3|AUDIO_FORMAT_AAC|AUDIO_FORMAT_PCM_24_BIT_OFFLOAD - devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE + sampling_rates 8000|11025|16000|22050|32000|44100|48000 + channel_masks AUDIO_CHANNEL_OUT_MONO|AUDIO_CHANNEL_OUT_STEREO + formats AUDIO_FORMAT_MP3|AUDIO_FORMAT_AAC + devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING } voip_rx { @@ -62,8 +62,8 @@ audio_hw_modules { primary { sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000 channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO|AUDIO_CHANNEL_IN_FRONT_BACK - formats AUDIO_FORMAT_PCM_16_BIT|AUDIO_FORMAT_AMR_NB|AUDIO_FORMAT_AMR_WB|AUDIO_FORMAT_QCELP|AUDIO_FORMAT_EVRC|AUDIO_FORMAT_EVRCB|AUDIO_FORMAT_EVRCWB|AUDIO_FORMAT_EVRCNW - devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_WIRED_HEADSET|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_VOICE_CALL + formats AUDIO_FORMAT_PCM_16_BIT + devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_WIRED_HEADSET|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_VOICE_CALL|AUDIO_DEVICE_IN_BACK_MIC } } } From 0b891084175ed74f7fad461eae5950b02b065887 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Tue, 13 Oct 2015 13:21:43 +0200 Subject: [PATCH 039/139] Revert "g2: configs: Rebase audio policy (for now)" This reverts commit 608b91b91182dafb36dbef06433353e8d9bc772d. --- configs/audio_policy.conf | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/configs/audio_policy.conf b/configs/audio_policy.conf index 43a6e50a..2b1ad967 100644 --- a/configs/audio_policy.conf +++ b/configs/audio_policy.conf @@ -5,7 +5,7 @@ global_configuration { attached_output_devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER default_output_device AUDIO_DEVICE_OUT_SPEAKER - attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BACK_MIC|AUDIO_DEVICE_IN_REMOTE_SUBMIX + attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_REMOTE_SUBMIX|AUDIO_DEVICE_IN_VOICE_CALL } # audio hardware module section: contains descriptors for all audio hw modules present on the @@ -26,15 +26,15 @@ audio_hw_modules { sampling_rates 44100|48000 channel_masks AUDIO_CHANNEL_OUT_STEREO formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET - flags AUDIO_OUTPUT_FLAG_PRIMARY + devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_FM|AUDIO_DEVICE_OUT_FM_TX + flags AUDIO_OUTPUT_FLAG_PRIMARY|AUDIO_OUTPUT_FLAG_FAST } deep_buffer { sampling_rates 44100|48000 channel_masks AUDIO_CHANNEL_OUT_STEREO formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET - flags AUDIO_OUTPUT_FLAG_FAST + devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_FM|AUDIO_DEVICE_OUT_FM_TX + flags AUDIO_OUTPUT_FLAG_DEEP_BUFFER } hdmi { sampling_rates 44100|48000 @@ -44,10 +44,10 @@ audio_hw_modules { flags AUDIO_OUTPUT_FLAG_DIRECT } compress_offload { - sampling_rates 8000|11025|16000|22050|32000|44100|48000 - channel_masks AUDIO_CHANNEL_OUT_MONO|AUDIO_CHANNEL_OUT_STEREO - formats AUDIO_FORMAT_MP3|AUDIO_FORMAT_AAC - devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET + sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000|64000|88200|96000|176400|192000 + channel_masks AUDIO_CHANNEL_OUT_STEREO + formats AUDIO_FORMAT_MP3|AUDIO_FORMAT_AAC|AUDIO_FORMAT_PCM_24_BIT_OFFLOAD + devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING } voip_rx { @@ -62,8 +62,8 @@ audio_hw_modules { primary { sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000 channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO|AUDIO_CHANNEL_IN_FRONT_BACK - formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_WIRED_HEADSET|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_VOICE_CALL|AUDIO_DEVICE_IN_BACK_MIC + formats AUDIO_FORMAT_PCM_16_BIT|AUDIO_FORMAT_AMR_NB|AUDIO_FORMAT_AMR_WB|AUDIO_FORMAT_QCELP|AUDIO_FORMAT_EVRC|AUDIO_FORMAT_EVRCB|AUDIO_FORMAT_EVRCWB|AUDIO_FORMAT_EVRCNW + devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_WIRED_HEADSET|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_VOICE_CALL } } } From 74a556f8448ea63970523829a2ffef6ca4f39066 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Tue, 13 Oct 2015 13:26:47 +0200 Subject: [PATCH 040/139] g2-common: configs: Sync audio policy with CM 12.1 --- configs/audio_policy.conf | 74 +++++++++++++++++++++++---------------- 1 file changed, 43 insertions(+), 31 deletions(-) diff --git a/configs/audio_policy.conf b/configs/audio_policy.conf index 2b1ad967..7234d679 100644 --- a/configs/audio_policy.conf +++ b/configs/audio_policy.conf @@ -5,7 +5,8 @@ global_configuration { attached_output_devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER default_output_device AUDIO_DEVICE_OUT_SPEAKER - attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_REMOTE_SUBMIX|AUDIO_DEVICE_IN_VOICE_CALL + attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BACK_MIC|AUDIO_DEVICE_IN_THIRD_MIC|AUDIO_DEVICE_IN_REMOTE_SUBMIX|AUDIO_DEVICE_IN_VOICE_CALL + speaker_drc_enabled TRUE } # audio hardware module section: contains descriptors for all audio hw modules present on the @@ -23,31 +24,24 @@ audio_hw_modules { primary { outputs { primary { - sampling_rates 44100|48000 - channel_masks AUDIO_CHANNEL_OUT_STEREO - formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_FM|AUDIO_DEVICE_OUT_FM_TX - flags AUDIO_OUTPUT_FLAG_PRIMARY|AUDIO_OUTPUT_FLAG_FAST - } - deep_buffer { - sampling_rates 44100|48000 + sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000|88200|96000|176400|192000 channel_masks AUDIO_CHANNEL_OUT_STEREO formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_FM|AUDIO_DEVICE_OUT_FM_TX - flags AUDIO_OUTPUT_FLAG_DEEP_BUFFER + devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_EXTERNAL_WIFI|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET + flags AUDIO_OUTPUT_FLAG_PRIMARY|AUDIO_OUTPUT_FLAG_DEEP_BUFFER } hdmi { sampling_rates 44100|48000 channel_masks dynamic formats AUDIO_FORMAT_PCM_16_BIT devices AUDIO_DEVICE_OUT_AUX_DIGITAL - flags AUDIO_OUTPUT_FLAG_DIRECT + flags AUDIO_OUTPUT_FLAG_MULTI_CH } compress_offload { - sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000|64000|88200|96000|176400|192000 - channel_masks AUDIO_CHANNEL_OUT_STEREO - formats AUDIO_FORMAT_MP3|AUDIO_FORMAT_AAC|AUDIO_FORMAT_PCM_24_BIT_OFFLOAD - devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE + sampling_rates dynamic + channel_masks dynamic + formats dynamic + devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_EXTERNAL_WIFI|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING } voip_rx { @@ -61,43 +55,61 @@ audio_hw_modules { inputs { primary { sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000 - channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO|AUDIO_CHANNEL_IN_FRONT_BACK - formats AUDIO_FORMAT_PCM_16_BIT|AUDIO_FORMAT_AMR_NB|AUDIO_FORMAT_AMR_WB|AUDIO_FORMAT_QCELP|AUDIO_FORMAT_EVRC|AUDIO_FORMAT_EVRCB|AUDIO_FORMAT_EVRCWB|AUDIO_FORMAT_EVRCNW - devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_WIRED_HEADSET|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_VOICE_CALL + channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO|AUDIO_CHANNEL_IN_FRONT_BACK|AUDIO_CHANNEL_IN_VOICE_UPLINK|AUDIO_CHANNEL_IN_VOICE_DNLINK + formats AUDIO_FORMAT_PCM_16_BIT + devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_WIRED_HEADSET|AUDIO_DEVICE_IN_WIRED_HEADPHONE|AUDIO_DEVICE_IN_AUX_DIGITAL|AUDIO_DEVICE_IN_VOICE_CALL|AUDIO_DEVICE_IN_BACK_MIC|AUDIO_DEVICE_IN_THIRD_MIC } } } a2dp { outputs { a2dp { - sampling_rates 44100 + sampling_rates 44100|48000 channel_masks AUDIO_CHANNEL_OUT_STEREO formats AUDIO_FORMAT_PCM_16_BIT devices AUDIO_DEVICE_OUT_ALL_A2DP } } - inputs { - a2dp { - sampling_rates 44100|48000 - channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO|AUDIO_CHANNEL_IN_5POINT1|AUDIO_CHANNEL_IN_VOICE_CALL_MONO|AUDIO_CHANNEL_IN_VOICE_DNLINK_MONO|AUDIO_CHANNEL_IN_VOICE_UPLINK_MONO - formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_IN_BLUETOOTH_A2DP - } - } } usb { outputs { usb_accessory { - sampling_rates 44100 + sampling_rates 44100|48000 channel_masks AUDIO_CHANNEL_OUT_STEREO formats AUDIO_FORMAT_PCM_16_BIT devices AUDIO_DEVICE_OUT_USB_ACCESSORY } usb_device { - sampling_rates 44100 + sampling_rates 44100|48000 + channel_masks dynamic + formats dynamic + devices AUDIO_DEVICE_OUT_USB_DEVICE|AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET + } + } + inputs { + usb_device { + sampling_rates 8000|11025|16000|22050|24000|32000|44100|48000 + channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO + formats AUDIO_FORMAT_PCM_16_BIT + devices AUDIO_DEVICE_IN_DGTL_DOCK_HEADSET + } + } + } + tms { + outputs { + tms { + sampling_rates 44100|48000 channel_masks AUDIO_CHANNEL_OUT_STEREO formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_OUT_USB_DEVICE + devices AUDIO_DEVICE_OUT_EXTERNAL_TMS + } + } + inputs { + tms { + sampling_rates 44100|48000 + channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO + formats AUDIO_FORMAT_PCM_16_BIT + devices AUDIO_DEVICE_IN_EXTERNAL_TMS } } } From d2e6c4b677241d4ecaeef9995c769c93e7766b88 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Tue, 13 Oct 2015 13:27:31 +0200 Subject: [PATCH 041/139] g2-common: configs: Rebase audio policy --- configs/audio_policy.conf | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/configs/audio_policy.conf b/configs/audio_policy.conf index 7234d679..14cfb29f 100644 --- a/configs/audio_policy.conf +++ b/configs/audio_policy.conf @@ -24,24 +24,24 @@ audio_hw_modules { primary { outputs { primary { - sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000|88200|96000|176400|192000 + sampling_rates 44100|48000 channel_masks AUDIO_CHANNEL_OUT_STEREO formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_EXTERNAL_WIFI|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET + devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_EXTERNAL_WIFI|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET flags AUDIO_OUTPUT_FLAG_PRIMARY|AUDIO_OUTPUT_FLAG_DEEP_BUFFER } hdmi { - sampling_rates 44100|48000 + sampling_rates 48000 channel_masks dynamic formats AUDIO_FORMAT_PCM_16_BIT devices AUDIO_DEVICE_OUT_AUX_DIGITAL flags AUDIO_OUTPUT_FLAG_MULTI_CH } compress_offload { - sampling_rates dynamic - channel_masks dynamic - formats dynamic - devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_EXTERNAL_WIFI|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET + sampling_rates 8000|11025|16000|22050|32000|44100|48000 + channel_masks AUDIO_CHANNEL_OUT_MONO|AUDIO_CHANNEL_OUT_STEREO|AUDIO_CHANNEL_OUT_2POINT1|AUDIO_CHANNEL_OUT_QUAD|AUDIO_CHANNEL_OUT_PENTA|AUDIO_CHANNEL_OUT_5POINT1|AUDIO_CHANNEL_OUT_6POINT1|AUDIO_CHANNEL_OUT_7POINT1 + formats AUDIO_FORMAT_MP3|AUDIO_FORMAT_AAC|AUDIO_FORMAT_AC3|AUDIO_FORMAT_EAC3 + devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_EXTERNAL_WIFI|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING } voip_rx { @@ -64,7 +64,7 @@ audio_hw_modules { a2dp { outputs { a2dp { - sampling_rates 44100|48000 + sampling_rates 44100 channel_masks AUDIO_CHANNEL_OUT_STEREO formats AUDIO_FORMAT_PCM_16_BIT devices AUDIO_DEVICE_OUT_ALL_A2DP @@ -74,7 +74,7 @@ audio_hw_modules { usb { outputs { usb_accessory { - sampling_rates 44100|48000 + sampling_rates 44100 channel_masks AUDIO_CHANNEL_OUT_STEREO formats AUDIO_FORMAT_PCM_16_BIT devices AUDIO_DEVICE_OUT_USB_ACCESSORY @@ -82,7 +82,7 @@ audio_hw_modules { usb_device { sampling_rates 44100|48000 channel_masks dynamic - formats dynamic + formats AUDIO_FORMAT_PCM_16_BIT devices AUDIO_DEVICE_OUT_USB_DEVICE|AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET } } @@ -98,7 +98,7 @@ audio_hw_modules { tms { outputs { tms { - sampling_rates 44100|48000 + sampling_rates 44100 channel_masks AUDIO_CHANNEL_OUT_STEREO formats AUDIO_FORMAT_PCM_16_BIT devices AUDIO_DEVICE_OUT_EXTERNAL_TMS @@ -106,7 +106,7 @@ audio_hw_modules { } inputs { tms { - sampling_rates 44100|48000 + sampling_rates 44100 channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO formats AUDIO_FORMAT_PCM_16_BIT devices AUDIO_DEVICE_IN_EXTERNAL_TMS From 66714b0562b4f3918c6e220547c8b690b6fa7346 Mon Sep 17 00:00:00 2001 From: Ethan Chen Date: Wed, 14 Oct 2015 17:28:38 +0200 Subject: [PATCH 042/139] g2-common: overlay: FB: Use LG D801 30B LED + vibrator + brightness settings Change-Id: Ic3d4b2be693ef2aa65bbcdd788034e5b6d744e62 Signed-off-by: Zdrowy Gosciu --- .../base/core/res/res/values/config.xml | 99 +++++++++++-------- 1 file changed, 56 insertions(+), 43 deletions(-) diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index e65ed7f3..850f95d0 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -20,13 +20,20 @@ - #ffffffff + #ff00ff00 - 1000 + 500 - 9000 + 12000 + + + true + + + true true @@ -87,13 +94,6 @@ 60000 - - true - - - true - @@ -130,18 +130,36 @@ 0 - 7 - 10 + 30 - 7 + 0 + 30 - 5 + 0 + 30 + + + + + 0 + 800 + + + + + 0 + 800 @@ -214,23 +232,14 @@ - 92 + 102 - 5 + 50 - 10 - - - 10 + 50 @@ -255,15 +264,17 @@ Spline interpolation is used to determine the auto-brightness backlight values for LUX levels between these control points. --> - 1 - 4 - 40 + 32 + 82 + 170 350 - 600 + 500 + 700 1000 - 1600 - 3000 - 10000 + 1400 + 2000 + 3500 + 5000 - 50 - 85 - 95 - 115 - 140 - 160 - 175 - 210 - 225 - 255 + 85 + 123 + 137 + 147 + 170 + 178 + 188 + 200 + 218 + 226 + 244 + 255 rmnet0 + + false + com.qualcomm.location + false + com.qualcomm.location + true + + 40 + + + 255 + - 102 - - - 50 + 90 - - 50 + + 30 @@ -270,7 +276,7 @@ Spline interpolation is used to determine the auto-brightness backlight values for LUX levels between these control points. --> - 32 + 40 82 170 350 @@ -288,18 +294,18 @@ than the size of the config_autoBrightnessLevels array. The brightness values must be between 0 and 255 and be non-decreasing. --> - 85 - 123 - 137 - 147 - 170 - 178 - 188 - 200 - 218 - 226 - 244 - 255 + 72 + 118 + 130 + 140 + 170 + 178 + 188 + 200 + 218 + 226 + 244 + 255 - false + true true From d77731888aad78dfed0280b8d34a385aac345be2 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Sat, 17 Oct 2015 16:41:44 +0200 Subject: [PATCH 055/139] g2-common: Setup Wi-Fi scan intervals by Framework --- custom_prop.mk | 1 - overlay/frameworks/base/core/res/res/values/config.xml | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/custom_prop.mk b/custom_prop.mk index 95d14d7b..4119b448 100644 --- a/custom_prop.mk +++ b/custom_prop.mk @@ -16,7 +16,6 @@ PRODUCT_PROPERTY_OVERRIDES += \ # Wi-Fi PRODUCT_PROPERTY_OVERRIDES += \ - wifi.supplicant_scan_interval=180 \ wlan.chip.vendor=brcm \ wlan.chip.version=bcm4335 diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index 96ccca88..8f8429b5 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -86,13 +86,13 @@ true - 60000 + 180000 - 60000 + 180000 - 60000 + 180000 - + "rndis0" - + "wlan0" - + "bt-pan" - + 0 1 5 @@ -103,7 +103,7 @@ before automatically restore the default connection. Set -1 if the connection does not require auto-restore. --> - + "wifi,1,1,1,-1,true" "mobile,0,0,0,-1,true" "mobile_mms,2,0,2,60000,true" @@ -121,7 +121,7 @@ based on the hardware --> - + "1,1" "0,1" "7,1" @@ -164,7 +164,7 @@ - true + true true @@ -196,13 +196,13 @@ true - rmnet0 + rmnet0 - false - com.qualcomm.location - false - com.qualcomm.location + false + com.qualcomm.location + false + com.qualcomm.location - 7 + 7 diff --git a/overlay/packages/services/Telephony/res/values/config.xml b/overlay/packages/services/Telephony/res/values/config.xml index fd128ceb..de63296c 100644 --- a/overlay/packages/services/Telephony/res/values/config.xml +++ b/overlay/packages/services/Telephony/res/values/config.xml @@ -21,5 +21,5 @@ true - true + true From 129556487c381f427c9b44131040a5a8824d900a Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Sat, 17 Oct 2015 23:12:02 +0200 Subject: [PATCH 057/139] g2-common: custom_prop: Enable 16bit PCM offload --- custom_prop.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/custom_prop.mk b/custom_prop.mk index 4119b448..bcb3c794 100644 --- a/custom_prop.mk +++ b/custom_prop.mk @@ -32,6 +32,7 @@ PRODUCT_PROPERTY_OVERRIDES += \ audio.offload.buffer.size.kb=32 \ audio.offload.gapless.enabled=true \ audio.offload.multiple.enabled=false \ + audio.offload.pcm.16bit.enable=true \ audio.offload.pcm.24bit.enable=true # AV offload From 5da2558366e7ee2b26ba98eaa619262302828131 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Sat, 17 Oct 2015 23:38:11 +0200 Subject: [PATCH 058/139] g2-common: configs: mixer_paths.xml: Increase microphone volume --- configs/mixer_paths.xml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/configs/mixer_paths.xml b/configs/mixer_paths.xml index 37c8b80a..da03ad2f 100644 --- a/configs/mixer_paths.xml +++ b/configs/mixer_paths.xml @@ -26,8 +26,8 @@ - - + + @@ -469,8 +469,8 @@ - - + + @@ -601,8 +601,8 @@ - - + + @@ -993,8 +993,8 @@ - - + + @@ -1104,8 +1104,8 @@ - - + + From 2277cf72ab7b423eb61a27031d49128aafcb3f28 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Sun, 18 Oct 2015 00:36:36 +0200 Subject: [PATCH 059/139] g2-common: configs: mixer_paths.xml: Lower speaker volume (in call) Value was too high.. --- configs/mixer_paths.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/mixer_paths.xml b/configs/mixer_paths.xml index da03ad2f..3838e1ac 100644 --- a/configs/mixer_paths.xml +++ b/configs/mixer_paths.xml @@ -571,8 +571,8 @@ - - + + From fc40351c8e347cef736dc8e876ef256d5d5ed869 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Sun, 18 Oct 2015 01:02:15 +0200 Subject: [PATCH 060/139] g2-common: Move custom props to system props Part of sync with CM 12.1 : * Disable tunnel audio encode (for working call recording) * Enable I/O scheduler property --- custom_prop.mk | 29 ----------------------------- system_prop.mk | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 29 deletions(-) diff --git a/custom_prop.mk b/custom_prop.mk index bcb3c794..252e3c98 100644 --- a/custom_prop.mk +++ b/custom_prop.mk @@ -23,27 +23,6 @@ PRODUCT_PROPERTY_OVERRIDES += \ # Audio/Video # -# AAC Stagefright -PRODUCT_PROPERTY_OVERRIDES += \ - media.aac_51_output_enabled=true - -# Audio offload -PRODUCT_PROPERTY_OVERRIDES += \ - audio.offload.buffer.size.kb=32 \ - audio.offload.gapless.enabled=true \ - audio.offload.multiple.enabled=false \ - audio.offload.pcm.16bit.enable=true \ - audio.offload.pcm.24bit.enable=true - -# AV offload -PRODUCT_PROPERTY_OVERRIDES += \ - av.offload.enable=true \ - av.streaming.offload.enable=true - -# Smooth streaming Stagefright -PRODUCT_PROPERTY_OVERRIDES += \ - mm.enable.smoothstreaming=true - # ALSA PRODUCT_PROPERTY_OVERRIDES += \ persist.audio.handset.mic.type=digital @@ -52,10 +31,6 @@ PRODUCT_PROPERTY_OVERRIDES += \ PRODUCT_PROPERTY_OVERRIDES += \ persist.audio.dualmic.config=endfire -# MM parser -PRODUCT_PROPERTY_OVERRIDES += \ - mm.enable.qcom_parser=3310129 - # VoIP and Direct output for PCM format PRODUCT_PROPERTY_OVERRIDES += \ use.dedicated.device.for.voip=false \ @@ -65,10 +40,6 @@ PRODUCT_PROPERTY_OVERRIDES += \ PRODUCT_PROPERTY_OVERRIDES += \ ro.qc.sdk.audio.ssr=false -# Stagefright recorder compress offload -PRODUCT_PROPERTY_OVERRIDES += \ - tunnel.audio.encode=false - # HW Composer debug level PRODUCT_PROPERTY_OVERRIDES += \ debug.mdpcomp.logs=0 diff --git a/system_prop.mk b/system_prop.mk index ead8a262..e4883916 100644 --- a/system_prop.mk +++ b/system_prop.mk @@ -23,6 +23,26 @@ PRODUCT_PROPERTY_OVERRIDES += \ PRODUCT_PROPERTY_OVERRIDES += \ drm.service.enabled=true +# IO Scheduler +PRODUCT_PROPERTY_OVERRIDES += \ + sys.io.scheduler=bfq + +# Media/offload +PRODUCT_PROPERTY_OVERRIDES += \ + audio.offload.buffer.size.kb=32 \ + audio.offload.gapless.enabled=true \ + audio.offload.multiple.enabled=false \ + audio.offload.pcm.16bit.enable=true \ + audio.offload.pcm.24bit.enable=true \ + av.offload.enable=true \ + av.streaming.offload.enable=true \ + tunnel.audio.encode=false + +PRODUCT_PROPERTY_OVERRIDES += \ + media.aac_51_output_enabled=true \ + mm.enable.smoothstreaming=true \ + mm.enable.qcom_parser=3310129 + # NFC PRODUCT_PROPERTY_OVERRIDES += \ nfc.app_log_level=2 \ From 34ca9316d8640c14cd235ebccb5f511551026e80 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Sun, 18 Oct 2015 12:28:35 +0200 Subject: [PATCH 061/139] g2-common: configs: Remove useless audio_platform_info.xml --- configs/audio_platform_info.xml | 62 --------------------------------- 1 file changed, 62 deletions(-) delete mode 100755 configs/audio_platform_info.xml diff --git a/configs/audio_platform_info.xml b/configs/audio_platform_info.xml deleted file mode 100755 index 84d34db6..00000000 --- a/configs/audio_platform_info.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From f54fd9d4b04c5bc3a51f8160e5fb94ba25cf72ba Mon Sep 17 00:00:00 2001 From: Rashed Abdel-Tawab Date: Sun, 18 Oct 2015 01:08:23 -0400 Subject: [PATCH 062/139] g2-common: configs: audio_policy.conf: Cleanup * Add seperate deep-buffer entry * Fix compress_offload entry * Remove hdmi entry * Add multichannel entry * Fix primary output entry Change-Id: I63cfd4d1343dc5f88e86f942acb6863aff05b138 Signed-off-by: Zdrowy Gosciu --- configs/audio_policy.conf | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/configs/audio_policy.conf b/configs/audio_policy.conf index 13db01b5..3adde77e 100644 --- a/configs/audio_policy.conf +++ b/configs/audio_policy.conf @@ -24,24 +24,31 @@ audio_hw_modules { primary { outputs { primary { - sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000|88200|96000|176400|192000 + sampling_rates 44100|48000 channel_masks AUDIO_CHANNEL_OUT_STEREO formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_EXTERNAL_WIFI|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET - flags AUDIO_OUTPUT_FLAG_PRIMARY|AUDIO_OUTPUT_FLAG_DEEP_BUFFER + devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY + flags AUDIO_OUTPUT_FLAG_PRIMARY } - hdmi { - sampling_rates 44100|48000 + deep_buffer { + sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000 + channel_masks AUDIO_CHANNEL_OUT_STEREO + formats AUDIO_FORMAT_PCM_16_BIT + devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY + flags AUDIO_OUTPUT_FLAG_DEEP_BUFFER + } + multichannel { + sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000|96000 channel_masks dynamic formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_OUT_AUX_DIGITAL - flags AUDIO_OUTPUT_FLAG_MULTI_CH + devices AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY + flags AUDIO_OUTPUT_FLAG_DIRECT } compress_offload { sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000|64000|88200|96000|176400|192000 - channel_masks dynamic - formats dynamic - devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_EXTERNAL_WIFI|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET + channel_masks AUDIO_CHANNEL_OUT_MONO|AUDIO_CHANNEL_OUT_STEREO|AUDIO_CHANNEL_OUT_2POINT1|AUDIO_CHANNEL_OUT_QUAD|AUDIO_CHANNEL_OUT_PENTA|AUDIO_CHANNEL_OUT_5POINT1|AUDIO_CHANNEL_OUT_6POINT1|AUDIO_CHANNEL_OUT_7POINT1 + formats AUDIO_FORMAT_MP3|AUDIO_FORMAT_AAC_LC|AUDIO_FORMAT_AAC_HE_V1|AUDIO_FORMAT_AAC_HE_V2|AUDIO_FORMAT_MP2|AUDIO_FORMAT_PCM_16_BIT_OFFLOAD|AUDIO_FORMAT_PCM_24_BIT_OFFLOAD + devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING } voip_rx { From a96f6f7e46b77c01b9e9c651b1c9591a597c2e05 Mon Sep 17 00:00:00 2001 From: fefifofum Date: Sat, 17 Oct 2015 17:02:56 +0200 Subject: [PATCH 063/139] g2-common: sepolicy: Address mpdecision denials Signed-off-by: Zdrowy Gosciu --- sepolicy/mpdecision.te | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sepolicy/mpdecision.te b/sepolicy/mpdecision.te index 38fca424..3ac4bbbd 100644 --- a/sepolicy/mpdecision.te +++ b/sepolicy/mpdecision.te @@ -5,6 +5,9 @@ type_transition mpdecision system_data_file:file mpctl_data_file; allow mpdecision mpdecision_data:file { rw_file_perms }; +allow mpdecision system_data_file:dir { write add_name }; +allow mpdecision system_data_file:file { open append create }; + binder_use(mpdecision) allow mpdecision socket_device:dir {add_name remove_name write}; From 8bbe06bbabd9e674a4a8fb58d3dc84984dbed0a4 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Sun, 18 Oct 2015 12:52:30 +0200 Subject: [PATCH 064/139] g2-common: init: power: Setup Simple GPU Signed-off-by: Zdrowy Gosciu --- rootdir/etc/init.g2.power.rc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rootdir/etc/init.g2.power.rc b/rootdir/etc/init.g2.power.rc index 5bf0b28d..87140590 100644 --- a/rootdir/etc/init.g2.power.rc +++ b/rootdir/etc/init.g2.power.rc @@ -11,6 +11,13 @@ on early-init write /proc/sys/kernel/random/read_wakeup_threshold 512 write /proc/sys/kernel/random/write_wakeup_threshold 256 + # Simple GPU + write /sys/module/simple_gpu_algorithm/parameters/simple_gpu_activate 1 + write /sys/module/simple_gpu_algorithm/parameters/simple_laziness 6 + write /sys/module/simple_gpu_algorithm/parameters/simple_ramp_threshold 4000 + write /sys/class/devfreq/fdb00000.qcom,kgsl-3d0/target_freq 320000000 + write /sys/class/devfreq/fdb00000.qcom,kgsl-3d0/max_freq 320000000 + on enable-low-power write /sys/module/lpm_levels/enable_low_power/l2 4 write /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled 1 From 54457013f965966bd335195441939b7512853915 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Sun, 18 Oct 2015 12:53:42 +0200 Subject: [PATCH 065/139] g2-common: init: power: Setup Intelli THERMAL Signed-off-by: Zdrowy Gosciu --- rootdir/etc/init.g2.power.rc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rootdir/etc/init.g2.power.rc b/rootdir/etc/init.g2.power.rc index 87140590..ba8ff794 100644 --- a/rootdir/etc/init.g2.power.rc +++ b/rootdir/etc/init.g2.power.rc @@ -18,6 +18,11 @@ on early-init write /sys/class/devfreq/fdb00000.qcom,kgsl-3d0/target_freq 320000000 write /sys/class/devfreq/fdb00000.qcom,kgsl-3d0/max_freq 320000000 + # Intelli THERMAL + write /sys/module/msm_thermal/parameters/intelli_enabled Y + write /sys/module/msm_thermal/parameters/limit_temp_degC 76 + write /sys/module/msm_thermal/parameters/core_limit_temp_degC 74 + on enable-low-power write /sys/module/lpm_levels/enable_low_power/l2 4 write /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled 1 From f38c5ff48908db4a16e19b151ea31b10f0706d7d Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Sun, 18 Oct 2015 14:52:53 +0200 Subject: [PATCH 066/139] g2-common: init: Setup ZRAM Signed-off-by: Zdrowy Gosciu --- rootdir/etc/fstab.g2 | 1 + rootdir/etc/init.g2.rc | 3 +++ 2 files changed, 4 insertions(+) diff --git a/rootdir/etc/fstab.g2 b/rootdir/etc/fstab.g2 index 601edf3f..e43b9ac4 100644 --- a/rootdir/etc/fstab.g2 +++ b/rootdir/etc/fstab.g2 @@ -19,3 +19,4 @@ /dev/block/platform/msm_sdcc.1/by-name/drm /persist-lg ext4 nosuid,nodev,barrier=1,noauto_da_alloc,errors=continue wait /dev/block/platform/msm_sdcc.1/by-name/mpt /mpt ext4 nodev,nosuid,barrier=1,noauto_da_alloc,errors=continue wait /devices/platform/xhci-hcd auto auto defaults voldmanaged=usbdisk0:auto +/dev/block/zram0 none swap defaults wait diff --git a/rootdir/etc/init.g2.rc b/rootdir/etc/init.g2.rc index e0c4c7b0..c431be6d 100644 --- a/rootdir/etc/init.g2.rc +++ b/rootdir/etc/init.g2.rc @@ -84,6 +84,8 @@ on init on fs mount_all ./fstab.g2 + write /sys/block/zram0/disksize 512M + swapon_all ./fstab.g2 restorecon_recursive /sns restorecon_recursive /mpt setprop ro.crypto.fuse_sdcard true @@ -339,6 +341,7 @@ on boot write /proc/sys/vm/swappiness 60 write /proc/sys/vm/vfs_cache_pressure 20 write /proc/sys/vm/drop_caches 3 + write /proc/sys/vm/page-cluster 0 # Services start here From 83810609413b5a6ca2961dc3e0023d6997c9de48 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Sun, 18 Oct 2015 14:54:35 +0200 Subject: [PATCH 067/139] g2-common: system_prop: Disable I/O scheduler setup Not good for custom kernels.. Signed-off-by: Zdrowy Gosciu --- system_prop.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system_prop.mk b/system_prop.mk index e4883916..415842a6 100644 --- a/system_prop.mk +++ b/system_prop.mk @@ -24,8 +24,8 @@ PRODUCT_PROPERTY_OVERRIDES += \ drm.service.enabled=true # IO Scheduler -PRODUCT_PROPERTY_OVERRIDES += \ - sys.io.scheduler=bfq +#PRODUCT_PROPERTY_OVERRIDES += \ +# sys.io.scheduler=bfq # Media/offload PRODUCT_PROPERTY_OVERRIDES += \ From 8f7d7b6edcc74b7942c3b7a5a0cd895fa1b2a350 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Sun, 18 Oct 2015 16:29:55 +0200 Subject: [PATCH 068/139] g2-common: init: power: Fix MM-OSAL logmask + MP-Decision default_values --- rootdir/etc/init.g2.power.rc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rootdir/etc/init.g2.power.rc b/rootdir/etc/init.g2.power.rc index ba8ff794..4cec7de8 100644 --- a/rootdir/etc/init.g2.power.rc +++ b/rootdir/etc/init.g2.power.rc @@ -80,7 +80,8 @@ on enable-low-power write /sys/class/devfreq/qcom,cpubw.42/governor cpubw_hwmon write /sys/class/devfreq/fdb00000.qcom,kgsl-3d0/governor msm-adreno-tz - rm /data/system/default_values + write /data/system/default_values "" + write /data/mmosal_logmask.cfg 0 # Permission for Power HAL CM extension chown root system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load From b636e2d68bd6131bba83b3e0f2de3a05c8ae3362 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Sun, 18 Oct 2015 16:50:30 +0200 Subject: [PATCH 069/139] g2-common: custom_prop: Include LIBARGS in RIL --- custom_prop.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/custom_prop.mk b/custom_prop.mk index 252e3c98..b2595cd2 100644 --- a/custom_prop.mk +++ b/custom_prop.mk @@ -19,6 +19,10 @@ PRODUCT_PROPERTY_OVERRIDES += \ wlan.chip.vendor=brcm \ wlan.chip.version=bcm4335 +# RIL +PRODUCT_PROPERTY_OVERRIDES += \ + rild.libargs=-d /dev/smd0 + # # Audio/Video # From 14ad34683471d6606c45ea2462df3bc635ec062f Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Sun, 18 Oct 2015 23:31:44 +0200 Subject: [PATCH 070/139] g2-common: Fix RILD device argument --- custom_prop.mk | 4 ---- rootdir/etc/ueventd.g2.rc | 2 +- system_prop.mk | 2 ++ 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/custom_prop.mk b/custom_prop.mk index b2595cd2..252e3c98 100644 --- a/custom_prop.mk +++ b/custom_prop.mk @@ -19,10 +19,6 @@ PRODUCT_PROPERTY_OVERRIDES += \ wlan.chip.vendor=brcm \ wlan.chip.version=bcm4335 -# RIL -PRODUCT_PROPERTY_OVERRIDES += \ - rild.libargs=-d /dev/smd0 - # # Audio/Video # diff --git a/rootdir/etc/ueventd.g2.rc b/rootdir/etc/ueventd.g2.rc index 63b190fb..dcc12dc2 100644 --- a/rootdir/etc/ueventd.g2.rc +++ b/rootdir/etc/ueventd.g2.rc @@ -36,7 +36,7 @@ /dev/kgsl-2d1 0666 root root /dev/ion 0664 system system /dev/rtc0 0660 system system -/dev/smd0 0660 system system +/dev/smd0 0660 radio radio /dev/smd4 0660 system system /dev/smd_cxm_qmi 0640 radio radio /dev/smd5 0660 system system diff --git a/system_prop.mk b/system_prop.mk index 415842a6..68ed0693 100644 --- a/system_prop.mk +++ b/system_prop.mk @@ -57,7 +57,9 @@ PRODUCT_PROPERTY_OVERRIDES += \ persist.radio.apm_sim_not_pwdn=1 \ ro.telephony.call_ring.multiple=0 +# RILD PRODUCT_PROPERTY_OVERRIDES += \ + rild.libargs=-d/dev/smd0 \ rild.libpath=/vendor/lib/libril-qc-qmi-1.so \ ro.telephony.ril_class=LgeLteRIL From 54d866a3f836e01fea6efa8c015ada516e7ce31c Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Mon, 19 Oct 2015 12:05:41 +0200 Subject: [PATCH 071/139] g2-common: Remove memory tweaks (for now) --- overlay/frameworks/base/core/res/res/values/config.xml | 9 --------- rootdir/etc/init.g2.rc | 8 -------- 2 files changed, 17 deletions(-) diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index 2bdc7073..81e355e7 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -403,13 +403,4 @@ --> true - - 256000 - diff --git a/rootdir/etc/init.g2.rc b/rootdir/etc/init.g2.rc index c431be6d..88d415bc 100644 --- a/rootdir/etc/init.g2.rc +++ b/rootdir/etc/init.g2.rc @@ -333,14 +333,6 @@ on boot chmod 0664 /sys/devices/virtual/input/lge_touch/touch_gesture # VM - write /proc/sys/vm/dirty_background_ratio 70 - write /proc/sys/vm/dirty_expire_centisecs 250 - write /proc/sys/vm/dirty_ratio 90 - write /proc/sys/vm/dirty_writeback_centisecs 500 - write /proc/sys/vm/min_free_kbytes 4096 - write /proc/sys/vm/swappiness 60 - write /proc/sys/vm/vfs_cache_pressure 20 - write /proc/sys/vm/drop_caches 3 write /proc/sys/vm/page-cluster 0 # Services start here From 19d6927cba3aba3170ababac111aafee831ac5c0 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Mon, 19 Oct 2015 12:06:47 +0200 Subject: [PATCH 072/139] g2-common: overlay: FB: Lower medium brightness values --- overlay/frameworks/base/core/res/res/values/config.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index 81e355e7..413fc16b 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -296,9 +296,9 @@ 72 118 - 130 - 140 - 170 + 124 + 130 + 158 178 188 200 From b6c43c2f8ea7cfd3dcfd5df6be43bb487ffcd0ea Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Mon, 19 Oct 2015 12:09:22 +0200 Subject: [PATCH 073/139] g2-common: Remove RILD device argument When it say nothing at all ;) This reverts commit 14ad34683471d6606c45ea2462df3bc635ec062f. --- rootdir/etc/ueventd.g2.rc | 2 +- system_prop.mk | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/rootdir/etc/ueventd.g2.rc b/rootdir/etc/ueventd.g2.rc index dcc12dc2..63b190fb 100644 --- a/rootdir/etc/ueventd.g2.rc +++ b/rootdir/etc/ueventd.g2.rc @@ -36,7 +36,7 @@ /dev/kgsl-2d1 0666 root root /dev/ion 0664 system system /dev/rtc0 0660 system system -/dev/smd0 0660 radio radio +/dev/smd0 0660 system system /dev/smd4 0660 system system /dev/smd_cxm_qmi 0640 radio radio /dev/smd5 0660 system system diff --git a/system_prop.mk b/system_prop.mk index 68ed0693..415842a6 100644 --- a/system_prop.mk +++ b/system_prop.mk @@ -57,9 +57,7 @@ PRODUCT_PROPERTY_OVERRIDES += \ persist.radio.apm_sim_not_pwdn=1 \ ro.telephony.call_ring.multiple=0 -# RILD PRODUCT_PROPERTY_OVERRIDES += \ - rild.libargs=-d/dev/smd0 \ rild.libpath=/vendor/lib/libril-qc-qmi-1.so \ ro.telephony.ril_class=LgeLteRIL From bf20e0f3b3fb1e64b8820b25690fd042ec68a4a9 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Mon, 19 Oct 2015 14:49:35 +0200 Subject: [PATCH 074/139] Revert "g2-common: configs: audio_policy.conf: Cleanup" This reverts commit f54fd9d4b04c5bc3a51f8160e5fb94ba25cf72ba. --- configs/audio_policy.conf | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/configs/audio_policy.conf b/configs/audio_policy.conf index 3adde77e..13db01b5 100644 --- a/configs/audio_policy.conf +++ b/configs/audio_policy.conf @@ -24,31 +24,24 @@ audio_hw_modules { primary { outputs { primary { - sampling_rates 44100|48000 - channel_masks AUDIO_CHANNEL_OUT_STEREO - formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY - flags AUDIO_OUTPUT_FLAG_PRIMARY - } - deep_buffer { - sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000 + sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000|88200|96000|176400|192000 channel_masks AUDIO_CHANNEL_OUT_STEREO formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY - flags AUDIO_OUTPUT_FLAG_DEEP_BUFFER + devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_EXTERNAL_WIFI|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET + flags AUDIO_OUTPUT_FLAG_PRIMARY|AUDIO_OUTPUT_FLAG_DEEP_BUFFER } - multichannel { - sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000|96000 + hdmi { + sampling_rates 44100|48000 channel_masks dynamic formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY - flags AUDIO_OUTPUT_FLAG_DIRECT + devices AUDIO_DEVICE_OUT_AUX_DIGITAL + flags AUDIO_OUTPUT_FLAG_MULTI_CH } compress_offload { sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000|64000|88200|96000|176400|192000 - channel_masks AUDIO_CHANNEL_OUT_MONO|AUDIO_CHANNEL_OUT_STEREO|AUDIO_CHANNEL_OUT_2POINT1|AUDIO_CHANNEL_OUT_QUAD|AUDIO_CHANNEL_OUT_PENTA|AUDIO_CHANNEL_OUT_5POINT1|AUDIO_CHANNEL_OUT_6POINT1|AUDIO_CHANNEL_OUT_7POINT1 - formats AUDIO_FORMAT_MP3|AUDIO_FORMAT_AAC_LC|AUDIO_FORMAT_AAC_HE_V1|AUDIO_FORMAT_AAC_HE_V2|AUDIO_FORMAT_MP2|AUDIO_FORMAT_PCM_16_BIT_OFFLOAD|AUDIO_FORMAT_PCM_24_BIT_OFFLOAD - devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL + channel_masks dynamic + formats dynamic + devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_EXTERNAL_WIFI|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING } voip_rx { From 889a473e9bbc6a9d38b64238bcce4852e67399bf Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Tue, 20 Oct 2015 10:45:37 +0200 Subject: [PATCH 075/139] g2-common: init: VM/LMK/NET tweaks Picked from DROIDTH http://forum.xda-developers.com/lg-g2/development/rom-skrom-droidth-t3044377 --- rootdir/etc/init.g2.rc | 65 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-) diff --git a/rootdir/etc/init.g2.rc b/rootdir/etc/init.g2.rc index 88d415bc..2c77b3c2 100644 --- a/rootdir/etc/init.g2.rc +++ b/rootdir/etc/init.g2.rc @@ -332,8 +332,71 @@ on boot chown system radio /sys/devices/virtual/input/lge_touch/touch_gesture chmod 0664 /sys/devices/virtual/input/lge_touch/touch_gesture + # LMK + write /sys/module/lowmemorykiller/parameters/adj "0,1,3,5,7,15" + write /sys/module/lowmemorykiller/parameters/minfree "16384,20992,24576,28160,32768,293888" + # VM - write /proc/sys/vm/page-cluster 0 + write /proc/sys/vm/block_dump 0 + write /proc/sys/vm/dirty_background_ratio 5 + write /proc/sys/vm/dirty_expire_centisecs 500 + write /proc/sys/vm/dirty_ratio 10 + write /proc/sys/vm/dirty_writeback_centisecs 3000 + write /proc/sys/vm/min_free_kbytes 4608 + write /proc/sys/vm/min_free_order_shift 4 + write /proc/sys/vm/oom_dump_tasks 1 + write /proc/sys/vm/oom_kill_allocating_task 1 + write /proc/sys/vm/overcommit_memory 1 + write /proc/sys/vm/page-cluster 3 + write /proc/sys/vm/panic_on_oom 0 + write /proc/sys/vm/swappiness 70 + write /proc/sys/vm/vfs_cache_pressure 50 + + # Kernel + write /proc/sys/kernel/hung_task_timeout_secs 0 + write /proc/sys/kernel/panic 0 + write /proc/sys/kernel/panic_on_oops 0 + write /proc/sys/kernel/softlockup_panic 0 + + # Network + write /proc/sys/net/ipv4/tcp_moderate_rcvbuf 1 + write /proc/sys/net/ipv4/route/flush 1 + write /proc/sys/net/ipv4/tcp_rfc1337 1 + write /proc/sys/net/ipv4/ip_no_pmtu_disc 0 + write /proc/sys/net/ipv4/tcp_ecn 0 + write /proc/sys/net/ipv4/tcp_fack 1 + write /proc/sys/net/ipv4/tcp_synack_retries 2 + write /proc/sys/net/ipv4/tcp_syn_retries 2 + write /proc/sys/net/ipv4/tcp_no_metrics_save 1 + write /proc/sys/net/ipv4/ip_forward 0 + write /proc/sys/net/ipv4/tcp_sack 1 + write /proc/sys/net/ipv4/tcp_dsack 1 + write /proc/sys/net/ipv4/tcp_tw_recycle 1 + write /proc/sys/net/ipv4/tcp_window_scaling 1 + write /proc/sys/net/ipv4/conf/default/accept_source_route 0 + write /proc/sys/net/ipv4/conf/all/accept_source_route 0 + write /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts 1 + write /proc/sys/net/ipv4/icmp_echo_ignore_all 1 + write /proc/sys/net/ipv4/icmp_ignore_bogus_error_responses 1 + write /proc/sys/net/ipv4/tcp_syncookies 0 + write /proc/sys/net/ipv4/conf/all/accept_redirects 0 + write /proc/sys/net/ipv4/conf/default/accept_redirects 0 + write /proc/sys/net/ipv4/conf/all/secure_redirects 0 + write /proc/sys/net/ipv4/conf/default/secure_redirects 0 + write /proc/sys/net/ipv4/ip_dynaddr 0 + write /proc/sys/net/ipv4/tcp_tw_reuse 1 + write /proc/sys/net/ipv4/tcp_keepalive_probes 5 + write /proc/sys/net/ipv4/tcp_max_syn_backlog 4096 + write /proc/sys/net/ipv4/tcp_timestamps 0 + write /proc/sys/net/ipv4/tcp_keepalive_probes 5 + write /proc/sys/net/ipv4/tcp_keepalive_intvl 30 + write /proc/sys/net/ipv4/tcp_fin_timeout 30 + write /proc/sys/net/core/wmem_max 404480 + write /proc/sys/net/core/rmem_max 404480 + write /proc/sys/net/core/rmem_default 256960 + write /proc/sys/net/core/wmem_default 256960 + write /proc/sys/net/ipv4/tcp_wmem "4096,16384,404480" + write /proc/sys/net/ipv4/tcp_rmem "4096,16384,404480" # Services start here From ac1142bc9cb6fc885e4e12dfc375c8848196134b Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Tue, 20 Oct 2015 23:48:53 +0200 Subject: [PATCH 076/139] g2-common: init: power: Setup GPU max freq easier --- rootdir/etc/init.g2.power.rc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rootdir/etc/init.g2.power.rc b/rootdir/etc/init.g2.power.rc index 4cec7de8..2dee0863 100644 --- a/rootdir/etc/init.g2.power.rc +++ b/rootdir/etc/init.g2.power.rc @@ -15,8 +15,7 @@ on early-init write /sys/module/simple_gpu_algorithm/parameters/simple_gpu_activate 1 write /sys/module/simple_gpu_algorithm/parameters/simple_laziness 6 write /sys/module/simple_gpu_algorithm/parameters/simple_ramp_threshold 4000 - write /sys/class/devfreq/fdb00000.qcom,kgsl-3d0/target_freq 320000000 - write /sys/class/devfreq/fdb00000.qcom,kgsl-3d0/max_freq 320000000 + write /sys/devices/fdb00000.qcom,kgsl-3d0/devfreq/fdb00000.qcom,kgsl-3d0/max_freq 320000000 # Intelli THERMAL write /sys/module/msm_thermal/parameters/intelli_enabled Y From 63bdd0729d992ddcd1d9e7f2b0f73b1610c1ce51 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Wed, 21 Oct 2015 12:30:15 +0200 Subject: [PATCH 077/139] g2-common: init: Setup 192000kB minfree LMK --- rootdir/etc/init.g2.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rootdir/etc/init.g2.rc b/rootdir/etc/init.g2.rc index 2c77b3c2..96a5f957 100644 --- a/rootdir/etc/init.g2.rc +++ b/rootdir/etc/init.g2.rc @@ -334,7 +334,7 @@ on boot # LMK write /sys/module/lowmemorykiller/parameters/adj "0,1,3,5,7,15" - write /sys/module/lowmemorykiller/parameters/minfree "16384,20992,24576,28160,32768,293888" + write /sys/module/lowmemorykiller/parameters/minfree "19200,24000,28800,33600,38400,48000" # VM write /proc/sys/vm/block_dump 0 From 4900d3c9b8ad800672996410f9c3a0e757a16064 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Mon, 26 Oct 2015 14:14:16 +0100 Subject: [PATCH 078/139] g2-common: power: Change early init to boot complete + setup zen (256kB) as default I/O scheduler --- rootdir/etc/init.g2.power.rc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rootdir/etc/init.g2.power.rc b/rootdir/etc/init.g2.power.rc index 2dee0863..428629a8 100644 --- a/rootdir/etc/init.g2.power.rc +++ b/rootdir/etc/init.g2.power.rc @@ -1,6 +1,7 @@ -on early-init - write /sys/block/mmcblk0/queue/scheduler bfq - write /sys/block/mmcblk0/bdi/read_ahead_kb 1024 +on property:sys.boot_completed=1 + setprop sys.io.scheduler zen + write /sys/block/mmcblk0/queue/scheduler zen + write /sys/block/mmcblk0/bdi/read_ahead_kb 256 write /sys/class/mmc_host/mmc0/clk_scaling/scale_down_in_low_wr_load 0 write /sys/module/cpu_boost/parameters/input_boost_ms 0 From 12439d5d16feebf50da56563c61b580f37ac61fc Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Mon, 26 Oct 2015 14:15:39 +0100 Subject: [PATCH 079/139] g2-common: init: power: Lower random read threshold (sync with kernel) --- rootdir/etc/init.g2.power.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rootdir/etc/init.g2.power.rc b/rootdir/etc/init.g2.power.rc index 428629a8..a97f3ede 100644 --- a/rootdir/etc/init.g2.power.rc +++ b/rootdir/etc/init.g2.power.rc @@ -9,7 +9,7 @@ on property:sys.boot_completed=1 write /sys/kernel/sched/gentle_fair_sleepers 0 # Tune entropy parameters - write /proc/sys/kernel/random/read_wakeup_threshold 512 + write /proc/sys/kernel/random/read_wakeup_threshold 128 write /proc/sys/kernel/random/write_wakeup_threshold 256 # Simple GPU From 879479f309176a47137db0a9b89a7fa20b2c5e87 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Mon, 26 Oct 2015 14:21:37 +0100 Subject: [PATCH 080/139] g2-common: init: Undervolt -15mV --- rootdir/etc/init.g2.rc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rootdir/etc/init.g2.rc b/rootdir/etc/init.g2.rc index 96a5f957..6e6c3b23 100644 --- a/rootdir/etc/init.g2.rc +++ b/rootdir/etc/init.g2.rc @@ -336,6 +336,9 @@ on boot write /sys/module/lowmemorykiller/parameters/adj "0,1,3,5,7,15" write /sys/module/lowmemorykiller/parameters/minfree "19200,24000,28800,33600,38400,48000" + # Undervolt -15mV + write /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table "760 760 765 775 795 805 815 835 845 880 895 920 955" + # VM write /proc/sys/vm/block_dump 0 write /proc/sys/vm/dirty_background_ratio 5 From ffc615b798694910f07e4a2a8603696af79dac96 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Mon, 26 Oct 2015 14:23:50 +0100 Subject: [PATCH 081/139] g2-common: power: Setup nightmare GOV --- rootdir/etc/init.g2.power.rc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/rootdir/etc/init.g2.power.rc b/rootdir/etc/init.g2.power.rc index a97f3ede..7e095b3b 100644 --- a/rootdir/etc/init.g2.power.rc +++ b/rootdir/etc/init.g2.power.rc @@ -77,6 +77,13 @@ on enable-low-power write /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_freq 960000 write /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_load 50 + write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor nightmare + write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor nightmare + write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor nightmare + write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor nightmare + write /sys/devices/system/cpu/cpufreq/nightmare/freq_for_responsiveness 1267200 + write /sys/devices/system/cpu/cpufreq/nightmare/freq_for_responsiveness_max 1574400 + write /sys/class/devfreq/qcom,cpubw.42/governor cpubw_hwmon write /sys/class/devfreq/fdb00000.qcom,kgsl-3d0/governor msm-adreno-tz @@ -191,6 +198,13 @@ on property:sys.perf.profile=1 write /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_freq 960000 write /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_load 50 + write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor nightmare + write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor nightmare + write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor nightmare + write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor nightmare + write /sys/devices/system/cpu/cpufreq/nightmare/freq_for_responsiveness 1267200 + write /sys/devices/system/cpu/cpufreq/nightmare/freq_for_responsiveness_max 1574400 + write /sys/class/devfreq/qcom,cpubw.42/governor msm-adreno-tz write /sys/class/devfreq/fdb00000.qcom,kgsl-3d0/governor msm-adreno-tz From 294a1faf88fc97b498c369501543810dd3affde0 Mon Sep 17 00:00:00 2001 From: Rashed Abdel-Tawab Date: Mon, 26 Oct 2015 14:26:20 +0100 Subject: [PATCH 082/139] g2-common: configs: audio_policy.conf: Rebase (sync with CM 13.0) Signed-off-by: Zdrowy Gosciu --- configs/audio_policy.conf | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/configs/audio_policy.conf b/configs/audio_policy.conf index 13db01b5..3adde77e 100644 --- a/configs/audio_policy.conf +++ b/configs/audio_policy.conf @@ -24,24 +24,31 @@ audio_hw_modules { primary { outputs { primary { - sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000|88200|96000|176400|192000 + sampling_rates 44100|48000 channel_masks AUDIO_CHANNEL_OUT_STEREO formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_EXTERNAL_WIFI|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET - flags AUDIO_OUTPUT_FLAG_PRIMARY|AUDIO_OUTPUT_FLAG_DEEP_BUFFER + devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY + flags AUDIO_OUTPUT_FLAG_PRIMARY } - hdmi { - sampling_rates 44100|48000 + deep_buffer { + sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000 + channel_masks AUDIO_CHANNEL_OUT_STEREO + formats AUDIO_FORMAT_PCM_16_BIT + devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY + flags AUDIO_OUTPUT_FLAG_DEEP_BUFFER + } + multichannel { + sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000|96000 channel_masks dynamic formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_OUT_AUX_DIGITAL - flags AUDIO_OUTPUT_FLAG_MULTI_CH + devices AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY + flags AUDIO_OUTPUT_FLAG_DIRECT } compress_offload { sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000|64000|88200|96000|176400|192000 - channel_masks dynamic - formats dynamic - devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_EXTERNAL_WIFI|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET + channel_masks AUDIO_CHANNEL_OUT_MONO|AUDIO_CHANNEL_OUT_STEREO|AUDIO_CHANNEL_OUT_2POINT1|AUDIO_CHANNEL_OUT_QUAD|AUDIO_CHANNEL_OUT_PENTA|AUDIO_CHANNEL_OUT_5POINT1|AUDIO_CHANNEL_OUT_6POINT1|AUDIO_CHANNEL_OUT_7POINT1 + formats AUDIO_FORMAT_MP3|AUDIO_FORMAT_AAC_LC|AUDIO_FORMAT_AAC_HE_V1|AUDIO_FORMAT_AAC_HE_V2|AUDIO_FORMAT_MP2|AUDIO_FORMAT_PCM_16_BIT_OFFLOAD|AUDIO_FORMAT_PCM_24_BIT_OFFLOAD + devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING } voip_rx { From 7d1fb75e45993c10e312cacd23904a52539087b2 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Tue, 27 Oct 2015 10:38:14 +0100 Subject: [PATCH 083/139] g2-common: init: power: Add write access to MM OSAL logmask + small cleanup --- rootdir/etc/init.g2.power.rc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rootdir/etc/init.g2.power.rc b/rootdir/etc/init.g2.power.rc index 7e095b3b..622bc113 100644 --- a/rootdir/etc/init.g2.power.rc +++ b/rootdir/etc/init.g2.power.rc @@ -87,8 +87,13 @@ on enable-low-power write /sys/class/devfreq/qcom,cpubw.42/governor cpubw_hwmon write /sys/class/devfreq/fdb00000.qcom,kgsl-3d0/governor msm-adreno-tz + # MP-Decision write /data/system/default_values "" + + # MM-OSAL write /data/mmosal_logmask.cfg 0 + chown root system /data/mmosal_logmask.cfg + chmod 664 /data/mmosal_logmask.cfg # Permission for Power HAL CM extension chown root system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load From ab988a6be2764cbb3fcb25750f291010f467da5d Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Tue, 27 Oct 2015 10:42:11 +0100 Subject: [PATCH 084/139] g2-common: init: power: Move governor setup to profile (cleanup) --- rootdir/etc/init.g2.power.rc | 48 +++++------------------------------- 1 file changed, 6 insertions(+), 42 deletions(-) diff --git a/rootdir/etc/init.g2.power.rc b/rootdir/etc/init.g2.power.rc index 622bc113..68877535 100644 --- a/rootdir/etc/init.g2.power.rc +++ b/rootdir/etc/init.g2.power.rc @@ -8,6 +8,8 @@ on property:sys.boot_completed=1 write /sys/kernel/sched/arch_power 0 write /sys/kernel/sched/gentle_fair_sleepers 0 + setprop sys.perf.profile 1 + # Tune entropy parameters write /proc/sys/kernel/random/read_wakeup_threshold 128 write /proc/sys/kernel/random/write_wakeup_threshold 256 @@ -46,47 +48,6 @@ on enable-low-power write /sys/module/msm_pm/modes/cpu2/retention/idle_enabled 1 write /sys/module/msm_pm/modes/cpu3/retention/idle_enabled 1 - write /sys/module/msm_thermal/core_control/enabled 0 - write /sys/devices/system/cpu/cpu1/online 1 - write /sys/devices/system/cpu/cpu2/online 1 - write /sys/devices/system/cpu/cpu3/online 1 - - write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive - write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor interactive - write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor interactive - write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor interactive - write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 300000 - write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 300000 - write /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq 300000 - write /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq 300000 - write /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay "20000 900000:60000 1500000:20000" - write /sys/devices/system/cpu/cpufreq/interactive/above_optimal_max_freq_delay 40000 - write /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load 95 - write /sys/devices/system/cpu/cpufreq/interactive/high_grid_load 45 - write /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq 1190400 - write /sys/devices/system/cpu/cpufreq/interactive/io_is_busy 0 - write /sys/devices/system/cpu/cpufreq/interactive/is_grid 1 - write /sys/devices/system/cpu/cpufreq/interactive/min_sample_time 40000 - write /sys/devices/system/cpu/cpufreq/interactive/max_freq_hysteresis 100000 - write /sys/devices/system/cpu/cpufreq/interactive/optimal_max_freq 1190400 - write /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor 0 - write /sys/devices/system/cpu/cpufreq/interactive/sync_freq 1190400 - write /sys/devices/system/cpu/cpufreq/interactive/target_loads "90 300000:45 800000:65 900000:70 1500000:90 1800000:99" - write /sys/devices/system/cpu/cpufreq/interactive/timer_rate 30000 - write /sys/devices/system/cpu/cpufreq/interactive/timer_slack 30000 - write /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_freq 960000 - write /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_load 50 - - write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor nightmare - write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor nightmare - write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor nightmare - write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor nightmare - write /sys/devices/system/cpu/cpufreq/nightmare/freq_for_responsiveness 1267200 - write /sys/devices/system/cpu/cpufreq/nightmare/freq_for_responsiveness_max 1574400 - - write /sys/class/devfreq/qcom,cpubw.42/governor cpubw_hwmon - write /sys/class/devfreq/fdb00000.qcom,kgsl-3d0/governor msm-adreno-tz - # MP-Decision write /data/system/default_values "" @@ -99,13 +60,16 @@ on enable-low-power chown root system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load chmod 664 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load + write /sys/module/msm_thermal/core_control/enabled 0 + write /sys/devices/system/cpu/cpu1/online 1 + write /sys/devices/system/cpu/cpu2/online 1 + write /sys/devices/system/cpu/cpu3/online 1 chown root system /sys/devices/system/cpu/cpu1/online chown root system /sys/devices/system/cpu/cpu2/online chown root system /sys/devices/system/cpu/cpu3/online chmod 664 /sys/devices/system/cpu/cpu1/online chmod 664 /sys/devices/system/cpu/cpu2/online chmod 664 /sys/devices/system/cpu/cpu3/online - write /sys/devices/system/cpu/cpu1/online 0 write /sys/devices/system/cpu/cpu2/online 0 write /sys/devices/system/cpu/cpu3/online 0 From 96d204833a8a02cf2e81c66325eaf5d792fb1c29 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Tue, 27 Oct 2015 10:46:17 +0100 Subject: [PATCH 085/139] g2-common: Setup uberdemand as default GOV --- power/power.c | 2 +- rootdir/etc/init.g2.power.rc | 32 ++++---------------------------- 2 files changed, 5 insertions(+), 29 deletions(-) diff --git a/power/power.c b/power/power.c index 237ee432..4a36a690 100644 --- a/power/power.c +++ b/power/power.c @@ -270,7 +270,7 @@ void set_interactive(struct power_module *module, int on) pthread_mutex_lock(&hint_mutex); - cm_power_set_interactive_ext(on); + // cm_power_set_interactive_ext(on); if (set_interactive_override(module, on) == HINT_HANDLED) { goto out; diff --git a/rootdir/etc/init.g2.power.rc b/rootdir/etc/init.g2.power.rc index 68877535..21920433 100644 --- a/rootdir/etc/init.g2.power.rc +++ b/rootdir/etc/init.g2.power.rc @@ -145,34 +145,10 @@ on property:sys.perf.profile=1 write /sys/devices/system/cpu/cpu2/online 1 write /sys/devices/system/cpu/cpu3/online 1 - write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive - write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor interactive - write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor interactive - write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor interactive - write /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay "20000 900000:60000 1500000:20000" - write /sys/devices/system/cpu/cpufreq/interactive/above_optimal_max_freq_delay 40000 - write /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load 95 - write /sys/devices/system/cpu/cpufreq/interactive/high_grid_load 45 - write /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq 1190400 - write /sys/devices/system/cpu/cpufreq/interactive/io_is_busy 0 - write /sys/devices/system/cpu/cpufreq/interactive/is_grid 1 - write /sys/devices/system/cpu/cpufreq/interactive/min_sample_time 40000 - write /sys/devices/system/cpu/cpufreq/interactive/max_freq_hysteresis 100000 - write /sys/devices/system/cpu/cpufreq/interactive/optimal_max_freq 1190400 - write /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor 0 - write /sys/devices/system/cpu/cpufreq/interactive/sync_freq 1190400 - write /sys/devices/system/cpu/cpufreq/interactive/target_loads "90 300000:45 800000:65 900000:70 1500000:90 1800000:99" - write /sys/devices/system/cpu/cpufreq/interactive/timer_rate 30000 - write /sys/devices/system/cpu/cpufreq/interactive/timer_slack 30000 - write /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_freq 960000 - write /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_load 50 - - write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor nightmare - write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor nightmare - write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor nightmare - write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor nightmare - write /sys/devices/system/cpu/cpufreq/nightmare/freq_for_responsiveness 1267200 - write /sys/devices/system/cpu/cpufreq/nightmare/freq_for_responsiveness_max 1574400 + write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor uberdemand + write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor uberdemand + write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor uberdemand + write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor uberdemand write /sys/class/devfreq/qcom,cpubw.42/governor msm-adreno-tz write /sys/class/devfreq/fdb00000.qcom,kgsl-3d0/governor msm-adreno-tz From 6815e5ef9786ff6b34a85885b2558821269c1b9e Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Wed, 28 Oct 2015 21:06:52 +0100 Subject: [PATCH 086/139] g2-common: init: Don't swap ZRAM at startup --- rootdir/etc/init.g2.rc | 1 - 1 file changed, 1 deletion(-) diff --git a/rootdir/etc/init.g2.rc b/rootdir/etc/init.g2.rc index 6e6c3b23..2d5319f6 100644 --- a/rootdir/etc/init.g2.rc +++ b/rootdir/etc/init.g2.rc @@ -85,7 +85,6 @@ on init on fs mount_all ./fstab.g2 write /sys/block/zram0/disksize 512M - swapon_all ./fstab.g2 restorecon_recursive /sns restorecon_recursive /mpt setprop ro.crypto.fuse_sdcard true From 1eb4caba92b69ad7de3cb27c7c90e2a013f1e20c Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Wed, 28 Oct 2015 21:38:52 +0100 Subject: [PATCH 087/139] g2-common: init: power: Use MSM CPUFREQ in CPU BW --- rootdir/etc/init.g2.power.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rootdir/etc/init.g2.power.rc b/rootdir/etc/init.g2.power.rc index 21920433..7755cc7a 100644 --- a/rootdir/etc/init.g2.power.rc +++ b/rootdir/etc/init.g2.power.rc @@ -150,7 +150,7 @@ on property:sys.perf.profile=1 write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor uberdemand write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor uberdemand - write /sys/class/devfreq/qcom,cpubw.42/governor msm-adreno-tz + write /sys/class/devfreq/qcom,cpubw.42/governor msm_cpufreq write /sys/class/devfreq/fdb00000.qcom,kgsl-3d0/governor msm-adreno-tz write /sys/devices/system/cpu/cpu1/online 0 From 669a108c5d5d97a4a814d02207dbbdb681c9a465 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Fri, 30 Oct 2015 01:38:26 +0100 Subject: [PATCH 088/139] g2-common: configs: audio_policy.conf: Fix slow audio/video stream This reverts commit 294a1faf88fc97b498c369501543810dd3affde0. --- configs/audio_policy.conf | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/configs/audio_policy.conf b/configs/audio_policy.conf index 3adde77e..13db01b5 100644 --- a/configs/audio_policy.conf +++ b/configs/audio_policy.conf @@ -24,31 +24,24 @@ audio_hw_modules { primary { outputs { primary { - sampling_rates 44100|48000 - channel_masks AUDIO_CHANNEL_OUT_STEREO - formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY - flags AUDIO_OUTPUT_FLAG_PRIMARY - } - deep_buffer { - sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000 + sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000|88200|96000|176400|192000 channel_masks AUDIO_CHANNEL_OUT_STEREO formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY - flags AUDIO_OUTPUT_FLAG_DEEP_BUFFER + devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_EXTERNAL_WIFI|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET + flags AUDIO_OUTPUT_FLAG_PRIMARY|AUDIO_OUTPUT_FLAG_DEEP_BUFFER } - multichannel { - sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000|96000 + hdmi { + sampling_rates 44100|48000 channel_masks dynamic formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY - flags AUDIO_OUTPUT_FLAG_DIRECT + devices AUDIO_DEVICE_OUT_AUX_DIGITAL + flags AUDIO_OUTPUT_FLAG_MULTI_CH } compress_offload { sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000|64000|88200|96000|176400|192000 - channel_masks AUDIO_CHANNEL_OUT_MONO|AUDIO_CHANNEL_OUT_STEREO|AUDIO_CHANNEL_OUT_2POINT1|AUDIO_CHANNEL_OUT_QUAD|AUDIO_CHANNEL_OUT_PENTA|AUDIO_CHANNEL_OUT_5POINT1|AUDIO_CHANNEL_OUT_6POINT1|AUDIO_CHANNEL_OUT_7POINT1 - formats AUDIO_FORMAT_MP3|AUDIO_FORMAT_AAC_LC|AUDIO_FORMAT_AAC_HE_V1|AUDIO_FORMAT_AAC_HE_V2|AUDIO_FORMAT_MP2|AUDIO_FORMAT_PCM_16_BIT_OFFLOAD|AUDIO_FORMAT_PCM_24_BIT_OFFLOAD - devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL + channel_masks dynamic + formats dynamic + devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_EXTERNAL_WIFI|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING } voip_rx { From bf1953160e34ae47490334a3954e0d418dc0c0d8 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Fri, 30 Oct 2015 11:39:53 +0100 Subject: [PATCH 089/139] g2-common: init: Don't set ZRAM disksize at startup --- rootdir/etc/init.g2.rc | 1 - 1 file changed, 1 deletion(-) diff --git a/rootdir/etc/init.g2.rc b/rootdir/etc/init.g2.rc index 2d5319f6..6b3d0f73 100644 --- a/rootdir/etc/init.g2.rc +++ b/rootdir/etc/init.g2.rc @@ -84,7 +84,6 @@ on init on fs mount_all ./fstab.g2 - write /sys/block/zram0/disksize 512M restorecon_recursive /sns restorecon_recursive /mpt setprop ro.crypto.fuse_sdcard true From 5b560b81ccd55bd069b7110d59fadba3221336a9 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Fri, 30 Oct 2015 14:42:22 +0100 Subject: [PATCH 090/139] g2-common: init: Disable UV --- rootdir/etc/init.g2.rc | 3 --- 1 file changed, 3 deletions(-) diff --git a/rootdir/etc/init.g2.rc b/rootdir/etc/init.g2.rc index 6b3d0f73..80068702 100644 --- a/rootdir/etc/init.g2.rc +++ b/rootdir/etc/init.g2.rc @@ -334,9 +334,6 @@ on boot write /sys/module/lowmemorykiller/parameters/adj "0,1,3,5,7,15" write /sys/module/lowmemorykiller/parameters/minfree "19200,24000,28800,33600,38400,48000" - # Undervolt -15mV - write /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table "760 760 765 775 795 805 815 835 845 880 895 920 955" - # VM write /proc/sys/vm/block_dump 0 write /proc/sys/vm/dirty_background_ratio 5 From ab660e8cc9ab1e5b682c17b417f97923a311ecb0 Mon Sep 17 00:00:00 2001 From: Dorimanx Date: Tue, 3 Nov 2015 17:28:05 +0100 Subject: [PATCH 091/139] g2-common: init: Tune LMK Signed-off-by: Zdrowy Gosciu --- rootdir/etc/init.g2.rc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rootdir/etc/init.g2.rc b/rootdir/etc/init.g2.rc index 80068702..3011116f 100644 --- a/rootdir/etc/init.g2.rc +++ b/rootdir/etc/init.g2.rc @@ -331,20 +331,20 @@ on boot chmod 0664 /sys/devices/virtual/input/lge_touch/touch_gesture # LMK - write /sys/module/lowmemorykiller/parameters/adj "0,1,3,5,7,15" - write /sys/module/lowmemorykiller/parameters/minfree "19200,24000,28800,33600,38400,48000" + write /sys/module/lowmemorykiller/parameters/minfree "4096,8192,16384,28672,46080,51200" # VM write /proc/sys/vm/block_dump 0 write /proc/sys/vm/dirty_background_ratio 5 - write /proc/sys/vm/dirty_expire_centisecs 500 - write /proc/sys/vm/dirty_ratio 10 + write /proc/sys/vm/dirty_expire_centisecs 200 + write /proc/sys/vm/dirty_ratio 25 write /proc/sys/vm/dirty_writeback_centisecs 3000 - write /proc/sys/vm/min_free_kbytes 4608 + write /proc/sys/vm/min_free_kbytes 2572 write /proc/sys/vm/min_free_order_shift 4 write /proc/sys/vm/oom_dump_tasks 1 - write /proc/sys/vm/oom_kill_allocating_task 1 + write /proc/sys/vm/oom_kill_allocating_task 0 write /proc/sys/vm/overcommit_memory 1 + write /proc/sys/vm/overcommit_ratio 50 write /proc/sys/vm/page-cluster 3 write /proc/sys/vm/panic_on_oom 0 write /proc/sys/vm/swappiness 70 From cbd5df0d76da3006c22349464cc717e9f0abea2e Mon Sep 17 00:00:00 2001 From: Adam Farden Date: Sun, 1 Nov 2015 22:13:22 +0100 Subject: [PATCH 092/139] g2-common: Use open source thermanager The current thermal solution spams the shit out of logcat and doesn't really work anyway. Sony's thermanager is open and proven to be effective. This config is based on Xperia Z3 config, but with limits approximately +10'C to compensate for LG's vastly inferior hardware heat dispersal. Change-Id: I14960c757920d57445d52139aa025484999196b7 Signed-off-by: Adam Farden Signed-off-by: Zdrowy Gosciu --- configs/thermal-engine-8974.conf | 112 ------------ configs/thermanager.xml | 300 +++++++++++++++++++++++++++++++ g2.mk | 5 +- rootdir/etc/init.g2.rc | 5 +- sepolicy/file_contexts | 1 + sepolicy/thermal-engine.te | 21 --- sepolicy/thermanager.te | 11 ++ 7 files changed, 319 insertions(+), 136 deletions(-) delete mode 100644 configs/thermal-engine-8974.conf create mode 100644 configs/thermanager.xml delete mode 100644 sepolicy/thermal-engine.te create mode 100644 sepolicy/thermanager.te diff --git a/configs/thermal-engine-8974.conf b/configs/thermal-engine-8974.conf deleted file mode 100644 index d2405a5d..00000000 --- a/configs/thermal-engine-8974.conf +++ /dev/null @@ -1,112 +0,0 @@ -sampling 5000 - -[CPU_LCD_management] -algo_type monitor -sensor xo_therm_pu2 -sampling 10000 -thresholds 46000 48000 50000 52000 54000 56000 -thresholds_clr 44000 46500 48500 50500 52500 54500 -actions cpu+lcd cpu+lcd cpu+lcd cpu+lcd cpu+lcd cpu+lcd -action_info FFFFFFF+255 1958400+255 1728000+235 1574400+215 1267200+204 1190400+204 -action_type 25000 - -[battery_monitor] -algo_type monitor -sensor xo_therm_pu2 -sampling 10000 -thresholds 42000 44000 46000 48000 50000 52000 -thresholds_clr 40000 42500 44500 46500 48500 50500 -actions battery battery battery battery battery battery -action_info 700 500 300 300 300 300 - -[batt_therm_monitor] -algo_type monitor -sensor batt_therm -sampling 10000 -thresholds 562000 -thresholds_clr 528000 -actions lcd -action_info 92 - -[CPU0_MONITOR] -algo_type monitor -sensor cpu0 -sampling 65 -thresholds 115000 -thresholds_clr 110000 -actions shutdown -action_info 0 - -[CPU1_MONITOR] -algo_type monitor -sensor cpu1 -sampling 65 -thresholds 115000 -thresholds_clr 110000 -actions shutdown -action_info 0 - -[CPU2_MONITOR] -algo_type monitor -sensor cpu2 -sampling 65 -thresholds 115000 -thresholds_clr 110000 -actions shutdown -action_info 0 - -[CPU3_MONITOR] -algo_type monitor -sensor cpu3 -sampling 65 -thresholds 115000 -thresholds_clr 110000 -actions shutdown -action_info 0 - -[SS-CPU0] -algo_type ss -sampling 65 -sensor cpu0 -device cpu -set_point 85000 -set_point_clr 55000 -action_type 10000 - -[SS-CPU1] -algo_type ss -sampling 65 -sensor cpu1 -device cpu -set_point 85000 -set_point_clr 55000 -action_type 10000 - -[SS-CPU2] -algo_type ss -sampling 65 -sensor cpu2 -device cpu -set_point 85000 -set_point_clr 55000 -action_type 10000 - -[SS-CPU3] -algo_type ss -sampling 65 -sensor cpu3 -device cpu -set_point 85000 -set_point_clr 55000 -action_type 10000 - -[SS-POPMEM] -algo_type ss -sampling 65 -sensor pop_mem -device cpu -set_point 80000 -set_point_clr 55000 -time_constant 16 -action_type 20000 - diff --git a/configs/thermanager.xml b/configs/thermanager.xml new file mode 100644 index 00000000..8396b964 --- /dev/null +++ b/configs/thermanager.xml @@ -0,0 +1,300 @@ + + + + /sys/class/thermal/thermal_zone0 + /sys/class/thermal/thermal_zone1 + /sys/class/thermal/thermal_zone2 + /sys/class/thermal/thermal_zone3 + /sys/class/thermal/thermal_zone4 + + /sys/class/thermal/thermal_zone5 + /sys/class/thermal/thermal_zone6 + /sys/class/thermal/thermal_zone7 + /sys/class/thermal/thermal_zone8 + /sys/class/thermal/thermal_zone9 + /sys/class/thermal/thermal_zone10 + + /sys/class/thermal/thermal_zone12 + /sys/class/thermal/thermal_zone13 + + + + + + + + + + + + + + + /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq + /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq + /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq + /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq + + + + + + + + + + /sys/class/leds/lcd-backlight/max_brightness + + /sys/class/kgsl/kgsl-3d0/max_gpuclk + /sys/class/power_supply/usb/current_max + /sys/class/power_supply/battery/temp + /sys/class/power_supply/battery/charging_enabled + + + + + + + + + + 1500000 + 900000 + 700000 + 500000 + 300000 + 150000 + + + + 1 + 0 + + + + + 0 + 1 + + + + NORMAL + WARNING + CRITICAL + + + + + + + + + 255 + 209 + 171 + 141 + 115 + 95 + 78 + 64 + 52 + 43 + + + + 578000000 + 462400000 + 389000000 + 330000000 + 200000000 + + + + + 2457600 + 2265600 + 1958400 + 1728000 + 1574400 + 1497600 + 1267200 + 1190400 + 1036800 + 960000 + 883200 + 729600 + 652800 + 422400 + 300000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/g2.mk b/g2.mk index 180c99b2..7e7c3b46 100644 --- a/g2.mk +++ b/g2.mk @@ -182,8 +182,11 @@ PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/configs/sensor_def_common.conf:system/etc/sensor_def_common.conf # Thermal +PRODUCT_PACKAGES += \ + thermanager + PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/configs/thermal-engine-8974.conf:system/etc/thermal-engine-8974.conf + $(LOCAL_PATH)/configs/thermanager.xml:system/etc/thermanager.xml # Touchscreen PRODUCT_COPY_FILES += \ diff --git a/rootdir/etc/init.g2.rc b/rootdir/etc/init.g2.rc index 3011116f..df095037 100644 --- a/rootdir/etc/init.g2.rc +++ b/rootdir/etc/init.g2.rc @@ -497,8 +497,9 @@ service set_baseband /system/bin/sh /system/etc/set_baseband.sh user root oneshot -service thermal-engine /system/bin/thermal-engine - class main +# OSS thermal management +service thermanager /system/bin/thermanager /system/etc/thermanager.xml + class late_start user root group root diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts index e0f509ea..c3c7fd09 100644 --- a/sepolicy/file_contexts +++ b/sepolicy/file_contexts @@ -16,6 +16,7 @@ /sns(/.*)? u:object_r:sensors_persist_file:s0 /data/system/default_values u:object_r:mpdecision_data:s0 /dev/btlock u:object_r:btlock_file:s0 +/system/bin/thermanager u:object_r:thermanager_exec:s0 /dev/bcm2079x u:object_r:nfc_device:s0 /dev/socket/mpdecision(/.*)? u:object_r:mpctl_socket:s0 diff --git a/sepolicy/thermal-engine.te b/sepolicy/thermal-engine.te deleted file mode 100644 index 09c6adef..00000000 --- a/sepolicy/thermal-engine.te +++ /dev/null @@ -1,21 +0,0 @@ -# Access /sys/devices/system/cpu/ -allow thermal-engine sysfs_devices_system_cpu:file rw_file_perms; - -binder_use(thermal-engine) - -# Some files in /sys/devices/system/cpu may pop in and out of existance, -# defeating our attempt to label them. As a result, they could have the -# sysfs label, not the sysfs_devices_system_cpu label. -# Allow write access for now until we figure out a better solution. -# For example, the following files pop in and out of existance: -# /sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_min_freq -# /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq -allow thermal-engine sysfs:file write; - -allow thermal-engine self:capability { dac_override net_admin }; - -allow thermal-engine system_server:binder call; -allow thermal-engine self:netlink_kobject_uevent_socket { create setopt bind read }; -allow thermal-engine sysfs:file write; - -allow thermal-engine mpctl_socket:dir w_dir_perms; diff --git a/sepolicy/thermanager.te b/sepolicy/thermanager.te new file mode 100644 index 00000000..e2a468e0 --- /dev/null +++ b/sepolicy/thermanager.te @@ -0,0 +1,11 @@ +type thermanager, domain; +type thermanager_exec, exec_type, file_type; + +# Started by init +init_daemon_domain(thermanager) + +allow thermanager self:capability dac_override; +allow thermanager { sysfs sysfs_devices_system_cpu }:file write; +allow thermanager { sysfs_thermal sysfs_usb_supply }:dir search; +allow thermanager sysfs_thermal:{ lnk_file file } rw_file_perms; +allow thermanager sysfs_usb_supply:file rw_file_perms; From 17d3d276ffe29d212002b903287ab9c61d1bd0ce Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Tue, 3 Nov 2015 17:40:36 +0100 Subject: [PATCH 093/139] g2-common: init: power: Don't startup Intelli Thermal --- rootdir/etc/init.g2.power.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rootdir/etc/init.g2.power.rc b/rootdir/etc/init.g2.power.rc index 7755cc7a..c80b97db 100644 --- a/rootdir/etc/init.g2.power.rc +++ b/rootdir/etc/init.g2.power.rc @@ -21,7 +21,7 @@ on property:sys.boot_completed=1 write /sys/devices/fdb00000.qcom,kgsl-3d0/devfreq/fdb00000.qcom,kgsl-3d0/max_freq 320000000 # Intelli THERMAL - write /sys/module/msm_thermal/parameters/intelli_enabled Y + write /sys/module/msm_thermal/parameters/intelli_enabled N write /sys/module/msm_thermal/parameters/limit_temp_degC 76 write /sys/module/msm_thermal/parameters/core_limit_temp_degC 74 From fc82815518f707a346965eeee2805f4efd06855d Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Tue, 3 Nov 2015 17:45:28 +0100 Subject: [PATCH 094/139] g2-common: Setup interactive as default GOV This reverts commit 96d204833a8a02cf2e81c66325eaf5d792fb1c29. --- power/power.c | 2 +- rootdir/etc/init.g2.power.rc | 25 +++++++++++++++++++++---- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/power/power.c b/power/power.c index 4a36a690..237ee432 100644 --- a/power/power.c +++ b/power/power.c @@ -270,7 +270,7 @@ void set_interactive(struct power_module *module, int on) pthread_mutex_lock(&hint_mutex); - // cm_power_set_interactive_ext(on); + cm_power_set_interactive_ext(on); if (set_interactive_override(module, on) == HINT_HANDLED) { goto out; diff --git a/rootdir/etc/init.g2.power.rc b/rootdir/etc/init.g2.power.rc index c80b97db..8af9eb6a 100644 --- a/rootdir/etc/init.g2.power.rc +++ b/rootdir/etc/init.g2.power.rc @@ -145,10 +145,27 @@ on property:sys.perf.profile=1 write /sys/devices/system/cpu/cpu2/online 1 write /sys/devices/system/cpu/cpu3/online 1 - write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor uberdemand - write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor uberdemand - write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor uberdemand - write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor uberdemand + write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive + write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor interactive + write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor interactive + write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor interactive + write /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay "20000 900000:60000 1500000:20000" + write /sys/devices/system/cpu/cpufreq/interactive/above_optimal_max_freq_delay 40000 + write /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load 95 + write /sys/devices/system/cpu/cpufreq/interactive/high_grid_load 65 + write /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq 1190400 + write /sys/devices/system/cpu/cpufreq/interactive/io_is_busy 0 + write /sys/devices/system/cpu/cpufreq/interactive/is_grid 1 + write /sys/devices/system/cpu/cpufreq/interactive/min_sample_time 40000 + write /sys/devices/system/cpu/cpufreq/interactive/max_freq_hysteresis 100000 + write /sys/devices/system/cpu/cpufreq/interactive/optimal_max_freq 1190400 + write /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor 0 + write /sys/devices/system/cpu/cpufreq/interactive/sync_freq 1190400 + write /sys/devices/system/cpu/cpufreq/interactive/target_loads "90 300000:45 800000:65 900000:70 1500000:90 1800000:99" + write /sys/devices/system/cpu/cpufreq/interactive/timer_rate 30000 + write /sys/devices/system/cpu/cpufreq/interactive/timer_slack 30000 + write /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_freq 960000 + write /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_load 75 write /sys/class/devfreq/qcom,cpubw.42/governor msm_cpufreq write /sys/class/devfreq/fdb00000.qcom,kgsl-3d0/governor msm-adreno-tz From 8493599282cc3dc99b9a7910648ece8a4397f1b2 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Tue, 3 Nov 2015 18:23:52 +0100 Subject: [PATCH 095/139] g2-common: Include Thermanager in SEPolicy --- BoardConfigCommon.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index a3325037..18ec0781 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -117,6 +117,9 @@ include device/qcom/sepolicy/sepolicy.mk BOARD_SEPOLICY_DIRS += \ device/lge/g2-common/sepolicy +BOARD_SEPOLICY_UNION += \ + thermanager.te + # Wi-Fi BOARD_WPA_SUPPLICANT_DRIVER := NL80211 WPA_SUPPLICANT_VERSION := VER_0_8_X From 2c8906420e21f56f417f3963ed65de3525202fef Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Wed, 4 Nov 2015 01:17:20 +0100 Subject: [PATCH 096/139] g2-common: init: power: Fix Power HAL CM extension permission --- rootdir/etc/init.g2.power.rc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rootdir/etc/init.g2.power.rc b/rootdir/etc/init.g2.power.rc index 8af9eb6a..602d7b2f 100644 --- a/rootdir/etc/init.g2.power.rc +++ b/rootdir/etc/init.g2.power.rc @@ -10,6 +10,10 @@ on property:sys.boot_completed=1 setprop sys.perf.profile 1 + # Permission for Power HAL CM extension + chown root system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load + chmod 664 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load + # Tune entropy parameters write /proc/sys/kernel/random/read_wakeup_threshold 128 write /proc/sys/kernel/random/write_wakeup_threshold 256 @@ -56,10 +60,6 @@ on enable-low-power chown root system /data/mmosal_logmask.cfg chmod 664 /data/mmosal_logmask.cfg - # Permission for Power HAL CM extension - chown root system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load - chmod 664 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load - write /sys/module/msm_thermal/core_control/enabled 0 write /sys/devices/system/cpu/cpu1/online 1 write /sys/devices/system/cpu/cpu2/online 1 From 74832728c08672cde3eb4ea658cf8cc764eb9e3f Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Wed, 4 Nov 2015 23:44:33 +0100 Subject: [PATCH 097/139] Revert "g2-common: init: Tune LMK" This reverts commit ab660e8cc9ab1e5b682c17b417f97923a311ecb0. --- rootdir/etc/init.g2.rc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rootdir/etc/init.g2.rc b/rootdir/etc/init.g2.rc index df095037..53700372 100644 --- a/rootdir/etc/init.g2.rc +++ b/rootdir/etc/init.g2.rc @@ -331,20 +331,20 @@ on boot chmod 0664 /sys/devices/virtual/input/lge_touch/touch_gesture # LMK - write /sys/module/lowmemorykiller/parameters/minfree "4096,8192,16384,28672,46080,51200" + write /sys/module/lowmemorykiller/parameters/adj "0,1,3,5,7,15" + write /sys/module/lowmemorykiller/parameters/minfree "19200,24000,28800,33600,38400,48000" # VM write /proc/sys/vm/block_dump 0 write /proc/sys/vm/dirty_background_ratio 5 - write /proc/sys/vm/dirty_expire_centisecs 200 - write /proc/sys/vm/dirty_ratio 25 + write /proc/sys/vm/dirty_expire_centisecs 500 + write /proc/sys/vm/dirty_ratio 10 write /proc/sys/vm/dirty_writeback_centisecs 3000 - write /proc/sys/vm/min_free_kbytes 2572 + write /proc/sys/vm/min_free_kbytes 4608 write /proc/sys/vm/min_free_order_shift 4 write /proc/sys/vm/oom_dump_tasks 1 - write /proc/sys/vm/oom_kill_allocating_task 0 + write /proc/sys/vm/oom_kill_allocating_task 1 write /proc/sys/vm/overcommit_memory 1 - write /proc/sys/vm/overcommit_ratio 50 write /proc/sys/vm/page-cluster 3 write /proc/sys/vm/panic_on_oom 0 write /proc/sys/vm/swappiness 70 From 19ac674c0dcbc660b18330083848d6acc68b7160 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Wed, 4 Nov 2015 23:50:05 +0100 Subject: [PATCH 098/139] g2-common: init: Fix LMK permissions --- rootdir/etc/init.g2.rc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rootdir/etc/init.g2.rc b/rootdir/etc/init.g2.rc index 53700372..014c6787 100644 --- a/rootdir/etc/init.g2.rc +++ b/rootdir/etc/init.g2.rc @@ -331,6 +331,8 @@ on boot chmod 0664 /sys/devices/virtual/input/lge_touch/touch_gesture # LMK + chmod 0664 /sys/module/lowmemorykiller/parameters/adj + chmod 0664 /sys/module/lowmemorykiller/parameters/minfree write /sys/module/lowmemorykiller/parameters/adj "0,1,3,5,7,15" write /sys/module/lowmemorykiller/parameters/minfree "19200,24000,28800,33600,38400,48000" From 7b0e433c665f94e0e9b962b96ae29dad5ce97a99 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Thu, 5 Nov 2015 00:19:46 +0100 Subject: [PATCH 099/139] g2-common: init: Setup VM/LMK/TCP tweaks after boot complete Make sure everything will be configured.. --- rootdir/etc/init.g2.power.rc | 66 ++++++++++++++++++++++++++++++++++++ rootdir/etc/init.g2.rc | 64 ---------------------------------- 2 files changed, 66 insertions(+), 64 deletions(-) diff --git a/rootdir/etc/init.g2.power.rc b/rootdir/etc/init.g2.power.rc index 602d7b2f..0d218cc9 100644 --- a/rootdir/etc/init.g2.power.rc +++ b/rootdir/etc/init.g2.power.rc @@ -29,6 +29,72 @@ on property:sys.boot_completed=1 write /sys/module/msm_thermal/parameters/limit_temp_degC 76 write /sys/module/msm_thermal/parameters/core_limit_temp_degC 74 + # LMK + write /sys/module/lowmemorykiller/parameters/adj "0,1,3,5,7,15" + write /sys/module/lowmemorykiller/parameters/minfree "19200,24000,28800,33600,38400,48000" + + # VM + write /proc/sys/vm/block_dump 0 + write /proc/sys/vm/dirty_background_ratio 5 + write /proc/sys/vm/dirty_expire_centisecs 500 + write /proc/sys/vm/dirty_ratio 10 + write /proc/sys/vm/dirty_writeback_centisecs 3000 + write /proc/sys/vm/min_free_kbytes 4608 + write /proc/sys/vm/min_free_order_shift 4 + write /proc/sys/vm/oom_dump_tasks 1 + write /proc/sys/vm/oom_kill_allocating_task 1 + write /proc/sys/vm/overcommit_memory 1 + write /proc/sys/vm/page-cluster 3 + write /proc/sys/vm/panic_on_oom 0 + write /proc/sys/vm/swappiness 70 + write /proc/sys/vm/vfs_cache_pressure 50 + + # Kernel + write /proc/sys/kernel/hung_task_timeout_secs 0 + write /proc/sys/kernel/panic 0 + write /proc/sys/kernel/panic_on_oops 0 + write /proc/sys/kernel/softlockup_panic 0 + + # Network + write /proc/sys/net/ipv4/tcp_moderate_rcvbuf 1 + write /proc/sys/net/ipv4/route/flush 1 + write /proc/sys/net/ipv4/tcp_rfc1337 1 + write /proc/sys/net/ipv4/ip_no_pmtu_disc 0 + write /proc/sys/net/ipv4/tcp_ecn 0 + write /proc/sys/net/ipv4/tcp_fack 1 + write /proc/sys/net/ipv4/tcp_synack_retries 2 + write /proc/sys/net/ipv4/tcp_syn_retries 2 + write /proc/sys/net/ipv4/tcp_no_metrics_save 1 + write /proc/sys/net/ipv4/ip_forward 0 + write /proc/sys/net/ipv4/tcp_sack 1 + write /proc/sys/net/ipv4/tcp_dsack 1 + write /proc/sys/net/ipv4/tcp_tw_recycle 1 + write /proc/sys/net/ipv4/tcp_window_scaling 1 + write /proc/sys/net/ipv4/conf/default/accept_source_route 0 + write /proc/sys/net/ipv4/conf/all/accept_source_route 0 + write /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts 1 + write /proc/sys/net/ipv4/icmp_echo_ignore_all 1 + write /proc/sys/net/ipv4/icmp_ignore_bogus_error_responses 1 + write /proc/sys/net/ipv4/tcp_syncookies 0 + write /proc/sys/net/ipv4/conf/all/accept_redirects 0 + write /proc/sys/net/ipv4/conf/default/accept_redirects 0 + write /proc/sys/net/ipv4/conf/all/secure_redirects 0 + write /proc/sys/net/ipv4/conf/default/secure_redirects 0 + write /proc/sys/net/ipv4/ip_dynaddr 0 + write /proc/sys/net/ipv4/tcp_tw_reuse 1 + write /proc/sys/net/ipv4/tcp_keepalive_probes 5 + write /proc/sys/net/ipv4/tcp_max_syn_backlog 4096 + write /proc/sys/net/ipv4/tcp_timestamps 0 + write /proc/sys/net/ipv4/tcp_keepalive_probes 5 + write /proc/sys/net/ipv4/tcp_keepalive_intvl 30 + write /proc/sys/net/ipv4/tcp_fin_timeout 30 + write /proc/sys/net/core/wmem_max 404480 + write /proc/sys/net/core/rmem_max 404480 + write /proc/sys/net/core/rmem_default 256960 + write /proc/sys/net/core/wmem_default 256960 + write /proc/sys/net/ipv4/tcp_wmem "4096,16384,404480" + write /proc/sys/net/ipv4/tcp_rmem "4096,16384,404480" + on enable-low-power write /sys/module/lpm_levels/enable_low_power/l2 4 write /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled 1 diff --git a/rootdir/etc/init.g2.rc b/rootdir/etc/init.g2.rc index 014c6787..329d664f 100644 --- a/rootdir/etc/init.g2.rc +++ b/rootdir/etc/init.g2.rc @@ -333,70 +333,6 @@ on boot # LMK chmod 0664 /sys/module/lowmemorykiller/parameters/adj chmod 0664 /sys/module/lowmemorykiller/parameters/minfree - write /sys/module/lowmemorykiller/parameters/adj "0,1,3,5,7,15" - write /sys/module/lowmemorykiller/parameters/minfree "19200,24000,28800,33600,38400,48000" - - # VM - write /proc/sys/vm/block_dump 0 - write /proc/sys/vm/dirty_background_ratio 5 - write /proc/sys/vm/dirty_expire_centisecs 500 - write /proc/sys/vm/dirty_ratio 10 - write /proc/sys/vm/dirty_writeback_centisecs 3000 - write /proc/sys/vm/min_free_kbytes 4608 - write /proc/sys/vm/min_free_order_shift 4 - write /proc/sys/vm/oom_dump_tasks 1 - write /proc/sys/vm/oom_kill_allocating_task 1 - write /proc/sys/vm/overcommit_memory 1 - write /proc/sys/vm/page-cluster 3 - write /proc/sys/vm/panic_on_oom 0 - write /proc/sys/vm/swappiness 70 - write /proc/sys/vm/vfs_cache_pressure 50 - - # Kernel - write /proc/sys/kernel/hung_task_timeout_secs 0 - write /proc/sys/kernel/panic 0 - write /proc/sys/kernel/panic_on_oops 0 - write /proc/sys/kernel/softlockup_panic 0 - - # Network - write /proc/sys/net/ipv4/tcp_moderate_rcvbuf 1 - write /proc/sys/net/ipv4/route/flush 1 - write /proc/sys/net/ipv4/tcp_rfc1337 1 - write /proc/sys/net/ipv4/ip_no_pmtu_disc 0 - write /proc/sys/net/ipv4/tcp_ecn 0 - write /proc/sys/net/ipv4/tcp_fack 1 - write /proc/sys/net/ipv4/tcp_synack_retries 2 - write /proc/sys/net/ipv4/tcp_syn_retries 2 - write /proc/sys/net/ipv4/tcp_no_metrics_save 1 - write /proc/sys/net/ipv4/ip_forward 0 - write /proc/sys/net/ipv4/tcp_sack 1 - write /proc/sys/net/ipv4/tcp_dsack 1 - write /proc/sys/net/ipv4/tcp_tw_recycle 1 - write /proc/sys/net/ipv4/tcp_window_scaling 1 - write /proc/sys/net/ipv4/conf/default/accept_source_route 0 - write /proc/sys/net/ipv4/conf/all/accept_source_route 0 - write /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts 1 - write /proc/sys/net/ipv4/icmp_echo_ignore_all 1 - write /proc/sys/net/ipv4/icmp_ignore_bogus_error_responses 1 - write /proc/sys/net/ipv4/tcp_syncookies 0 - write /proc/sys/net/ipv4/conf/all/accept_redirects 0 - write /proc/sys/net/ipv4/conf/default/accept_redirects 0 - write /proc/sys/net/ipv4/conf/all/secure_redirects 0 - write /proc/sys/net/ipv4/conf/default/secure_redirects 0 - write /proc/sys/net/ipv4/ip_dynaddr 0 - write /proc/sys/net/ipv4/tcp_tw_reuse 1 - write /proc/sys/net/ipv4/tcp_keepalive_probes 5 - write /proc/sys/net/ipv4/tcp_max_syn_backlog 4096 - write /proc/sys/net/ipv4/tcp_timestamps 0 - write /proc/sys/net/ipv4/tcp_keepalive_probes 5 - write /proc/sys/net/ipv4/tcp_keepalive_intvl 30 - write /proc/sys/net/ipv4/tcp_fin_timeout 30 - write /proc/sys/net/core/wmem_max 404480 - write /proc/sys/net/core/rmem_max 404480 - write /proc/sys/net/core/rmem_default 256960 - write /proc/sys/net/core/wmem_default 256960 - write /proc/sys/net/ipv4/tcp_wmem "4096,16384,404480" - write /proc/sys/net/ipv4/tcp_rmem "4096,16384,404480" # Services start here From 5d34a525633508159c348bdafbf5fc0c9d0356d3 Mon Sep 17 00:00:00 2001 From: Adam Farden Date: Sun, 8 Nov 2015 13:06:52 +0100 Subject: [PATCH 100/139] g2-common: Setup QC-QMI logmask Used by bin/qmuxd + lib/libqmi_client_qmux.so Change-Id: Idc308e2c22cf94389f12bf6d798fa85eab575c5b Signed-off-by: Adam Farden Signed-off-by: Zdrowy Gosciu --- system_prop.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/system_prop.mk b/system_prop.mk index 415842a6..fde6abb8 100644 --- a/system_prop.mk +++ b/system_prop.mk @@ -57,6 +57,9 @@ PRODUCT_PROPERTY_OVERRIDES += \ persist.radio.apm_sim_not_pwdn=1 \ ro.telephony.call_ring.multiple=0 +PRODUCT_PROPERTY_OVERRIDES += \ + persist.data.qmi.adb_logmask=0 \ + PRODUCT_PROPERTY_OVERRIDES += \ rild.libpath=/vendor/lib/libril-qc-qmi-1.so \ ro.telephony.ril_class=LgeLteRIL From bf094f0c33edd80d8732b0cdbf1485bf4238cf65 Mon Sep 17 00:00:00 2001 From: Adam Farden Date: Tue, 10 Nov 2015 16:02:57 +0100 Subject: [PATCH 101/139] g2-common: Use OSS TimeKeep service by Sony Works much better than QCOM proprietary blobs Signed-off-by: Adam Farden Signed-off-by: Zdrowy Gosciu --- BoardConfigCommon.mk | 9 +++++++-- g2.mk | 5 +++++ rootdir/etc/init.g2.rc | 4 +++- sepolicy/file_contexts | 1 + sepolicy/property.te | 1 + sepolicy/property_contexts | 1 + sepolicy/service.te | 1 + sepolicy/service_contexts | 1 + sepolicy/system_app.te | 1 + sepolicy/timekeep.te | 7 +++++++ 10 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 sepolicy/service.te create mode 100644 sepolicy/service_contexts create mode 100644 sepolicy/system_app.te create mode 100644 sepolicy/timekeep.te diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index 18ec0781..3e0b0b0d 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -94,7 +94,6 @@ TARGET_POWERHAL_VARIANT := g2 # Qualcomm support BOARD_USES_QCOM_HARDWARE := true -BOARD_USES_QC_TIME_SERVICES := true # Recovery COMMON_GLOBAL_CFLAGS += -DNO_SECURE_DISCARD @@ -118,7 +117,13 @@ BOARD_SEPOLICY_DIRS += \ device/lge/g2-common/sepolicy BOARD_SEPOLICY_UNION += \ - thermanager.te + property.te \ + property_contexts \ + service.te \ + service_contexts \ + system_app.te \ + thermanager.te \ + timekeep.te # Wi-Fi BOARD_WPA_SUPPLICANT_DRIVER := NL80211 diff --git a/g2.mk b/g2.mk index 7e7c3b46..2be8e39d 100644 --- a/g2.mk +++ b/g2.mk @@ -185,6 +185,11 @@ PRODUCT_COPY_FILES += \ PRODUCT_PACKAGES += \ thermanager +# Time Service +PRODUCT_PACKAGES += \ + timekeep \ + TimeKeep + PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/configs/thermanager.xml:system/etc/thermanager.xml diff --git a/rootdir/etc/init.g2.rc b/rootdir/etc/init.g2.rc index 329d664f..ad245235 100644 --- a/rootdir/etc/init.g2.rc +++ b/rootdir/etc/init.g2.rc @@ -441,10 +441,12 @@ service thermanager /system/bin/thermanager /system/etc/thermanager.xml user root group root -service time_daemon /system/bin/time_daemon +# OSS time solution +service timekeep /system/bin/timekeep restore class late_start user root group root + oneshot # WiFi service p2p_supplicant /system/bin/wpa_supplicant \ diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts index c3c7fd09..baf85c12 100644 --- a/sepolicy/file_contexts +++ b/sepolicy/file_contexts @@ -17,6 +17,7 @@ /data/system/default_values u:object_r:mpdecision_data:s0 /dev/btlock u:object_r:btlock_file:s0 /system/bin/thermanager u:object_r:thermanager_exec:s0 +/system/bin/timekeep u:object_r:timekeep_exec:s0 /dev/bcm2079x u:object_r:nfc_device:s0 /dev/socket/mpdecision(/.*)? u:object_r:mpctl_socket:s0 diff --git a/sepolicy/property.te b/sepolicy/property.te index 09676b80..efafeee7 100644 --- a/sepolicy/property.te +++ b/sepolicy/property.te @@ -1,2 +1,3 @@ type baseband_prop, property_type; type camera_prop, property_type; +type timekeep_prop, property_type; diff --git a/sepolicy/property_contexts b/sepolicy/property_contexts index 58e01f3e..323b3d47 100644 --- a/sepolicy/property_contexts +++ b/sepolicy/property_contexts @@ -3,3 +3,4 @@ camera. u:object_r:camera_prop:s0 persist.data.sensor_name u:object_r:camera_prop:s0 persist.data.rear.minfps u:object_r:camera_prop:s0 persist.data.front.minfps u:object_r:camera_prop:s0 +persist.sys.timeadjust u:object_r:timekeep_prop:s0 diff --git a/sepolicy/service.te b/sepolicy/service.te new file mode 100644 index 00000000..ba78a01b --- /dev/null +++ b/sepolicy/service.te @@ -0,0 +1 @@ +type timekeep_service, service_manager_type; diff --git a/sepolicy/service_contexts b/sepolicy/service_contexts new file mode 100644 index 00000000..24c2939d --- /dev/null +++ b/sepolicy/service_contexts @@ -0,0 +1 @@ +com.sony.timekeep u:object_r:timekeep_service:s0 diff --git a/sepolicy/system_app.te b/sepolicy/system_app.te new file mode 100644 index 00000000..c313b557 --- /dev/null +++ b/sepolicy/system_app.te @@ -0,0 +1 @@ +allow system_app timekeep_prop:property_service set; diff --git a/sepolicy/timekeep.te b/sepolicy/timekeep.te new file mode 100644 index 00000000..e139b8ef --- /dev/null +++ b/sepolicy/timekeep.te @@ -0,0 +1,7 @@ +type timekeep, domain; +type timekeep_exec, exec_type, file_type; + +# Started by init +init_daemon_domain(timekeep) + +allow timekeep self:capability { sys_time }; From 643c1d23c6ee2bcff675a7269f2552d92cb6c11c Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Thu, 12 Nov 2015 11:41:13 +0100 Subject: [PATCH 102/139] g2-common: init: Enable QCOM thermal engine & time daemon services But don't include it in /system/bin for compatibility with non Healthy ROM's.. --- rootdir/etc/init.g2.rc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/rootdir/etc/init.g2.rc b/rootdir/etc/init.g2.rc index ad245235..ea567709 100644 --- a/rootdir/etc/init.g2.rc +++ b/rootdir/etc/init.g2.rc @@ -435,6 +435,16 @@ service set_baseband /system/bin/sh /system/etc/set_baseband.sh user root oneshot +service thermal-engine /system/bin/thermal-engine + class main + user root + group root + +service time_daemon /system/bin/time_daemon + class late_start + user root + group root + # OSS thermal management service thermanager /system/bin/thermanager /system/etc/thermanager.xml class late_start From 26008c56aa6c91097c132b4bc35fe4e08db615ac Mon Sep 17 00:00:00 2001 From: Dan Pasanen Date: Sun, 15 Nov 2015 21:53:03 -0600 Subject: [PATCH 103/139] g2-common: SEPolicy: Allow thermanager to shutdown the device Change-Id: If5b6e376b77c72b5874acf5b3c0e4458f5b78054 Signed-off-by: Zdrowy Gosciu --- sepolicy/thermanager.te | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sepolicy/thermanager.te b/sepolicy/thermanager.te index e2a468e0..6fca2677 100644 --- a/sepolicy/thermanager.te +++ b/sepolicy/thermanager.te @@ -4,7 +4,7 @@ type thermanager_exec, exec_type, file_type; # Started by init init_daemon_domain(thermanager) -allow thermanager self:capability dac_override; +allow thermanager self:capability { dac_override sys_boot }; allow thermanager { sysfs sysfs_devices_system_cpu }:file write; allow thermanager { sysfs_thermal sysfs_usb_supply }:dir search; allow thermanager sysfs_thermal:{ lnk_file file } rw_file_perms; From 267768bde5ad4343a8c325e51eb52c59f03966e4 Mon Sep 17 00:00:00 2001 From: Ethan Chen Date: Sun, 15 Nov 2015 23:24:14 -0800 Subject: [PATCH 104/139] g2-common: init: Start set_baseband at boot complete Change-Id: I1d59bbb9630b8bf87b96df68128a78fb87d729a4 Signed-off-by: Zdrowy Gosciu --- rootdir/etc/init.g2.rc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rootdir/etc/init.g2.rc b/rootdir/etc/init.g2.rc index ea567709..657cb535 100644 --- a/rootdir/etc/init.g2.rc +++ b/rootdir/etc/init.g2.rc @@ -434,6 +434,10 @@ service set_baseband /system/bin/sh /system/etc/set_baseband.sh class late_start user root oneshot + disabled + +on property:sys.boot_completed=1 + start set_baseband service thermal-engine /system/bin/thermal-engine class main From 5a9c29e2f769c547bbde375c5553da68f8bcf4c9 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Tue, 24 Nov 2015 20:49:27 +0100 Subject: [PATCH 105/139] g2-common: init: power: Remove interactive GOV setup --- rootdir/etc/init.g2.power.rc | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/rootdir/etc/init.g2.power.rc b/rootdir/etc/init.g2.power.rc index 0d218cc9..ec343cae 100644 --- a/rootdir/etc/init.g2.power.rc +++ b/rootdir/etc/init.g2.power.rc @@ -215,23 +215,6 @@ on property:sys.perf.profile=1 write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor interactive write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor interactive write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor interactive - write /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay "20000 900000:60000 1500000:20000" - write /sys/devices/system/cpu/cpufreq/interactive/above_optimal_max_freq_delay 40000 - write /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load 95 - write /sys/devices/system/cpu/cpufreq/interactive/high_grid_load 65 - write /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq 1190400 - write /sys/devices/system/cpu/cpufreq/interactive/io_is_busy 0 - write /sys/devices/system/cpu/cpufreq/interactive/is_grid 1 - write /sys/devices/system/cpu/cpufreq/interactive/min_sample_time 40000 - write /sys/devices/system/cpu/cpufreq/interactive/max_freq_hysteresis 100000 - write /sys/devices/system/cpu/cpufreq/interactive/optimal_max_freq 1190400 - write /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor 0 - write /sys/devices/system/cpu/cpufreq/interactive/sync_freq 1190400 - write /sys/devices/system/cpu/cpufreq/interactive/target_loads "90 300000:45 800000:65 900000:70 1500000:90 1800000:99" - write /sys/devices/system/cpu/cpufreq/interactive/timer_rate 30000 - write /sys/devices/system/cpu/cpufreq/interactive/timer_slack 30000 - write /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_freq 960000 - write /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_load 75 write /sys/class/devfreq/qcom,cpubw.42/governor msm_cpufreq write /sys/class/devfreq/fdb00000.qcom,kgsl-3d0/governor msm-adreno-tz From 5a38c4f9dd56f7d18c4823714572eed11813d57b Mon Sep 17 00:00:00 2001 From: Hendrik Hagendorn Date: Sun, 29 Nov 2015 09:46:44 +0100 Subject: [PATCH 106/139] g2-common: thermanager: Disable brightness control Change-Id: I5e5630f845e63da4169feef37a67a2912f1f4956 Signed-off-by: Zdrowy Gosciu --- configs/thermanager.xml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/configs/thermanager.xml b/configs/thermanager.xml index 8396b964..7022d7f1 100644 --- a/configs/thermanager.xml +++ b/configs/thermanager.xml @@ -43,8 +43,6 @@ - /sys/class/leds/lcd-backlight/max_brightness - /sys/class/kgsl/kgsl-3d0/max_gpuclk /sys/class/power_supply/usb/current_max /sys/class/power_supply/battery/temp @@ -88,19 +86,6 @@ - - 255 - 209 - 171 - 141 - 115 - 95 - 78 - 64 - 52 - 43 - - 578000000 462400000 From 902c1f649ac87d29ba096ac28d398339b8c68f39 Mon Sep 17 00:00:00 2001 From: Steve Kondik Date: Thu, 26 Nov 2015 22:22:06 -0600 Subject: [PATCH 107/139] g2-common: Kill mm-parser * Qualcomm caused hell-on-earth with libavenhancements- an apparently well-intentioned effort to minimize the amount of change in f/av which has backfired. In order to use this library, an OEM must not change *anything* *anywhere* in f/av to maintain ABI exactness. And that ABI exactness is different per SoC branch and constantly in motion. Best of all, the base classes are monkey patched with a proprietary library which also is different per SoC branch and much exactly match the f/av code. And if you get the ABI right, then your customizations stop working because they've been hijacked by overloading. The whole message bus is hijacked, and you're wasting your time. * Now that FFMPEG can talk to all the hardware codecs, there is no reason to tolerate this. Our stack has more features, more codec support, and it's open source all the way. * I love Qualcomm's SoCs, but come on guys.. I expect every OEM will complain about this AV shit then proceed to gut it as I am doing. Change-Id: If2522754ef08b5a7d69dc49fa248685eeeefbf9a Signed-off-by: Zdrowy Gosciu Conflicts: proprietary-files.txt --- proprietary-files.txt | 5 ----- rootdir/etc/init.g2.power.rc | 5 ----- system_prop.mk | 3 +-- 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/proprietary-files.txt b/proprietary-files.txt index e3219250..01f6143e 100644 --- a/proprietary-files.txt +++ b/proprietary-files.txt @@ -172,7 +172,6 @@ vendor/lib/libCommandSvc.so vendor/lib/libconfigdb.so vendor/lib/libdiag.so vendor/lib/libdisp-aba.so -vendor/lib/libDivxDrm.so vendor/lib/libdrmdecrypt.so vendor/lib/libdrmdiag.so vendor/lib/libdrmfs.so @@ -180,7 +179,6 @@ vendor/lib/libdrmtime.so vendor/lib/libdsi_netctrl.so vendor/lib/libdsucsd.so vendor/lib/libdsutils.so -vendor/lib/libExtendedExtractor.so vendor/lib/libfastcvadsp_stub.so vendor/lib/libfastcvopt.so vendor/lib/libFileMux.so @@ -232,8 +230,6 @@ vendor/lib/libmmipstreamnetwork.so vendor/lib/libmmipstreamsourcehttp.so vendor/lib/libmmipstreamutils.so vendor/lib/libmmjpeg.so -vendor/lib/libmmosal.so -vendor/lib/libmmparser.so vendor/lib/libmmqjpeg_codec.so vendor/lib/libmsapm_jni.so vendor/lib/libnetmgr.so @@ -284,7 +280,6 @@ vendor/lib/libsensor_reg.so vendor/lib/libsensor_test.so vendor/lib/libsensor_thresh.so vendor/lib/libsensor_user_cal.so -vendor/lib/libSHIMDivxDrm.so vendor/lib/libsmemlog.so vendor/lib/libssd.so vendor/lib/libSSEPKCS11.so diff --git a/rootdir/etc/init.g2.power.rc b/rootdir/etc/init.g2.power.rc index ec343cae..e1d68be9 100644 --- a/rootdir/etc/init.g2.power.rc +++ b/rootdir/etc/init.g2.power.rc @@ -121,11 +121,6 @@ on enable-low-power # MP-Decision write /data/system/default_values "" - # MM-OSAL - write /data/mmosal_logmask.cfg 0 - chown root system /data/mmosal_logmask.cfg - chmod 664 /data/mmosal_logmask.cfg - write /sys/module/msm_thermal/core_control/enabled 0 write /sys/devices/system/cpu/cpu1/online 1 write /sys/devices/system/cpu/cpu2/online 1 diff --git a/system_prop.mk b/system_prop.mk index fde6abb8..751bfcee 100644 --- a/system_prop.mk +++ b/system_prop.mk @@ -40,8 +40,7 @@ PRODUCT_PROPERTY_OVERRIDES += \ PRODUCT_PROPERTY_OVERRIDES += \ media.aac_51_output_enabled=true \ - mm.enable.smoothstreaming=true \ - mm.enable.qcom_parser=3310129 + mm.enable.smoothstreaming=true # NFC PRODUCT_PROPERTY_OVERRIDES += \ From 67e1dabc7dfa24d6b17e26aa42510916582da9ea Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Sun, 29 Nov 2015 16:01:42 +0100 Subject: [PATCH 108/139] g2-common: configs: thermanager.xml: Fix backlight error --- configs/thermanager.xml | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/configs/thermanager.xml b/configs/thermanager.xml index 7022d7f1..a4eb2c1b 100644 --- a/configs/thermanager.xml +++ b/configs/thermanager.xml @@ -200,40 +200,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From deaab508745c247f2b2abe795f27aebd61908194 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Fri, 4 Dec 2015 16:01:35 +0100 Subject: [PATCH 109/139] g2-common: init: power: Move Power HAL permission to CM profile --- rootdir/etc/init.g2.power.rc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rootdir/etc/init.g2.power.rc b/rootdir/etc/init.g2.power.rc index e1d68be9..5e00d84d 100644 --- a/rootdir/etc/init.g2.power.rc +++ b/rootdir/etc/init.g2.power.rc @@ -10,10 +10,6 @@ on property:sys.boot_completed=1 setprop sys.perf.profile 1 - # Permission for Power HAL CM extension - chown root system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load - chmod 664 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load - # Tune entropy parameters write /proc/sys/kernel/random/read_wakeup_threshold 128 write /proc/sys/kernel/random/write_wakeup_threshold 256 @@ -211,6 +207,10 @@ on property:sys.perf.profile=1 write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor interactive write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor interactive + # Permission for Power HAL CM extension + chown root system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load + chmod 664 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load + write /sys/class/devfreq/qcom,cpubw.42/governor msm_cpufreq write /sys/class/devfreq/fdb00000.qcom,kgsl-3d0/governor msm-adreno-tz From 31bb59aa1a8b0ddfe7e2151808f61ed7e77d53ac Mon Sep 17 00:00:00 2001 From: Dan Pasanen Date: Wed, 2 Dec 2015 06:50:46 -0600 Subject: [PATCH 110/139] fstab: mount ext4 cache and data with journal_async_commit Change-Id: I4db54dd1dc14ba31d71f534cbfbe617af853b1a3 --- rootdir/etc/fstab.g2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rootdir/etc/fstab.g2 b/rootdir/etc/fstab.g2 index e43b9ac4..8a287d13 100644 --- a/rootdir/etc/fstab.g2 +++ b/rootdir/etc/fstab.g2 @@ -9,9 +9,9 @@ /dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults defaults /dev/block/platform/msm_sdcc.1/by-name/recovery /recovery emmc defaults defaults /dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait,check -/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 nosuid,nodev,barrier=1,noauto_da_alloc,errors=continue wait,check,encryptable=/dev/block/platform/msm_sdcc.1/by-name/encrypt +/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 nosuid,nodev,barrier=1,noauto_da_alloc,errors=continue,journal_async_commit wait,check,encryptable=/dev/block/platform/msm_sdcc.1/by-name/encrypt /dev/block/platform/msm_sdcc.1/by-name/userdata /data f2fs rw,discard,nosuid,nodev,noatime,nodiratime,inline_xattr wait,check,encryptable=/dev/block/platform/msm_sdcc.1/by-name/encrypt -/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 nosuid,nodev,barrier=1,noauto_da_alloc,errors=continue wait +/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 nosuid,nodev,barrier=1,noauto_da_alloc,errors=continue,journal_async_commit wait /dev/block/platform/msm_sdcc.1/by-name/cache /cache f2fs rw,discard,nosuid,nodev,noatime,nodiratime,inline_xattr wait,check /dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 nosuid,nodev,barrier=1,noauto_da_alloc,errors=continue wait /dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait From bd4cac9d662a35c88c6f2f2e76398d1b113cab4f Mon Sep 17 00:00:00 2001 From: Dan Pasanen Date: Wed, 25 Nov 2015 09:36:56 -0600 Subject: [PATCH 111/139] fstab: don't trim persist, sns, persist-lg or mpt Change-Id: I34f780ca78d1e86d81e6a8d0cbbc51ad5670da47 --- rootdir/etc/fstab.g2 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rootdir/etc/fstab.g2 b/rootdir/etc/fstab.g2 index 8a287d13..44bd4fd8 100644 --- a/rootdir/etc/fstab.g2 +++ b/rootdir/etc/fstab.g2 @@ -13,10 +13,10 @@ /dev/block/platform/msm_sdcc.1/by-name/userdata /data f2fs rw,discard,nosuid,nodev,noatime,nodiratime,inline_xattr wait,check,encryptable=/dev/block/platform/msm_sdcc.1/by-name/encrypt /dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 nosuid,nodev,barrier=1,noauto_da_alloc,errors=continue,journal_async_commit wait /dev/block/platform/msm_sdcc.1/by-name/cache /cache f2fs rw,discard,nosuid,nodev,noatime,nodiratime,inline_xattr wait,check -/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 nosuid,nodev,barrier=1,noauto_da_alloc,errors=continue wait +/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 nosuid,nodev,barrier=1,noauto_da_alloc,errors=continue,notrim wait /dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait -/dev/block/platform/msm_sdcc.1/by-name/sns /sns ext4 nosuid,nodev,barrier=1,noauto_da_alloc,errors=continue wait -/dev/block/platform/msm_sdcc.1/by-name/drm /persist-lg ext4 nosuid,nodev,barrier=1,noauto_da_alloc,errors=continue wait -/dev/block/platform/msm_sdcc.1/by-name/mpt /mpt ext4 nodev,nosuid,barrier=1,noauto_da_alloc,errors=continue wait +/dev/block/platform/msm_sdcc.1/by-name/sns /sns ext4 nosuid,nodev,barrier=1,noauto_da_alloc,errors=continue,notrim wait +/dev/block/platform/msm_sdcc.1/by-name/drm /persist-lg ext4 nosuid,nodev,barrier=1,noauto_da_alloc,errors=continue,notrim wait +/dev/block/platform/msm_sdcc.1/by-name/mpt /mpt ext4 nodev,nosuid,barrier=1,noauto_da_alloc,errors=continue,notrim wait /devices/platform/xhci-hcd auto auto defaults voldmanaged=usbdisk0:auto /dev/block/zram0 none swap defaults wait From 187d229eb6319f57238a712852697df94b3433b0 Mon Sep 17 00:00:00 2001 From: Dan Pasanen Date: Wed, 25 Nov 2015 19:09:44 -0600 Subject: [PATCH 112/139] fstab: notrim is an fs_mgr flag, move it there Change-Id: I263a41d193d24fca7c2dde0f036accfa8d73b41f --- rootdir/etc/fstab.g2 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rootdir/etc/fstab.g2 b/rootdir/etc/fstab.g2 index 44bd4fd8..2de00597 100644 --- a/rootdir/etc/fstab.g2 +++ b/rootdir/etc/fstab.g2 @@ -13,10 +13,10 @@ /dev/block/platform/msm_sdcc.1/by-name/userdata /data f2fs rw,discard,nosuid,nodev,noatime,nodiratime,inline_xattr wait,check,encryptable=/dev/block/platform/msm_sdcc.1/by-name/encrypt /dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 nosuid,nodev,barrier=1,noauto_da_alloc,errors=continue,journal_async_commit wait /dev/block/platform/msm_sdcc.1/by-name/cache /cache f2fs rw,discard,nosuid,nodev,noatime,nodiratime,inline_xattr wait,check -/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 nosuid,nodev,barrier=1,noauto_da_alloc,errors=continue,notrim wait +/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 nosuid,nodev,barrier=1,noauto_da_alloc,errors=continue wait,notrim /dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait -/dev/block/platform/msm_sdcc.1/by-name/sns /sns ext4 nosuid,nodev,barrier=1,noauto_da_alloc,errors=continue,notrim wait -/dev/block/platform/msm_sdcc.1/by-name/drm /persist-lg ext4 nosuid,nodev,barrier=1,noauto_da_alloc,errors=continue,notrim wait -/dev/block/platform/msm_sdcc.1/by-name/mpt /mpt ext4 nodev,nosuid,barrier=1,noauto_da_alloc,errors=continue,notrim wait +/dev/block/platform/msm_sdcc.1/by-name/sns /sns ext4 nosuid,nodev,barrier=1,noauto_da_alloc,errors=continue wait,notrim +/dev/block/platform/msm_sdcc.1/by-name/drm /persist-lg ext4 nosuid,nodev,barrier=1,noauto_da_alloc,errors=continue wait,notrim +/dev/block/platform/msm_sdcc.1/by-name/mpt /mpt ext4 nodev,nosuid,barrier=1,noauto_da_alloc,errors=continue wait,notrim /devices/platform/xhci-hcd auto auto defaults voldmanaged=usbdisk0:auto /dev/block/zram0 none swap defaults wait From f588967c1827ee1b9efa1544d6a0b27d9c25f1f1 Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Mon, 30 Nov 2015 08:25:28 -0200 Subject: [PATCH 113/139] g2-common: fstab: Support USB OTG storage, but not adoptable Bug: 19993667 Change-Id: I946779517b2b964f869e4d370ed286304fdef085 Signed-off-by: Zdrowy Gosciu Conflicts: rootdir/etc/fstab.g2 --- rootdir/etc/fstab.g2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rootdir/etc/fstab.g2 b/rootdir/etc/fstab.g2 index 2de00597..d529fdbe 100644 --- a/rootdir/etc/fstab.g2 +++ b/rootdir/etc/fstab.g2 @@ -18,5 +18,5 @@ /dev/block/platform/msm_sdcc.1/by-name/sns /sns ext4 nosuid,nodev,barrier=1,noauto_da_alloc,errors=continue wait,notrim /dev/block/platform/msm_sdcc.1/by-name/drm /persist-lg ext4 nosuid,nodev,barrier=1,noauto_da_alloc,errors=continue wait,notrim /dev/block/platform/msm_sdcc.1/by-name/mpt /mpt ext4 nodev,nosuid,barrier=1,noauto_da_alloc,errors=continue wait,notrim -/devices/platform/xhci-hcd auto auto defaults voldmanaged=usbdisk0:auto +/devices/platform/xhci-hcd/usb* auto auto defaults voldmanaged=usb:auto /dev/block/zram0 none swap defaults wait From 919eedc61e40e31d5a05c8e13a7db0e542b9abaa Mon Sep 17 00:00:00 2001 From: Rashed Abdel-Tawab Date: Tue, 20 Oct 2015 15:12:48 -0400 Subject: [PATCH 114/139] g2-common: Enable new sample rate representation Change-Id: Ifccb4d40ae5d98331d4357b608cb37ca6f9485a8 Signed-off-by: Zdrowy Gosciu --- BoardConfigCommon.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index 3e0b0b0d..48872a23 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -45,7 +45,8 @@ TARGET_KERNEL_SOURCE := kernel/lge/msm8974 # Audio AUDIO_FEATURE_LOW_LATENCY_PRIMARY := true -BOARD_USES_ALSA_AUDIO:= true +AUDIO_FEATURE_ENABLED_NEW_SAMPLE_RATE := true +BOARD_USES_ALSA_AUDIO := true # Bluetooth BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/lge/g2-common/bluetooth From e458d7c6febf40f460f5e072dd752642b8c7dbef Mon Sep 17 00:00:00 2001 From: Rashed Abdel-Tawab Date: Sun, 18 Oct 2015 01:08:23 -0400 Subject: [PATCH 115/139] g2-common: Cleanup audio policy * Add seperate deep-buffer entry * Fix compress_offload entry * Remove hdmi entry * Add multichannel entry * Fix primary output entry Change-Id: I63cfd4d1343dc5f88e86f942acb6863aff05b138 Signed-off-by: Zdrowy Gosciu Conflicts: configs/audio_policy.conf --- configs/audio_policy.conf | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/configs/audio_policy.conf b/configs/audio_policy.conf index 13db01b5..3adde77e 100644 --- a/configs/audio_policy.conf +++ b/configs/audio_policy.conf @@ -24,24 +24,31 @@ audio_hw_modules { primary { outputs { primary { - sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000|88200|96000|176400|192000 + sampling_rates 44100|48000 channel_masks AUDIO_CHANNEL_OUT_STEREO formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_EXTERNAL_WIFI|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET - flags AUDIO_OUTPUT_FLAG_PRIMARY|AUDIO_OUTPUT_FLAG_DEEP_BUFFER + devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY + flags AUDIO_OUTPUT_FLAG_PRIMARY } - hdmi { - sampling_rates 44100|48000 + deep_buffer { + sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000 + channel_masks AUDIO_CHANNEL_OUT_STEREO + formats AUDIO_FORMAT_PCM_16_BIT + devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY + flags AUDIO_OUTPUT_FLAG_DEEP_BUFFER + } + multichannel { + sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000|96000 channel_masks dynamic formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_OUT_AUX_DIGITAL - flags AUDIO_OUTPUT_FLAG_MULTI_CH + devices AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY + flags AUDIO_OUTPUT_FLAG_DIRECT } compress_offload { sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000|64000|88200|96000|176400|192000 - channel_masks dynamic - formats dynamic - devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_EXTERNAL_WIFI|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET + channel_masks AUDIO_CHANNEL_OUT_MONO|AUDIO_CHANNEL_OUT_STEREO|AUDIO_CHANNEL_OUT_2POINT1|AUDIO_CHANNEL_OUT_QUAD|AUDIO_CHANNEL_OUT_PENTA|AUDIO_CHANNEL_OUT_5POINT1|AUDIO_CHANNEL_OUT_6POINT1|AUDIO_CHANNEL_OUT_7POINT1 + formats AUDIO_FORMAT_MP3|AUDIO_FORMAT_AAC_LC|AUDIO_FORMAT_AAC_HE_V1|AUDIO_FORMAT_AAC_HE_V2|AUDIO_FORMAT_MP2|AUDIO_FORMAT_PCM_16_BIT_OFFLOAD|AUDIO_FORMAT_PCM_24_BIT_OFFLOAD + devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING } voip_rx { From 05c1b0df3958774cdd7cbcb5fb85f73084d2eb0f Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Fri, 11 Dec 2015 12:30:40 +0100 Subject: [PATCH 116/139] Revert "g2-common: fstab: Support USB OTG storage, but not adoptable" This reverts commit f588967c1827ee1b9efa1544d6a0b27d9c25f1f1. --- rootdir/etc/fstab.g2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rootdir/etc/fstab.g2 b/rootdir/etc/fstab.g2 index d529fdbe..2de00597 100644 --- a/rootdir/etc/fstab.g2 +++ b/rootdir/etc/fstab.g2 @@ -18,5 +18,5 @@ /dev/block/platform/msm_sdcc.1/by-name/sns /sns ext4 nosuid,nodev,barrier=1,noauto_da_alloc,errors=continue wait,notrim /dev/block/platform/msm_sdcc.1/by-name/drm /persist-lg ext4 nosuid,nodev,barrier=1,noauto_da_alloc,errors=continue wait,notrim /dev/block/platform/msm_sdcc.1/by-name/mpt /mpt ext4 nodev,nosuid,barrier=1,noauto_da_alloc,errors=continue wait,notrim -/devices/platform/xhci-hcd/usb* auto auto defaults voldmanaged=usb:auto +/devices/platform/xhci-hcd auto auto defaults voldmanaged=usbdisk0:auto /dev/block/zram0 none swap defaults wait From f3da86c6f5dbc3dcf6812f1315cd4878f82cd0fb Mon Sep 17 00:00:00 2001 From: Michael Bestas Date: Sun, 29 Nov 2015 21:42:20 -0600 Subject: [PATCH 117/139] g2-common: Cleanup com.android.future.usb.accessory package Included in system build.. Change-Id: I8e11ccf9eac045a690b834a016496cea20171473 Signed-off-by: Zdrowy Gosciu --- g2.mk | 4 ---- 1 file changed, 4 deletions(-) diff --git a/g2.mk b/g2.mk index 2be8e39d..43d0d145 100644 --- a/g2.mk +++ b/g2.mk @@ -198,10 +198,6 @@ PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/keylayout/gpio-keys.kl:system/usr/keylayout/gpio-keys.kl \ $(LOCAL_PATH)/keylayout/touch_dev.idc:system/usr/idc/touch_dev.idc -# USB -PRODUCT_PACKAGES += \ - com.android.future.usb.accessory - # Wifi PRODUCT_PACKAGES += \ libwpa_client \ From c471aa25634f5e97cea82e0ebd3db44bcd50d771 Mon Sep 17 00:00:00 2001 From: Manikanta Sivapala Date: Tue, 11 Aug 2015 18:12:08 +0530 Subject: [PATCH 118/139] g2-common: adding compilation of libextmedia_jni & libqcmediaplayer Change-Id: I009efec16ba128892c3fff218937a4f37d32ff55 --- g2.mk | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/g2.mk b/g2.mk index 43d0d145..8ac45e63 100644 --- a/g2.mk +++ b/g2.mk @@ -131,11 +131,12 @@ PRODUCT_COPY_FILES += \ PRODUCT_PACKAGES += \ lights.msm8974 -# Media +# OMX PRODUCT_PACKAGES += \ libc2dcolorconvert \ - libdivxdrmdecrypt \ libdashplayer \ + libdivxdrmdecrypt \ + libextmedia_jni \ libOmxAacEnc \ libOmxAmrEnc \ libOmxCore \ @@ -143,10 +144,13 @@ PRODUCT_PACKAGES += \ libOmxQcelp13Enc \ libOmxVdec \ libOmxVenc \ + libOmxVidcCommon \ + libqcmediaplayer \ libstagefrighthw \ qcmediaplayer -PRODUCT_BOOT_JARS += qcmediaplayer +PRODUCT_BOOT_JARS += \ + qcmediaplayer PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/configs/media_codecs.xml:system/etc/media_codecs.xml \ From 2052b56dd013a2280bf25143ee340f3396e206f9 Mon Sep 17 00:00:00 2001 From: Rashed Abdel-Tawab Date: Wed, 14 Oct 2015 12:46:33 -0400 Subject: [PATCH 119/139] g2-common: media_codecs: Checkout from CAF 6.0 tree Change-Id: I6d12139bd14d891db928c7229c03f85ac5e0c6dc --- configs/media_codecs.xml | 70 ++++++++++++++++++++++++---------------- 1 file changed, 42 insertions(+), 28 deletions(-) diff --git a/configs/media_codecs.xml b/configs/media_codecs.xml index 2b658710..4dd5b69e 100644 --- a/configs/media_codecs.xml +++ b/configs/media_codecs.xml @@ -50,16 +50,10 @@ + + + - - - - - - - - - @@ -70,6 +64,7 @@ + @@ -80,6 +75,7 @@ + @@ -90,6 +86,7 @@ + @@ -100,29 +97,11 @@ + - - - - - - - - - - - - - - - - - - - @@ -133,6 +112,19 @@ + + + + + + + + + + + + + @@ -143,6 +135,19 @@ + + + + + + + + + + + + + @@ -153,6 +158,7 @@ + @@ -163,6 +169,7 @@ + @@ -173,6 +180,7 @@ + @@ -183,6 +191,7 @@ + @@ -193,6 +202,7 @@ + @@ -203,6 +213,7 @@ + @@ -213,6 +224,7 @@ + @@ -223,6 +235,7 @@ + @@ -233,6 +246,7 @@ + From 7ce86ce9cb54ce38a1d121278c01d5b6b2c6ce36 Mon Sep 17 00:00:00 2001 From: Chong Zhang Date: Wed, 27 May 2015 17:03:30 -0700 Subject: [PATCH 120/139] g2-common: remove video editor from media_profiles.xml bug: 17112465 Change-Id: I2bebe92c10ca7e03ad3aa1e8e89028bb8ea40432 --- configs/media_profiles.xml | 45 -------------------------------------- 1 file changed, 45 deletions(-) diff --git a/configs/media_profiles.xml b/configs/media_profiles.xml index 0fe2b052..9e11a01b 100644 --- a/configs/media_profiles.xml +++ b/configs/media_profiles.xml @@ -74,16 +74,6 @@ - - - - - - - - - - @@ -459,41 +449,6 @@ - - - - - - - - - - From 726b89d86a0a091e002757217aa9bbe0a5fd8511 Mon Sep 17 00:00:00 2001 From: Ethan Chen Date: Sun, 29 Nov 2015 20:57:11 -0600 Subject: [PATCH 121/139] g2-common: Clean up media library listing * Remove libdivxdrmdecrypt (this is OSS) * Remove dashplayer * Remove libscale (unused) * Remove postproc (unused) * Remove QC HEVC decoder (fails to initialize) * Add missing libFileMux dependency (libwfdcommonutils is required) * Bring back SHIMDivxDrm (dependency of libdivxdrmdecrypt) * Bring back DivxDrm (dependency of SHIMDivxDrm) * Bring back mmosal (dependency of DivxDrm, Hevc, etc) Change-Id: I1964a34ef3bfff19157535067a42355ba0d3d14b Conflicts: proprietary-files.txt --- configs/media_codecs.xml | 22 ---------------------- g2.mk | 8 +------- 2 files changed, 1 insertion(+), 29 deletions(-) diff --git a/configs/media_codecs.xml b/configs/media_codecs.xml index 4dd5b69e..ce6e1c05 100644 --- a/configs/media_codecs.xml +++ b/configs/media_codecs.xml @@ -226,28 +226,6 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/g2.mk b/g2.mk index 8ac45e63..ed84e2ce 100644 --- a/g2.mk +++ b/g2.mk @@ -134,7 +134,6 @@ PRODUCT_PACKAGES += \ # OMX PRODUCT_PACKAGES += \ libc2dcolorconvert \ - libdashplayer \ libdivxdrmdecrypt \ libextmedia_jni \ libOmxAacEnc \ @@ -145,12 +144,7 @@ PRODUCT_PACKAGES += \ libOmxVdec \ libOmxVenc \ libOmxVidcCommon \ - libqcmediaplayer \ - libstagefrighthw \ - qcmediaplayer - -PRODUCT_BOOT_JARS += \ - qcmediaplayer + libstagefrighthw PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/configs/media_codecs.xml:system/etc/media_codecs.xml \ From 3be893ba64f3715835752f87e96f89ed4bec874c Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Sat, 12 Dec 2015 20:39:57 +0100 Subject: [PATCH 122/139] g2-common: Remove proprietary-files.txt --- proprietary-files.txt | 314 ------------------------------------------ 1 file changed, 314 deletions(-) delete mode 100644 proprietary-files.txt diff --git a/proprietary-files.txt b/proprietary-files.txt deleted file mode 100644 index 01f6143e..00000000 --- a/proprietary-files.txt +++ /dev/null @@ -1,314 +0,0 @@ --app/qcrilmsgtunnel/qcrilmsgtunnel.apk --app/TimeService/TimeService.apk -bin/bridgemgrd -bin/btnvtool -bin/gsiff_daemon -bin/hci_qcomm_init -bin/hvdcp -bin/irsc_util -bin/location-mq -bin/loc_launcher -bin/lowi-server -bin/mm-pp-daemon -bin/mm-qcamera-daemon -bin/mpdecision -bin/netmgrd -bin/qmuxd -bin/quipc_igsn -bin/quipc_main -bin/qseecomd -bin/radish -bin/rmt_storage -bin/sensors.qcom -bin/thermal-engine -bin/time_daemon -bin/xtwifi-client -bin/xtwifi-inet-agent -etc/acdbdata/Bluetooth_cal.acdb -etc/acdbdata/General_cal.acdb -etc/acdbdata/Global_cal.acdb -etc/acdbdata/Handset_cal.acdb -etc/acdbdata/Hdmi_cal.acdb -etc/acdbdata/Headset_cal.acdb -etc/acdbdata/Speaker_cal.acdb -etc/firmware/a330_pfp.fw -etc/firmware/a330_pm4.fw -etc/firmware/cpp_firmware_v1_1_1.fw -etc/firmware/cpp_firmware_v1_1_6.fw -etc/firmware/cpp_firmware_v1_2_0.fw -etc/firmware/cpp_firmware_v1_2_1.fw -etc/firmware/fw_bcmdhd_apsta.bin -etc/firmware/fw_bcmdhd.bin -etc/firmware/fw_bcmdhd_mfg.bin -etc/firmware/venus.b00 -etc/firmware/venus.b01 -etc/firmware/venus.b02 -etc/firmware/venus.b03 -etc/firmware/venus.b04 -etc/firmware/venus.mbn -etc/firmware/venus.mdt -etc/permissions/qcrilhook.xml -etc/permissions/qcnvitems.xml -etc/permissions/com.qualcomm.location.xml --framework/qcnvitems.jar --framework/qcrilhook.jar -lib/drm/libdrmwvmplugin.so -lib/hw/camera.vendor.msm8974.so -lib/hw/consumerir.msm8974.so -lib/libchromatix_imx135_liveshot.so -lib/libcir_driver.so -lib/libdivxdrm_jni.so -lib/libdivxdrmdecrypt.so -lib/libdrmframework.so -lib/libdrmframework_jni.so -lib/libHDR.so -lib/libloc_api_v02.so -lib/libloc_ds_api.so -lib/libmdmdetect.so -lib/libmmcamera_interface.so -lib/libmmjpeg_interface.so -lib/libmm-qcamera.so -lib/libmorphoimageconverter_4.so -lib/libmorpho_image_stab31.so -lib/libmorpho_memory_allocator.so -lib/libmorpho_noise_reduction.so -lib/libmorpho_panorama_gp.so -lib/libmorpho_panorama_wa_4.so -lib/libmorpho_panorama_wa_viewer.so -lib/libmorpho_sensor_fusion_4.so -lib/libmorpho_video_denoiser.so -lib/libOmxVdecHevc.so -lib/libqomx_core.so -lib/libril.so -lib/libuicc.so -lib/libVDObjectTrackerAPI.so -lib/libvss_bsp_qcci.so -lib/libvss_common_core.so -lib/libvss_common_idl.so -lib/libvss_common_iface.so -lib/libvss_dmi_qcci.so -lib/libvss_gnss_qcci.so -lib/libvss_ims_qcci.so -lib/libvss_nv_core.so -lib/libvss_nv_idl.so -lib/libvss_nv_iface.so -lib/libvss_resim_core.so -lib/libvss_resim_idl.so -lib/libvss_resim_iface.so -lib/libvss_sar_qcci.so --priv-app/com.qualcomm.location/com.qualcomm.location.apk -vendor/bin/slim_ap_daemon -vendor/firmware/BCM4335B0_002.001.006.0191.0201_ORC.hcd -vendor/lib/drm/libdrmwvmplugin.so -vendor/lib/egl/eglsubAndroid.so -vendor/lib/egl/libEGL_adreno.so -vendor/lib/egl/libGLESv1_CM_adreno.so -vendor/lib/egl/libGLESv2_adreno.so -vendor/lib/egl/libq3dtools_adreno.so -vendor/lib/hw/activity_recognition.msm8974.so -vendor/lib/hw/flp.default.so -vendor/lib/hw/sensors.msm8974.so -vendor/lib/libacdbloader.so -vendor/lib/libacdbmapper.so -vendor/lib/libacdbrtac.so -vendor/lib/libactuator_dw9714.so -vendor/lib/libactuator_dw9714_camcorder.so -vendor/lib/libactuator_dw9714_camera.so -vendor/lib/libactuator_dw9714_lgaf_1.so -vendor/lib/libactuator_dw9714_lgaf_1_camcorder.so -vendor/lib/libactuator_dw9714_lgaf_1_camera.so -vendor/lib/libactuator_dw9716.so -vendor/lib/libactuator_dw9716_camcorder.so -vendor/lib/libactuator_dw9716_camera.so -vendor/lib/libactuator_iu074.so -vendor/lib/libactuator_iu074_camcorder.so -vendor/lib/libactuator_iu074_camera.so -vendor/lib/libactuator_ov12830.so -vendor/lib/libactuator_ov12830_camcorder.so -vendor/lib/libactuator_ov12830_camera.so -vendor/lib/libactuator_ov8825.so -vendor/lib/libactuator_ov8825_camcorder.so -vendor/lib/libactuator_ov8825_camera.so -vendor/lib/libactuator_rohm_bu64243gwz.so -vendor/lib/libactuator_rohm_bu64243gwz_camcorder.so -vendor/lib/libactuator_rohm_bu64243gwz_camera.so -vendor/lib/libadiertac.so -vendor/lib/libadreno_utils.so -vendor/lib/libadsprpc.so -vendor/lib/libalarmservice_jni.so -vendor/lib/libasn1cper.so -vendor/lib/libasn1crt.so -vendor/lib/libasn1crtx.so -vendor/lib/libaudcal.so -vendor/lib/libaudioalsa.so -vendor/lib/libbccQTI.so -vendor/lib/libbtnv.so -vendor/lib/libC2D2.so -vendor/lib/libc2d30-a3xx.so -vendor/lib/libc2d30-a4xx.so -vendor/lib/libCB.so -vendor/lib/libchromaflash.so -vendor/lib/libchromatix_imx132_common.so -vendor/lib/libchromatix_imx132_default_video.so -vendor/lib/libchromatix_imx132_mms_video.so -vendor/lib/libchromatix_imx132_preview.so -vendor/lib/libchromatix_imx132_vt.so -vendor/lib/libchromatix_imx135_common.so -vendor/lib/libchromatix_imx135_default_video.so -vendor/lib/libchromatix_imx135_hfr_120.so -vendor/lib/libchromatix_imx135_hfr_60.so -vendor/lib/libchromatix_imx135_mms_video.so -vendor/lib/libchromatix_imx135_preview.so -vendor/lib/libchromatix_imx135_snapshot.so -vendor/lib/libchromatix_imx135_uhd_video.so -vendor/lib/libchromatix_imx135_video_dualrec.so -vendor/lib/libchromatix_imx135_video_hdr.so -vendor/lib/libchromatix_imx135_video_hd.so -vendor/lib/libchromatix_imx135_video_qtr.so -vendor/lib/libcneapiclient.so -vendor/lib/libcneconn.so -vendor/lib/libcneqmiutils.so -vendor/lib/libCommandSvc.so -vendor/lib/libconfigdb.so -vendor/lib/libdiag.so -vendor/lib/libdisp-aba.so -vendor/lib/libdrmdecrypt.so -vendor/lib/libdrmdiag.so -vendor/lib/libdrmfs.so -vendor/lib/libdrmtime.so -vendor/lib/libdsi_netctrl.so -vendor/lib/libdsucsd.so -vendor/lib/libdsutils.so -vendor/lib/libfastcvadsp_stub.so -vendor/lib/libfastcvopt.so -vendor/lib/libFileMux.so -vendor/lib/libgeofence.so -vendor/lib/libgsl.so -vendor/lib/libHevcSwDecoder.so -vendor/lib/libI420colorconvert.so -vendor/lib/libidl.so -vendor/lib/libizat_core.so -vendor/lib/libjpegdhw.so -vendor/lib/libjpegehw.so -vendor/lib/liblbs_core.so -vendor/lib/libllvm-qcom.so -vendor/lib/liblocationservice.so -vendor/lib/liblowi_client.so -vendor/lib/libmm-abl-oem.so -vendor/lib/libmm-abl.so -vendor/lib/libmmcamera2_c2d_module.so -vendor/lib/libmmcamera2_cpp_module.so -vendor/lib/libmmcamera2_frame_algorithm.so -vendor/lib/libmmcamera2_iface_modules.so -vendor/lib/libmmcamera2_imglib_modules.so -vendor/lib/libmmcamera2_isp_modules.so -vendor/lib/libmmcamera2_is.so -vendor/lib/libmmcamera2_pproc_modules.so -vendor/lib/libmmcamera2_sensor_modules.so -vendor/lib/libmmcamera2_stats_algorithm.so -vendor/lib/libmmcamera2_stats_modules.so -vendor/lib/libmmcamera2_vpe_module.so -vendor/lib/libmmcamera2_wnr_module.so -vendor/lib/libmmcamera_chromaflash_lib.so -vendor/lib/libmmcamera_faceproc.so -vendor/lib/libmmcamera_hdr_gb_lib.so -vendor/lib/libmmcamera_hdr_lib.so -vendor/lib/libmmcamera_imglib.so -vendor/lib/libmmcamera_imx132.so -vendor/lib/libmmcamera_imx135.so -vendor/lib/libmmcamera_sonyimx135_eeprom.so -vendor/lib/libmmcamera_tintless_algo.so -vendor/lib/libmmcamera_tintless_bg_pca_algo.so -vendor/lib/libmmcamera_tuning.so -vendor/lib/libmmcamera_ubifocus_lib.so -vendor/lib/libmmcamera_wavelet_lib.so -vendor/lib/libmm-color-convertor.so -vendor/lib/libmm-hdcpmgr.so -vendor/lib/libmmipl.so -vendor/lib/libmmipstreamaal.so -vendor/lib/libmmipstreamnetwork.so -vendor/lib/libmmipstreamsourcehttp.so -vendor/lib/libmmipstreamutils.so -vendor/lib/libmmjpeg.so -vendor/lib/libmmqjpeg_codec.so -vendor/lib/libmsapm_jni.so -vendor/lib/libnetmgr.so -vendor/lib/liboemcamera.so -vendor/lib/libOmxAacDec.so -vendor/lib/libOmxAmrwbplusDec.so -vendor/lib/libOmxEvrcDec.so -vendor/lib/libOmxMux.so -vendor/lib/libOmxQcelp13Dec.so -vendor/lib/libOmxWmaDec.so -vendor/lib/libOpenCL.so -vendor/lib/libperipheral_client.so -vendor/lib/libqcci_legacy.so -vendor/lib/libqdi.so -vendor/lib/libqdp.so -vendor/lib/libqmi_cci.so -vendor/lib/libqmi_client_helper.so -vendor/lib/libqmi_client_qmux.so -vendor/lib/libqmi_common_so.so -vendor/lib/libqmi_csi.so -vendor/lib/libqmi_csvt_srvc.so -vendor/lib/libqmi_encdec.so -vendor/lib/libqmiservices.so -vendor/lib/libqmi.so -vendor/lib/libqomx_jpegdec.so -vendor/lib/libqomx_jpegenc.so -vendor/lib/libQSEEComAPI.so -vendor/lib/libqti-perfd-client.so -vendor/lib/libquipc_os_api.so -vendor/lib/libquipc_ulp_adapter.so -vendor/lib/libril-qc-qmi-1.so -vendor/lib/libril-qcril-hook-oem.so -vendor/lib/librpmb.so -vendor/lib/librs_adreno_sha1.so -vendor/lib/librs_adreno.so -vendor/lib/libRSDriver_adreno.so -vendor/lib/libscale.so -vendor/lib/libscve.so -vendor/lib/libscve_stub.so -vendor/lib/libsc-a2xx.so -vendor/lib/libsc-a3xx.so -vendor/lib/libSecureUILib.so -vendor/lib/libsecureui.so -vendor/lib/libsecureui_svcsock.so -vendor/lib/libsecureuisvc_jni.so -vendor/lib/libsensor1.so -vendor/lib/libsensor_reg.so -vendor/lib/libsensor_test.so -vendor/lib/libsensor_thresh.so -vendor/lib/libsensor_user_cal.so -vendor/lib/libsmemlog.so -vendor/lib/libssd.so -vendor/lib/libSSEPKCS11.so -vendor/lib/libStDrvInt.so -vendor/lib/libstlport_sh_521.so -vendor/lib/libsystem_health_mon.so -vendor/lib/lib-sec-disp.so -vendor/lib/libthermalclient.so -vendor/lib/libthermalioctl.so --vendor/lib/libtime_genoff.so -vendor/lib/libTimeService.so -vendor/lib/libubifocus.so -vendor/lib/libulp2.so -vendor/lib/libvendorconn.so -vendor/lib/libwifiscanner.so -vendor/lib/libwvdrm_L1.so -vendor/lib/libwvm.so -vendor/lib/libWVphoneAPI.so -vendor/lib/libWVStreamControlAPI_L1.so -vendor/lib/libxml.so -vendor/lib/libxtadapter.so -vendor/lib/libxtwifi_ulp_adaptor.so -vendor/lib/libxtwifi_zpp_adaptor.so -vendor/lib/mediadrm/libwvdrmengine.so -vendor/lib/rfsa/adsp/libapps_mem_heap.so -vendor/lib/rfsa/adsp/libdspCV_skel.so -vendor/lib/rfsa/adsp/libfastcvadsp_skel.so -vendor/lib/rfsa/adsp/libfastcvadsp.so -vendor/lib/rfsa/adsp/libscveT2T_skel.so -vendor/lib/soundfx/libqcbassboost.so -vendor/lib/soundfx/libqcreverb.so -vendor/lib/soundfx/libqcvirt.so From 4fb7d967ee11f0ce9af2955183c09441ccf4a636 Mon Sep 17 00:00:00 2001 From: Dan Pasanen Date: Sun, 15 Nov 2015 00:57:35 -0600 Subject: [PATCH 123/139] g2-common: init: power: Enable adaptive lmk Change-Id: Ibbd5e636c301cb70b513d17f97ba27bc12a75c97 Signed-off-by: Zdrowy Gosciu Conflicts: rootdir/etc/init.g2.power.rc --- rootdir/etc/init.g2.power.rc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rootdir/etc/init.g2.power.rc b/rootdir/etc/init.g2.power.rc index 5e00d84d..59281b8b 100644 --- a/rootdir/etc/init.g2.power.rc +++ b/rootdir/etc/init.g2.power.rc @@ -8,6 +8,9 @@ on property:sys.boot_completed=1 write /sys/kernel/sched/arch_power 0 write /sys/kernel/sched/gentle_fair_sleepers 0 + write /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk 1 + write /sys/module/lowmemorykiller/parameters/vmpressure_file_min 53059 + setprop sys.perf.profile 1 # Tune entropy parameters From 05b5e0ac68a997c72f141682726594113ed6e0ad Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Sun, 13 Dec 2015 00:14:44 +0100 Subject: [PATCH 124/139] g2-common: init: power: Cleanup (sync for LP511M kernel) --- rootdir/etc/init.g2.power.rc | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/rootdir/etc/init.g2.power.rc b/rootdir/etc/init.g2.power.rc index 59281b8b..85d76b43 100644 --- a/rootdir/etc/init.g2.power.rc +++ b/rootdir/etc/init.g2.power.rc @@ -2,7 +2,6 @@ on property:sys.boot_completed=1 setprop sys.io.scheduler zen write /sys/block/mmcblk0/queue/scheduler zen write /sys/block/mmcblk0/bdi/read_ahead_kb 256 - write /sys/class/mmc_host/mmc0/clk_scaling/scale_down_in_low_wr_load 0 write /sys/module/cpu_boost/parameters/input_boost_ms 0 write /sys/kernel/sched/arch_power 0 @@ -17,17 +16,6 @@ on property:sys.boot_completed=1 write /proc/sys/kernel/random/read_wakeup_threshold 128 write /proc/sys/kernel/random/write_wakeup_threshold 256 - # Simple GPU - write /sys/module/simple_gpu_algorithm/parameters/simple_gpu_activate 1 - write /sys/module/simple_gpu_algorithm/parameters/simple_laziness 6 - write /sys/module/simple_gpu_algorithm/parameters/simple_ramp_threshold 4000 - write /sys/devices/fdb00000.qcom,kgsl-3d0/devfreq/fdb00000.qcom,kgsl-3d0/max_freq 320000000 - - # Intelli THERMAL - write /sys/module/msm_thermal/parameters/intelli_enabled N - write /sys/module/msm_thermal/parameters/limit_temp_degC 76 - write /sys/module/msm_thermal/parameters/core_limit_temp_degC 74 - # LMK write /sys/module/lowmemorykiller/parameters/adj "0,1,3,5,7,15" write /sys/module/lowmemorykiller/parameters/minfree "19200,24000,28800,33600,38400,48000" @@ -118,7 +106,7 @@ on enable-low-power write /sys/module/msm_pm/modes/cpu3/retention/idle_enabled 1 # MP-Decision - write /data/system/default_values "" + rm /data/system/default_values write /sys/module/msm_thermal/core_control/enabled 0 write /sys/devices/system/cpu/cpu1/online 1 From 63885e9d731304031d0446e1e494eb65db3765ca Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Sun, 13 Dec 2015 00:16:09 +0100 Subject: [PATCH 125/139] g2-common: init: power: Add MM OSAL logmask --- rootdir/etc/init.g2.power.rc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rootdir/etc/init.g2.power.rc b/rootdir/etc/init.g2.power.rc index 85d76b43..b8b7f4c2 100644 --- a/rootdir/etc/init.g2.power.rc +++ b/rootdir/etc/init.g2.power.rc @@ -108,6 +108,11 @@ on enable-low-power # MP-Decision rm /data/system/default_values + # MM-OSAL + write /data/mmosal_logmask.cfg 0 + chown root system /data/mmosal_logmask.cfg + chmod 664 /data/mmosal_logmask.cfg + write /sys/module/msm_thermal/core_control/enabled 0 write /sys/devices/system/cpu/cpu1/online 1 write /sys/devices/system/cpu/cpu2/online 1 From 83f169159968ddb7c7adf959ae26520da46ffbc6 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Sun, 13 Dec 2015 00:19:22 +0100 Subject: [PATCH 126/139] g2-common: init: power: Update read ahead to 512 kB --- rootdir/etc/init.g2.power.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rootdir/etc/init.g2.power.rc b/rootdir/etc/init.g2.power.rc index b8b7f4c2..539b2756 100644 --- a/rootdir/etc/init.g2.power.rc +++ b/rootdir/etc/init.g2.power.rc @@ -1,7 +1,7 @@ on property:sys.boot_completed=1 setprop sys.io.scheduler zen write /sys/block/mmcblk0/queue/scheduler zen - write /sys/block/mmcblk0/bdi/read_ahead_kb 256 + write /sys/block/mmcblk0/bdi/read_ahead_kb 512 write /sys/module/cpu_boost/parameters/input_boost_ms 0 write /sys/kernel/sched/arch_power 0 From d92610f7b2089a7a005141409a33aeb26fee4390 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Sun, 13 Dec 2015 00:48:33 +0100 Subject: [PATCH 127/139] g2-common: init: Enable DT2W at startup --- rootdir/etc/init.g2.rc | 1 + 1 file changed, 1 insertion(+) diff --git a/rootdir/etc/init.g2.rc b/rootdir/etc/init.g2.rc index 657cb535..de8d875b 100644 --- a/rootdir/etc/init.g2.rc +++ b/rootdir/etc/init.g2.rc @@ -329,6 +329,7 @@ on boot # Tap to wake chown system radio /sys/devices/virtual/input/lge_touch/touch_gesture chmod 0664 /sys/devices/virtual/input/lge_touch/touch_gesture + write /sys/devices/virtual/input/lge_touch/touch_gesture 1 # LMK chmod 0664 /sys/module/lowmemorykiller/parameters/adj From 7bcb62bb4ecc206aed649e79894ff304fab1f71d Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Sun, 13 Dec 2015 10:09:19 +0100 Subject: [PATCH 128/139] g2-common: Build OTAUpdates + Camera apps Moved from CM vendor.. Snap https://github.com/HealthyHoney/camera/tree/lp511 Snapdragon Camera https://github.com/ZdrowyGosciu/SnapdragonCamera/tree/lp511 OTAUpdates https://github.com/HealthyHoney/temasek_OTA/tree/temasek-cm-12.1 --- g2.mk | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/g2.mk b/g2.mk index ed84e2ce..08247bf5 100644 --- a/g2.mk +++ b/g2.mk @@ -209,5 +209,19 @@ PRODUCT_COPY_FILES += \ $(call inherit-product-if-exists, hardware/broadcom/wlan/bcmdhd/config/config-bcm.mk) +# Kryten2k35 OTAUpdates +PRODUCT_PACKAGES += \ + OTAUpdates + +PRODUCT_PROPERTY_OVERRIDES += \ + ro.ota.romname=temasek-D802 \ + ro.ota.version=$(shell date -u +%y%m%d%H%M) \ + ro.ota.manifest=http://temasek.wysocki.mobi/ota/d802_rom.xml + +# Camera +PRODUCT_PACKAGES += \ + Snap \ + SnapdragonCamera + # System properties -include $(LOCAL_PATH)/custom_prop.mk From 46b5ebb897f9a5a45b4c96d80ed4182094ceeaa3 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Sun, 13 Dec 2015 10:34:31 +0100 Subject: [PATCH 129/139] g2-common: Revert last media libs commits This reverts commits : 63885e9d731304031d0446e1e494eb65db3765ca 3be893ba64f3715835752f87e96f89ed4bec874c 726b89d86a0a091e002757217aa9bbe0a5fd8511 7ce86ce9cb54ce38a1d121278c01d5b6b2c6ce36 2052b56dd013a2280bf25143ee340f3396e206f9 c471aa25634f5e97cea82e0ebd3db44bcd50d771 --- configs/media_codecs.xml | 88 +++++----- configs/media_profiles.xml | 45 +++++ g2.mk | 10 +- proprietary-files.txt | 314 +++++++++++++++++++++++++++++++++++ rootdir/etc/init.g2.power.rc | 5 - 5 files changed, 413 insertions(+), 49 deletions(-) create mode 100644 proprietary-files.txt diff --git a/configs/media_codecs.xml b/configs/media_codecs.xml index ce6e1c05..2b658710 100644 --- a/configs/media_codecs.xml +++ b/configs/media_codecs.xml @@ -50,10 +50,16 @@ - - - + + + + + + + + + @@ -64,7 +70,6 @@ - @@ -75,7 +80,6 @@ - @@ -86,7 +90,6 @@ - @@ -97,11 +100,29 @@ - + + + + + + + + + + + + + + + + + + + @@ -112,19 +133,6 @@ - - - - - - - - - - - - - @@ -135,19 +143,6 @@ - - - - - - - - - - - - - @@ -158,7 +153,6 @@ - @@ -169,7 +163,6 @@ - @@ -180,7 +173,6 @@ - @@ -191,7 +183,6 @@ - @@ -202,7 +193,6 @@ - @@ -213,7 +203,6 @@ - @@ -224,7 +213,26 @@ - + + + + + + + + + + + + + + + + + + + + diff --git a/configs/media_profiles.xml b/configs/media_profiles.xml index 9e11a01b..0fe2b052 100644 --- a/configs/media_profiles.xml +++ b/configs/media_profiles.xml @@ -74,6 +74,16 @@ + + + + + + + + + + @@ -449,6 +459,41 @@ + + + + + + + + + + diff --git a/g2.mk b/g2.mk index 08247bf5..b07d7737 100644 --- a/g2.mk +++ b/g2.mk @@ -131,11 +131,11 @@ PRODUCT_COPY_FILES += \ PRODUCT_PACKAGES += \ lights.msm8974 -# OMX +# Media PRODUCT_PACKAGES += \ libc2dcolorconvert \ libdivxdrmdecrypt \ - libextmedia_jni \ + libdashplayer \ libOmxAacEnc \ libOmxAmrEnc \ libOmxCore \ @@ -143,8 +143,10 @@ PRODUCT_PACKAGES += \ libOmxQcelp13Enc \ libOmxVdec \ libOmxVenc \ - libOmxVidcCommon \ - libstagefrighthw + libstagefrighthw \ + qcmediaplayer + +PRODUCT_BOOT_JARS += qcmediaplayer PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/configs/media_codecs.xml:system/etc/media_codecs.xml \ diff --git a/proprietary-files.txt b/proprietary-files.txt new file mode 100644 index 00000000..01f6143e --- /dev/null +++ b/proprietary-files.txt @@ -0,0 +1,314 @@ +-app/qcrilmsgtunnel/qcrilmsgtunnel.apk +-app/TimeService/TimeService.apk +bin/bridgemgrd +bin/btnvtool +bin/gsiff_daemon +bin/hci_qcomm_init +bin/hvdcp +bin/irsc_util +bin/location-mq +bin/loc_launcher +bin/lowi-server +bin/mm-pp-daemon +bin/mm-qcamera-daemon +bin/mpdecision +bin/netmgrd +bin/qmuxd +bin/quipc_igsn +bin/quipc_main +bin/qseecomd +bin/radish +bin/rmt_storage +bin/sensors.qcom +bin/thermal-engine +bin/time_daemon +bin/xtwifi-client +bin/xtwifi-inet-agent +etc/acdbdata/Bluetooth_cal.acdb +etc/acdbdata/General_cal.acdb +etc/acdbdata/Global_cal.acdb +etc/acdbdata/Handset_cal.acdb +etc/acdbdata/Hdmi_cal.acdb +etc/acdbdata/Headset_cal.acdb +etc/acdbdata/Speaker_cal.acdb +etc/firmware/a330_pfp.fw +etc/firmware/a330_pm4.fw +etc/firmware/cpp_firmware_v1_1_1.fw +etc/firmware/cpp_firmware_v1_1_6.fw +etc/firmware/cpp_firmware_v1_2_0.fw +etc/firmware/cpp_firmware_v1_2_1.fw +etc/firmware/fw_bcmdhd_apsta.bin +etc/firmware/fw_bcmdhd.bin +etc/firmware/fw_bcmdhd_mfg.bin +etc/firmware/venus.b00 +etc/firmware/venus.b01 +etc/firmware/venus.b02 +etc/firmware/venus.b03 +etc/firmware/venus.b04 +etc/firmware/venus.mbn +etc/firmware/venus.mdt +etc/permissions/qcrilhook.xml +etc/permissions/qcnvitems.xml +etc/permissions/com.qualcomm.location.xml +-framework/qcnvitems.jar +-framework/qcrilhook.jar +lib/drm/libdrmwvmplugin.so +lib/hw/camera.vendor.msm8974.so +lib/hw/consumerir.msm8974.so +lib/libchromatix_imx135_liveshot.so +lib/libcir_driver.so +lib/libdivxdrm_jni.so +lib/libdivxdrmdecrypt.so +lib/libdrmframework.so +lib/libdrmframework_jni.so +lib/libHDR.so +lib/libloc_api_v02.so +lib/libloc_ds_api.so +lib/libmdmdetect.so +lib/libmmcamera_interface.so +lib/libmmjpeg_interface.so +lib/libmm-qcamera.so +lib/libmorphoimageconverter_4.so +lib/libmorpho_image_stab31.so +lib/libmorpho_memory_allocator.so +lib/libmorpho_noise_reduction.so +lib/libmorpho_panorama_gp.so +lib/libmorpho_panorama_wa_4.so +lib/libmorpho_panorama_wa_viewer.so +lib/libmorpho_sensor_fusion_4.so +lib/libmorpho_video_denoiser.so +lib/libOmxVdecHevc.so +lib/libqomx_core.so +lib/libril.so +lib/libuicc.so +lib/libVDObjectTrackerAPI.so +lib/libvss_bsp_qcci.so +lib/libvss_common_core.so +lib/libvss_common_idl.so +lib/libvss_common_iface.so +lib/libvss_dmi_qcci.so +lib/libvss_gnss_qcci.so +lib/libvss_ims_qcci.so +lib/libvss_nv_core.so +lib/libvss_nv_idl.so +lib/libvss_nv_iface.so +lib/libvss_resim_core.so +lib/libvss_resim_idl.so +lib/libvss_resim_iface.so +lib/libvss_sar_qcci.so +-priv-app/com.qualcomm.location/com.qualcomm.location.apk +vendor/bin/slim_ap_daemon +vendor/firmware/BCM4335B0_002.001.006.0191.0201_ORC.hcd +vendor/lib/drm/libdrmwvmplugin.so +vendor/lib/egl/eglsubAndroid.so +vendor/lib/egl/libEGL_adreno.so +vendor/lib/egl/libGLESv1_CM_adreno.so +vendor/lib/egl/libGLESv2_adreno.so +vendor/lib/egl/libq3dtools_adreno.so +vendor/lib/hw/activity_recognition.msm8974.so +vendor/lib/hw/flp.default.so +vendor/lib/hw/sensors.msm8974.so +vendor/lib/libacdbloader.so +vendor/lib/libacdbmapper.so +vendor/lib/libacdbrtac.so +vendor/lib/libactuator_dw9714.so +vendor/lib/libactuator_dw9714_camcorder.so +vendor/lib/libactuator_dw9714_camera.so +vendor/lib/libactuator_dw9714_lgaf_1.so +vendor/lib/libactuator_dw9714_lgaf_1_camcorder.so +vendor/lib/libactuator_dw9714_lgaf_1_camera.so +vendor/lib/libactuator_dw9716.so +vendor/lib/libactuator_dw9716_camcorder.so +vendor/lib/libactuator_dw9716_camera.so +vendor/lib/libactuator_iu074.so +vendor/lib/libactuator_iu074_camcorder.so +vendor/lib/libactuator_iu074_camera.so +vendor/lib/libactuator_ov12830.so +vendor/lib/libactuator_ov12830_camcorder.so +vendor/lib/libactuator_ov12830_camera.so +vendor/lib/libactuator_ov8825.so +vendor/lib/libactuator_ov8825_camcorder.so +vendor/lib/libactuator_ov8825_camera.so +vendor/lib/libactuator_rohm_bu64243gwz.so +vendor/lib/libactuator_rohm_bu64243gwz_camcorder.so +vendor/lib/libactuator_rohm_bu64243gwz_camera.so +vendor/lib/libadiertac.so +vendor/lib/libadreno_utils.so +vendor/lib/libadsprpc.so +vendor/lib/libalarmservice_jni.so +vendor/lib/libasn1cper.so +vendor/lib/libasn1crt.so +vendor/lib/libasn1crtx.so +vendor/lib/libaudcal.so +vendor/lib/libaudioalsa.so +vendor/lib/libbccQTI.so +vendor/lib/libbtnv.so +vendor/lib/libC2D2.so +vendor/lib/libc2d30-a3xx.so +vendor/lib/libc2d30-a4xx.so +vendor/lib/libCB.so +vendor/lib/libchromaflash.so +vendor/lib/libchromatix_imx132_common.so +vendor/lib/libchromatix_imx132_default_video.so +vendor/lib/libchromatix_imx132_mms_video.so +vendor/lib/libchromatix_imx132_preview.so +vendor/lib/libchromatix_imx132_vt.so +vendor/lib/libchromatix_imx135_common.so +vendor/lib/libchromatix_imx135_default_video.so +vendor/lib/libchromatix_imx135_hfr_120.so +vendor/lib/libchromatix_imx135_hfr_60.so +vendor/lib/libchromatix_imx135_mms_video.so +vendor/lib/libchromatix_imx135_preview.so +vendor/lib/libchromatix_imx135_snapshot.so +vendor/lib/libchromatix_imx135_uhd_video.so +vendor/lib/libchromatix_imx135_video_dualrec.so +vendor/lib/libchromatix_imx135_video_hdr.so +vendor/lib/libchromatix_imx135_video_hd.so +vendor/lib/libchromatix_imx135_video_qtr.so +vendor/lib/libcneapiclient.so +vendor/lib/libcneconn.so +vendor/lib/libcneqmiutils.so +vendor/lib/libCommandSvc.so +vendor/lib/libconfigdb.so +vendor/lib/libdiag.so +vendor/lib/libdisp-aba.so +vendor/lib/libdrmdecrypt.so +vendor/lib/libdrmdiag.so +vendor/lib/libdrmfs.so +vendor/lib/libdrmtime.so +vendor/lib/libdsi_netctrl.so +vendor/lib/libdsucsd.so +vendor/lib/libdsutils.so +vendor/lib/libfastcvadsp_stub.so +vendor/lib/libfastcvopt.so +vendor/lib/libFileMux.so +vendor/lib/libgeofence.so +vendor/lib/libgsl.so +vendor/lib/libHevcSwDecoder.so +vendor/lib/libI420colorconvert.so +vendor/lib/libidl.so +vendor/lib/libizat_core.so +vendor/lib/libjpegdhw.so +vendor/lib/libjpegehw.so +vendor/lib/liblbs_core.so +vendor/lib/libllvm-qcom.so +vendor/lib/liblocationservice.so +vendor/lib/liblowi_client.so +vendor/lib/libmm-abl-oem.so +vendor/lib/libmm-abl.so +vendor/lib/libmmcamera2_c2d_module.so +vendor/lib/libmmcamera2_cpp_module.so +vendor/lib/libmmcamera2_frame_algorithm.so +vendor/lib/libmmcamera2_iface_modules.so +vendor/lib/libmmcamera2_imglib_modules.so +vendor/lib/libmmcamera2_isp_modules.so +vendor/lib/libmmcamera2_is.so +vendor/lib/libmmcamera2_pproc_modules.so +vendor/lib/libmmcamera2_sensor_modules.so +vendor/lib/libmmcamera2_stats_algorithm.so +vendor/lib/libmmcamera2_stats_modules.so +vendor/lib/libmmcamera2_vpe_module.so +vendor/lib/libmmcamera2_wnr_module.so +vendor/lib/libmmcamera_chromaflash_lib.so +vendor/lib/libmmcamera_faceproc.so +vendor/lib/libmmcamera_hdr_gb_lib.so +vendor/lib/libmmcamera_hdr_lib.so +vendor/lib/libmmcamera_imglib.so +vendor/lib/libmmcamera_imx132.so +vendor/lib/libmmcamera_imx135.so +vendor/lib/libmmcamera_sonyimx135_eeprom.so +vendor/lib/libmmcamera_tintless_algo.so +vendor/lib/libmmcamera_tintless_bg_pca_algo.so +vendor/lib/libmmcamera_tuning.so +vendor/lib/libmmcamera_ubifocus_lib.so +vendor/lib/libmmcamera_wavelet_lib.so +vendor/lib/libmm-color-convertor.so +vendor/lib/libmm-hdcpmgr.so +vendor/lib/libmmipl.so +vendor/lib/libmmipstreamaal.so +vendor/lib/libmmipstreamnetwork.so +vendor/lib/libmmipstreamsourcehttp.so +vendor/lib/libmmipstreamutils.so +vendor/lib/libmmjpeg.so +vendor/lib/libmmqjpeg_codec.so +vendor/lib/libmsapm_jni.so +vendor/lib/libnetmgr.so +vendor/lib/liboemcamera.so +vendor/lib/libOmxAacDec.so +vendor/lib/libOmxAmrwbplusDec.so +vendor/lib/libOmxEvrcDec.so +vendor/lib/libOmxMux.so +vendor/lib/libOmxQcelp13Dec.so +vendor/lib/libOmxWmaDec.so +vendor/lib/libOpenCL.so +vendor/lib/libperipheral_client.so +vendor/lib/libqcci_legacy.so +vendor/lib/libqdi.so +vendor/lib/libqdp.so +vendor/lib/libqmi_cci.so +vendor/lib/libqmi_client_helper.so +vendor/lib/libqmi_client_qmux.so +vendor/lib/libqmi_common_so.so +vendor/lib/libqmi_csi.so +vendor/lib/libqmi_csvt_srvc.so +vendor/lib/libqmi_encdec.so +vendor/lib/libqmiservices.so +vendor/lib/libqmi.so +vendor/lib/libqomx_jpegdec.so +vendor/lib/libqomx_jpegenc.so +vendor/lib/libQSEEComAPI.so +vendor/lib/libqti-perfd-client.so +vendor/lib/libquipc_os_api.so +vendor/lib/libquipc_ulp_adapter.so +vendor/lib/libril-qc-qmi-1.so +vendor/lib/libril-qcril-hook-oem.so +vendor/lib/librpmb.so +vendor/lib/librs_adreno_sha1.so +vendor/lib/librs_adreno.so +vendor/lib/libRSDriver_adreno.so +vendor/lib/libscale.so +vendor/lib/libscve.so +vendor/lib/libscve_stub.so +vendor/lib/libsc-a2xx.so +vendor/lib/libsc-a3xx.so +vendor/lib/libSecureUILib.so +vendor/lib/libsecureui.so +vendor/lib/libsecureui_svcsock.so +vendor/lib/libsecureuisvc_jni.so +vendor/lib/libsensor1.so +vendor/lib/libsensor_reg.so +vendor/lib/libsensor_test.so +vendor/lib/libsensor_thresh.so +vendor/lib/libsensor_user_cal.so +vendor/lib/libsmemlog.so +vendor/lib/libssd.so +vendor/lib/libSSEPKCS11.so +vendor/lib/libStDrvInt.so +vendor/lib/libstlport_sh_521.so +vendor/lib/libsystem_health_mon.so +vendor/lib/lib-sec-disp.so +vendor/lib/libthermalclient.so +vendor/lib/libthermalioctl.so +-vendor/lib/libtime_genoff.so +vendor/lib/libTimeService.so +vendor/lib/libubifocus.so +vendor/lib/libulp2.so +vendor/lib/libvendorconn.so +vendor/lib/libwifiscanner.so +vendor/lib/libwvdrm_L1.so +vendor/lib/libwvm.so +vendor/lib/libWVphoneAPI.so +vendor/lib/libWVStreamControlAPI_L1.so +vendor/lib/libxml.so +vendor/lib/libxtadapter.so +vendor/lib/libxtwifi_ulp_adaptor.so +vendor/lib/libxtwifi_zpp_adaptor.so +vendor/lib/mediadrm/libwvdrmengine.so +vendor/lib/rfsa/adsp/libapps_mem_heap.so +vendor/lib/rfsa/adsp/libdspCV_skel.so +vendor/lib/rfsa/adsp/libfastcvadsp_skel.so +vendor/lib/rfsa/adsp/libfastcvadsp.so +vendor/lib/rfsa/adsp/libscveT2T_skel.so +vendor/lib/soundfx/libqcbassboost.so +vendor/lib/soundfx/libqcreverb.so +vendor/lib/soundfx/libqcvirt.so diff --git a/rootdir/etc/init.g2.power.rc b/rootdir/etc/init.g2.power.rc index 539b2756..db49e300 100644 --- a/rootdir/etc/init.g2.power.rc +++ b/rootdir/etc/init.g2.power.rc @@ -108,11 +108,6 @@ on enable-low-power # MP-Decision rm /data/system/default_values - # MM-OSAL - write /data/mmosal_logmask.cfg 0 - chown root system /data/mmosal_logmask.cfg - chmod 664 /data/mmosal_logmask.cfg - write /sys/module/msm_thermal/core_control/enabled 0 write /sys/devices/system/cpu/cpu1/online 1 write /sys/devices/system/cpu/cpu2/online 1 From 03231e016201173ad5e6fb7e503d3c3acbe1b852 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Mon, 14 Dec 2015 15:19:00 +0100 Subject: [PATCH 130/139] g2-common: Use Intelliplug as default hotplug --- rootdir/etc/init.g2.power.rc | 14 ++++++++++++-- rootdir/etc/init.g2.rc | 2 +- system_prop.mk | 4 ---- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/rootdir/etc/init.g2.power.rc b/rootdir/etc/init.g2.power.rc index db49e300..bb2e66e0 100644 --- a/rootdir/etc/init.g2.power.rc +++ b/rootdir/etc/init.g2.power.rc @@ -166,6 +166,8 @@ on property:init.svc.recovery=running # CM Powersave Profile on property:sys.perf.profile=0 stop mpdecision + write /sys/module/intelli_plug/parameters/intelli_plug_active 0 + write /sys/module/msm_thermal/core_control/enabled 0 write /sys/devices/system/cpu/cpu1/online 1 write /sys/devices/system/cpu/cpu2/online 1 @@ -183,11 +185,15 @@ on property:sys.perf.profile=0 write /sys/devices/system/cpu/cpu2/online 0 write /sys/devices/system/cpu/cpu3/online 0 write /sys/module/msm_thermal/core_control/enabled 1 - start mpdecision + + write /sys/module/intelli_plug/parameters/nr_run_profile_sel 2 + write /sys/module/intelli_plug/parameters/intelli_plug_active 1 # CM Balanced Profile on property:sys.perf.profile=1 stop mpdecision + write /sys/module/intelli_plug/parameters/intelli_plug_active 0 + write /sys/module/msm_thermal/core_control/enabled 0 write /sys/devices/system/cpu/cpu1/online 1 write /sys/devices/system/cpu/cpu2/online 1 @@ -209,11 +215,15 @@ on property:sys.perf.profile=1 write /sys/devices/system/cpu/cpu2/online 0 write /sys/devices/system/cpu/cpu3/online 0 write /sys/module/msm_thermal/core_control/enabled 1 - start mpdecision + + write /sys/module/intelli_plug/parameters/nr_run_profile_sel 2 + write /sys/module/intelli_plug/parameters/intelli_plug_active 1 # CM Performance Profile on property:sys.perf.profile=2 stop mpdecision + write /sys/module/intelli_plug/parameters/intelli_plug_active 0 + write /sys/module/msm_thermal/core_control/enabled 0 write /sys/devices/system/cpu/cpu1/online 1 write /sys/devices/system/cpu/cpu2/online 1 diff --git a/rootdir/etc/init.g2.rc b/rootdir/etc/init.g2.rc index de8d875b..bb3b52da 100644 --- a/rootdir/etc/init.g2.rc +++ b/rootdir/etc/init.g2.rc @@ -375,7 +375,7 @@ service loc_launcher /system/bin/loc_launcher class late_start group gps inet net_raw qcom_diag net_admin wifi -service mpdecision /system/bin/mpdecision --avg_comp +service mpdecision /system/bin/mpdecision --no_sleep --avg_comp class late_start user root group root system diff --git a/system_prop.mk b/system_prop.mk index 751bfcee..048e4572 100644 --- a/system_prop.mk +++ b/system_prop.mk @@ -47,10 +47,6 @@ PRODUCT_PROPERTY_OVERRIDES += \ nfc.app_log_level=2 \ nfc.enable_protocol_log=0 -# Perf -PRODUCT_PROPERTY_OVERRIDES += \ - ro.vendor.extension_library=/vendor/lib/libqti-perfd-client.so - # Radio PRODUCT_PROPERTY_OVERRIDES += \ persist.radio.apm_sim_not_pwdn=1 \ From 97bcf688f58d3d5b593c3dd7c64731c0b97ea9cb Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Mon, 14 Dec 2015 15:20:14 +0100 Subject: [PATCH 131/139] g2-common: init: power: Lower GPU max freq to 320MHz --- rootdir/etc/init.g2.power.rc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rootdir/etc/init.g2.power.rc b/rootdir/etc/init.g2.power.rc index bb2e66e0..215e8492 100644 --- a/rootdir/etc/init.g2.power.rc +++ b/rootdir/etc/init.g2.power.rc @@ -12,6 +12,9 @@ on property:sys.boot_completed=1 setprop sys.perf.profile 1 + # Lower GPU + write /sys/devices/fdb00000.qcom,kgsl-3d0/devfreq/fdb00000.qcom,kgsl-3d0/max_freq 320000000 + # Tune entropy parameters write /proc/sys/kernel/random/read_wakeup_threshold 128 write /proc/sys/kernel/random/write_wakeup_threshold 256 From 1f452225b7f216017478c6b7f21fd3fb28d1f663 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Mon, 14 Dec 2015 19:05:32 +0100 Subject: [PATCH 132/139] g2-common: Build kernel with GCC 4.9 --- BoardConfigCommon.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index 48872a23..2f6d97b9 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -24,6 +24,7 @@ TARGET_BOARD_PLATFORM_GPU := qcom-adreno330 TARGET_CPU_ABI := armeabi-v7a TARGET_CPU_ABI2 := armeabi TARGET_CPU_VARIANT := krait +TARGET_GCC_VERSION_EXP := 4.9 # Assertions TARGET_BOARD_INFO_FILE ?= device/lge/g2-common/board-info.txt From 5d2200a5f616f2ae98c5d3e080377ccc2e7e8bd7 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Wed, 16 Dec 2015 10:53:34 +0100 Subject: [PATCH 133/139] g2-common: init: power: Remove LMK settings --- rootdir/etc/init.g2.power.rc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/rootdir/etc/init.g2.power.rc b/rootdir/etc/init.g2.power.rc index 215e8492..42727a41 100644 --- a/rootdir/etc/init.g2.power.rc +++ b/rootdir/etc/init.g2.power.rc @@ -19,10 +19,6 @@ on property:sys.boot_completed=1 write /proc/sys/kernel/random/read_wakeup_threshold 128 write /proc/sys/kernel/random/write_wakeup_threshold 256 - # LMK - write /sys/module/lowmemorykiller/parameters/adj "0,1,3,5,7,15" - write /sys/module/lowmemorykiller/parameters/minfree "19200,24000,28800,33600,38400,48000" - # VM write /proc/sys/vm/block_dump 0 write /proc/sys/vm/dirty_background_ratio 5 From 1b73c07d43897f22bc4cb49328ab74225cdf08c1 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Wed, 16 Dec 2015 11:06:56 +0100 Subject: [PATCH 134/139] Revert "g2-common: Use OSS TimeKeep service by Sony" Introduced wrong device uptime.. This reverts commit bf094f0c33edd80d8732b0cdbf1485bf4238cf65. --- BoardConfigCommon.mk | 9 ++------- g2.mk | 5 ----- rootdir/etc/init.g2.rc | 4 +--- sepolicy/file_contexts | 1 - sepolicy/property.te | 1 - sepolicy/property_contexts | 1 - sepolicy/service.te | 1 - sepolicy/service_contexts | 1 - sepolicy/system_app.te | 1 - sepolicy/timekeep.te | 7 ------- 10 files changed, 3 insertions(+), 28 deletions(-) delete mode 100644 sepolicy/service.te delete mode 100644 sepolicy/service_contexts delete mode 100644 sepolicy/system_app.te delete mode 100644 sepolicy/timekeep.te diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index 2f6d97b9..053f9ac6 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -96,6 +96,7 @@ TARGET_POWERHAL_VARIANT := g2 # Qualcomm support BOARD_USES_QCOM_HARDWARE := true +BOARD_USES_QC_TIME_SERVICES := true # Recovery COMMON_GLOBAL_CFLAGS += -DNO_SECURE_DISCARD @@ -119,13 +120,7 @@ BOARD_SEPOLICY_DIRS += \ device/lge/g2-common/sepolicy BOARD_SEPOLICY_UNION += \ - property.te \ - property_contexts \ - service.te \ - service_contexts \ - system_app.te \ - thermanager.te \ - timekeep.te + thermanager.te # Wi-Fi BOARD_WPA_SUPPLICANT_DRIVER := NL80211 diff --git a/g2.mk b/g2.mk index b07d7737..65de273e 100644 --- a/g2.mk +++ b/g2.mk @@ -185,11 +185,6 @@ PRODUCT_COPY_FILES += \ PRODUCT_PACKAGES += \ thermanager -# Time Service -PRODUCT_PACKAGES += \ - timekeep \ - TimeKeep - PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/configs/thermanager.xml:system/etc/thermanager.xml diff --git a/rootdir/etc/init.g2.rc b/rootdir/etc/init.g2.rc index bb3b52da..066b4d9c 100644 --- a/rootdir/etc/init.g2.rc +++ b/rootdir/etc/init.g2.rc @@ -456,12 +456,10 @@ service thermanager /system/bin/thermanager /system/etc/thermanager.xml user root group root -# OSS time solution -service timekeep /system/bin/timekeep restore +service time_daemon /system/bin/time_daemon class late_start user root group root - oneshot # WiFi service p2p_supplicant /system/bin/wpa_supplicant \ diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts index baf85c12..c3c7fd09 100644 --- a/sepolicy/file_contexts +++ b/sepolicy/file_contexts @@ -17,7 +17,6 @@ /data/system/default_values u:object_r:mpdecision_data:s0 /dev/btlock u:object_r:btlock_file:s0 /system/bin/thermanager u:object_r:thermanager_exec:s0 -/system/bin/timekeep u:object_r:timekeep_exec:s0 /dev/bcm2079x u:object_r:nfc_device:s0 /dev/socket/mpdecision(/.*)? u:object_r:mpctl_socket:s0 diff --git a/sepolicy/property.te b/sepolicy/property.te index efafeee7..09676b80 100644 --- a/sepolicy/property.te +++ b/sepolicy/property.te @@ -1,3 +1,2 @@ type baseband_prop, property_type; type camera_prop, property_type; -type timekeep_prop, property_type; diff --git a/sepolicy/property_contexts b/sepolicy/property_contexts index 323b3d47..58e01f3e 100644 --- a/sepolicy/property_contexts +++ b/sepolicy/property_contexts @@ -3,4 +3,3 @@ camera. u:object_r:camera_prop:s0 persist.data.sensor_name u:object_r:camera_prop:s0 persist.data.rear.minfps u:object_r:camera_prop:s0 persist.data.front.minfps u:object_r:camera_prop:s0 -persist.sys.timeadjust u:object_r:timekeep_prop:s0 diff --git a/sepolicy/service.te b/sepolicy/service.te deleted file mode 100644 index ba78a01b..00000000 --- a/sepolicy/service.te +++ /dev/null @@ -1 +0,0 @@ -type timekeep_service, service_manager_type; diff --git a/sepolicy/service_contexts b/sepolicy/service_contexts deleted file mode 100644 index 24c2939d..00000000 --- a/sepolicy/service_contexts +++ /dev/null @@ -1 +0,0 @@ -com.sony.timekeep u:object_r:timekeep_service:s0 diff --git a/sepolicy/system_app.te b/sepolicy/system_app.te deleted file mode 100644 index c313b557..00000000 --- a/sepolicy/system_app.te +++ /dev/null @@ -1 +0,0 @@ -allow system_app timekeep_prop:property_service set; diff --git a/sepolicy/timekeep.te b/sepolicy/timekeep.te deleted file mode 100644 index e139b8ef..00000000 --- a/sepolicy/timekeep.te +++ /dev/null @@ -1,7 +0,0 @@ -type timekeep, domain; -type timekeep_exec, exec_type, file_type; - -# Started by init -init_daemon_domain(timekeep) - -allow timekeep self:capability { sys_time }; From 4ef9415a72800cf3623ee8e195dc01fd04c5377f Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Thu, 17 Dec 2015 14:03:56 +0100 Subject: [PATCH 135/139] g2-common: init: power: Tune LMK minfree --- rootdir/etc/init.g2.power.rc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rootdir/etc/init.g2.power.rc b/rootdir/etc/init.g2.power.rc index 42727a41..1cae150e 100644 --- a/rootdir/etc/init.g2.power.rc +++ b/rootdir/etc/init.g2.power.rc @@ -19,6 +19,9 @@ on property:sys.boot_completed=1 write /proc/sys/kernel/random/read_wakeup_threshold 128 write /proc/sys/kernel/random/write_wakeup_threshold 256 + # LMK + write /sys/module/lowmemorykiller/parameters/minfree "4096,8192,16384,28672,46080,51200" + # VM write /proc/sys/vm/block_dump 0 write /proc/sys/vm/dirty_background_ratio 5 From c49280571eca88c59b4b94b2b9cdd8a76fea904d Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Fri, 18 Dec 2015 12:17:13 +0100 Subject: [PATCH 136/139] g2-common: init: power: Move LMK + VM pressure settings to kernel --- rootdir/etc/init.g2.power.rc | 6 ------ 1 file changed, 6 deletions(-) diff --git a/rootdir/etc/init.g2.power.rc b/rootdir/etc/init.g2.power.rc index 1cae150e..6e3bda98 100644 --- a/rootdir/etc/init.g2.power.rc +++ b/rootdir/etc/init.g2.power.rc @@ -7,9 +7,6 @@ on property:sys.boot_completed=1 write /sys/kernel/sched/arch_power 0 write /sys/kernel/sched/gentle_fair_sleepers 0 - write /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk 1 - write /sys/module/lowmemorykiller/parameters/vmpressure_file_min 53059 - setprop sys.perf.profile 1 # Lower GPU @@ -19,9 +16,6 @@ on property:sys.boot_completed=1 write /proc/sys/kernel/random/read_wakeup_threshold 128 write /proc/sys/kernel/random/write_wakeup_threshold 256 - # LMK - write /sys/module/lowmemorykiller/parameters/minfree "4096,8192,16384,28672,46080,51200" - # VM write /proc/sys/vm/block_dump 0 write /proc/sys/vm/dirty_background_ratio 5 From cf59e753b48fc122470ee51d55dd8a42c77d132a Mon Sep 17 00:00:00 2001 From: firebird11 Date: Tue, 22 Dec 2015 12:38:47 +0100 Subject: [PATCH 137/139] g2-common: configs: mixer_paths.xml: Raise volumes a bit Signed-off-by: Zdrowy Gosciu Conflicts: configs/mixer_paths.xml --- configs/mixer_paths.xml | 54 ++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/configs/mixer_paths.xml b/configs/mixer_paths.xml index 3838e1ac..dfff875a 100644 --- a/configs/mixer_paths.xml +++ b/configs/mixer_paths.xml @@ -26,8 +26,8 @@ - - + + @@ -461,7 +461,7 @@ - + @@ -478,7 +478,7 @@ - + @@ -510,8 +510,8 @@ - - + + @@ -523,7 +523,7 @@ - + @@ -533,13 +533,13 @@ - + - + @@ -549,19 +549,19 @@ - + - + - + @@ -578,7 +578,7 @@ - + @@ -610,8 +610,8 @@ - - + + @@ -624,11 +624,11 @@ - - + + - + @@ -652,8 +652,8 @@ - - + + @@ -663,8 +663,8 @@ - - + + @@ -674,8 +674,8 @@ - - + + @@ -686,13 +686,13 @@ - + - + @@ -702,7 +702,7 @@ - + From 8f58e93406e737d683a1b2472f65d4e7bcd66917 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Wed, 30 Dec 2015 21:49:58 +0100 Subject: [PATCH 138/139] g2-common: init: power: Setup interactive GOV (CAF) --- rootdir/etc/init.g2.power.rc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rootdir/etc/init.g2.power.rc b/rootdir/etc/init.g2.power.rc index 6e3bda98..a261a82a 100644 --- a/rootdir/etc/init.g2.power.rc +++ b/rootdir/etc/init.g2.power.rc @@ -199,6 +199,13 @@ on property:sys.perf.profile=1 write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor interactive write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor interactive write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor interactive + write /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay "20000 1400000:40000 1700000:20000" + write /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load 90 + write /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq 1190400 + write /sys/devices/system/cpu/cpufreq/interactive/io_is_busy 1 + write /sys/devices/system/cpu/cpufreq/interactive/target_loads "85 1500000:90 1800000:70" + write /sys/devices/system/cpu/cpufreq/interactive/min_sample_time 40000 + write /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor 100000 # Permission for Power HAL CM extension chown root system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load From 43fbc79d8a3fc242e084732075b600003ff41eb9 Mon Sep 17 00:00:00 2001 From: Zdrowy Gosciu Date: Wed, 30 Dec 2015 21:55:10 +0100 Subject: [PATCH 139/139] g2-common: power HAL: Sync with CAF --- power/hint-data.c | 2 +- power/hint-data.h | 2 - power/metadata-defs.h | 11 +----- power/metadata-parser.c | 35 +----------------- power/performance.h | 81 ++++------------------------------------- power/power-8974.c | 79 +--------------------------------------- power/power-common.h | 4 -- power/power.c | 77 ++++++++++----------------------------- power/utils.c | 22 ++--------- power/utils.h | 2 - 10 files changed, 33 insertions(+), 282 deletions(-) diff --git a/power/hint-data.c b/power/hint-data.c index 05e4f887..67da77ad 100644 --- a/power/hint-data.c +++ b/power/hint-data.c @@ -41,7 +41,7 @@ int hint_compare(struct hint_data *first_hint, } } -void hint_dump(__attribute__((unused)) struct hint_data *hint) +void hint_dump(struct hint_data *hint) { /*ALOGI("hint_id: %lu", hint->hint_id);*/ } diff --git a/power/hint-data.h b/power/hint-data.h index 57455dfb..2a8113a2 100644 --- a/power/hint-data.h +++ b/power/hint-data.h @@ -32,8 +32,6 @@ #define DEFAULT_VIDEO_DECODE_HINT_ID (0x0B00) #define DISPLAY_STATE_HINT_ID (0x0C00) #define DISPLAY_STATE_HINT_ID_2 (0x0D00) -#define DEFAULT_AUDIO_HINT_ID (0x0E00) -#define DEFAULT_PROFILE_HINT_ID (0x0F00) struct hint_data { unsigned long hint_id; /* This is our key. */ diff --git a/power/metadata-defs.h b/power/metadata-defs.h index 59b92d1f..c4649007 100644 --- a/power/metadata-defs.h +++ b/power/metadata-defs.h @@ -46,18 +46,9 @@ struct video_decode_metadata_t { int state; }; -struct audio_metadata_t { - int hint_id; - int state; -}; - int parse_metadata(char *metadata, char **metadata_saveptr, - char *attribute, int attribute_size, char *value, - unsigned int value_size); + char *attribute, int attribute_size, char *value, int value_size); int parse_video_encode_metadata(char *metadata, struct video_encode_metadata_t *video_encode_metadata); int parse_video_decode_metadata(char *metadata, struct video_decode_metadata_t *video_decode_metadata); -int parse_audio_metadata(char *metadata, - struct audio_metadata_t *audio_metadata); - diff --git a/power/metadata-parser.c b/power/metadata-parser.c index 6e90de70..b4561848 100644 --- a/power/metadata-parser.c +++ b/power/metadata-parser.c @@ -34,8 +34,7 @@ #include "metadata-defs.h" int parse_metadata(char *metadata, char **metadata_saveptr, - char *attribute, int attribute_size, char *value, - unsigned int value_size) + char *attribute, int attribute_size, char *value, int value_size) { char *attribute_string; char *attribute_value_delim; @@ -130,35 +129,3 @@ int parse_video_decode_metadata(char *metadata, return 0; } - -int parse_audio_metadata(char *metadata, - struct audio_metadata_t *audio_metadata) -{ - char attribute[1024], value[1024], *saveptr; - char *temp_metadata = metadata; - int parsing_status; - - while ((parsing_status = parse_metadata(temp_metadata, &saveptr, - attribute, sizeof(attribute), value, sizeof(value))) == METADATA_PARSING_CONTINUE) { - if (strlen(attribute) == strlen("hint_id") && - (strncmp(attribute, "hint_id", strlen("hint_id")) == 0)) { - if (strlen(value) > 0) { - audio_metadata->hint_id = atoi(value); - } - } - - if (strlen(attribute) == strlen("state") && - (strncmp(attribute, "state", strlen("state")) == 0)) { - if (strlen(value) > 0) { - audio_metadata->state = atoi(value); - } - } - - temp_metadata = NULL; - } - - if (parsing_status == METADATA_PARSING_ERR) - return -1; - - return 0; -} diff --git a/power/performance.h b/power/performance.h index 49a4a4a3..955158f1 100644 --- a/power/performance.h +++ b/power/performance.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2012, 2014, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012, 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 @@ -112,6 +112,11 @@ enum MAX_CPUS_ONLINE_LVL { CPUS_ONLINE_MAX_LIMIT_MAX = 0x8FB, }; +enum ALL_CPUS_FREQBOOST_LVL { + ALL_CPUS_FREQ_NONTURBO_MAX = 0x90A, + ALL_CPUS_FREQ_TURBO = 0x9FE, +}; + enum SAMPLING_RATE_LVL { MS_500 = 0xBCD, MS_50 = 0xBFA, @@ -128,7 +133,6 @@ enum ONDEMAND_SAMPLING_DOWN_FACTOR_LVL { SAMPLING_DOWN_FACTOR_4 = 0xD04, }; - enum INTERACTIVE_TIMER_RATE_LVL { TR_MS_500 = 0xECD, TR_MS_100 = 0xEF5, @@ -137,26 +141,6 @@ enum INTERACTIVE_TIMER_RATE_LVL { TR_MS_20 = 0xEFD, }; -/* This timer rate applicable to cpu0 - across 8939 series chipset */ -enum INTERACTIVE_TIMER_RATE_LVL_CPU0_8939 { - TR_MS_CPU0_500 = 0x30CD, - TR_MS_CPU0_100 = 0x30F5, - TR_MS_CPU0_50 = 0x30FA, - TR_MS_CPU0_30 = 0x30FC, - TR_MS_CPU0_20 = 0x30FD, -}; - -/* This timer rate applicable to cpu4 - across 8939 series chipset */ -enum INTERACTIVE_TIMER_RATE_LVL_CPU4_8939 { - TR_MS_CPU4_500 = 0x3B0CD, - TR_MS_CPU4_100 = 0x3BF5, - TR_MS_CPU4_50 = 0x3BFA, - TR_MS_CPU4_30 = 0x3BFC, - TR_MS_CPU4_20 = 0x3BFD, -}; - enum INTERACTIVE_HISPEED_FREQ_LVL { HS_FREQ_1026 = 0xF0A, }; @@ -182,8 +166,7 @@ enum OPTIMAL_FREQ_LVL { }; enum SCREEN_PWR_CLPS_LVL { - PWR_CLPS_DIS = 0x1300, - PWR_CLPS_ENA = 0x1301, + PWR_CLPS_DIS = 0x1301, }; enum THREAD_MIGRATION_LVL { @@ -194,56 +177,6 @@ enum INTERACTIVE_IO_BUSY_LVL { INTERACTIVE_IO_BUSY_OFF = 0x1B00, INTERACTIVE_IO_BUSY_ON = 0x1B01, }; - -enum SCHED_BOOST_LVL { - SCHED_BOOST_ON = 0x1E01, -}; - -enum CPU4_MIN_FREQ_LVL { - CPU4_MIN_FREQ_NONTURBO_MAX = 0x1F0A, - CPU4_MIN_FREQ_TURBO_MAX = 0x1FFE, -}; - -enum CPU5_MIN_FREQ_LVL { - CPU5_MIN_FREQ_NONTURBO_MAX = 0x200A, - CPU5_MIN_FREQ_TURBO_MAX = 0x20FE, -}; - -enum CPU6_MIN_FREQ_LVL { - CPU6_MIN_FREQ_NONTURBO_MAX = 0x210A, - CPU6_MIN_FREQ_TURBO_MAX = 0x21FE, -}; - -enum CPU7_MIN_FREQ_LVL { - CPU7_MIN_FREQ_NONTURBO_MAX = 0x220A, - CPU7_MIN_FREQ_TURBO_MAX = 0x22FE, -}; - -enum CPU4_MAX_FREQ_LVL { - CPU4_MAX_FREQ_NONTURBO_MAX = 0x230A, -}; - -enum CPU5_MAX_FREQ_LVL { - CPU5_MAX_FREQ_NONTURBO_MAX = 0x240A, -}; - -enum CPU6_MAX_FREQ_LVL { - CPU6_MAX_FREQ_NONTURBO_MAX = 0x250A, -}; - -enum CPU7_MAX_FREQ_LVL { - CPU7_MAX_FREQ_NONTURBO_MAX = 0x260A, -}; - -enum SCHED_PREFER_IDLE { - SCHED_PREFER_IDLE_DIS = 0x3E01, -}; - -enum SCHED_MIGRATE_COST_CHNG { - SCHED_MIGRATE_COST_SET = 0x3F01, -}; - - #ifdef __cplusplus } #endif diff --git a/power/power-8974.c b/power/power-8974.c index bdb017a3..7aa15294 100644 --- a/power/power-8974.c +++ b/power/power-8974.c @@ -1,6 +1,5 @@ /* * Copyright (c) 2013, The Linux Foundation. All rights reserved. - * Copyright (c) 2014, The CyanogenMod Project * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -53,83 +52,7 @@ static int display_hint2_sent; static int first_display_off_hint; extern int display_boost; -enum { - PROFILE_POWER_SAVE = 0, - PROFILE_BALANCED, - PROFILE_HIGH_PERFORMANCE -}; - -static int current_power_profile = PROFILE_BALANCED; - -static void set_power_profile(int profile) { - - if (profile == current_power_profile) - return; - - ALOGV("%s: profile=%d", __func__, profile); - - if (current_power_profile != PROFILE_BALANCED) { - undo_hint_action(DEFAULT_PROFILE_HINT_ID); - ALOGV("%s: hint undone", __func__); - } - - if (profile == PROFILE_HIGH_PERFORMANCE) { - int resource_values[] = { CPUS_ONLINE_MIN_4, - CPU0_MIN_FREQ_TURBO_MAX, CPU1_MIN_FREQ_TURBO_MAX, - CPU2_MIN_FREQ_TURBO_MAX, CPU3_MIN_FREQ_TURBO_MAX }; - perform_hint_action(DEFAULT_PROFILE_HINT_ID, - resource_values, sizeof(resource_values)/sizeof(resource_values[0])); - ALOGD("%s: set performance mode", __func__); - - } else if (profile == PROFILE_POWER_SAVE) { - int resource_values[] = { CPUS_ONLINE_MAX_LIMIT_2, - CPU0_MAX_FREQ_NONTURBO_MAX, CPU1_MAX_FREQ_NONTURBO_MAX, - CPU2_MAX_FREQ_NONTURBO_MAX, CPU3_MAX_FREQ_NONTURBO_MAX }; - perform_hint_action(DEFAULT_PROFILE_HINT_ID, - resource_values, sizeof(resource_values)/sizeof(resource_values[0])); - ALOGD("%s: set powersave", __func__); - } - - current_power_profile = profile; -} - -extern void interaction(int duration, int num_args, int opt_list[]); - -int power_hint_override(__attribute__((unused)) struct power_module *module, - power_hint_t hint, void *data) -{ - if (hint == POWER_HINT_SET_PROFILE) { - set_power_profile((int)data); - return HINT_HANDLED; - } - - if (hint == POWER_HINT_LOW_POWER) { - if (current_power_profile == PROFILE_POWER_SAVE) { - set_power_profile(PROFILE_BALANCED); - } else { - set_power_profile(PROFILE_POWER_SAVE); - } - } - - // Skip other hints in custom power modes - if (current_power_profile != PROFILE_BALANCED) { - return HINT_HANDLED; - } - - if (hint == POWER_HINT_CPU_BOOST) { - int duration = (int)data / 1000; - int resources[] = { CPUS_ONLINE_MIN_2, 0x20B, 0x30B }; - - if (duration > 0) - interaction(duration, sizeof(resources)/sizeof(resources[0]), resources); - - return HINT_HANDLED; - } - - return HINT_NONE; -} - -int set_interactive_override(struct power_module *module __unused, int on) +int set_interactive_override(struct power_module *module, int on) { char governor[80]; diff --git a/power/power-common.h b/power/power-common.h index c352441a..c00ce4e3 100644 --- a/power/power-common.h +++ b/power/power-common.h @@ -33,8 +33,6 @@ #define DCVS_CPU0_SLACK_MIN_NODE "/sys/module/msm_dcvs/cores/cpu0/slack_time_min_us" #define MPDECISION_SLACK_MAX_NODE "/sys/module/msm_mpdecision/slack_time_max_us" #define MPDECISION_SLACK_MIN_NODE "/sys/module/msm_mpdecision/slack_time_min_us" -#define SCALING_MIN_FREQ "/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq" -#define GO_HISPEED_LOAD_PATH "/sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load" #define ONDEMAND_GOVERNOR "ondemand" #define INTERACTIVE_GOVERNOR "interactive" @@ -42,5 +40,3 @@ #define HINT_HANDLED (0) #define HINT_NONE (-1) - -#define OFF_HIGHSPEED_LOAD 110 diff --git a/power/power.c b/power/power.c index 237ee432..73d9e712 100644 --- a/power/power.c +++ b/power/power.c @@ -1,6 +1,5 @@ /* * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * Copyright (c) 2014, The CyanogenMod Project * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -42,7 +41,6 @@ #include #include #include -#include #include "utils.h" #include "metadata-defs.h" @@ -57,17 +55,13 @@ static int saved_mpdecision_slack_min = -1; static int saved_interactive_mode = -1; static int slack_node_rw_failed = 0; static int display_hint_sent; -static int go_hispeed_load = 0; -static int off_hispeed_load = OFF_HIGHSPEED_LOAD; int display_boost; static struct hw_module_methods_t power_module_methods = { .open = NULL, }; -static pthread_mutex_t hint_mutex = PTHREAD_MUTEX_INITIALIZER; - -static void power_init(__attribute__((unused))struct power_module *module) +static void power_init(struct power_module *module) { ALOGI("QCOM power HAL initing."); @@ -80,7 +74,7 @@ static void power_init(__attribute__((unused))struct power_module *module) ALOGW("Unable to read soc_id"); } else { int soc_id = atoi(buf); - if (soc_id == 194 || (soc_id >= 208 && soc_id <= 218) || soc_id == 178) { + if (soc_id == 194 || (soc_id >= 208 && soc_id <= 218)) { display_boost = 1; } } @@ -194,34 +188,31 @@ static void process_video_encode_hint(void *metadata) } } -int __attribute__ ((weak)) power_hint_override( - __attribute__((unused)) struct power_module *module, - __attribute__((unused)) power_hint_t hint, - __attribute__((unused)) void *data) +int __attribute__ ((weak)) power_hint_override(struct power_module *module, power_hint_t hint, + void *data) { return HINT_NONE; } -extern void interaction(int duration, int num_args, int opt_list[]); - -static void power_hint(__attribute__((unused)) struct power_module *module, power_hint_t hint, +static void power_hint(struct power_module *module, power_hint_t hint, void *data) { - pthread_mutex_lock(&hint_mutex); - /* Check if this hint has been overridden. */ if (power_hint_override(module, hint, data) == HINT_HANDLED) { /* The power_hint has been handled. We can skip the rest. */ - goto out; + return; } switch(hint) { case POWER_HINT_VSYNC: + break; case POWER_HINT_INTERACTION: - case POWER_HINT_CPU_BOOST: - case POWER_HINT_AUDIO: - case POWER_HINT_SET_PROFILE: - case POWER_HINT_LOW_POWER: + { + int resources[] = {0x702, 0x20F, 0x30F}; + int duration = 3000; + + interaction(duration, sizeof(resources)/sizeof(resources[0]), resources); + } break; case POWER_HINT_VIDEO_ENCODE: process_video_encode_hint(data); @@ -229,38 +220,14 @@ static void power_hint(__attribute__((unused)) struct power_module *module, powe case POWER_HINT_VIDEO_DECODE: process_video_decode_hint(data); break; - break; } - -out: - pthread_mutex_unlock(&hint_mutex); } -int __attribute__ ((weak)) set_interactive_override( - __attribute__((unused)) struct power_module *module, - __attribute__((unused)) int on) +int __attribute__ ((weak)) set_interactive_override(struct power_module *module, int on) { return HINT_NONE; } -static void cm_power_set_interactive_ext(int on) -{ - char tmp_str[NODE_MAX]; - int tmp; - - if (sysfs_read(GO_HISPEED_LOAD_PATH, tmp_str, NODE_MAX - 1)) { - return; - } - - tmp = atoi(tmp_str); - if (!go_hispeed_load || (go_hispeed_load != tmp && off_hispeed_load != tmp)) { - go_hispeed_load = tmp; - } - - snprintf(tmp_str, NODE_MAX, "%d", on ? go_hispeed_load : off_hispeed_load); - sysfs_write(GO_HISPEED_LOAD_PATH, tmp_str); -} - void set_interactive(struct power_module *module, int on) { char governor[80]; @@ -268,19 +235,16 @@ void set_interactive(struct power_module *module, int on) struct video_encode_metadata_t video_encode_metadata; int rc; - pthread_mutex_lock(&hint_mutex); - - cm_power_set_interactive_ext(on); - if (set_interactive_override(module, on) == HINT_HANDLED) { - goto out; + return; } ALOGI("Got set_interactive hint"); if (get_scaling_governor(governor, sizeof(governor)) == -1) { ALOGE("Can't obtain scaling governor."); - goto out; + + return; } if (!on) { @@ -296,7 +260,7 @@ void set_interactive(struct power_module *module, int on) } } else if ((strncmp(governor, INTERACTIVE_GOVERNOR, strlen(INTERACTIVE_GOVERNOR)) == 0) && (strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) { - int resource_values[] = {THREAD_MIGRATION_SYNC_OFF}; + int resource_values[] = {TR_MS_50, THREAD_MIGRATION_SYNC_OFF}; if (!display_hint_sent) { perform_hint_action(DISPLAY_STATE_HINT_ID, @@ -467,9 +431,6 @@ void set_interactive(struct power_module *module, int on) } saved_interactive_mode = !!on; - -out: - pthread_mutex_unlock(&hint_mutex); } struct power_module HAL_MODULE_INFO_SYM = { @@ -479,7 +440,7 @@ struct power_module HAL_MODULE_INFO_SYM = { .hal_api_version = HARDWARE_HAL_API_VERSION, .id = POWER_HARDWARE_MODULE_ID, .name = "QCOM Power HAL", - .author = "Qualcomm/CyanogenMod", + .author = "Qualcomm", .methods = &power_module_methods, }, diff --git a/power/utils.c b/power/utils.c index 4c910c63..5c7863e8 100644 --- a/power/utils.c +++ b/power/utils.c @@ -44,9 +44,7 @@ static void *qcopt_handle; static int (*perf_lock_acq)(unsigned long handle, int duration, int list[], int numArgs); static int (*perf_lock_rel)(unsigned long handle); -static int (*perf_lock_use_profile)(unsigned long handle, int profile); static struct list_node active_hint_list_head; -static int profile_handle = 0; static void *get_qcopt_handle() { @@ -89,8 +87,6 @@ static void __attribute__ ((constructor)) initialize(void) if (!perf_lock_rel) { ALOGE("Unable to get perf_lock_rel function handle.\n"); } - - perf_lock_use_profile = dlsym(qcopt_handle, "perf_lock_use_profile"); } } @@ -177,9 +173,10 @@ int get_scaling_governor(char governor[], int size) void interaction(int duration, int num_args, int opt_list[]) { +#ifdef INTERACTION_BOOST static int lock_handle = 0; - if (duration <= 0 || num_args < 1 || opt_list[0] == 0) + if (duration < 0 || num_args < 1 || opt_list[0] == NULL) return; if (qcopt_handle) { @@ -189,6 +186,7 @@ void interaction(int duration, int num_args, int opt_list[]) ALOGE("Failed to acquire lock."); } } +#endif } void perform_hint_action(int hint_id, int resource_values[], int num_resources) @@ -284,17 +282,3 @@ void undo_initial_hint_action() } } } - -/* Set a static profile */ -void set_profile(int profile) -{ - if (qcopt_handle) { - if (perf_lock_use_profile) { - profile_handle = perf_lock_use_profile(profile_handle, profile); - if (profile_handle == -1) - ALOGE("Failed to set profile."); - if (profile < 0) - profile_handle = 0; - } - } -} diff --git a/power/utils.h b/power/utils.h index cc922729..cd12c15c 100644 --- a/power/utils.h +++ b/power/utils.h @@ -40,5 +40,3 @@ void unvote_ondemand_sdf_low(); void perform_hint_action(int hint_id, int resource_values[], int num_resources); void undo_hint_action(int hint_id); -void undo_initial_hint_action(); -void set_profile(int profile);