Merge "hal: support snd card status with set parameters"
diff --git a/configs/atoll/atoll.mk b/configs/atoll/atoll.mk
old mode 100644
new mode 100755
index 5acb773..3517085
--- a/configs/atoll/atoll.mk
+++ b/configs/atoll/atoll.mk
@@ -71,87 +71,6 @@
 
 BOARD_SUPPORTS_OPENSOURCE_STHAL := true
 
-AUDIO_HARDWARE := audio.a2dp.default
-AUDIO_HARDWARE += audio.usb.default
-AUDIO_HARDWARE += audio.r_submix.default
-AUDIO_HARDWARE += audio.primary.atoll
-
-#HAL Wrapper
-AUDIO_WRAPPER := libqahw
-AUDIO_WRAPPER += libqahwwrapper
-
-#HAL Test app
-AUDIO_HAL_TEST_APPS := hal_play_test
-AUDIO_HAL_TEST_APPS += hal_rec_test
-
-PRODUCT_PACKAGES += $(AUDIO_HARDWARE)
-PRODUCT_PACKAGES += $(AUDIO_WRAPPER)
-PRODUCT_PACKAGES += $(AUDIO_HAL_TEST_APPS)
-
-ifeq ($(AUDIO_FEATURE_ENABLED_DLKM),true)
-BOARD_VENDOR_KERNEL_MODULES := \
-    $(KERNEL_MODULES_OUT)/audio_apr.ko \
-    $(KERNEL_MODULES_OUT)/audio_q6_pdr.ko \
-    $(KERNEL_MODULES_OUT)/audio_q6_notifier.ko \
-    $(KERNEL_MODULES_OUT)/audio_adsp_loader.ko \
-    $(KERNEL_MODULES_OUT)/audio_q6.ko \
-    $(KERNEL_MODULES_OUT)/audio_usf.ko \
-    $(KERNEL_MODULES_OUT)/audio_pinctrl_lpi.ko \
-    $(KERNEL_MODULES_OUT)/audio_swr.ko \
-    $(KERNEL_MODULES_OUT)/audio_wcd_core.ko \
-    $(KERNEL_MODULES_OUT)/audio_swr_ctrl.ko \
-    $(KERNEL_MODULES_OUT)/audio_wsa881x.ko \
-    $(KERNEL_MODULES_OUT)/audio_platform.ko \
-    $(KERNEL_MODULES_OUT)/audio_hdmi.ko \
-    $(KERNEL_MODULES_OUT)/audio_stub.ko \
-    $(KERNEL_MODULES_OUT)/audio_wcd9xxx.ko \
-    $(KERNEL_MODULES_OUT)/audio_mbhc.ko \
-    $(KERNEL_MODULES_OUT)/audio_wcd938x.ko \
-    $(KERNEL_MODULES_OUT)/audio_wcd938x_slave.ko \
-    $(KERNEL_MODULES_OUT)/audio_wcd937x.ko \
-    $(KERNEL_MODULES_OUT)/audio_wcd937x_slave.ko \
-    $(KERNEL_MODULES_OUT)/audio_bolero_cdc.ko \
-    $(KERNEL_MODULES_OUT)/audio_wsa_macro.ko \
-    $(KERNEL_MODULES_OUT)/audio_va_macro.ko \
-    $(KERNEL_MODULES_OUT)/audio_rx_macro.ko \
-    $(KERNEL_MODULES_OUT)/audio_tx_macro.ko \
-    $(KERNEL_MODULES_OUT)/audio_native.ko \
-    $(KERNEL_MODULES_OUT)/audio_machine_atoll.ko \
-    $(KERNEL_MODULES_OUT)/audio_snd_event.ko
-endif
-
-#Audio DLKM
-AUDIO_DLKM := audio_apr.ko
-AUDIO_DLKM += audio_q6_pdr.ko
-AUDIO_DLKM += audio_q6_notifier.ko
-AUDIO_DLKM += audio_adsp_loader.ko
-AUDIO_DLKM += audio_q6.ko
-AUDIO_DLKM += audio_usf.ko
-AUDIO_DLKM += audio_pinctrl_wcd.ko
-AUDIO_DLKM += audio_swr.ko
-AUDIO_DLKM += audio_wcd_core.ko
-AUDIO_DLKM += audio_swr_ctrl.ko
-AUDIO_DLKM += audio_wsa881x.ko
-AUDIO_DLKM += audio_platform.ko
-AUDIO_DLKM += audio_hdmi.ko
-AUDIO_DLKM += audio_stub.ko
-AUDIO_DLKM += audio_wcd9xxx.ko
-AUDIO_DLKM += audio_mbhc.ko
-AUDIO_DLKM += audio_native.ko
-AUDIO_DLKM += audio_wcd938x.ko
-AUDIO_DLKM += audio_wcd938x_slave.ko
-AUDIO_DLKM += audio_wcd937x.ko
-AUDIO_DLKM += audio_wcd937x_slave.ko
-AUDIO_DLKM += audio_bolero_cdc.ko
-AUDIO_DLKM += audio_wsa_macro.ko
-AUDIO_DLKM += audio_va_macro.ko
-AUDIO_DLKM += audio_rx_macro.ko
-AUDIO_DLKM += audio_tx_macro.ko
-AUDIO_DLKM += audio_machine_atoll.ko
-AUDIO_DLKM += audio_snd_event.ko
-
-PRODUCT_PACKAGES += $(AUDIO_DLKM)
-
 #Audio Specific device overlays
 DEVICE_PACKAGE_OVERLAYS += vendor/qcom/opensource/audio-hal/primary-hal/configs/common/overlay
 
@@ -201,19 +120,6 @@
 persist.vendor.audio.fluence.voicerec=false\
 persist.vendor.audio.fluence.speaker=true
 
-#
-#snapdragon value add features
-#
-PRODUCT_PROPERTY_OVERRIDES += \
-ro.qc.sdk.audio.ssr=false
-
-##fluencetype can be "fluence" or "fluencepro" or "none"
-PRODUCT_PROPERTY_OVERRIDES += \
-ro.qc.sdk.audio.fluencetype=none\
-persist.audio.fluence.voicecall=true\
-persist.audio.fluence.voicerec=false\
-persist.audio.fluence.speaker=true
-
 ##speaker protection v3 switch and ADSP AFE API version
 PRODUCT_PROPERTY_OVERRIDES += \
 persist.vendor.audio.spv3.enable=true\
diff --git a/configs/atoll/audio_policy_configuration.xml b/configs/atoll/audio_policy_configuration.xml
index a6d7eef..bcf3e4b 100644
--- a/configs/atoll/audio_policy_configuration.xml
+++ b/configs/atoll/audio_policy_configuration.xml
@@ -176,6 +176,11 @@
                              samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
                              channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
                 </mixPort>
+                <mixPort name="voip_tx" role="sink"
+                         flags="AUDIO_INPUT_FLAG_VOIP_TX">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="8000,16000,32000,48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
+                </mixPort>
                 <mixPort name="surround_sound" role="sink">
                     <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                              samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
@@ -361,6 +366,8 @@
                        sources="Telephony Rx"/>
                 <route type="mix" sink="primary input"
                        sources="Wired Headset Mic,BT SCO Headset Mic,FM Tuner,USB Device In,USB Headset In,Telephony Rx"/>
+                <route type="mix" sink="voip_tx"
+                       sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In"/>
                 <route type="mix" sink="surround_sound"
                        sources="Built-In Mic,Built-In Back Mic"/>
                 <route type="mix" sink="usb_surround_sound"
diff --git a/configs/kona/audio_policy_configuration.xml b/configs/kona/audio_policy_configuration.xml
index 8bb3328..1e4e338 100644
--- a/configs/kona/audio_policy_configuration.xml
+++ b/configs/kona/audio_policy_configuration.xml
@@ -173,6 +173,11 @@
                              samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
                              channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
                 </mixPort>
+                <mixPort name="voip_tx" role="sink"
+                         flags="AUDIO_INPUT_FLAG_VOIP_TX">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="8000,16000,32000,48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
+                </mixPort>
                 <mixPort name="usb_surround_sound" role="sink">
                     <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                              samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,88200,96000,176400,192000"
@@ -350,6 +355,8 @@
                        sources="Telephony Rx"/>
                 <route type="mix" sink="primary input"
                        sources="Wired Headset Mic,BT SCO Headset Mic,FM Tuner,USB Device In,USB Headset In,Telephony Rx"/>
+                <route type="mix" sink="voip_tx"
+                       sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In"/>
                 <route type="mix" sink="usb_surround_sound"
                        sources="USB Device In,USB Headset In"/>
                 <route type="mix" sink="record_24"
diff --git a/configs/kona/kona.mk b/configs/kona/kona.mk
index 252c462..33a678f 100644
--- a/configs/kona/kona.mk
+++ b/configs/kona/kona.mk
@@ -401,7 +401,6 @@
 vendor.audio.feature.a2dp_offload.enable=true \
 vendor.audio.feature.afe_proxy.enable=true \
 vendor.audio.feature.anc_headset.enable=true \
-vendor.audio.feature.audio_sphere.enable=true \
 vendor.audio.feature.battery_listener.enable=true \
 vendor.audio.feature.compr_cap.enable=false \
 vendor.audio.feature.compress_in.enable=true \
diff --git a/configs/lito/audio_policy_configuration.xml b/configs/lito/audio_policy_configuration.xml
index a33356b..b719ff0 100644
--- a/configs/lito/audio_policy_configuration.xml
+++ b/configs/lito/audio_policy_configuration.xml
@@ -173,6 +173,11 @@
                              samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
                              channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
                 </mixPort>
+                <mixPort name="voip_tx" role="sink"
+                         flags="AUDIO_INPUT_FLAG_VOIP_TX">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="8000,16000,32000,48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
+                </mixPort>
                 <mixPort name="surround_sound" role="sink">
                     <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                              samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
@@ -358,6 +363,8 @@
                        sources="Telephony Rx"/>
                 <route type="mix" sink="primary input"
                        sources="Wired Headset Mic,BT SCO Headset Mic,FM Tuner,USB Device In,USB Headset In,Telephony Rx"/>
+                <route type="mix" sink="voip_tx"
+                       sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In"/>
                 <route type="mix" sink="surround_sound"
                        sources="Built-In Mic,Built-In Back Mic"/>
                 <route type="mix" sink="usb_surround_sound"
diff --git a/configs/lito/lito.mk b/configs/lito/lito.mk
index dd88b9c..00876db 100644
--- a/configs/lito/lito.mk
+++ b/configs/lito/lito.mk
@@ -385,7 +385,6 @@
 vendor.audio.feature.a2dp_offload.enable=true \
 vendor.audio.feature.afe_proxy.enable=true \
 vendor.audio.feature.anc_headset.enable=true \
-vendor.audio.feature.audio_sphere.enable=true \
 vendor.audio.feature.battery_listener.enable=true \
 vendor.audio.feature.compr_cap.enable=false \
 vendor.audio.feature.compress_in.enable=true \
diff --git a/configs/lito/mixer_paths_qrd.xml b/configs/lito/mixer_paths_qrd.xml
index 0d8585b..b246c5a 100644
--- a/configs/lito/mixer_paths_qrd.xml
+++ b/configs/lito/mixer_paths_qrd.xml
@@ -2284,7 +2284,7 @@
     </path>
 
     <path name="speaker-protected">
-        <ctl name="WSA_AIF_VI Mixer WSA_SPKR_VI_1" value="1" />
+        <ctl name="WSA_AIF_VI Mixer WSA_SPKR_VI_2" value="1" />
         <ctl name="WSA_CDC_DMA_0 TX Format" value="PACKED_16B" />
         <path name="speaker" />
         <ctl name="VI_FEED_TX Channels" value="One" />
@@ -2292,7 +2292,7 @@
     </path>
 
     <path name="voice-speaker-protected">
