Merge "HAL: Converting PCM enum to AUDIO FORMAT enum"
diff --git a/configs/audio_vendor_product.mk b/configs/audio_vendor_product.mk
index a28ff20..4778443 100644
--- a/configs/audio_vendor_product.mk
+++ b/configs/audio_vendor_product.mk
@@ -142,6 +142,7 @@
 MM_AUDIO += capi_v2_avc
 MM_AUDIO += capi_v2_asrc
 MM_AUDIO += capi_v2_ecmx
+MM_AUDIO += capi_v2_vote
 MM_AUDIO += icc_module.so.1
 MM_AUDIO += sec_module.so.1
 MM_AUDIO += audio-nxp-auto
diff --git a/configs/lahaina/mixer_paths.xml b/configs/lahaina/mixer_paths.xml
index 0aaa868..bbac6da 100644
--- a/configs/lahaina/mixer_paths.xml
+++ b/configs/lahaina/mixer_paths.xml
@@ -559,6 +559,11 @@
         <ctl name="EC Reference Channels" value="Two"/>
     </path>
 
+    <path name="echo-reference usb-headphones">
+        <ctl name="AUDIO_REF_EC_UL1 MUX" value="USB_AUDIO_RX"/>
+        <ctl name="EC Reference Channels" value="Two"/>
+    </path>
+
     <path name="echo-reference bt-sco-wb">
         <path name="echo-reference bt-sco" />
     </path>
@@ -587,6 +592,11 @@
         <ctl name="EC Reference Channels" value="Two"/>
     </path>
 
+    <path name="echo-reference-voip-low-latency usb-headphones">
+        <ctl name="AUDIO_REF_EC_UL8 MUX" value="USB_AUDIO_RX"/>
+        <ctl name="EC Reference Channels" value="Two"/>
+    </path>
+
     <path name="echo-reference-voip-low-latency bt-sco-wb">
         <path name="echo-reference-voip-low-latency bt-sco" />
     </path>
@@ -615,6 +625,11 @@
         <ctl name="EC Reference Channels" value="Two"/>
     </path>
 
+    <path name="echo-reference-voip usb-headphones">
+        <ctl name="AUDIO_REF_EC_UL10 MUX" value="USB_AUDIO_RX"/>
+        <ctl name="EC Reference Channels" value="Two"/>
+    </path>
+
     <path name="echo-reference-voip bt-sco-wb">
         <path name="echo-reference-voip bt-sco" />
     </path>
diff --git a/configs/lahaina/mixer_paths_cdp.xml b/configs/lahaina/mixer_paths_cdp.xml
index a57a233..3f5a969 100644
--- a/configs/lahaina/mixer_paths_cdp.xml
+++ b/configs/lahaina/mixer_paths_cdp.xml
@@ -542,6 +542,11 @@
         <ctl name="EC Reference Channels" value="Two"/>
     </path>
 
+    <path name="echo-reference usb-headphones">
+        <ctl name="AUDIO_REF_EC_UL1 MUX" value="USB_AUDIO_RX"/>
+        <ctl name="EC Reference Channels" value="Two"/>
+    </path>
+
     <path name="echo-reference bt-sco-wb">
         <path name="echo-reference bt-sco" />
     </path>
@@ -570,6 +575,11 @@
         <ctl name="EC Reference Channels" value="Two"/>
     </path>
 
+    <path name="echo-reference-voip-low-latency usb-headphones">
+        <ctl name="AUDIO_REF_EC_UL8 MUX" value="USB_AUDIO_RX"/>
+        <ctl name="EC Reference Channels" value="Two"/>
+    </path>
+
     <path name="echo-reference-voip-low-latency bt-sco-wb">
         <path name="echo-reference-voip-low-latency bt-sco" />
     </path>
@@ -598,6 +608,11 @@
         <ctl name="EC Reference Channels" value="Two"/>
     </path>
 
+    <path name="echo-reference-voip usb-headphones">
+        <ctl name="AUDIO_REF_EC_UL10 MUX" value="USB_AUDIO_RX"/>
+        <ctl name="EC Reference Channels" value="Two"/>
+    </path>
+
     <path name="echo-reference-voip bt-sco-wb">
         <path name="echo-reference-voip bt-sco" />
     </path>
diff --git a/configs/lahaina/mixer_paths_hdk.xml b/configs/lahaina/mixer_paths_hdk.xml
index 6b22ba6..e56628b 100644
--- a/configs/lahaina/mixer_paths_hdk.xml
+++ b/configs/lahaina/mixer_paths_hdk.xml
@@ -550,6 +550,11 @@
         <ctl name="EC Reference Channels" value="Two"/>
     </path>
 
