Merge "bengal: Enable MPEGH features"
diff --git a/configs/bengal/audio_configs.xml b/configs/bengal/audio_configs.xml
index 8e3cda2..01b2e8c 100644
--- a/configs/bengal/audio_configs.xml
+++ b/configs/bengal/audio_configs.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <!--
-Copyright (c) 2019, The Linux Foundation. All rights reserved.
+Copyright (c) 2019-2020, 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
@@ -57,7 +57,7 @@
         <!-- AV Configs -->
         <property name="vendor.audio.use.sw.alac.decoder" value="true"/>
         <property name="vendor.audio.use.sw.ape.decoder" value="true"/>
-        <property name="vendor.audio.use.sw.mpegh.decoder" value="false"/>
+        <property name="vendor.audio.use.sw.mpegh.decoder" value="true"/>
         <property name="vendor.audio.flac.sw.decoder.24bit" value="true"/>
         <property name="vendor.audio.hw.aac.encoder" value="true"/>
         <flag name="aac_adts_offload_enabled" value="true" />
diff --git a/configs/bengal/audio_platform_info_intcodec.xml b/configs/bengal/audio_platform_info_intcodec.xml
index c2ca94e..e2a47c7 100644
--- a/configs/bengal/audio_platform_info_intcodec.xml
+++ b/configs/bengal/audio_platform_info_intcodec.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!-- Copyright (c) 2014, 2016-2019, The Linux Foundation. All rights reserved.   -->
+<!-- Copyright (c) 2014, 2016-2020, 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 -->
@@ -97,7 +97,7 @@
         <device name="SND_DEVICE_IN_UNPROCESSED_THREE_MIC" acdb_id="145"/>
         <device name="SND_DEVICE_IN_UNPROCESSED_QUAD_MIC" acdb_id="146"/>
         <device name="SND_DEVICE_IN_UNPROCESSED_HEADSET_MIC" acdb_id="147"/>
-        <device name="SND_DEVICE_IN_HANDSET_GENERIC_QMIC" acdb_id="157"/>
+        <device name="SND_DEVICE_IN_HANDSET_GENERIC_QMIC" acdb_id="191"/>
     </acdb_ids>
     <backend_names>
         <device name="SND_DEVICE_OUT_HEADPHONES" backend="headphones" interface="RX_CDC_DMA_RX_0"/>
diff --git a/configs/bengal/audio_policy_configuration.xml b/configs/bengal/audio_policy_configuration.xml
index 67f5d9d..52ca2c4 100644
--- a/configs/bengal/audio_policy_configuration.xml
+++ b/configs/bengal/audio_policy_configuration.xml
@@ -203,6 +203,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,AUDIO_CHANNEL_INDEX_MASK_3"/>
                 </mixPort>
+                <mixPort name="quad mic" role="sink">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                        samplingRates="48000"
+                        channelMasks="AUDIO_CHANNEL_INDEX_MASK_4"/>
+                </mixPort>
                 <mixPort name="hifi_input" role="sink" />
             </mixPorts>
 
@@ -357,7 +362,9 @@
                        sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic"/>
                 <route type="mix" sink="mmap_no_irq_in"
                        sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,USB Device In,USB Headset In"/>
-                <route type="mix" sink="BT A2DP Out"
+                <route type="mix" sink="quad mic"
+                       sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In,Wired Headset Mic"/>
+		<route type="mix" sink="BT A2DP Out"
                        sources="primary output,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
                 <route type="mix" sink="BT A2DP Headphones"
                        sources="primary output,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
diff --git a/configs/bengal/bengal.mk b/configs/bengal/bengal.mk
index a9218fe..ff0f239 100644
--- a/configs/bengal/bengal.mk
+++ b/configs/bengal/bengal.mk
@@ -32,6 +32,7 @@
 AUDIO_FEATURE_ENABLED_ALAC_OFFLOAD := true
 AUDIO_FEATURE_ENABLED_APE_OFFLOAD := true
 AUDIO_FEATURE_ENABLED_AAC_ADTS_OFFLOAD := true
+AUDIO_FEATURE_ENABLED_MPEGH_SW_DECODER := true
 AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true
 AUDIO_FEATURE_ENABLED_SSR := true
 AUDIO_FEATURE_ENABLED_DTS_EAGLE := false
@@ -207,6 +208,14 @@
 PRODUCT_PROPERTY_OVERRIDES += \
     vendor.audio_hal.period_size=192
 
+##Ambisonic Capture
+PRODUCT_PROPERTY_OVERRIDES += \
+persist.vendor.audio.ambisonic.capture=false \
+persist.vendor.audio.ambisonic.auto.profile=false
+
+PRODUCT_PROPERTY_OVERRIDES += \
+persist.vendor.audio.apptype.multirec.enabled=false
+
 ##fluencetype can be "fluence" or "fluencepro" or "none"
 PRODUCT_PROPERTY_OVERRIDES += \
 ro.vendor.audio.sdk.fluencetype=none\
diff --git a/configs/bengal/mixer_paths.xml b/configs/bengal/mixer_paths.xml
index 7b851a0..9fea425 100644
--- a/configs/bengal/mixer_paths.xml
+++ b/configs/bengal/mixer_paths.xml
@@ -345,7 +345,7 @@
     <!-- Volume controls -->
     <ctl name="RX_RX0 Digital Volume" value="84" />
     <ctl name="RX_RX1 Digital Volume" value="84" />
-    <ctl name="RX_RX2 Digital Volume" value="84" />
+    <ctl name="RX_RX2 Digital Volume" value="78" />
     <ctl name="HPHL Volume" value="20" />
     <ctl name="HPHR Volume" value="20" />
     <ctl name="EAR SPKR PA Gain" value="G_DEFAULT" />