-        <ctl name="WSA_AIF_VI Mixer WSA_SPKR_VI_1" value="1" />
+        <ctl name="WSA_AIF_VI Mixer WSA_SPKR_VI_2" value="1" />
         <ctl name="WSA_CDC_DMA_0 TX Format" value="PACKED_16B" />
         <path name="speaker-mono" />
         <ctl name="VI_FEED_TX Channels" value="One" />
diff --git a/configs/msm8937/msm8937.mk b/configs/msm8937/msm8937.mk
index 72fa6f3..a41740f 100644
--- a/configs/msm8937/msm8937.mk
+++ b/configs/msm8937/msm8937.mk
@@ -199,10 +199,6 @@
 vendor.audio.use.sw.alac.decoder=true\
 vendor.audio.use.sw.ape.decoder=true
 
-#property for AudioSphere Post processing
-PRODUCT_PROPERTY_OVERRIDES += \
-vendor.audio.pp.asphere.enabled=false
-
 #Audio voice concurrency related flags
 PRODUCT_PROPERTY_OVERRIDES += \
 vendor.voice.playback.conc.disabled=true\
@@ -245,7 +241,6 @@
 vendor.audio.feature.a2dp_offload.enable=false \
 vendor.audio.feature.afe_proxy.enable=true \
 vendor.audio.feature.anc_headset.enable=true \
-vendor.audio.feature.audio_sphere.enable=true \
 vendor.audio.feature.battery_listener.enable=false \
 vendor.audio.feature.compr_cap.enable=false \
 vendor.audio.feature.compress_in.enable=false \
diff --git a/configs/msm8953/msm8953.mk b/configs/msm8953/msm8953.mk
index 25d42cf..0b0e6be 100644
--- a/configs/msm8953/msm8953.mk
+++ b/configs/msm8953/msm8953.mk
@@ -212,10 +212,6 @@
 vendor.audio.use.sw.alac.decoder=true\
 vendor.audio.use.sw.ape.decoder=true
 
-#property for AudioSphere Post processing
-PRODUCT_PROPERTY_OVERRIDES += \
-vendor.audio.pp.asphere.enabled=false
-
 #Audio voice concurrency related flags
 PRODUCT_PROPERTY_OVERRIDES += \
 vendor.voice.playback.conc.disabled=true\
diff --git a/configs/msm8998/audio_policy_configuration.xml b/configs/msm8998/audio_policy_configuration.xml
index 505a205..5f861d9 100644
--- a/configs/msm8998/audio_policy_configuration.xml
+++ b/configs/msm8998/audio_policy_configuration.xml
@@ -167,6 +167,11 @@
                              samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
                              channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
                 </mixPort>
+                <mixPort name="voip_tx" role="sink"
+                         flags="AUDIO_INPUT_FLAG_VOIP_TX">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="8000,16000,32000,48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
+                </mixPort>
                 <mixPort name="surround_sound" role="sink">
                     <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                              samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
@@ -346,6 +351,8 @@
                        sources="Telephony Rx"/>
                 <route type="mix" sink="primary input"
                        sources="Wired Headset Mic,BT SCO Headset Mic,FM Tuner,USB Device In,USB Headset In,Telephony Rx"/>
+                <route type="mix" sink="voip_tx"
+                       sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In"/>
                 <route type="mix" sink="surround_sound"
                        sources="Built-In Mic,Built-In Back Mic"/>
                 <route type="mix" sink="record_24"
diff --git a/configs/msm8998/msm8998.mk b/configs/msm8998/msm8998.mk
index 56cc95d..7004379 100644
--- a/configs/msm8998/msm8998.mk
+++ b/configs/msm8998/msm8998.mk
@@ -99,7 +99,9 @@
     vendor/qcom/opensource/audio-hal/primary-hal/configs/msm8998/sound_trigger_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_platform_info.xml \
     vendor/qcom/opensource/audio-hal/primary-hal/configs/msm8998/graphite_ipc_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/graphite_ipc_platform_info.xml \
     vendor/qcom/opensource/audio-hal/primary-hal/configs/msm8998/audio_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info.xml \
-    vendor/qcom/opensource/audio-hal/primary-hal/configs/msm8998/audio_configs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_configs.xml
+    vendor/qcom/opensource/audio-hal/primary-hal/configs/msm8998/audio_configs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_configs.xml \
+    frameworks/native/data/etc/android.hardware.audio.pro.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.pro.xml \
+    frameworks/native/data/etc/android.hardware.audio.low_latency.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.low_latency.xml
 
 #XML Audio configuration files
 ifeq ($(USE_XML_AUDIO_POLICY_CONF), 1)
@@ -255,7 +257,6 @@
 vendor.audio.feature.a2dp_offload.enable=true \
 vendor.audio.feature.afe_proxy.enable=true \
 vendor.audio.feature.anc_headset.enable=true \
-vendor.audio.feature.audio_sphere.enable=true \
 vendor.audio.feature.battery_listener.enable=false \
 vendor.audio.feature.compr_cap.enable=false \
 vendor.audio.feature.compress_in.enable=false \
diff --git a/configs/msmnile/audio_policy_configuration.xml b/configs/msmnile/audio_policy_configuration.xml
index 5c05206..92430bd 100644
--- a/configs/msmnile/audio_policy_configuration.xml
+++ b/configs/msmnile/audio_policy_configuration.xml
@@ -173,6 +173,11 @@
                              samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
                              channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
                 </mixPort>
+                <mixPort name="voip_tx" role="sink"
+                         flags="AUDIO_INPUT_FLAG_VOIP_TX">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="8000,16000,32000,48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
+                </mixPort>
                 <mixPort name="usb_surround_sound" role="sink">
                     <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                              samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,88200,96000,176400,192000"
@@ -350,6 +355,8 @@
                        sources="Telephony Rx"/>
                 <route type="mix" sink="primary input"
                        sources="Wired Headset Mic,BT SCO Headset Mic,FM Tuner,USB Device In,USB Headset In,Telephony Rx"/>
+                <route type="mix" sink="voip_tx"
+                       sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In"/>
                 <route type="mix" sink="usb_surround_sound"
                        sources="USB Device In,USB Headset In"/>
                 <route type="mix" sink="record_24"
diff --git a/configs/msmnile/mixer_paths_tavil.xml b/configs/msmnile/mixer_paths_tavil.xml
index fb315bf..cb9d2af 100644
--- a/configs/msmnile/mixer_paths_tavil.xml
+++ b/configs/msmnile/mixer_paths_tavil.xml
@@ -3025,7 +3025,12 @@
     </path>
 
     <path name="voice-tty-hco-headset-mic">
-        <path name="voice-tty-full-headset-mic" />
+        <ctl name="AIF1_CAP Mixer SLIM TX0" value="1"/>
+        <ctl name="SLIM_0_TX Channels" value="One" />
+        <ctl name="CDC_IF TX0 MUX" value="DEC0" />
+        <ctl name="ADC MUX0" value="AMIC" />
+        <ctl name="AMIC MUX0" value="ADC2" />
+        <ctl name="IIR0 INP0 MUX" value="DEC0" />
     </path>
 
     <path name="voice-tty-vco-handset-mic">
diff --git a/configs/msmnile/msmnile.mk b/configs/msmnile/msmnile.mk
index 29f277b..3315b11 100644
--- a/configs/msmnile/msmnile.mk
+++ b/configs/msmnile/msmnile.mk
@@ -380,7 +380,6 @@
 vendor.audio.feature.a2dp_offload.enable=true \
 vendor.audio.feature.afe_proxy.enable=false \
 vendor.audio.feature.anc_headset.enable=false \
-vendor.audio.feature.audio_sphere.enable=false \
 vendor.audio.feature.battery_listener.enable=false \
 vendor.audio.feature.compr_cap.enable=false \
 vendor.audio.feature.compress_in.enable=false \
@@ -425,7 +424,6 @@
 vendor.audio.feature.a2dp_offload.enable=true \
 vendor.audio.feature.afe_proxy.enable=true \
 vendor.audio.feature.anc_headset.enable=true \
-vendor.audio.feature.audio_sphere.enable=true \
 vendor.audio.feature.battery_listener.enable=true \
 vendor.audio.feature.compr_cap.enable=false \
 vendor.audio.feature.compress_in.enable=true \
diff --git a/configs/msmsteppe/audio_policy_configuration.xml b/configs/msmsteppe/audio_policy_configuration.xml
index b092687..99f03bf 100644
--- a/configs/msmsteppe/audio_policy_configuration.xml
+++ b/configs/msmsteppe/audio_policy_configuration.xml
@@ -167,6 +167,11 @@
                              samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
                              channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
                 </mixPort>
+                <mixPort name="voip_tx" role="sink"
+                         flags="AUDIO_INPUT_FLAG_VOIP_TX">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="8000,16000,32000,48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
+                </mixPort>
                 <mixPort name="incall_music_uplink" role="source"
                         flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC">
                     <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
@@ -350,6 +355,8 @@
                        sources="Telephony Rx"/>
                 <route type="mix" sink="primary input"
                        sources="Wired Headset Mic,BT SCO Headset Mic,FM Tuner,USB Device In,USB Headset In,Telephony Rx"/>
+                <route type="mix" sink="voip_tx"
+                       sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In"/>
                 <route type="mix" sink="usb_surround_sound"
                        sources="USB Device In,USB Headset In"/>
                 <route type="mix" sink="record_24"
diff --git a/configs/msmsteppe/mixer_paths_qrd.xml b/configs/msmsteppe/mixer_paths_qrd.xml
index db33f96..5665322 100644
--- a/configs/msmsteppe/mixer_paths_qrd.xml
+++ b/configs/msmsteppe/mixer_paths_qrd.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!-- Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.    -->
+<!-- Copyright (c) 2015-2019, 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 -->
@@ -2196,7 +2196,15 @@
     </path>
 
     <path name="voice-headphones">
-        <path name="headphones" />
+        <ctl name="RX_MACRO RX0 MUX" value="AIF1_PB" />
+        <ctl name="RX_MACRO RX1 MUX" value="AIF1_PB" />
+        <ctl name="RX_CDC_DMA_RX_0 Channels" value="Two" />
+        <ctl name="RX INT0_1 MIX1 INP0" value="RX0" />
+        <ctl name="RX INT1_1 MIX1 INP0" value="RX1" />
+        <ctl name="RX INT0 DEM MUX" value="CLSH_DSM_OUT" />
+        <ctl name="RX INT1 DEM MUX" value="CLSH_DSM_OUT" />
+        <ctl name="HPHL_RDAC Switch" value="1" />
+        <ctl name="HPHR_RDAC Switch" value="1" />
     </path>
 
     <path name="voice-line">
diff --git a/configs/msmsteppe/msmsteppe.mk b/configs/msmsteppe/msmsteppe.mk
index 5c648b5..ec546ac 100644
--- a/configs/msmsteppe/msmsteppe.mk
+++ b/configs/msmsteppe/msmsteppe.mk
@@ -362,7 +362,6 @@
 vendor.audio.feature.a2dp_offload.enable=true \
 vendor.audio.feature.afe_proxy.enable=true \
 vendor.audio.feature.anc_headset.enable=true \
-vendor.audio.feature.audio_sphere.enable=true \
 vendor.audio.feature.battery_listener.enable=false \
 vendor.audio.feature.compr_cap.enable=false \
 vendor.audio.feature.compress_in.enable=false \
diff --git a/configs/msmsteppe/sound_trigger_mixer_paths.xml b/configs/msmsteppe/sound_trigger_mixer_paths.xml
index a489e7f..90de0d3 100644
--- a/configs/msmsteppe/sound_trigger_mixer_paths.xml
+++ b/configs/msmsteppe/sound_trigger_mixer_paths.xml
@@ -206,11 +206,11 @@
         <ctl name="TX_DEC3 Volume" value="102" />
         <ctl name="TX DMIC MUX0" value="DMIC2" />
         <ctl name="TX_AIF1_CAP Mixer DEC1" value="1" />