+    <path name="echo-reference usb-headphones">
+        <ctl name="AUDIO_REF_EC_UL1 MUX" value="USB_AUDIO_RX"/>
+        <ctl name="EC Reference Channels" value="Two"/>
+    </path>
+
     <path name="echo-reference bt-sco-wb">
         <path name="echo-reference bt-sco" />
     </path>
@@ -573,6 +578,11 @@
         <ctl name="EC Reference Channels" value="Two"/>
     </path>
 
+    <path name="echo-reference-voip-low-latency usb-headphones">
+        <ctl name="AUDIO_REF_EC_UL8 MUX" value="USB_AUDIO_RX"/>
+        <ctl name="EC Reference Channels" value="Two"/>
+    </path>
+
     <path name="echo-reference-voip">
         <ctl name="AUDIO_REF_EC_UL10 MUX" value="WSA_CDC_DMA_RX_0" />
         <ctl name="EC Reference Channels" value="One"/>
@@ -593,6 +603,11 @@
         <ctl name="EC Reference Channels" value="Two"/>
     </path>
 
+    <path name="echo-reference-voip usb-headphones">
+        <ctl name="AUDIO_REF_EC_UL10 MUX" value="USB_AUDIO_RX"/>
+        <ctl name="EC Reference Channels" value="Two"/>
+    </path>
+
     <path name="echo-reference-voip bt-sco-wb">
         <path name="echo-reference-voip bt-sco" />
     </path>
diff --git a/configs/lahaina/mixer_paths_hhg.xml b/configs/lahaina/mixer_paths_hhg.xml
index faf7250..d782e23 100644
--- a/configs/lahaina/mixer_paths_hhg.xml
+++ b/configs/lahaina/mixer_paths_hhg.xml
@@ -551,6 +551,11 @@
         <ctl name="EC Reference Channels" value="Two"/>
     </path>
 
+    <path name="echo-reference usb-headphones">
+        <ctl name="AUDIO_REF_EC_UL1 MUX" value="USB_AUDIO_RX"/>
+        <ctl name="EC Reference Channels" value="Two"/>
+    </path>
+
     <path name="echo-reference bt-sco-wb">
         <path name="echo-reference bt-sco" />
     </path>
@@ -579,6 +584,11 @@
         <ctl name="EC Reference Channels" value="Two"/>
     </path>
 
+    <path name="echo-reference-voip-low-latency usb-headphones">
+        <ctl name="AUDIO_REF_EC_UL8 MUX" value="USB_AUDIO_RX"/>
+        <ctl name="EC Reference Channels" value="Two"/>
+    </path>
+
     <path name="echo-reference-voip-low-latency bt-sco-wb">
         <path name="echo-reference-voip-low-latency bt-sco" />
     </path>
@@ -607,6 +617,11 @@
         <ctl name="EC Reference Channels" value="Two"/>
     </path>
 
+    <path name="echo-reference-voip usb-headphones">
+        <ctl name="AUDIO_REF_EC_UL10 MUX" value="USB_AUDIO_RX"/>
+        <ctl name="EC Reference Channels" value="Two"/>
+    </path>
+
     <path name="echo-reference-voip bt-sco-wb">
         <path name="echo-reference-voip bt-sco" />
     </path>
diff --git a/configs/lahaina/mixer_paths_qrd.xml b/configs/lahaina/mixer_paths_qrd.xml
index 93d8ed3..73b6dfa 100644
--- a/configs/lahaina/mixer_paths_qrd.xml
+++ b/configs/lahaina/mixer_paths_qrd.xml
@@ -551,6 +551,11 @@
         <ctl name="EC Reference Channels" value="Two"/>
     </path>
 
+    <path name="echo-reference usb-headphones">
+        <ctl name="AUDIO_REF_EC_UL1 MUX" value="USB_AUDIO_RX"/>
+        <ctl name="EC Reference Channels" value="Two"/>
+    </path>
+
     <path name="echo-reference bt-sco-wb">
         <path name="echo-reference bt-sco" />
     </path>
@@ -579,6 +584,11 @@
         <ctl name="EC Reference Channels" value="Two"/>
     </path>
 
