am 65837dc5: mako: reduce the power consumption in off-mode charging

# Via Iliyan Malchev
* commit '65837dc56e06ffaf903a82a8cbad4d3e127d7b55':
  mako: reduce the power consumption in off-mode charging
diff --git a/CleanSpec.mk b/CleanSpec.mk
index f26b51e..ae11cd8 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -58,6 +58,22 @@
 $(call add-clean-step, rm -f $(OUT_DIR)/target/product/mako/root/default.prop)
 $(call add-clean-step, rm -f $(OUT_DIR)/target/product/mako/recovery/root/default.prop)
 $(call add-clean-step, rm -f $(OUT_DIR)/target/product/mako/system/build.prop)
+$(call add-clean-step, rm -f $(OUT_DIR)/target/product/mako/root/default.prop)
+$(call add-clean-step, rm -f $(OUT_DIR)/target/product/mako/recovery/root/default.prop)
+$(call add-clean-step, rm -f $(OUT_DIR)/target/product/mako/system/build.prop)
+$(call add-clean-step, rm -f $(OUT_DIR)/target/product/mako/root/default.prop)
+$(call add-clean-step, rm -f $(OUT_DIR)/target/product/mako/recovery/root/default.prop)
+$(call add-clean-step, rm -f $(OUT_DIR)/target/product/mako/system/build.prop)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/mako/obj/EXECUTABLES/mm-vdec-omx-test*_intermediates)
+$(call add-clean-step, rm -f $(OUT_DIR)/target/product/mako/symbols/system/bin/mm-vdec-omx-test*)
+$(call add-clean-step, rm -f $(OUT_DIR)/target/product/mako/system/bin/mm-vdec-omx-test*)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/mako/obj/EXECUTABLES/charger_touch_intermediates)
+$(call add-clean-step, rm -f $(OUT_DIR)/target/product/mako/symbols/system/bin/charger_touch)
+$(call add-clean-step, rm -f $(OUT_DIR)/target/product/mako/system/bin/charger_touch)
+$(call add-clean-step, rm -f $(OUT_DIR)/target/product/mako/obj/NOTICE_FILES/src/system/bin/charger_touch.txt)
+$(call add-clean-step, rm -f $(OUT_DIR)/target/product/mako/root/default.prop)
+$(call add-clean-step, rm -f $(OUT_DIR)/target/product/mako/recovery/root/default.prop)
+$(call add-clean-step, rm -f $(OUT_DIR)/target/product/mako/system/build.prop)
 
 $(call add-clean-step, rm -f $(OUT_DIR)/target/product/mako/root/default.prop)
 $(call add-clean-step, rm -f $(OUT_DIR)/target/product/mako/recovery/root/default.prop)
diff --git a/board-info.txt b/board-info.txt
index a68002d..3e554ae 100644
--- a/board-info.txt
+++ b/board-info.txt
@@ -1,2 +1 @@
-require board=mako|J1TM
-
+require board=mako
diff --git a/device.mk b/device.mk
index 30863bf..683bce3 100644
--- a/device.mk
+++ b/device.mk
@@ -153,7 +153,7 @@
 	ro.telephony.call_ring.multiple=0
 
 #Upto 3 layers can go through overlays
-PRODUCT_PROPERTY_OVERRIDES += debug.mdpcomp.maxlayer=3
+PRODUCT_PROPERTY_OVERRIDES += persist.hwc.mdpcomp.enable=true
 
 PRODUCT_CHARACTERISTICS := nosdcard
 
@@ -202,8 +202,7 @@
 	libmmcamera_interface
 
 PRODUCT_PACKAGES += \
-	mm-vdec-omx-test \
-	mm-venc-omx-test720p \
+        libmm-omxcore \
 	libdivxdrmdecrypt \
 	libOmxVdec \
 	libOmxVenc \
@@ -221,8 +220,10 @@
 PRODUCT_PACKAGES += \
 	bdAddrLoader \
 	libwfcu \
-	conn_init \
-	charger_touch
+	conn_init
+
+PRODUCT_PACKAGES += \
+	keystore.msm8960
 
 PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
 	rild.libpath=/system/lib/libril-qc-qmi-1.so
@@ -239,14 +240,14 @@
 
 # Enable AAC 5.1 output
 PRODUCT_PROPERTY_OVERRIDES += \
-	media.aac_51_output_enabled=true
-
-PRODUCT_PROPERTY_OVERRIDES += \
-	debug.prerotation.disable=1
+    media.aac_51_output_enabled=true
 
 PRODUCT_PROPERTY_OVERRIDES += \
         debug.egl.recordable.rgba8888=1
 
+PRODUCT_PROPERTY_OVERRIDES += \
+	ro.qc.sensors.wl_dis=true
+
 PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
 	persist.sys.usb.config=mtp
 
diff --git a/init.mako.rc b/init.mako.rc
index 87c1d2d..93b0b40 100644
--- a/init.mako.rc
+++ b/init.mako.rc
@@ -39,6 +39,15 @@
     mkdir /persist 0771 system system
     mkdir /firmware 0771 system system
 