-        <ctl name="TX DMIC MUX1" value="DMIC1" />
+        <ctl name="TX DMIC MUX1" value="DMIC0" />
         <ctl name="TX_AIF1_CAP Mixer DEC2" value="1" />
         <ctl name="TX DMIC MUX2" value="DMIC3" />
         <ctl name="TX_AIF1_CAP Mixer DEC3" value="1" />
-        <ctl name="TX DMIC MUX3" value="DMIC0" />
+        <ctl name="TX DMIC MUX3" value="DMIC1" />
     </path>
 
     <path name="echo-reference">
diff --git a/configs/msmsteppe/sound_trigger_mixer_paths_wcd9340.xml b/configs/msmsteppe/sound_trigger_mixer_paths_wcd9340.xml
index 55dd42f..f74c4fe 100644
--- a/configs/msmsteppe/sound_trigger_mixer_paths_wcd9340.xml
+++ b/configs/msmsteppe/sound_trigger_mixer_paths_wcd9340.xml
@@ -199,7 +199,7 @@
         <ctl name= "DMIC MUX0" value="DMIC2" />
         <ctl name= "DEC0 Volume" value="84" />
         <ctl name= "ADC MUX1" value="DMIC" />
-        <ctl name= "DMIC MUX1" value="DMIC0" />
+        <ctl name= "DMIC MUX1" value="DMIC5" />
         <ctl name= "DEC1 Volume" value="84" />
         <ctl name= "WDMA3 PORT0 MUX" value="DEC0" />
         <ctl name= "WDMA3 PORT1 MUX" value="DEC1" />
@@ -217,7 +217,7 @@
         <ctl name= "DMIC MUX1" value="DMIC0" />
         <ctl name= "DEC1 Volume" value="84" />
         <ctl name= "ADC MUX2" value="DMIC" />
-        <ctl name= "DMIC MUX2" value="DMIC1" />
+        <ctl name= "DMIC MUX2" value="DMIC5" />
         <ctl name= "DEC2 Volume" value="84" />
         <ctl name= "WDMA3 PORT0 MUX" value="DEC0" />
         <ctl name= "WDMA3 PORT1 MUX" value="DEC1" />
@@ -237,10 +237,10 @@
         <ctl name= "DMIC MUX1" value="DMIC0" />
         <ctl name= "DEC1 Volume" value="84" />
         <ctl name= "ADC MUX2" value="DMIC" />
-        <ctl name= "DMIC MUX2" value="DMIC1" />
+        <ctl name= "DMIC MUX2" value="DMIC5" />
         <ctl name= "DEC2 Volume" value="84" />
         <ctl name= "ADC MUX3" value="DMIC" />
-        <ctl name= "DMIC MUX3" value="DMIC3" />
+        <ctl name= "DMIC MUX3" value="DMIC1" />
         <ctl name= "DEC3 Volume" value="84" />
         <ctl name= "WDMA3 PORT0 MUX" value="DEC0" />
         <ctl name= "WDMA3 PORT1 MUX" value="DEC1" />
@@ -298,7 +298,7 @@
         <ctl name="AIF1_CAP Mixer SLIM TX8" value="1" />
         <ctl name="CDC_IF TX7 MUX" value="DEC7" />
         <ctl name="ADC MUX7" value="DMIC" />
-        <ctl name="DMIC MUX7" value="DMIC1" />
+        <ctl name="DMIC MUX7" value="DMIC2" />
         <ctl name="CDC_IF TX8 MUX" value="DEC8" />
         <ctl name="ADC MUX8" value="DMIC" />
         <ctl name="DMIC MUX8" value="DMIC5" />
@@ -312,13 +312,13 @@
         <ctl name="SLIM_0_TX Channels" value="Three" />
         <ctl name="CDC_IF TX5 MUX" value="DEC5" />
         <ctl name="ADC MUX5" value="DMIC" />
-        <ctl name="DMIC MUX5" value="DMIC1" />
+        <ctl name="DMIC MUX5" value="DMIC2" />
         <ctl name="CDC_IF TX6 MUX" value="DEC6" />
         <ctl name="ADC MUX6" value="DMIC" />
-        <ctl name="DMIC MUX6" value="DMIC5" />
+        <ctl name="DMIC MUX6" value="DMIC0" />
         <ctl name="CDC_IF TX7 MUX" value="DEC7" />
         <ctl name="ADC MUX7" value="DMIC" />
-        <ctl name="DMIC MUX7" value="DMIC2" />
+        <ctl name="DMIC MUX7" value="DMIC5" />
     </path>
 
     <path name="listen-ape-handset-qmic">
@@ -329,16 +329,16 @@
         <ctl name="SLIM_0_TX Channels" value="Four" />
         <ctl name="CDC_IF TX5 MUX" value="DEC5" />
         <ctl name="ADC MUX5" value="DMIC" />
-        <ctl name="DMIC MUX5" value="DMIC1" />
+        <ctl name="DMIC MUX5" value="DMIC2" />
         <ctl name="CDC_IF TX6 MUX" value="DEC6" />
         <ctl name="ADC MUX6" value="DMIC" />
-        <ctl name="DMIC MUX6" value="DMIC5" />
+        <ctl name="DMIC MUX6" value="DMIC0" />
         <ctl name="CDC_IF TX7 MUX" value="DEC7" />
         <ctl name="ADC MUX7" value="DMIC" />
-        <ctl name="DMIC MUX7" value="DMIC2" />
+        <ctl name="DMIC MUX7" value="DMIC5" />
         <ctl name="CDC_IF TX8 MUX" value="DEC8" />
         <ctl name="ADC MUX8" value="DMIC" />
-        <ctl name="DMIC MUX8" value="DMIC0" />
+        <ctl name="DMIC MUX8" value="DMIC1" />
     </path>
 
     <path name="echo-reference">
diff --git a/configs/msmsteppe/sound_trigger_platform_info.xml b/configs/msmsteppe/sound_trigger_platform_info.xml
index 413f4c6..a85a180 100644
--- a/configs/msmsteppe/sound_trigger_platform_info.xml
+++ b/configs/msmsteppe/sound_trigger_platform_info.xml
@@ -54,6 +54,8 @@
 
     </common_config>
     <acdb_ids>
+        <!--For internal codec please enable below device-->
+        <!--param DEVICE_HANDSET_MIC_APE="130" /-->
         <param DEVICE_HANDSET_MIC_APE="100" />
         <param DEVICE_HANDSET_MIC_CPE="128" />
         <param DEVICE_HANDSET_MIC_ECPP_CPE="128" />
@@ -127,6 +129,28 @@
             <param read_rsp_ids="0x00020013, 0x3, 0x00020016" />
             <param custom_config_ids="0x00012C0D, 0x3, 0x00012C20" />
         </gcs_usecase>
+        <gcs_usecase>
+            <param uid="0x7" />
+            <param acdb_devices="DEVICE_HANDSET_DMIC_CPE" />
+            <param load_sound_model_ids="0x00012C0D, 0x7, 0x00012C14" />
+            <param confidence_levels_ids="0x00012C0D, 0x7, 0x00012C28" />
+            <param detection_event_ids="0x00012C0D, 0x7, 0x00012B05" />
+            <param read_cmd_ids="0x00020013, 0x7, 0x00020015" />
+            <param read_rsp_ids="0x00020013, 0x7, 0x00020016" />
+            <param custom_config_ids="0x00012C0D, 0x7, 0x00012C20" />
+            <param det_event_type_ids="0x00012C0D, 0x7, 0x00012C2A" />
+        </gcs_usecase>
+        <gcs_usecase>
+            <param uid="0x8" />
+            <param acdb_devices="DEVICE_HANDSET_DMIC_CPE" />
+            <param load_sound_model_ids="0x00012C0D, 0x8, 0x00012C14" />
+            <param confidence_levels_ids="0x00012C0D, 0x8, 0x00012C28" />
+            <param detection_event_ids="0x00012C0D, 0x8, 0x00012B05" />
+            <param read_cmd_ids="0x00020013, 0x8, 0x00020015" />
+            <param read_rsp_ids="0x00020013, 0x8, 0x00020016" />
+            <param custom_config_ids="0x00012C0D, 0x8, 0x00012C20" />
+            <param det_event_type_ids="0x00012C0D, 0x8, 0x00012C2A" />
+        </gcs_usecase>
         <!-- Module and param ids with which the algorithm is integrated
             in non-graphite firmware (note these must come after gcs params)
             Extends flexibility to have different ids based on execution type.
diff --git a/configs/msmsteppe_au/mixer_paths_adp.xml b/configs/msmsteppe_au/mixer_paths_adp.xml
index e2de539..4ac4798 100644
--- a/configs/msmsteppe_au/mixer_paths_adp.xml
+++ b/configs/msmsteppe_au/mixer_paths_adp.xml
@@ -755,6 +755,11 @@
         <path name="compress-offload-playback4" />
     </path>
 
+    <path name="voice-call">
+        <!-- Added AFE loopback ctrl path for CS-Voice call-->
+        <ctl name="TERT_TDM_RX_0 Port Mixer AUX_PCM_UL_TX" value="1" />
+        <ctl name="AUX_PCM_RX Port Mixer TERT_TDM_TX_0" value="1" />
+    </path>
 
     <path name="compress-offload-playback4 afe-proxy">
         <ctl name="AFE_PCM_RX Audio Mixer MultiMedia11" value="1" />
diff --git a/configs/qssi/qssi.mk b/configs/qssi/qssi.mk
index 39569fb..653c177 100644
--- a/configs/qssi/qssi.mk
+++ b/configs/qssi/qssi.mk
@@ -106,6 +106,10 @@
 PRODUCT_PRODUCT_PROPERTIES += \
 audio.sys.noisy.broadcast.delay=600
 
+#offload minimum duration set to 30sec
+PRODUCT_PRODUCT_PROPERTIES += \
+audio.offload.min.duration.secs=30
+
 #offload pausetime out duration to 3 secs to inline with other outputs
 PRODUCT_PRODUCT_PROPERTIES += \
 audio.sys.offload.pstimeout.secs=3
diff --git a/configs/sdm660/audio_policy_configuration.xml b/configs/sdm660/audio_policy_configuration.xml
index 662764f..e1a0181 100644
--- a/configs/sdm660/audio_policy_configuration.xml
+++ b/configs/sdm660/audio_policy_configuration.xml
@@ -163,6 +163,11 @@
                              samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
                              channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
                 </mixPort>
+                <mixPort name="voip_tx" role="sink"
+                         flags="AUDIO_INPUT_FLAG_VOIP_TX">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="8000,16000,32000,48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
+                </mixPort>
                 <mixPort name="surround_sound" role="sink">
                     <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                              samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
@@ -337,6 +342,8 @@
                        sources="Telephony Rx"/>
                 <route type="mix" sink="primary input"
                        sources="Wired Headset Mic,BT SCO Headset Mic,FM Tuner,USB Device In,USB Headset In,Telephony Rx"/>
+                <route type="mix" sink="voip_tx"
+                       sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In"/>
                 <route type="mix" sink="surround_sound"
                        sources="Built-In Mic,Built-In Back Mic"/>
                 <route type="mix" sink="record_24"
diff --git a/configs/sdm660/sdm660.mk b/configs/sdm660/sdm660.mk
index 0f66da9..03e59e2 100644
--- a/configs/sdm660/sdm660.mk
+++ b/configs/sdm660/sdm660.mk
@@ -106,7 +106,9 @@
     vendor/qcom/opensource/audio-hal/primary-hal/configs/sdm660/sound_trigger_mixer_paths_wcd9340.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths_wcd9340.xml \
     vendor/qcom/opensource/audio-hal/primary-hal/configs/sdm660/sound_trigger_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_platform_info.xml \
     vendor/qcom/opensource/audio-hal/primary-hal/configs/sdm660/graphite_ipc_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/graphite_ipc_platform_info.xml \