+    <path name="echo-reference-voip-low-latency usb-headphones">
+        <ctl name="AUDIO_REF_EC_UL8 MUX" value="USB_AUDIO_RX"/>
+        <ctl name="EC Reference Channels" value="Two"/>
+    </path>
+
     <path name="echo-reference-voip-low-latency bt-sco-wb">
         <path name="echo-reference-voip-low-latency bt-sco" />
     </path>
@@ -607,6 +617,11 @@
         <ctl name="EC Reference Channels" value="Two"/>
     </path>
 
+    <path name="echo-reference-voip usb-headphones">
+        <ctl name="AUDIO_REF_EC_UL10 MUX" value="USB_AUDIO_RX"/>
+        <ctl name="EC Reference Channels" value="Two"/>
+    </path>
+
     <path name="echo-reference-voip bt-sco-wb">
         <path name="echo-reference-voip bt-sco" />
     </path>
diff --git a/configs/lahaina/mixer_paths_shimaidp.xml b/configs/lahaina/mixer_paths_shimaidp.xml
index 012f043..d5f7746 100644
--- a/configs/lahaina/mixer_paths_shimaidp.xml
+++ b/configs/lahaina/mixer_paths_shimaidp.xml
@@ -546,6 +546,11 @@
         <ctl name="EC Reference Channels" value="Two"/>
     </path>
 
+    <path name="echo-reference usb-headphones">
+        <ctl name="AUDIO_REF_EC_UL1 MUX" value="USB_AUDIO_RX"/>
+        <ctl name="EC Reference Channels" value="Two"/>
+    </path>
+
     <path name="echo-reference bt-sco-wb">
         <path name="echo-reference bt-sco" />
     </path>
@@ -574,6 +579,11 @@
         <ctl name="EC Reference Channels" value="Two"/>
     </path>
 
+    <path name="echo-reference-voip-low-latency usb-headphones">
+        <ctl name="AUDIO_REF_EC_UL8 MUX" value="USB_AUDIO_RX"/>
+        <ctl name="EC Reference Channels" value="Two"/>
+    </path>
+
     <path name="echo-reference-voip-low-latency bt-sco-wb">
         <path name="echo-reference-voip-low-latency bt-sco" />
     </path>
@@ -602,6 +612,11 @@
         <ctl name="EC Reference Channels" value="Two"/>
     </path>
 
+    <path name="echo-reference-voip usb-headphones">
+        <ctl name="AUDIO_REF_EC_UL10 MUX" value="USB_AUDIO_RX"/>
+        <ctl name="EC Reference Channels" value="Two"/>
+    </path>
+
     <path name="echo-reference-voip bt-sco-wb">
         <path name="echo-reference-voip bt-sco" />
     </path>
diff --git a/configs/lahaina/mixer_paths_shimaidps.xml b/configs/lahaina/mixer_paths_shimaidps.xml
index 081bfd6..74796d9 100644
--- a/configs/lahaina/mixer_paths_shimaidps.xml
+++ b/configs/lahaina/mixer_paths_shimaidps.xml
@@ -537,6 +537,11 @@
         <ctl name="EC Reference Channels" value="Two"/>
     </path>
 
+    <path name="echo-reference usb-headphones">
+        <ctl name="AUDIO_REF_EC_UL1 MUX" value="USB_AUDIO_RX"/>
+        <ctl name="EC Reference Channels" value="Two"/>
+    </path>
+
     <path name="echo-reference bt-sco-wb">
         <path name="echo-reference bt-sco" />
     </path>
@@ -565,6 +570,11 @@
         <ctl name="EC Reference Channels" value="Two"/>
     </path>
 
+    <path name="echo-reference-voip-low-latency usb-headphones">
+        <ctl name="AUDIO_REF_EC_UL8 MUX" value="USB_AUDIO_RX"/>
+        <ctl name="EC Reference Channels" value="Two"/>
+    </path>
+
     <path name="echo-reference-voip-low-latency bt-sco-wb">
         <path name="echo-reference-voip-low-latency bt-sco" />
     </path>
@@ -593,6 +603,11 @@
         <ctl name="EC Reference Channels" value="Two"/>
     </path>
 
+    <path name="echo-reference-voip usb-headphones">
+        <ctl name="AUDIO_REF_EC_UL10 MUX" value="USB_AUDIO_RX"/>
+        <ctl name="EC Reference Channels" value="Two"/>
+    </path>
+
     <path name="echo-reference-voip bt-sco-wb">
         <path name="echo-reference-voip bt-sco" />
     </path>