+on init
+    # 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}"
+    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.mako
     setprop ro.crypto.fuse_sdcard true
diff --git a/media_codecs.xml b/media_codecs.xml
index 9e460e9..82dc5a7 100644
--- a/media_codecs.xml
+++ b/media_codecs.xml
@@ -49,11 +49,6 @@
             <Quirk name="requires-allocate-on-output-ports"/>
             <Quirk name="defers-output-buffer-allocation"/>
         </MediaCodec>
-        <MediaCodec name="OMX.qcom.video.decoder.mpeg2" type="video/mpeg2" >
-            <Quirk name="requires-allocate-on-input-ports" />
-            <Quirk name="requires-allocate-on-output-ports"/>
-            <Quirk name="defers-output-buffer-allocation"/>
-        </MediaCodec>
         <MediaCodec name="OMX.qcom.video.decoder.mpeg4" type="video/mp4v-es" >
             <Quirk name="requires-allocate-on-input-ports" />
             <Quirk name="requires-allocate-on-output-ports"/>
diff --git a/nfc/libnfc-brcm.conf b/nfc/libnfc-brcm.conf
index e0c16f5..75f36ef 100644
--- a/nfc/libnfc-brcm.conf
+++ b/nfc/libnfc-brcm.conf
@@ -46,7 +46,7 @@
 #    Delay after turning off chip, before USERIAL_close returns (default 0)
 #
 #POWER_ON_DELAY=300
-#PRE_POWER_OFF_DELAY=0
+PRE_POWER_OFF_DELAY=10
 #POST_POWER_OFF_DELAY=0
 
 ###############################################################################
@@ -60,7 +60,7 @@
 #  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={00:B9:21:01:02:FF:FF:04:A0:0F:40:00:80:02:02:10:00:00:00:31:0C:30:00:00:00:00:00:00:00:00:00:00:00:00:00:00}
+LPTD_CFG={23:B9:21:01:02:FF:FF:04:A0:0F:40:00:80:02:02:10:00:00:00:31:0E:30:00:00:00:00:00:00:00:00:00:00:00:00:00:00}
 
 ###############################################################################
 # Startup Configuration (100 bytes maximum)
@@ -119,7 +119,7 @@
 # SE that is detected by the stack.  This value might be used when the phone
 # supports multiple SE (e.g. 0xF3 and 0xF4) but you want to force it to use
 # one of them (e.g. 0xF4).
-#ACTIVE_SE=0xF3
+ACTIVE_SE=0xF4
 
 ###############################################################################
 # Configure the NFC Extras to open and use a static pipe.  If the value is
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index fd51c37..2ae86d1 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -250,4 +250,7 @@
     <!-- The default iface on which to monitor data use -->
     <string name="config_datause_iface" translatable="false">rmnet_usb0</string>
 
+    <!-- Flag indicating if the speed up audio on mt call code should be executed -->
+    <bool name="config_speed_up_audio_on_mt_calls">true</bool>
+
 </resources>
diff --git a/overlay/frameworks/base/core/res/res/xml/power_profile.xml b/overlay/frameworks/base/core/res/res/xml/power_profile.xml
index 2ddce57..9b6ddc7 100644
--- a/overlay/frameworks/base/core/res/res/xml/power_profile.xml
+++ b/overlay/frameworks/base/core/res/res/xml/power_profile.xml
@@ -21,21 +21,21 @@
     <item name="none">0</item>
     <item name="screen.on">42.4</item>
     <item name="screen.full">211.6</item>
-    <item name="bluetooth.active">66.2</item>
+    <item name="bluetooth.active">59.22</item>
     <item name="bluetooth.on">0.7</item>
-    <item name="wifi.on">3.16</item>
+    <item name="wifi.on">1.38</item>
     <item name="wifi.active">62.09</item>
     <item name="wifi.scan">52.1</item>
     <item name="dsp.audio">0.1</item>
     <item name="dsp.video">0.1</item>
-    <item name="gps.on">59.7</item>
+    <item name="gps.on">20.9</item>
     <item name="radio.active">185.6</item>
     <!-- The current consumed by the radio when it is scanning for a signal -->
     <item name="radio.scanning">122.68</item>
     <!-- Current consumed by the radio at different signal strengths, when paging -->
     <array name="radio.on"> <!-- Strength 0 to BINS-1 -->
-        <value>1.7</value>
-        <value>2.4</value>
+        <value>1.16</value>
+        <value>2.15</value>
     </array>
     <!-- Different CPU speeds as reported in
          /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state -->
@@ -55,7 +55,7 @@
     </array>
     <!-- Power consumption when CPU is idle -->
     <item name="cpu.idle">3.5</item>
-    <item name="cpu.awake">35.33</item>
+    <item name="cpu.awake">10.43</item>
     <!-- Power consumption at different speeds -->
     <array name="cpu.active">
         <value>92.6</value> <!-- 384 MHz CPU speed -->
diff --git a/proprietary-blobs.txt b/proprietary-blobs.txt
index bd281b6..5e18358 100644
--- a/proprietary-blobs.txt
+++ b/proprietary-blobs.txt
@@ -28,7 +28,6 @@
 /system/bin/mpdecision
 /system/bin/netmgrd
 /system/bin/nl_listener