-    vendor/qcom/opensource/audio-hal/primary-hal/configs/sdm660/audio_configs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_configs.xml
+    vendor/qcom/opensource/audio-hal/primary-hal/configs/sdm660/audio_configs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_configs.xml \
+    frameworks/native/data/etc/android.hardware.audio.pro.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.pro.xml \
+    frameworks/native/data/etc/android.hardware.audio.low_latency.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.low_latency.xml
 
 #XML Audio configuration files
 ifeq ($(USE_XML_AUDIO_POLICY_CONF), 1)
@@ -266,7 +268,6 @@
 vendor.audio.feature.a2dp_offload.enable=true \
 vendor.audio.feature.afe_proxy.enable=true \
 vendor.audio.feature.anc_headset.enable=true \
-vendor.audio.feature.audio_sphere.enable=true \
 vendor.audio.feature.battery_listener.enable=false \
 vendor.audio.feature.compr_cap.enable=false \
 vendor.audio.feature.compress_in.enable=false \
diff --git a/configs/sdm710/audio_policy_configuration.xml b/configs/sdm710/audio_policy_configuration.xml
index a7f4869..145a811 100644
--- a/configs/sdm710/audio_policy_configuration.xml
+++ b/configs/sdm710/audio_policy_configuration.xml
@@ -167,6 +167,11 @@
                              samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
                              channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
                 </mixPort>
+                <mixPort name="voip_tx" role="sink"
+                         flags="AUDIO_INPUT_FLAG_VOIP_TX">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="8000,16000,32000,48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
+                </mixPort>
                 <mixPort name="surround_sound" role="sink">
                     <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                              samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
@@ -346,6 +351,8 @@
                        sources="Telephony Rx"/>
                 <route type="mix" sink="primary input"
                        sources="Wired Headset Mic,BT SCO Headset Mic,FM Tuner,USB Device In,USB Headset In,Telephony Rx"/>
+                <route type="mix" sink="voip_tx"
+                       sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In"/>
                 <route type="mix" sink="surround_sound"
                        sources="Built-In Mic,Built-In Back Mic"/>
                 <route type="mix" sink="record_24"
diff --git a/configs/sdm710/sdm710.mk b/configs/sdm710/sdm710.mk
index 37fe4a4..ea71582 100644
--- a/configs/sdm710/sdm710.mk
+++ b/configs/sdm710/sdm710.mk
@@ -170,7 +170,9 @@
     vendor/qcom/opensource/audio-hal/primary-hal/configs/sdm710/sound_trigger_mixer_paths_wcd9340.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths_wcd9340.xml \
     vendor/qcom/opensource/audio-hal/primary-hal/configs/sdm710/sound_trigger_mixer_paths_wcd9340.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths_wcd9340.xml \
     vendor/qcom/opensource/audio-hal/primary-hal/configs/sdm710/graphite_ipc_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/graphite_ipc_platform_info.xml \
-    vendor/qcom/opensource/audio-hal/primary-hal/configs/sdm710/audio_configs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_configs.xml
+    vendor/qcom/opensource/audio-hal/primary-hal/configs/sdm710/audio_configs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_configs.xml \
+    frameworks/native/data/etc/android.hardware.audio.pro.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.pro.xml \
+    frameworks/native/data/etc/android.hardware.audio.low_latency.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.low_latency.xml
 
 #XML Audio configuration files
 ifeq ($(USE_XML_AUDIO_POLICY_CONF), 1)
@@ -365,7 +367,6 @@
 vendor.audio.feature.a2dp_offload.enable=true \
 vendor.audio.feature.afe_proxy.enable=true \
 vendor.audio.feature.anc_headset.enable=true \
-vendor.audio.feature.audio_sphere.enable=true \
 vendor.audio.feature.battery_listener.enable=false \
 vendor.audio.feature.compr_cap.enable=false \
 vendor.audio.feature.compress_in.enable=false \
diff --git a/configs/sdm845/audio_policy_configuration.xml b/configs/sdm845/audio_policy_configuration.xml
index 76f5236..fcd0119 100644
--- a/configs/sdm845/audio_policy_configuration.xml
+++ b/configs/sdm845/audio_policy_configuration.xml
@@ -161,12 +161,16 @@
                     <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                              samplingRates="8000,16000,32000,48000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
                 </mixPort>
-
                 <mixPort name="primary input" role="sink" maxOpenCount="2" maxActiveCount="2">
                     <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                              samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
                              channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
                 </mixPort>
+                <mixPort name="voip_tx" role="sink"
+                         flags="AUDIO_INPUT_FLAG_VOIP_TX">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="8000,16000,32000,48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
+                </mixPort>
                 <mixPort name="record_24" role="sink">
                     <profile name="" format="AUDIO_FORMAT_PCM_24_BIT_PACKED"
                              samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,96000,192000"
@@ -341,6 +345,8 @@
                        sources="Telephony Rx"/>
                 <route type="mix" sink="primary input"
                        sources="Wired Headset Mic,BT SCO Headset Mic,FM Tuner,USB Device In,USB Headset In,Telephony Rx"/>
+                <route type="mix" sink="voip_tx"
+                       sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In"/>
                 <route type="mix" sink="record_24"
                        sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic"/>
                 <route type="mix" sink="mmap_no_irq_in"
diff --git a/configs/sdm845/sdm845.mk b/configs/sdm845/sdm845.mk
index 659262b..6e56597 100644
--- a/configs/sdm845/sdm845.mk
+++ b/configs/sdm845/sdm845.mk
@@ -124,7 +124,9 @@
     vendor/qcom/opensource/audio-hal/primary-hal/configs/sdm845/sound_trigger_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_platform_info.xml \
     vendor/qcom/opensource/audio-hal/primary-hal/configs/sdm845/graphite_ipc_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/graphite_ipc_platform_info.xml \
     vendor/qcom/opensource/audio-hal/primary-hal/configs/sdm845/audio_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info.xml \
-    vendor/qcom/opensource/audio-hal/primary-hal/configs/sdm845/audio_configs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_configs.xml
+    vendor/qcom/opensource/audio-hal/primary-hal/configs/sdm845/audio_configs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_configs.xml \
+    frameworks/native/data/etc/android.hardware.audio.pro.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.pro.xml \
+    frameworks/native/data/etc/android.hardware.audio.low_latency.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.low_latency.xml
 
 #XML Audio configuration files
 ifeq ($(USE_XML_AUDIO_POLICY_CONF), 1)
@@ -314,7 +316,6 @@
 vendor.audio.feature.a2dp_offload.enable=true \
 vendor.audio.feature.afe_proxy.enable=true \
 vendor.audio.feature.anc_headset.enable=true \
-vendor.audio.feature.audio_sphere.enable=true \
 vendor.audio.feature.battery_listener.enable=false \
 vendor.audio.feature.compr_cap.enable=false \
 vendor.audio.feature.compress_in.enable=false \
diff --git a/configs/trinket/audio_policy_configuration.xml b/configs/trinket/audio_policy_configuration.xml
index 8015afa..043df15 100644
--- a/configs/trinket/audio_policy_configuration.xml
+++ b/configs/trinket/audio_policy_configuration.xml
@@ -167,6 +167,11 @@
                              samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
                              channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
                 </mixPort>
+                <mixPort name="voip_tx" role="sink"
+                         flags="AUDIO_INPUT_FLAG_VOIP_TX">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="8000,16000,32000,48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
+                </mixPort>
                 <mixPort name="incall_music_uplink" role="source"
                         flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC">
                     <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
@@ -358,6 +363,8 @@
                        sources="Telephony Rx"/>
                 <route type="mix" sink="primary input"
                        sources="Wired Headset Mic,BT SCO Headset Mic,FM Tuner,USB Device In,USB Headset In,Telephony Rx"/>
+                <route type="mix" sink="voip_tx"
+                       sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In"/>
                 <route type="mix" sink="surround_sound"
                        sources="Built-In Mic,Built-In Back Mic"/>
                 <route type="mix" sink="usb_surround_sound"
diff --git a/configs/trinket/trinket.mk b/configs/trinket/trinket.mk
index 5dc2ec4..5176889 100644
--- a/configs/trinket/trinket.mk
+++ b/configs/trinket/trinket.mk
@@ -244,7 +244,6 @@
 vendor.audio.feature.a2dp_offload.enable=true \
 vendor.audio.feature.afe_proxy.enable=true \
 vendor.audio.feature.anc_headset.enable=true \
-vendor.audio.feature.audio_sphere.enable=true \
 vendor.audio.feature.battery_listener.enable=false \
 vendor.audio.feature.compr_cap.enable=false \
 vendor.audio.feature.compress_in.enable=false \
diff --git a/hal/Android.mk b/hal/Android.mk
index a671373..1a0c2e2 100644
--- a/hal/Android.mk
+++ b/hal/Android.mk
@@ -88,6 +88,10 @@
   LOCAL_CFLAGS := -DPLATFORM_LITO
   LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="4"
 endif
+ifneq ($(filter atoll,$(TARGET_BOARD_PLATFORM)),)
+  LOCAL_CFLAGS := -DPLATFORM_ATOLL
+  LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="4"
+endif
 ifneq ($(filter sdm660,$(TARGET_BOARD_PLATFORM)),)
   LOCAL_CFLAGS := -DPLATFORM_MSMFALCON
   LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="8"
diff --git a/hal/audio_extn/Android.mk b/hal/audio_extn/Android.mk
index e944260..fee6977 100644
--- a/hal/audio_extn/Android.mk
+++ b/hal/audio_extn/Android.mk
@@ -410,7 +410,7 @@
 PRIMARY_HAL_PATH := vendor/qcom/opensource/audio-hal/primary-hal/hal
 AUDIO_PLATFORM := $(TARGET_BOARD_PLATFORM)
 
-ifneq ($(filter sdm845 sdm710 msmnile kona lito sdm660 msm8937 msm8998 $(MSMSTEPPE) $(TRINKET),$(TARGET_BOARD_PLATFORM)),)
+ifneq ($(filter sdm845 sdm710 msmnile kona lito atoll sdm660 msm8937 msm8998 $(MSMSTEPPE) $(TRINKET),$(TARGET_BOARD_PLATFORM)),)
   # B-family platform uses msm8974 code base
   AUDIO_PLATFORM := msm8974
   MULTIPLE_HW_VARIANTS_ENABLED := true
@@ -469,7 +469,7 @@
 PRIMARY_HAL_PATH := vendor/qcom/opensource/audio-hal/primary-hal/hal
 AUDIO_PLATFORM := $(TARGET_BOARD_PLATFORM)
 
-ifneq ($(filter sdm845 sdm710 msmnile kona lito sdm660 msm8937 msm8998 $(MSMSTEPPE) $(TRINKET),$(TARGET_BOARD_PLATFORM)),)
+ifneq ($(filter sdm845 sdm710 msmnile kona lito atoll sdm660 msm8937 msm8998 $(MSMSTEPPE) $(TRINKET),$(TARGET_BOARD_PLATFORM)),)
   # B-family platform uses msm8974 code base
   AUDIO_PLATFORM := msm8974
   MULTIPLE_HW_VARIANTS_ENABLED := true
@@ -528,7 +528,7 @@
 PRIMARY_HAL_PATH := vendor/qcom/opensource/audio-hal/primary-hal/hal
 AUDIO_PLATFORM := $(TARGET_BOARD_PLATFORM)
 