diff --git a/configs/lahaina/mixer_paths_shimaqrd.xml b/configs/lahaina/mixer_paths_shimaqrd.xml
index 4f9113d..e80ba83 100644
--- a/configs/lahaina/mixer_paths_shimaqrd.xml
+++ b/configs/lahaina/mixer_paths_shimaqrd.xml
@@ -547,6 +547,11 @@
         <ctl name="EC Reference Channels" value="Two"/>
     </path>
 
+    <path name="echo-reference usb-headphones">
+        <ctl name="AUDIO_REF_EC_UL1 MUX" value="USB_AUDIO_RX"/>
+        <ctl name="EC Reference Channels" value="Two"/>
+    </path>
+
     <path name="echo-reference bt-sco-wb">
         <path name="echo-reference bt-sco" />
     </path>
@@ -570,6 +575,11 @@
         <ctl name="EC Reference Channels" value="Two"/>
     </path>
 
+    <path name="echo-reference-voip-low-latency usb-headphones">
+        <ctl name="AUDIO_REF_EC_UL8 MUX" value="USB_AUDIO_RX"/>
+        <ctl name="EC Reference Channels" value="Two"/>
+    </path>
+
     <path name="echo-reference-voip">
         <ctl name="AUDIO_REF_EC_UL10 MUX" value="WSA_CDC_DMA_RX_0" />
         <ctl name="EC Reference Channels" value="One"/>
@@ -590,6 +600,11 @@
         <ctl name="EC Reference Channels" value="Two"/>
     </path>
 
+    <path name="echo-reference-voip usb-headphones">
+        <ctl name="AUDIO_REF_EC_UL10 MUX" value="USB_AUDIO_RX"/>
+        <ctl name="EC Reference Channels" value="Two"/>
+    </path>
+
     <path name="echo-reference-voip bt-sco-wb">
         <path name="echo-reference-voip bt-sco" />
     </path>
diff --git a/configs/lahaina/shima_overlay/mixer_paths_shimaqrd_overlay.xml b/configs/lahaina/shima_overlay/mixer_paths_shimaqrd_overlay.xml
index 34defc0..a95f5fb 100755
--- a/configs/lahaina/shima_overlay/mixer_paths_shimaqrd_overlay.xml
+++ b/configs/lahaina/shima_overlay/mixer_paths_shimaqrd_overlay.xml
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <!--- Copyright (c) 2020, The Linux Foundation. All rights reserved.       -->
+<!--- Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. -->
 <!---                                                                           -->
 <!--- Redistribution and use in source and binary forms, with or without        -->
 <!--- modification, are permitted provided that the following conditions are    -->
@@ -48,6 +49,10 @@
         <ctl name="AUDIO_REF_EC_UL1 MUX" value="RX_CDC_DMA_RX_0"/>
         <ctl name="EC Reference Channels" value="One"/>
     </path>
+    <path name="echo-reference usb-headphones">
+        <ctl name="AUDIO_REF_EC_UL1 MUX" value="USB_AUDIO_RX"/>
+        <ctl name="EC Reference Channels" value="Two"/>
+    </path>
     <path name="echo-reference-voip-low-latency">
         <ctl name="AUDIO_REF_EC_UL8 MUX" value="WSA_CDC_DMA_RX_0"/>
         <ctl name="EC Reference Channels" value="One"/>
@@ -56,6 +61,10 @@
         <ctl name="AUDIO_REF_EC_UL8 MUX" value="RX_CDC_DMA_RX_0"/>
         <ctl name="EC Reference Channels" value="One"/>
     </path>
+    <path name="echo-reference-voip-low-latency usb-headphones">
+        <ctl name="AUDIO_REF_EC_UL8 MUX" value="USB_AUDIO_RX"/>
+        <ctl name="EC Reference Channels" value="Two"/>
+    </path>
     <path name="echo-reference-voip">
         <ctl name="AUDIO_REF_EC_UL10 MUX" value="WSA_CDC_DMA_RX_0"/>
         <ctl name="EC Reference Channels" value="One"/>
@@ -64,6 +73,10 @@
         <ctl name="AUDIO_REF_EC_UL10 MUX" value="RX_CDC_DMA_RX_0"/>
         <ctl name="EC Reference Channels" value="One"/>
     </path>
+    <path name="echo-reference-voip usb-headphones">
+        <ctl name="AUDIO_REF_EC_UL10 MUX" value="USB_AUDIO_RX"/>
+        <ctl name="EC Reference Channels" value="Two"/>
+    </path>
     <path name="amic2">
         <ctl name="TX DEC0 MUX" value="SWR_MIC"/>
         <ctl name="TX SMIC MUX0" value="SWR_MIC1"/>