-/system/bin/PktRspTest
 /system/bin/port-bridge
 /system/bin/qcks
 /system/bin/qmuxd
@@ -36,12 +35,6 @@
 /system/bin/radish
 /system/bin/rmt_storage
 /system/bin/sensors.qcom
-/system/bin/sns_cm_conc_test
-/system/bin/sns_cm_test
-/system/bin/sns_debug_file_test
-/system/bin/sns_dsps_tc0001
-/system/bin/sns_smr_loopback_test
-/system/bin/test_diag
 /system/bin/thermald
 /system/bin/usbhub
 /system/bin/usbhub_init
@@ -163,7 +156,6 @@
 /system/lib/libsc-a3xx.so
 /system/lib/libsensor1.so
 /system/lib/libsensor_reg.so
-/system/lib/libsensor_test.so
 /system/lib/libsensor_user_cal.so
 /system/lib/libstagefright_hdcp.so
 /system/lib/libxml.so
@@ -175,4 +167,9 @@
 /system/vendor/firmware/discretix/dxhdcp2.b02
 /system/vendor/firmware/discretix/dxhdcp2.b03
 /system/vendor/firmware/discretix/dxhdcp2.mdt
+/system/vendor/firmware/keymaster/keymaster.b00
+/system/vendor/firmware/keymaster/keymaster.b01
+/system/vendor/firmware/keymaster/keymaster.b02
+/system/vendor/firmware/keymaster/keymaster.b03
+/system/vendor/firmware/keymaster/keymaster.mdt
 /system/vendor/lib/libdrmdecrypt.so
diff --git a/snd_soc_msm_2x_Fusion3 b/snd_soc_msm_2x_Fusion3
index 1d335bc..42a1c87 100644
--- a/snd_soc_msm_2x_Fusion3
+++ b/snd_soc_msm_2x_Fusion3
@@ -1780,6 +1780,32 @@
 EndSection
 
 SectionDevice
+	Name "Voice Earpiece TMUS"
+	Comment "Handset Rx device"
+
+	EnableSequence
+		'SLIM_0_RX Channels':0:One
+		'RX1 MIX1 INP1':0:RX1
+		'RX1 MIX1 INP2':0:RX6
+		'RX1 Digital Volume':1:68
+		'EAR PA Gain':0:POS_6_DB
+		'DAC1 Switch':1:1
+		'SLIM TX3 MUX':0:RMIX1
+	EndSequence
+
+	DisableSequence
+		'RX1 MIX1 INP1':0:ZERO
+		'RX1 MIX1 INP2':0:ZERO
+		'RX1 Digital Volume':1:68
+		'DAC1 Switch':1:0
+		'SLIM TX3 MUX':0:ZERO
+	EndSequence
+
+	ACDBID	81:1
+
+EndSection
+
+SectionDevice
 	Name "HAC Earpiece"
 	Comment "Handset Rx device for Hearing AID"
 
@@ -2320,6 +2346,7 @@
 	EffectsMixerCTL "SRS TruMedia"
 
 EndSection
+
 SectionDevice
 	Name "HeadsetVM Tx"
 	Comment "Headset Tx device"
@@ -2672,6 +2699,46 @@
 EndSection
 
 SectionDevice
+	Name "DMIC Endfire TMUS"
+	Comment "Dual MIC Endfire Tx device"
+
+	EnableSequence
+		'SLIM TX7 MUX':0:DEC7
+		'DEC7 MUX':0:ADC1
+		'SLIM TX8 MUX':0:DEC9
+		'DEC9 MUX':0:ADC3
+		'DEC7 Volume':1:66
+		'ADC1 Volume':1:100
+		'DEC9 Volume':1:66
+		'ADC3 Volume':1:100
+		'SLIM_0_TX Channels':0:Two
+		'MICBIAS1 CAPLESS Switch':1:0
+		'RX1 MIX2 INP1':0:IIR1
+		'RX2 MIX2 INP1':0:IIR1
+		'IIR1 INP1 Volume':1:51
+		'IIR1 INP1 MUX':0:DEC7
+	EndSequence
+
+	DisableSequence
+		'DEC7 Volume':1:60
+		'DEC9 Volume':1:60
+		'SLIM TX7 MUX':0:ZERO
+		'DEC7 MUX':0:ZERO
+		'SLIM TX8 MUX':0:ZERO
+		'DEC9 MUX':0:ZERO
+		'MICBIAS1 CAPLESS Switch':1:1
+		'RX1 MIX2 INP1':0:ZERO
+		'RX2 MIX2 INP1':0:ZERO
+		'IIR1 INP1 Volume':1:0
+		'IIR1 INP1 MUX':0:ZERO
+	EndSequence
+
+	ACDBID	91:2
+	EffectsMixerCTL "SRS TruMedia"
+
+EndSection
+
+SectionDevice
 	Name "Speaker DMIC Broadside"
 	Comment "Dual MIC Broadside Tx device"