-ifneq ($(filter sdm845 sdm710 msmnile kona lito sdm660 msm8937 msm8998 $(MSMSTEPPE) $(TRINKET),$(TARGET_BOARD_PLATFORM)),)
+ifneq ($(filter sdm845 sdm710 msmnile kona lito atoll sdm660 msm8937 msm8998 $(MSMSTEPPE) $(TRINKET),$(TARGET_BOARD_PLATFORM)),)
   # B-family platform uses msm8974 code base
   AUDIO_PLATFORM := msm8974
   MULTIPLE_HW_VARIANTS_ENABLED := true
@@ -590,7 +590,7 @@
 PRIMARY_HAL_PATH := vendor/qcom/opensource/audio-hal/primary-hal/hal
 AUDIO_PLATFORM := $(TARGET_BOARD_PLATFORM)
 
-ifneq ($(filter sdm845 sdm710 msmnile kona lito sdm660 msm8937 msm8998 $(MSMSTEPPE) $(TRINKET),$(TARGET_BOARD_PLATFORM)),)
+ifneq ($(filter sdm845 sdm710 msmnile kona lito atoll sdm660 msm8937 msm8998 $(MSMSTEPPE) $(TRINKET),$(TARGET_BOARD_PLATFORM)),)
   # B-family platform uses msm8974 code base
   AUDIO_PLATFORM := msm8974
   MULTIPLE_HW_VARIANTS_ENABLED := true
@@ -660,7 +660,7 @@
 PRIMARY_HAL_PATH := vendor/qcom/opensource/audio-hal/primary-hal/hal
 AUDIO_PLATFORM := $(TARGET_BOARD_PLATFORM)
 
-ifneq ($(filter sdm845 sdm710 msmnile kona lito sdm660 msm8937 msm8998 $(MSMSTEPPE) $(TRINKET),$(TARGET_BOARD_PLATFORM)),)
+ifneq ($(filter sdm845 sdm710 msmnile kona lito atoll sdm660 msm8937 msm8998 $(MSMSTEPPE) $(TRINKET),$(TARGET_BOARD_PLATFORM)),)
   # B-family platform uses msm8974 code base
   AUDIO_PLATFORM := msm8974
   MULTIPLE_HW_VARIANTS_ENABLED := true
diff --git a/hal/audio_extn/audio_extn.h b/hal/audio_extn/audio_extn.h
index c7fc60e..d407f80 100644
--- a/hal/audio_extn/audio_extn.h
+++ b/hal/audio_extn/audio_extn.h
@@ -1001,7 +1001,8 @@
 
 #define audio_extn_gef_init(adev) (0)
 #define audio_extn_gef_deinit(adev) (0)
-#define audio_extn_gef_notify_device_config(devices, cmask, sample_rate, acdb_id) (0)
+#define audio_extn_gef_notify_device_config(devices, cmask, sample_rate, \
+        acdb_id, app_type) (0)
 
 #ifndef INSTANCE_ID_ENABLED
 #define audio_extn_gef_send_audio_cal(dev, acdb_dev_id, acdb_device_type,\
@@ -1033,7 +1034,7 @@
 void audio_extn_gef_deinit(struct audio_device *adev);
 
 void audio_extn_gef_notify_device_config(audio_devices_t audio_device,
-    audio_channel_mask_t channel_mask, int sample_rate, int acdb_id);
+    audio_channel_mask_t channel_mask, int sample_rate, int acdb_id, int app_type);
 #ifndef INSTANCE_ID_ENABLED
 int audio_extn_gef_send_audio_cal(void* adev, int acdb_dev_id, int acdb_device_type,
     int app_type, int topology_id, int sample_rate, uint32_t module_id,
diff --git a/hal/audio_extn/auto_hal.c b/hal/audio_extn/auto_hal.c
index ace7723..7f2163d 100644
--- a/hal/audio_extn/auto_hal.c
+++ b/hal/audio_extn/auto_hal.c
@@ -341,7 +341,7 @@
  */
 #define MIN_VOLUME_VALUE_MB -6000
 #define MAX_VOLUME_VALUE_MB 600
-
+#define STEP_VALUE_MB 100
 int audio_extn_auto_hal_set_audio_port_config(struct audio_hw_device *dev,
                         const struct audio_port_config *config)
 {
@@ -394,7 +394,10 @@
                     /* millibel = 1/100 dB = 1/1000 bel
                      * q13 = (10^(mdb/100/20))*(2^13)
                      */
-                    volume = powf(10.0, ((float)config->gain.values[0] / 2000));
+                    if(config->gain.values[0] <= (MIN_VOLUME_VALUE_MB + STEP_VALUE_MB))
+                        volume = 0.0 ;
+                    else
+                        volume = powf(10.0, ((float)config->gain.values[0] / 2000));
                     ALOGV("%s: set volume to stream: %p", __func__,
                         &out_ctxt->output->stream);
                     /* set gain if output stream is active */
diff --git a/hal/audio_extn/gef.c b/hal/audio_extn/gef.c
index ca1a16b..83e9d45 100644
--- a/hal/audio_extn/gef.c
+++ b/hal/audio_extn/gef.c
@@ -64,7 +64,7 @@
 typedef void* (*gef_init_t)(void*);
 typedef void (*gef_deinit_t)(void*);
 typedef void (*gef_device_config_cb_t)(void*, audio_devices_t,
-    audio_channel_mask_t, int, int);
+    audio_channel_mask_t, int, int, int);
 
 typedef struct {
     void* handle;
@@ -428,14 +428,14 @@
 
 //this will be called from HAL to notify GEF of new device configuration
 void audio_extn_gef_notify_device_config(audio_devices_t audio_device,
-    audio_channel_mask_t channel_mask, int sample_rate, int acdb_id)
+    audio_channel_mask_t channel_mask, int sample_rate, int acdb_id, int app_type)
 {
     ALOGV("%s: Enter", __func__);
 
     //call into GEF to share channel mask and device info
     if (gef_hal_handle.handle && gef_hal_handle.device_config_cb) {
         gef_hal_handle.device_config_cb(gef_hal_handle.gef_ptr, audio_device, channel_mask,
-            sample_rate, acdb_id);
+            sample_rate, acdb_id, app_type);
     }
 
     ALOGV("%s: Exit", __func__);
diff --git a/hal/audio_extn/ip_hdlr_intf.c b/hal/audio_extn/ip_hdlr_intf.c
index 0afc705..3214c03 100644
--- a/hal/audio_extn/ip_hdlr_intf.c
+++ b/hal/audio_extn/ip_hdlr_intf.c
@@ -62,8 +62,8 @@
 #define ADSP_DEC_SERVICE_ID 1
 #define ADSP_EVENT_ID_RTIC            0x00013239
 #define ADSP_EVENT_ID_RTIC_FAIL       0x0001323A
-#define TRUMPET_TOPOLOGY 0x11000099
-#define TRUMPET_MODULE 0x0001099A
+#define TRUMPET_TOPOLOGY              0x11000099
+#define TRUMPET_MODULE                0x0001099A
 
 struct lib_fd_info {
     int32_t fd;
@@ -212,10 +212,12 @@
     return ret;
 
 }
+
 bool audio_extn_ip_hdlr_intf_supported_for_copp(void *platform)
 {
     return adm_event_enable;
 }
+
 bool audio_extn_ip_hdlr_intf_supported(audio_format_t format,
                     bool is_direct_passthrough,
                     bool is_transcode_loopback)
@@ -224,28 +226,30 @@
     if ((format & AUDIO_FORMAT_MAIN_MASK) == AUDIO_FORMAT_DOLBY_TRUEHD) {
         asm_event_enable = true;
         return true;
+    } else if ((format & AUDIO_FORMAT_MAIN_MASK) == AUDIO_FORMAT_MAT) {
+        asm_event_enable = true;
+        return true;
     } else if (!is_direct_passthrough && !audio_extn_qaf_is_enabled() &&
             (((format & AUDIO_FORMAT_MAIN_MASK) == AUDIO_FORMAT_E_AC3) ||
              ((format & AUDIO_FORMAT_MAIN_MASK) == AUDIO_FORMAT_AC3))) {
         asm_event_enable = true;
         return true;
-    } else if (is_transcode_loopback &&
+   } else if (is_transcode_loopback &&
             (((format & AUDIO_FORMAT_MAIN_MASK) == AUDIO_FORMAT_E_AC3) ||
              ((format & AUDIO_FORMAT_MAIN_MASK) == AUDIO_FORMAT_AC3))) {
-        asm_event_enable = true;
-        return true;
-    } else {
-        asm_event_enable = false;
-        return false;
-    }
+       asm_event_enable = true;
+       return true;
+   } else {
+       asm_event_enable = false;
+       return false;
 }
 
 int audio_extn_ip_hdlr_intf_event_adm(void *stream_handle __unused,
                                void *payload, void *ip_hdlr_handle )
 {
-    ALOGVV("%s:[%d] handle = %p\n",__func__, ip_hdlr->ref_cnt, ip_hdlr_handle);
+        ALOGVV("%s:[%d] handle = %p\n",__func__, ip_hdlr->ref_cnt, ip_hdlr_handle);
 
-    return ip_hdlr->event_adm(ip_hdlr_handle, payload);
+        return ip_hdlr->event_adm(ip_hdlr_handle, payload);
 }
 
 int audio_extn_ip_hdlr_intf_event(void *stream_handle __unused, void *payload, void *ip_hdlr_handle )
@@ -887,9 +891,6 @@
         return -EINVAL;
     }
     ALOGD("%s:[%d] handle = %p",__func__, ip_hdlr->ref_cnt, handle);
-    ret = ip_hdlr->deinit(handle);
-    if (ret < 0)
-        ALOGE("%s:[%d] deinit failed ret = %d", __func__, ip_hdlr->ref_cnt, ret);
 
     if (--ip_hdlr->ref_cnt == 0) {
         ip_hdlr->get_lib_fd(handle, &lib_fd.fd);
@@ -917,8 +918,11 @@
             goto dlclose;
         }
 
-        ret = ip_hdlr->deinit_lib(ip_hdlr->ip_lib_handle);
+        ret = ip_hdlr->deinit_lib(handle);
         ip_hdlr->lib_fd_created = false;
+        ret = ip_hdlr->deinit(handle);
+        if (ret < 0)
+            ALOGE("%s:[%d] deinit failed ret = %d", __func__, ip_hdlr->ref_cnt, ret);
         if (ip_hdlr->lib_hdl)
             dlclose(ip_hdlr->lib_hdl);
 dlclose:
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 598dea6..b759f4d 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -2702,15 +2702,18 @@
                     (usecase->stream.out->sample_rate < OUTPUT_SAMPLING_RATE_44100)) {
             usecase->stream.out->app_type_cfg.sample_rate = DEFAULT_OUTPUT_SAMPLING_RATE;
         }
+    }
+    enable_audio_route(adev, usecase);
 
-        /* Notify device change info to effect clients registered */
+    /* Notify device change info to effect clients registered */
+    if (usecase->type == PCM_PLAYBACK) {
         audio_extn_gef_notify_device_config(
                 usecase->stream.out->devices,
                 usecase->stream.out->channel_mask,
                 usecase->stream.out->app_type_cfg.sample_rate,
-                platform_get_snd_device_acdb_id(usecase->out_snd_device));
+                platform_get_snd_device_acdb_id(usecase->out_snd_device),
+                usecase->stream.out->app_type_cfg.app_type);
     }
-    enable_audio_route(adev, usecase);
 
     audio_extn_qdsp_set_device(usecase);
 
@@ -5123,6 +5126,24 @@
             volume[1] = (long)(AmpToDb(right));
             mixer_ctl_set_array(ctl, volume, sizeof(volume)/sizeof(volume[0]));
             return 0;
