Merge 6e62f964a632f0fd73dab89dc41a3736f9aa9b7b on remote branch

Change-Id: Ia98bc2e87f0a54388288eb07db9fa01092a4701b
diff --git a/configs/msmnile_au/audio_effects.xml b/configs/msmnile_au/audio_effects.xml
index bf720fc..c3751a0 100644
--- a/configs/msmnile_au/audio_effects.xml
+++ b/configs/msmnile_au/audio_effects.xml
@@ -32,14 +32,10 @@
         <library name="reverb" path="libreverbwrapper.so"/>
         <library name="visualizer_sw" path="libvisualizer.so"/>
         <library name="visualizer_hw" path="libqcomvisualizer.so"/>
-        <library name="downmix" path="libdownmix.so"/>
         <library name="loudness_enhancer" path="libldnhncr.so"/>
-        <library name="dynamics_processing" path="libdynproc.so"/>
         <library name="proxy" path="libeffectproxy.so"/>
         <library name="offload_bundle" path="libqcompostprocbundle.so"/>
         <library name="audio_pre_processing" path="libqcomvoiceprocessing.so"/>
-        <library name="audiosphere" path="libasphere.so"/>
-        <library name="shoebox" path="libshoebox.so"/>
         <library name="audio_bmt" path="libqtiautobundle.so"/>
         <library name="audio_fnb" path="libqtiautobundle.so"/>
         <library name="audio_delay" path="libqtiautobundle.so"/>
diff --git a/configs/msmnile_au/audio_platform_info.xml b/configs/msmnile_au/audio_platform_info.xml
index 9f53553..fddf2cd 100755
--- a/configs/msmnile_au/audio_platform_info.xml
+++ b/configs/msmnile_au/audio_platform_info.xml
@@ -33,7 +33,7 @@
         <device name="SND_DEVICE_OUT_BUS_MEDIA" acdb_id="60"/>
         <device name="SND_DEVICE_OUT_BUS_SYS" acdb_id="60"/>
         <device name="SND_DEVICE_OUT_BUS_NAV" acdb_id="14"/>
-        <device name="SND_DEVICE_OUT_BUS_PHN" acdb_id="94"/>
+        <device name="SND_DEVICE_OUT_BUS_PHN" acdb_id="60"/>
         <device name="SND_DEVICE_OUT_BUS_ALR" acdb_id="60"/>
         <device name="SND_DEVICE_OUT_BUS_PAX" acdb_id="60"/>
         <device name="SND_DEVICE_OUT_BUS_RSE" acdb_id="60"/>
diff --git a/configs/msmnile_au/audio_policy_configuration.xml b/configs/msmnile_au/audio_policy_configuration.xml
index c7bf080..f00e643 100755
--- a/configs/msmnile_au/audio_policy_configuration.xml
+++ b/configs/msmnile_au/audio_policy_configuration.xml
@@ -268,6 +268,11 @@
                     <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                              samplingRates="16000,48000" channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
                 </mixPort>
+		<mixPort name="mixport_tuner0" role="sink">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="48000"
+                             channelMasks="AUDIO_CHANNEL_IN_STEREO"/>
+                </mixPort>
             </mixPorts>
 
             <devicePorts>
@@ -526,6 +531,8 @@
                        sources="primary output,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
                 <route type="mix" sink="BT A2DP Speaker"
                        sources="primary output,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
+		<route type="mix" sink="mixport_tuner0"
+                       sources="FM Tuner"/>
             </routes>
 
         </module>
diff --git a/configs/msmnile_au/card-defs-dummy.xml b/configs/msmnile_au/card-defs-dummy.xml
new file mode 100644
index 0000000..a7eccd0
--- /dev/null
+++ b/configs/msmnile_au/card-defs-dummy.xml
@@ -0,0 +1,4 @@
+<!--  Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.-->
+<!--  SPDX-License-Identifier: BSD-3-Clause-Clear                             -->
+<def>
+</def>
diff --git a/configs/msmnile_au/mixer_paths_adp.xml b/configs/msmnile_au/mixer_paths_adp.xml
index b283151..ec95990 100644
--- a/configs/msmnile_au/mixer_paths_adp.xml
+++ b/configs/msmnile_au/mixer_paths_adp.xml
@@ -26,6 +26,23 @@
 <!-- IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.                          -->
 <mixer>
     <!-- These are the initial mixer settings -->