diff --git a/configs/lahaina/yupik_overlay/mixer_paths_yupikidp_overlay.xml b/configs/lahaina/yupik_overlay/mixer_paths_yupikidp_overlay.xml
index e79e5f1..4a2fe2d 100644
--- a/configs/lahaina/yupik_overlay/mixer_paths_yupikidp_overlay.xml
+++ b/configs/lahaina/yupik_overlay/mixer_paths_yupikidp_overlay.xml
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <!--- Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.       -->
+<!--- Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. -->
 <!---                                                                           -->
 <!--- Redistribution and use in source and binary forms, with or without        -->
 <!--- modification, are permitted provided that the following conditions are    -->
@@ -119,4 +120,16 @@
     <path name="mmap-record capture-fm">
         <ctl name="MultiMedia16 Mixer SEC_MI2S_TX" value="1"/>
     </path>
+    <path name="echo-reference usb-headphones">
+        <ctl name="AUDIO_REF_EC_UL1 MUX" value="USB_AUDIO_RX"/>
+        <ctl name="EC Reference Channels" value="Two"/>
+    </path>
+    <path name="echo-reference-voip-low-latency usb-headphones">
+        <ctl name="AUDIO_REF_EC_UL8 MUX" value="USB_AUDIO_RX"/>
+        <ctl name="EC Reference Channels" value="Two"/>
+    </path>
+    <path name="echo-reference-voip usb-headphones">
+        <ctl name="AUDIO_REF_EC_UL10 MUX" value="USB_AUDIO_RX"/>
+        <ctl name="EC Reference Channels" value="Two"/>
+    </path>
 </mixer>
diff --git a/configs/lahaina/yupik_overlay/mixer_paths_yupikqrd_overlay.xml b/configs/lahaina/yupik_overlay/mixer_paths_yupikqrd_overlay.xml
index 0437aef..79b544e 100644
--- a/configs/lahaina/yupik_overlay/mixer_paths_yupikqrd_overlay.xml
+++ b/configs/lahaina/yupik_overlay/mixer_paths_yupikqrd_overlay.xml
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <!--- Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.       -->
+<!--- Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. -->
 <!---                                                                           -->
 <!--- Redistribution and use in source and binary forms, with or without        -->
 <!--- modification, are permitted provided that the following conditions are    -->
@@ -54,6 +55,10 @@
         <ctl name="AUDIO_REF_EC_UL1 MUX" value="RX_CDC_DMA_RX_0"/>
         <ctl name="EC Reference Channels" value="One"/>
     </path>
+    <path name="echo-reference usb-headphones">
+        <ctl name="AUDIO_REF_EC_UL1 MUX" value="USB_AUDIO_RX"/>
+        <ctl name="EC Reference Channels" value="Two"/>
+    </path>
     <path name="echo-reference-voip-low-latency">
         <ctl name="AUDIO_REF_EC_UL8 MUX" value="WSA_CDC_DMA_RX_0"/>
         <ctl name="EC Reference Channels" value="One"/>
@@ -62,6 +67,10 @@
         <ctl name="AUDIO_REF_EC_UL8 MUX" value="RX_CDC_DMA_RX_0"/>
         <ctl name="EC Reference Channels" value="One"/>
     </path>
+    <path name="echo-reference-voip-low-latency usb-headphones">
+        <ctl name="AUDIO_REF_EC_UL8 MUX" value="USB_AUDIO_RX"/>
+        <ctl name="EC Reference Channels" value="Two"/>
+    </path>
     <path name="echo-reference-voip">
         <ctl name="AUDIO_REF_EC_UL10 MUX" value="WSA_CDC_DMA_RX_0"/>
         <ctl name="EC Reference Channels" value="One"/>
@@ -70,6 +79,10 @@
         <ctl name="AUDIO_REF_EC_UL10 MUX" value="RX_CDC_DMA_RX_0"/>
         <ctl name="EC Reference Channels" value="One"/>
     </path>
+    <path name="echo-reference-voip usb-headphones">
+        <ctl name="AUDIO_REF_EC_UL10 MUX" value="USB_AUDIO_RX"/>
+        <ctl name="EC Reference Channels" value="Two"/>
+    </path>
     <path name="speaker">
         <ctl name="WSA_CDC_DMA_RX_0 Channels" value="One"/>
         <ctl name="WSA RX1 MUX" value="AIF1_PB"/>