+        } else if ((out->devices & AUDIO_DEVICE_OUT_BUS) &&
+                (audio_extn_auto_hal_get_snd_device_for_car_audio_stream(out) ==
+                    SND_DEVICE_OUT_BUS_MEDIA)) {
+            ALOGD("%s: Overriding offload set volume for media bus stream", __func__);
+            struct listnode *node = NULL;
+            list_for_each(node, &adev->active_outputs_list) {
+                streams_output_ctxt_t *out_ctxt = node_to_item(node,
+                                                    streams_output_ctxt_t,
+                                                    list);
+                if (out_ctxt->output->usecase == USECASE_AUDIO_PLAYBACK_MEDIA) {
+                    out->volume_l = out_ctxt->output->volume_l;
+                    out->volume_r = out_ctxt->output->volume_r;
+                }
+            }
+            if (!out->a2dp_compress_mute) {
+                ret = out_set_compr_volume(&out->stream, out->volume_l, out->volume_r);
+            }
+            return ret;
         } else {
             pthread_mutex_lock(&out->compr_mute_lock);
             ALOGV("%s: compress mute %d", __func__, out->a2dp_compress_mute);
@@ -8250,13 +8271,17 @@
             if (usecase->stream.out && (usecase->type == PCM_PLAYBACK) &&
                 (usecase->devices & AUDIO_DEVICE_OUT_ALL_A2DP)){
                 ALOGD("reconfigure a2dp... forcing device switch");
-
                 pthread_mutex_unlock(&adev->lock);
                 lock_output_stream(usecase->stream.out);
                 pthread_mutex_lock(&adev->lock);
                 audio_extn_a2dp_set_handoff_mode(true);
+                ALOGD("Switching to speaker and muting the stream before select_devices");
+                check_a2dp_restore_l(adev, usecase->stream.out, false);
                 //force device switch to re configure encoder
                 select_devices(adev, usecase->id);
+                ALOGD("Unmuting the stream after select_devices");
+                usecase->stream.out->a2dp_compress_mute = false;
+                out_set_compr_volume(&usecase->stream.out->stream, usecase->stream.out->volume_l, usecase->stream.out->volume_r);
                 audio_extn_a2dp_set_handoff_mode(false);
                 pthread_mutex_unlock(&usecase->stream.out->lock);
                 break;
diff --git a/hal/msm8916/platform.c b/hal/msm8916/platform.c
index e6989f6..8b9b53d 100644
--- a/hal/msm8916/platform.c
+++ b/hal/msm8916/platform.c
@@ -4206,7 +4206,7 @@
         * enforced audible (e.g. Camera shutter sound).
         */
         if ((mode == AUDIO_MODE_IN_CALL) ||
-            voice_is_in_call(adev) ||
+            voice_check_voicecall_usecases_active(adev) ||
             voice_extn_compress_voip_is_active(adev))
                 is_active_voice_call = true;
 
@@ -4289,7 +4289,7 @@
     }
 
     if ((mode == AUDIO_MODE_IN_CALL) ||
-        voice_is_in_call(adev) ||
+        voice_check_voicecall_usecases_active(adev) ||
         voice_extn_compress_voip_is_active(adev)) {
         if (devices & AUDIO_DEVICE_OUT_WIRED_HEADPHONE ||
             devices & AUDIO_DEVICE_OUT_WIRED_HEADSET ||
@@ -4665,8 +4665,10 @@
     ALOGV("%s: enter: out_device(%#x) in_device(%#x) channel_count (%d) channel_mask (0x%x)",
           __func__, out_device, in_device, channel_count, channel_mask);
     if (my_data->external_mic) {
-        if ((out_device != AUDIO_DEVICE_NONE) && ((mode == AUDIO_MODE_IN_CALL) || voice_is_in_call(adev) ||
-            voice_extn_compress_voip_is_active(adev) || audio_extn_hfp_is_active(adev))) {
+        if ((out_device != AUDIO_DEVICE_NONE) && ((mode == AUDIO_MODE_IN_CALL) ||
+            voice_check_voicecall_usecases_active(adev) ||
+            voice_extn_compress_voip_is_active(adev) ||
+            audio_extn_hfp_is_active(adev))) {
             if (out_device & AUDIO_DEVICE_OUT_WIRED_HEADPHONE ||
                out_device & AUDIO_DEVICE_OUT_EARPIECE ||
                out_device & AUDIO_DEVICE_OUT_SPEAKER )
@@ -4680,8 +4682,10 @@
     if (snd_device != AUDIO_DEVICE_NONE)
         goto exit;
 
-    if ((out_device != AUDIO_DEVICE_NONE) && ((mode == AUDIO_MODE_IN_CALL) || voice_is_in_call(adev) ||
-        voice_extn_compress_voip_is_active(adev) || audio_extn_hfp_is_active(adev))) {
+    if ((out_device != AUDIO_DEVICE_NONE) && ((mode == AUDIO_MODE_IN_CALL) ||
+        voice_check_voicecall_usecases_active(adev) ||
+        voice_extn_compress_voip_is_active(adev) ||
+        audio_extn_hfp_is_active(adev))) {
         if ((adev->voice.tty_mode != TTY_MODE_OFF) &&
             !voice_extn_compress_voip_is_active(adev)) {
             if (out_device & AUDIO_DEVICE_OUT_WIRED_HEADPHONE ||
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index 3d89032..0988ad1 100644
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -89,7 +89,9 @@
     defined (PLATFORM_QCS605) || defined (PLATFORM_MSMNILE) || \
     defined (PLATFORM_KONA) || defined (PLATFORM_MSMSTEPPE) || \
     defined (PLATFORM_QCS405) || defined (PLATFORM_TRINKET) || \
-    defined (PLATFORM_LITO) || defined (PLATFORM_MSMFALCON)
+    defined (PLATFORM_LITO) || defined (PLATFORM_MSMFALCON) || \
+    defined (PLATFORM_ATOLL)
+
 #include <sound/devdep_params.h>
 #endif
 
@@ -2017,7 +2019,9 @@
         !strncmp(snd_card_name, "sdx-tavil-i2s-snd-card",
                  sizeof("sdx-tavil-i2s-snd-card")) ||
         !strncmp(snd_card_name, "sda845-tavil-i2s-snd-card",
-                 sizeof("sda845-tavil-i2s-snd-card"))) {
+                 sizeof("sda845-tavil-i2s-snd-card")) ||
+        !strncmp(snd_card_name, "sa6155-adp-star-snd-card",
+                 sizeof("sa6155-adp-star-snd-card"))) {
         plat_data->is_i2s_ext_modem = true;
     }
     ALOGV("%s, is_i2s_ext_modem:%d soundcard name is %s",__func__,
@@ -2026,6 +2030,20 @@
     return plat_data->is_i2s_ext_modem;
 }
 
+static bool is_auto_snd_card(const char *snd_card_name)
+{
+    bool is_auto_snd_card = false;
+
+    if (!strncmp(snd_card_name, "sa6155-adp-star-snd-card",
+                 sizeof("sa6155-adp-star-snd-card"))) {
+        is_auto_snd_card = true;
+        ALOGV("%s : Auto snd card detected: soundcard name is %s",__func__,
+               snd_card_name);
+    }
+
+    return is_auto_snd_card;
+}
+
 static void set_platform_defaults(struct platform_data * my_data)
 {
     int32_t dev;
@@ -2923,7 +2941,8 @@
         return NULL;
     }
 
-    if (platform_is_i2s_ext_modem(snd_card_name, my_data)) {
+    if (platform_is_i2s_ext_modem(snd_card_name, my_data) &&
+        !is_auto_snd_card(snd_card_name)) {
         ALOGD("%s: Call MIXER_XML_PATH_I2S", __func__);
 
         adev->audio_route = audio_route_init(adev->snd_card,
@@ -3161,7 +3180,7 @@
 
 
     /* Initialize ACDB ID's */
-    if (my_data->is_i2s_ext_modem)
+    if (my_data->is_i2s_ext_modem && !is_auto_snd_card(snd_card_name))
         platform_info_init(PLATFORM_INFO_XML_PATH_I2S, my_data, PLATFORM);
     else if (!strncmp(snd_card_name, "sdm660-snd-card-skush",
                sizeof("sdm660-snd-card-skush")))
@@ -3360,6 +3379,7 @@
     property_get("ro.baseband", baseband, "");
     if ((!strncmp("apq8084", platform, sizeof("apq8084")) ||
         !strncmp("msm8996", platform, sizeof("msm8996")) ||
+        !strncmp("sm6150", platform, sizeof("sm6150")) ||
         !strncmp("sdx", platform, sizeof("sdx")) ||
         !strncmp("sdm845", platform, sizeof("sdm845"))) &&
         ( !strncmp("mdm", baseband, (sizeof("mdm")-1)) ||
@@ -5594,7 +5614,7 @@
         * enforced audible (e.g. Camera shutter sound).
         */
         if ((mode == AUDIO_MODE_IN_CALL) ||
-            voice_is_in_call(adev) ||
+            voice_check_voicecall_usecases_active(adev) ||
             voice_extn_compress_voip_is_active(adev))
                 is_active_voice_call = true;
 
@@ -5718,7 +5738,7 @@
     }
 
     if ((mode == AUDIO_MODE_IN_CALL) ||
-        voice_is_in_call(adev) ||
+        voice_check_voicecall_usecases_active(adev) ||
         voice_extn_compress_voip_is_active(adev) ||
         adev->enable_voicerx ||
         audio_extn_hfp_is_active(adev)) {
@@ -6215,8 +6235,10 @@
     ALOGV("%s: enter: out_device(%#x) in_device(%#x) channel_count (%d) channel_mask (0x%x)",
           __func__, out_device, in_device, channel_count, channel_mask);
     if (my_data->external_mic) {
-        if ((out_device != AUDIO_DEVICE_NONE) && ((mode == AUDIO_MODE_IN_CALL) || voice_is_in_call(adev) ||
-            voice_extn_compress_voip_is_active(adev) || audio_extn_hfp_is_active(adev))) {
+        if ((out_device != AUDIO_DEVICE_NONE) && ((mode == AUDIO_MODE_IN_CALL) ||
+            voice_check_voicecall_usecases_active(adev) ||
+            voice_extn_compress_voip_is_active(adev) ||
+            audio_extn_hfp_is_active(adev))) {
             if (out_device & AUDIO_DEVICE_OUT_WIRED_HEADPHONE ||
                out_device & AUDIO_DEVICE_OUT_EARPIECE ||
                out_device & AUDIO_DEVICE_OUT_SPEAKER )
@@ -6230,8 +6252,10 @@
     if (snd_device != AUDIO_DEVICE_NONE)
         goto exit;
 
-    if ((out_device != AUDIO_DEVICE_NONE) && ((mode == AUDIO_MODE_IN_CALL) || voice_is_in_call(adev) ||
-        voice_extn_compress_voip_is_active(adev) || audio_extn_hfp_is_active(adev))) {
+    if ((out_device != AUDIO_DEVICE_NONE) && ((mode == AUDIO_MODE_IN_CALL) ||
+        voice_check_voicecall_usecases_active(adev) ||
+        voice_extn_compress_voip_is_active(adev) ||
+        audio_extn_hfp_is_active(adev))) {
         if ((adev->voice.tty_mode != TTY_MODE_OFF) &&
             !voice_extn_compress_voip_is_active(adev)) {
             if (out_device & AUDIO_DEVICE_OUT_WIRED_HEADPHONE ||
@@ -10613,7 +10637,8 @@
     defined (PLATFORM_QCS605) || defined (PLATFORM_MSMNILE) || \
     defined (PLATFORM_KONA) || defined (PLATFORM_MSMSTEPPE) || \
     defined (PLATFORM_QCS405) || defined (PLATFORM_TRINKET) || \
-    defined (PLATFORM_LITO) || defined (PLATFORM_MSMFALCON)
+    defined (PLATFORM_LITO) || defined (PLATFORM_MSMFALCON) || \
+    defined (PLATFORM_ATOLL)
 int platform_get_mmap_data_fd(void *platform, int fe_dev, int dir, int *fd,
                               uint32_t *size)
 {
diff --git a/hal/msm8974/platform.h b/hal/msm8974/platform.h
index 1d56a7e..7b4647a 100644
--- a/hal/msm8974/platform.h
+++ b/hal/msm8974/platform.h
@@ -480,7 +480,8 @@
     defined (PLATFORM_QCS605) ||defined (PLATFORM_SDX24) || \
     defined (PLATFORM_MSMNILE) || defined (PLATFORM_KONA) || \
     defined (PLATFORM_MSMSTEPPE) || defined (PLATFORM_QCS405) || \
-    defined (PLATFORM_TRINKET) || defined (PLATFORM_LITO)
+    defined (PLATFORM_TRINKET) || defined (PLATFORM_LITO) || \
+    defined (PLATFORM_ATOLL)
 #define PLAYBACK_OFFLOAD_DEVICE2 17
 #elif defined (PLATFORM_MSMFALCON) || defined (PLATFORM_MSM8937)
 #define PLAYBACK_OFFLOAD_DEVICE2 24
@@ -493,7 +494,7 @@
     defined (PLATFORM_KONA) || defined (PLATFORM_MSMSTEPPE) || \
     defined (PLATFORM_QCS405) || defined (PLATFORM_TRINKET) || \
     defined (PLATFORM_LITO) || defined (PLATFORM_MSMFALCON) || \
-    defined (PLATFORM_MSM8937)
+    defined (PLATFORM_MSM8937) || defined (PLATFORM_ATOLL)
 #define PLAYBACK_OFFLOAD_DEVICE3 18
 #define PLAYBACK_OFFLOAD_DEVICE4 34
 #define PLAYBACK_OFFLOAD_DEVICE5 35
@@ -585,6 +586,14 @@
 #define VOLTE_CALL_PCM_DEVICE 15
 #define QCHAT_CALL_PCM_DEVICE 37
 #define VOWLAN_CALL_PCM_DEVICE 16
+#elif PLATFORM_AUTO
+#define HOST_LESS_RX_ID 41
+#define HOST_LESS_TX_ID 42
+#define VOICE_CALL_PCM_DEVICE 8
+#define VOICE2_CALL_PCM_DEVICE -1
+#define VOLTE_CALL_PCM_DEVICE -1
+#define QCHAT_CALL_PCM_DEVICE -1
+#define VOWLAN_CALL_PCM_DEVICE -1
 #else
 #define VOICE_CALL_PCM_DEVICE 2
 #define VOICE2_CALL_PCM_DEVICE 22
diff --git a/hal/platform_info.c b/hal/platform_info.c
index 8ee8b07..827c558 100644
--- a/hal/platform_info.c
+++ b/hal/platform_info.c
@@ -653,6 +653,8 @@
     }
 
     str_parms_add_str(my_data.kvpairs, (char*)attr[1], (char*)attr[3]);
+    if (my_data.caller == PLATFORM)
+        platform_set_parameters(my_data.platform, my_data.kvpairs);
 done:
     return;
 }
@@ -1387,9 +1389,6 @@
         section = ROOT;
     } else if (strcmp(tag_name, "config_params") == 0) {
         section = ROOT;
-        if (my_data.caller == PLATFORM) {
-            platform_set_parameters(my_data.platform, my_data.kvpairs);
-        }
     } else if (strcmp(tag_name, "operator_specific") == 0) {
         section = ROOT;
     } else if (strcmp(tag_name, "interface_names") == 0) {
diff --git a/hal/voice.c b/hal/voice.c
index 729ab27..c455537 100644
--- a/hal/voice.c
+++ b/hal/voice.c
@@ -48,6 +48,10 @@
     .format = PCM_FORMAT_S16_LE,
 };
 
+#ifdef PLATFORM_AUTO
+struct pcm *voice_loopback_tx = NULL;
+struct pcm *voice_loopback_rx = NULL;
+#endif
 static struct voice_session *voice_get_session_from_use_case(struct audio_device *adev,
                               audio_usecase_t usecase_id)
 {
@@ -182,6 +186,16 @@
         session->pcm_tx = NULL;
     }
 
+#ifdef PLATFORM_AUTO
+    if(voice_loopback_rx) {
+        pcm_close(voice_loopback_rx);
+        voice_loopback_rx = NULL;
+    }
+    if(voice_loopback_tx) {
+        pcm_close(voice_loopback_tx);
+        voice_loopback_tx = NULL;
+    }
+#endif
     /* 2. Get and set stream specific mixer controls */
     disable_audio_route(adev, uc_info);
 
@@ -201,6 +215,9 @@
     int ret = 0;
     struct audio_usecase *uc_info;
     int pcm_dev_rx_id, pcm_dev_tx_id;
+#ifdef PLATFORM_AUTO
+    int pcm_dev_loopback_rx_id, pcm_dev_loopback_tx_id;
+#endif
     uint32_t sample_rate = 8000;
     struct voice_session *session = NULL;
     struct pcm_config voice_config = pcm_config_voice_call;
@@ -246,6 +263,10 @@
 
     select_devices(adev, usecase_id);
 
+#ifdef PLATFORM_AUTO
+    pcm_dev_loopback_rx_id = HOST_LESS_RX_ID;
+    pcm_dev_loopback_tx_id = HOST_LESS_TX_ID;
+#endif
     pcm_dev_rx_id = platform_get_pcm_device_id(uc_info->id, PCM_PLAYBACK);
     pcm_dev_tx_id = platform_get_pcm_device_id(uc_info->id, PCM_CAPTURE);
 
@@ -287,6 +308,28 @@
         goto error_start_voice;
     }
 
+#ifdef PLATFORM_AUTO
+    voice_loopback_rx = pcm_open(adev->snd_card,
+                                 pcm_dev_loopback_rx_id,
+                                 PCM_OUT, &voice_config);
+    if (voice_loopback_rx < 0 || !pcm_is_ready(voice_loopback_rx)) {
+        ALOGE("%s: Either could not open pcm_dev_loopback_rx_id %d or %s",
+              __func__, pcm_dev_loopback_rx_id, pcm_get_error(voice_loopback_rx));
+        ret = -EIO;
+        goto error_start_voice;
+    }
+
+    voice_loopback_tx = pcm_open(adev->snd_card,
+                                 pcm_dev_loopback_tx_id,
+                                 PCM_IN, &voice_config);
+    if (voice_loopback_tx < 0 || !pcm_is_ready(voice_loopback_tx)) {
+         ALOGE("%s: Either could not open pcm_dev_loopback_tx_id %d or %s",
+               __func__, pcm_dev_loopback_tx_id, pcm_get_error(voice_loopback_tx));
+         ret = -EIO;
+         goto error_start_voice;
+    }
+#endif
+
     if(adev->mic_break_enabled)
         platform_set_mic_break_det(adev->platform, true);
 
@@ -302,6 +345,20 @@
         goto error_start_voice;
     }
 
+#ifdef PLATFORM_AUTO
+    ret = pcm_start(voice_loopback_tx);
+    if (ret != 0) {
+        ALOGE("%s: %s", __func__, pcm_get_error(voice_loopback_tx));
+        goto error_start_voice;
+    }
+
+    ret = pcm_start(voice_loopback_rx);
+    if (ret != 0) {
+        ALOGE("%s: %s", __func__, pcm_get_error(voice_loopback_rx));
+        goto error_start_voice;
+    }
+#endif
+
     /* Enable aanc only when no calls are active */
     if (!voice_is_call_state_active(adev))
         voice_check_and_update_aanc_path(adev, uc_info->out_snd_device, true);
@@ -377,6 +434,22 @@
     return session_id;
 }
 
+bool voice_check_voicecall_usecases_active(struct audio_device *adev)
+{
+    struct listnode *node;
+    struct audio_usecase *usecase = NULL;
+
+    list_for_each(node, &adev->usecase_list) {
+        usecase = node_to_item(node, struct audio_usecase, list);
+        if (usecase->type == VOICE_CALL) {
+            ALOGV("%s: voice usecase:%s is active", __func__,
+                   use_case_table[usecase->id]);
+            return true;
+        }
+    }
+    return false;
+}
+
 int voice_check_and_set_incall_rec_usecase(struct audio_device *adev,
                                            struct stream_in *in)
 {
diff --git a/hal/voice.h b/hal/voice.h
index 9612edd..188345d 100644
--- a/hal/voice.h
+++ b/hal/voice.h
@@ -101,4 +101,5 @@
 bool voice_is_call_state_active(struct audio_device *adev);
 void voice_set_device_mute_flag (struct audio_device *adev, bool state);
 snd_device_t voice_get_incall_rec_backend_device(struct stream_in *in);
+bool voice_check_voicecall_usecases_active(struct audio_device *adev);
 #endif //VOICE_H
diff --git a/post_proc/Android.mk b/post_proc/Android.mk
index 6b1afd3..fb42514 100644
--- a/post_proc/Android.mk
+++ b/post_proc/Android.mk
@@ -30,8 +30,7 @@
         virtualizer.c \
         reverb.c \
         effect_api.c \
-        effect_util.c \
-        asphere.c
+        effect_util.c
 
 # HW_ACCELERATED has been disabled by default since msm8996. File doesn't
 # compile cleanly on tip so don't want to include it, but keeping this
diff --git a/post_proc/Makefile.am b/post_proc/Makefile.am
index bd29473..8bd41ae 100644
--- a/post_proc/Makefile.am
+++ b/post_proc/Makefile.am
@@ -19,10 +19,6 @@
 c_sources += hw_accelerator.c
 endif
 
-if AUDIOSPHERE
-c_sources += asphere.c
-endif
-
 library_include_HEADERS = $(h_sources)
 library_includedir = $(includedir)
 
diff --git a/post_proc/asphere.c b/post_proc/asphere.c
deleted file mode 100644
index efe07c6..0000000
--- a/post_proc/asphere.c
+++ /dev/null
@@ -1,323 +0,0 @@
-/* Copyright (c) 2015, 2017, 2019 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.
- *
- */
-#define LOG_TAG "audio_pp_asphere"
-/*#define LOG_NDEBUG 0*/
-
-#include <errno.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <stdbool.h>
-#include <sys/stat.h>
-#include <log/log.h>
-#include <cutils/list.h>
-#include <cutils/str_parms.h>
-#include <cutils/properties.h>
-#include <hardware/audio_effect.h>
-#include <pthread.h>
-#include "bundle.h"
-#include "equalizer.h"
-#include "bass_boost.h"
-#include "virtualizer.h"
-#include "reverb.h"
-#include "asphere.h"
-
-#define ASPHERE_MIXER_NAME  "MSM ASphere Set Param"
-
-#define AUDIO_PARAMETER_KEY_ASPHERE_STATUS  "asphere_status"
-#define AUDIO_PARAMETER_KEY_ASPHERE_ENABLE   "asphere_enable"
-#define AUDIO_PARAMETER_KEY_ASPHERE_STRENGTH "asphere_strength"
-
-#define AUDIO_ASPHERE_EVENT_NODE "/data/misc/audio_pp/event_node"
-
-enum {
-    ASPHERE_ACTIVE = 0,
-    ASPHERE_SUSPENDED,
-    ASPHERE_ERROR
-};
-
-#ifdef AUDIO_FEATURE_ENABLED_GCOV
-extern void  __gcov_flush();
-static void enable_gcov()
-{
-    __gcov_flush();
-}
-#else
-static void enable_gcov()
-{
-}
-#endif
-
-struct asphere_module {
-    bool enabled;
-    int status;
-    int strength;
-    pthread_mutex_t lock;
-    int init_status;
-};
-
-static struct asphere_module asphere;
-pthread_once_t asphere_once = PTHREAD_ONCE_INIT;
-
-static int asphere_create_app_notification_node(void)
-{
-    int fd;
-    if ((fd = open(AUDIO_ASPHERE_EVENT_NODE, O_CREAT|O_TRUNC|O_WRONLY,
-                            S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH)) < 0) {
-        ALOGE("creating notification node failed %d", errno);
-        return -EINVAL;
-    }
-    chmod(AUDIO_ASPHERE_EVENT_NODE, S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH);
-    close(fd);
-    ALOGD("%s: successfully created notification node %s",
-                               __func__, AUDIO_ASPHERE_EVENT_NODE);
-    return 0;
-}
-
-static int asphere_notify_app(void)
-{
-    int fd;
-    if ((fd = open(AUDIO_ASPHERE_EVENT_NODE, O_TRUNC|O_WRONLY)) < 0) {
-        ALOGE("opening notification node failed %d", errno);
-        return -EINVAL;
-    }
-    close(fd);
-    ALOGD("%s: successfully opened notification node", __func__);
-    return 0;
-}
-
-static int asphere_get_values_from_mixer(void)
-{
-    int ret = 0;
-    long val[2] = {-1, -1};
-    struct mixer_ctl *ctl = NULL;
-    struct mixer *mixer = mixer_open(MIXER_CARD);
-    if (mixer)
-        ctl = mixer_get_ctl_by_name(mixer, ASPHERE_MIXER_NAME);
-    if (!ctl) {
-        ALOGE("%s: could not get ctl for mixer cmd - %s",
-              __func__, ASPHERE_MIXER_NAME);
-        return -EINVAL;
-    }
-    ret = mixer_ctl_get_array(ctl, val, sizeof(val)/sizeof(val[0]));
-    if (!ret) {
-        asphere.enabled = (val[0] == 0) ? false : true;
-        asphere.strength = val[1];
-    }
-    ALOGD("%s: returned %d, enabled:%ld, strength:%ld",
-          __func__, ret, val[0], val[1]);
-
-    return ret;
-}
-
-static int asphere_set_values_to_mixer(void)
-{
-    int ret = 0;
-    long val[2] = {-1, -1};
-    struct mixer_ctl *ctl = NULL;
-    struct mixer *mixer = mixer_open(MIXER_CARD);
-    if (mixer)
-        ctl = mixer_get_ctl_by_name(mixer, ASPHERE_MIXER_NAME);
-    if (!ctl) {
-        ALOGE("%s: could not get ctl for mixer cmd - %s",
-              __func__, ASPHERE_MIXER_NAME);
-        return -EINVAL;
-    }
-    val[0] = ((asphere.status == ASPHERE_ACTIVE) && asphere.enabled) ? 1 : 0;
-    val[1] = asphere.strength;
-
-    ret = mixer_ctl_set_array(ctl, val, sizeof(val)/sizeof(val[0]));
-    ALOGD("%s: returned %d, enabled:%ld, strength:%ld",
-          __func__, ret, val[0], val[1]);
-
-    return ret;
-}
-
-static void asphere_init_once() {
-    ALOGD("%s", __func__);
-    pthread_mutex_init(&asphere.lock, NULL);
-
-    if (property_get_bool("vendor.audio.feature.audio_sphere.enable", false)) {
-        asphere.init_status = 1;
-        asphere_get_values_from_mixer();
-        asphere_create_app_notification_node();
-        return;
-    } else {
-        ALOGW("%s: asphere feature not enabled", __func__);
-    }
-
-    asphere.init_status = 0;
-}
-
-static int asphere_init() {
-    pthread_once(&asphere_once, asphere_init_once);
-    enable_gcov();
-    return asphere.init_status;
-}
-
-static bool asphere_parms_allowed(struct str_parms *parms)
-{
-    if (str_parms_has_key(parms, AUDIO_PARAMETER_KEY_ASPHERE_ENABLE))
-        return true;
-    if (str_parms_has_key(parms, AUDIO_PARAMETER_KEY_ASPHERE_STRENGTH))
-        return true;
-    if (str_parms_has_key(parms, AUDIO_PARAMETER_KEY_ASPHERE_STATUS))
-        return true;
-
-    return false;
-}
-
-void asphere_set_parameters(struct str_parms *parms)
-{
-    int ret = 0;
-    bool enable = false;
-    int strength = -1;
-    char value[32] = {0};
-    bool set_enable = false, set_strength = false;
-
-    if (!asphere_parms_allowed(parms)) {
-        return;
-    }
-
-    if (asphere_init() != 1) {
-        ALOGW("%s: init check failed!!!", __func__);
-        return;
-    }
-
-    ret = str_parms_get_str(parms, AUDIO_PARAMETER_KEY_ASPHERE_ENABLE,
-                                                  value, sizeof(value));
-    if (ret > 0) {
-        enable = (atoi(value) == 1) ? true : false;
-        set_enable = true;
-    }
-
-    ret = str_parms_get_str(parms, AUDIO_PARAMETER_KEY_ASPHERE_STRENGTH,
-                                                   value, sizeof(value));
-    if (ret > 0) {
-        strength = atoi(value);
-        if (strength >= 0 && strength <= 1000)
-            set_strength = true;
-    }
-
-    if (set_enable || set_strength) {
-        pthread_mutex_lock(&asphere.lock);
-        asphere.enabled = set_enable ? enable : asphere.enabled;
-        asphere.strength = set_strength ? strength : asphere.strength;
-        ret = asphere_set_values_to_mixer();
-        pthread_mutex_unlock(&asphere.lock);
-        ALOGV("%s: exit ret %d", __func__, ret);
-    }
-}
-
-void asphere_get_parameters(struct str_parms *query,
-                                      struct str_parms *reply)
-{
-    char value[32] = {0};
-    int ret;
-
-    if (asphere_init() != 1) {
-        ALOGW("%s: init check failed!!!", __func__);
-        return;
-    }
-
-    ret = str_parms_get_str(query, AUDIO_PARAMETER_KEY_ASPHERE_STATUS,
-                                                 value, sizeof(value));
-    if (ret >= 0) {
-        str_parms_add_int(reply, AUDIO_PARAMETER_KEY_ASPHERE_STATUS,
-                                                     asphere.status);
-    }
-
-    ret = str_parms_get_str(query, AUDIO_PARAMETER_KEY_ASPHERE_ENABLE,
-                                                 value, sizeof(value));
-    if (ret >= 0) {
-        str_parms_add_int(reply, AUDIO_PARAMETER_KEY_ASPHERE_ENABLE,
-                                              asphere.enabled ? 1 : 0);
-    }
-
-    ret = str_parms_get_str(query, AUDIO_PARAMETER_KEY_ASPHERE_STRENGTH,
-                                                  value, sizeof(value));
-    if (ret >= 0) {
-        str_parms_add_int(reply, AUDIO_PARAMETER_KEY_ASPHERE_STRENGTH,
-                                                     asphere.strength);
-    }
-}
-
-static bool effect_needs_asphere_concurrency_handling(effect_context_t *context)
-{
-    if (memcmp(&context->desc->type,
-                &equalizer_descriptor.type, sizeof(effect_uuid_t)) == 0 ||
-        memcmp(&context->desc->type,
-                &bassboost_descriptor.type, sizeof(effect_uuid_t)) == 0 ||
-        memcmp(&context->desc->type,
-                &virtualizer_descriptor.type, sizeof(effect_uuid_t)) == 0 ||
-        memcmp(&context->desc->type,
-                &ins_preset_reverb_descriptor.type, sizeof(effect_uuid_t)) == 0 ||
-        memcmp(&context->desc->type,
-                &ins_env_reverb_descriptor.type, sizeof(effect_uuid_t)) == 0)
-        return true;
-
-    return false;
-}
-
-void handle_asphere_on_effect_enabled(bool enable,
-                                      effect_context_t *context,
-                                      struct listnode *created_effects)
-{
-    struct listnode *node;
-
-    ALOGV("%s: effect %0x", __func__, context->desc->type.timeLow);
-    if (asphere_init() != 1) {
-        ALOGW("%s: init check failed!!!", __func__);
-        return;
-    }
-
-    if (!effect_needs_asphere_concurrency_handling(context)) {
-        ALOGV("%s: effect %0x, do not need concurrency handling",
-                                 __func__, context->desc->type.timeLow);
-        return;
-    }
-
-    list_for_each(node, created_effects) {
-        effect_context_t *fx_ctxt = node_to_item(node,
-                                                 effect_context_t,
-                                                 effects_list_node);
-        if (fx_ctxt != NULL &&
-            effect_needs_asphere_concurrency_handling(fx_ctxt) == true &&
-            fx_ctxt != context && effect_is_active(fx_ctxt) == true) {
-            ALOGV("%s: found another effect %0x, skip processing %0x", __func__,
-                      fx_ctxt->desc->type.timeLow, context->desc->type.timeLow);
-            return;
-        }
-    }
-    pthread_mutex_lock(&asphere.lock);
-    asphere.status = enable ? ASPHERE_SUSPENDED : ASPHERE_ACTIVE;
-    asphere_set_values_to_mixer();
-    asphere_notify_app();
-    pthread_mutex_unlock(&asphere.lock);
-}
diff --git a/post_proc/asphere.h b/post_proc/asphere.h
deleted file mode 100644
index 3babd1d..0000000
--- a/post_proc/asphere.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Copyright (c) 2015, 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.
- *
- */
-
-#ifndef OFFLOAD_ASPHERE_H_
-#define OFFLOAD_ASPHERE_H_
-
-#include <cutils/str_parms.h>
-#include <cutils/list.h>
-#include "bundle.h"
-
-void asphere_get_parameters(struct str_parms *query,
-                            struct str_parms *reply);
-void asphere_set_parameters(struct str_parms *reply);
-void handle_asphere_on_effect_enabled(bool enable,
-                                      effect_context_t *context,
-                                      struct listnode *created_effects);
-
-#endif /* OFFLOAD_ASPHERE_H_ */
diff --git a/post_proc/bundle.c b/post_proc/bundle.c
index 1e6b91d..0dbf27b 100644
--- a/post_proc/bundle.c
+++ b/post_proc/bundle.c
@@ -40,6 +40,7 @@
 
 #include <stdlib.h>
 #include <cutils/list.h>
+#include <cutils/str_parms.h>
 #include <log/log.h>
 #include <system/thread_defs.h>
 #include <tinyalsa/asoundlib.h>
@@ -53,7 +54,6 @@
 #include "bass_boost.h"
 #include "virtualizer.h"
 #include "reverb.h"
-#include "asphere.h"
 
 #ifdef DTS_EAGLE
 #include "effect_util.h"
@@ -455,20 +455,16 @@
 
 /*
  * Effect Bundle Set and get param operations.
- * currently only handles audio sphere scenario,
- * but the interface itself can be utilized for any effect.
  */
 __attribute__ ((visibility ("default")))
-void offload_effects_bundle_get_parameters(struct str_parms *query,
-                                           struct str_parms *reply)
+void offload_effects_bundle_get_parameters(struct str_parms *query __unused,
+                                           struct str_parms *reply __unused)
 {
-    asphere_get_parameters(query, reply);
 }
 
 __attribute__ ((visibility ("default")))
-void offload_effects_bundle_set_parameters(struct str_parms *parms)
+void offload_effects_bundle_set_parameters(struct str_parms *parms __unused)
 {
-    asphere_set_parameters(parms);
 }
 
 /*
@@ -826,7 +822,6 @@
             status = -ENOSYS;
             goto exit;
         }
-        handle_asphere_on_effect_enabled(true, context, &created_effects_list);
         context->state = EFFECT_STATE_ACTIVE;
         if (context->ops.enable)
             context->ops.enable(context);
@@ -841,7 +836,6 @@
             status = -ENOSYS;
             goto exit;
         }
-        handle_asphere_on_effect_enabled(false, context, &created_effects_list);
         context->state = EFFECT_STATE_INITIALIZED;
         if (context->ops.disable)
             context->ops.disable(context);