+    <!-- Example commands to Enable the paired rx usecase-->
+    <!-- SlotMapping with the last possible slot of respective TDM interface -->
+    <!-- <ctl name="TERT_TDM_RX_3 SlotMapping" id = "0" value="28"/>
+    <ctl name="TERT_TDM_RX_3 SlotMapping" id = "1" value="65535" />
+    <ctl name="TERT_TDM_RX_3 Channels" value="One" />
+    <ctl name="TERT_TDM Paired_Rx" value="TERT_TDM_RX_3" />
+
+    <ctl name="QUAT_TDM_RX_3 SlotMapping" id = "0" value="124"/>
+    <ctl name="QUAT_TDM_RX_3 SlotMapping" id = "1" value="65535" />
+    <ctl name="QUAT_TDM_RX_3 Channels" value="One" />
+    <ctl name="QUAT_TDM Paired_Rx" value="QUAT_TDM_RX_3" />
+
+    <ctl name="QUIN_TDM_RX_3 SlotMapping" id = "0" value="60"/>
+    <ctl name="QUIN_TDM_RX_3 SlotMapping" id = "1" value="65535" />
+    <ctl name="QUIN_TDM_RX_3 Channels" value="One" />
+    <ctl name="QUIN_TDM Paired_Rx" value="QUIN_TDM_RX_3" /> -->
+
     <ctl name="MultiMedia5 Mixer AFE_PCM_TX" value="0" />
     <ctl name="MultiMedia1 Mixer TERT_TDM_TX_0" value="0" />
     <ctl name="MultiMedia8 Mixer TERT_TDM_TX_0" value="0" />
diff --git a/configs/msmnile_au/msmnile_au.mk b/configs/msmnile_au/msmnile_au.mk
index d14c49d..0f9cb7b 100644
--- a/configs/msmnile_au/msmnile_au.mk
+++ b/configs/msmnile_au/msmnile_au.mk
@@ -168,6 +168,10 @@
     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
 
+#Automotive audio card defs dummpy files for elite and ar co-exit.
+PRODUCT_COPY_FILES += \
+    $(TOPDIR)vendor/qcom/opensource/audio-hal/primary-hal/configs/msmnile_au/card-defs-dummy.xml:$(TARGET_COPY_OUT_VENDOR)/etc/card-defs-dummy.xml
+
 #XML Audio configuration files
 ifneq ($(TARGET_USES_AOSP_FOR_AUDIO), true)
 PRODUCT_COPY_FILES += \
@@ -539,7 +543,7 @@
     AudioSettings
 
 # for HIDL related audiocontrol packages
-ifeq ( ,$(filter 12 Tiramisu,$(PLATFORM_VERSION)))
+ifeq ( ,$(filter 12 13,$(PLATFORM_VERSION)))
 PRODUCT_PACKAGES += \
     android.hardware.automotive.audiocontrol@2.0-service \
     android.hardware.automotive.audiocontrol@2.0
diff --git a/configs/msmsteppe_au/msmsteppe_au.mk b/configs/msmsteppe_au/msmsteppe_au.mk
index e298e06..f7171a1 100644
--- a/configs/msmsteppe_au/msmsteppe_au.mk
+++ b/configs/msmsteppe_au/msmsteppe_au.mk
@@ -501,7 +501,7 @@
     AudioSettings
 
 # for HIDL related audiocontrol packages
-ifeq ( ,$(filter 12 Tiramisu,$(PLATFORM_VERSION)))
+ifeq ( ,$(filter 12 13,$(PLATFORM_VERSION)))
 PRODUCT_PACKAGES += \
     android.hardware.automotive.audiocontrol@2.0-service \
     android.hardware.automotive.audiocontrol@2.0
diff --git a/hal/audio_extn/Android.mk b/hal/audio_extn/Android.mk
index 1e13f86..7fc02cb 100644
--- a/hal/audio_extn/Android.mk
+++ b/hal/audio_extn/Android.mk
@@ -202,6 +202,10 @@
     $(TARGET_OUT_HEADERS)/mm-audio/surround_sound_3mic/ \
     $(TARGET_OUT_HEADERS)/common/inc/
 
+ifeq ($(ENABLE_AUDIO_LEGACY_TECHPACK),true)
+LOCAL_HEADER_LIBRARIES += qti_legacy_audio_kernel_uapi
+endif
+
 LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
 LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include/audio
 LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/techpack/audio/include
diff --git a/hal/msm8974/platform.h b/hal/msm8974/platform.h
index 1535940..089e437 100644
--- a/hal/msm8974/platform.h
+++ b/hal/msm8974/platform.h
@@ -42,7 +42,7 @@
     SOURCE_DUAL_MIC  = 0x2,            /* Target contains 2 mics */
     SOURCE_THREE_MIC = 0x4,            /* Target contains 3 mics */
     SOURCE_QUAD_MIC  = 0x8,            /* Target contains 4 mics */
-    SOURCE_HEX_MIC   = 0x16,           /* Target contains 6 mics */
+    SOURCE_HEX_MIC   = 0x10,           /* Target contains 6 mics */
     SOURCE_OCT_MIC   = 0x20,           /* Target contains 8 mics */
     SOURCE_DEC_MIC   = 0x40,
 };