Audio configuration for spatial audio

Update audio policy and effect configuration files to
support spatial audio feature

Bug: 237677573
Test: make
Change-Id: I4a7e2eb3c44192954b7bcf804d14097e94e90eb0
diff --git a/audio/oriole/config/audio_platform_configuration.xml b/audio/oriole/config/audio_platform_configuration.xml
index a4232cd..676131b 100644
--- a/audio/oriole/config/audio_platform_configuration.xml
+++ b/audio/oriole/config/audio_platform_configuration.xml
@@ -182,6 +182,7 @@
         <usecase id="UC_DEEP_BUFFER_PLAYBACK" dev1="5" dyn_path="true" dsp_vol="false" mmap="false" period="20" period_num="4"/>
         <!-- dev1: voice-call downlink dev2: voice-clal uplink -->
         <usecase id="UC_VOICE_CALL" dev1="4" dev2="11"/>
+        <usecase id="UC_IMMERSIVE_PLAYBACK" dev1="3"/>
         <!-- for output with AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD, 4 * 128KB buffer -->
         <usecase id="UC_COMPRESSED_OFFLOAD_PLAYBACK" dev1="6" dyn_path="true" dsp_vol="true" mmap="false" period="131072" period_num="4" pre_proc_id="14"/>
         <!-- dev1: audio dev2: haptic -->
diff --git a/audio/oriole/config/audio_policy_configuration.xml b/audio/oriole/config/audio_policy_configuration.xml
index 5bd7ec8..fe4eafb 100644
--- a/audio/oriole/config/audio_policy_configuration.xml
+++ b/audio/oriole/config/audio_policy_configuration.xml
@@ -64,6 +64,10 @@
                     <profile name="" format="AUDIO_FORMAT_PCM_FLOAT"
                              samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
                 </mixPort>
+                <mixPort name="immersive_out" role="source" flags="AUDIO_OUTPUT_FLAG_SPATIALIZER">
+                    <profile name="" format="AUDIO_FORMAT_PCM_FLOAT"
+                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+                </mixPort>
                 <mixPort name="incall playback" role="source"
                          flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC">
                     <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
@@ -196,25 +200,25 @@
             <!-- route declaration, i.e. list all available sources for a given sink -->
             <routes>
                 <route type="mix" sink="Speaker"
-                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
+                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,immersive_out"/>
                 <route type="mix" sink="Speaker Safe"
                        sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
                 <route type="mix" sink="Earpiece"
                        sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
                 <route type="mix" sink="BT A2DP Out"
-                       sources="primary output,deep buffer,haptic,compressed_offload,voip_rx"/>
+                       sources="primary output,deep buffer,haptic,compressed_offload,voip_rx,immersive_out"/>
                 <route type="mix" sink="BT A2DP Headphones"
-                       sources="primary output,deep buffer,haptic,compressed_offload,voip_rx"/>
+                       sources="primary output,deep buffer,haptic,compressed_offload,voip_rx,immersive_out"/>
                 <route type="mix" sink="BT A2DP Speaker"
-                       sources="primary output,deep buffer,haptic,compressed_offload,voip_rx"/>
+                       sources="primary output,deep buffer,haptic,compressed_offload,voip_rx,immersive_out"/>
                 <route type="mix" sink="BT BLE Headset"
-                       sources="primary output,deep buffer,haptic,compressed_offload,voip_rx"/>
+                       sources="primary output,deep buffer,haptic,compressed_offload,voip_rx,immersive_out"/>
                 <route type="mix" sink="BT BLE Speaker"
-                       sources="primary output,deep buffer,haptic,compressed_offload,voip_rx"/>
+                       sources="primary output,deep buffer,haptic,compressed_offload,voip_rx,immersive_out"/>
                 <route type="mix" sink="USB Device Out"
-                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
+                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback,immersive_out"/>
                 <route type="mix" sink="USB Headset Out"
-                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
+                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback,immersive_out"/>
                 <route type="mix" sink="BT SCO"
                        sources="primary output,deep buffer,haptic,compressed_offload,voip_rx"/>
                 <route type="mix" sink="BT SCO Headset"
diff --git a/audio/oriole/config/audio_policy_configuration_a2dp_offload_disabled.xml b/audio/oriole/config/audio_policy_configuration_a2dp_offload_disabled.xml
index c0f0677..29b967a 100644
--- a/audio/oriole/config/audio_policy_configuration_a2dp_offload_disabled.xml
+++ b/audio/oriole/config/audio_policy_configuration_a2dp_offload_disabled.xml
@@ -64,6 +64,10 @@
                     <profile name="" format="AUDIO_FORMAT_PCM_FLOAT"
                              samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
                 </mixPort>
+                <mixPort name="immersive_out" role="source" flags="AUDIO_OUTPUT_FLAG_SPATIALIZER">
+                    <profile name="" format="AUDIO_FORMAT_PCM_FLOAT"
+                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+                </mixPort>
                 <mixPort name="incall playback" role="source"
                          flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC">
                     <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
@@ -171,15 +175,15 @@
             <!-- route declaration, i.e. list all available sources for a given sink -->
             <routes>
                 <route type="mix" sink="Speaker"
-                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
+                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,immersive_out"/>
                 <route type="mix" sink="Speaker Safe"
                        sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
                 <route type="mix" sink="Earpiece"
                        sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
                 <route type="mix" sink="USB Device Out"
-                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
+                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback,immersive_out"/>
                 <route type="mix" sink="USB Headset Out"
-                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
+                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback,immersive_out"/>
                 <route type="mix" sink="BT SCO"
                        sources="primary output,deep buffer,haptic,compressed_offload,voip_rx"/>
                 <route type="mix" sink="BT SCO Headset"
diff --git a/audio/oriole/config/audio_policy_configuration_le_offload_disabled.xml b/audio/oriole/config/audio_policy_configuration_le_offload_disabled.xml
index 95c2dbe..224d0a2 100644
--- a/audio/oriole/config/audio_policy_configuration_le_offload_disabled.xml
+++ b/audio/oriole/config/audio_policy_configuration_le_offload_disabled.xml
@@ -64,6 +64,10 @@
                     <profile name="" format="AUDIO_FORMAT_PCM_FLOAT"
                              samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
                 </mixPort>
+                <mixPort name="immersive_out" role="source" flags="AUDIO_OUTPUT_FLAG_SPATIALIZER">
+                    <profile name="" format="AUDIO_FORMAT_PCM_FLOAT"
+                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+                </mixPort>
                 <mixPort name="incall playback" role="source"
                          flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC">
                     <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
@@ -186,21 +190,21 @@
             <!-- route declaration, i.e. list all available sources for a given sink -->
             <routes>
                 <route type="mix" sink="Speaker"
-                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
+                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,immersive_out"/>
                 <route type="mix" sink="Speaker Safe"
                        sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
                 <route type="mix" sink="Earpiece"
                        sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
                 <route type="mix" sink="BT A2DP Out"
-                       sources="primary output,deep buffer,haptic,compressed_offload,voip_rx"/>
+                       sources="primary output,deep buffer,haptic,compressed_offload,voip_rx,immersive_out"/>
                 <route type="mix" sink="BT A2DP Headphones"
-                       sources="primary output,deep buffer,haptic,compressed_offload,voip_rx"/>
+                       sources="primary output,deep buffer,haptic,compressed_offload,voip_rx,immersive_out"/>
                 <route type="mix" sink="BT A2DP Speaker"
-                       sources="primary output,deep buffer,haptic,compressed_offload,voip_rx"/>
+                       sources="primary output,deep buffer,haptic,compressed_offload,voip_rx,immersive_out"/>
                 <route type="mix" sink="USB Device Out"
-                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
+                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback,immersive_out"/>
                 <route type="mix" sink="USB Headset Out"
-                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
+                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback,immersive_out"/>
                 <route type="mix" sink="BT SCO"
                        sources="primary output,deep buffer,haptic,compressed_offload,voip_rx"/>
                 <route type="mix" sink="BT SCO Headset"
diff --git a/audio/oriole/config/bluetooth_with_le_audio_policy_configuration_7_0.xml b/audio/oriole/config/bluetooth_with_le_audio_policy_configuration_7_0.xml
index 4b915ec..e3f27d9 100644
--- a/audio/oriole/config/bluetooth_with_le_audio_policy_configuration_7_0.xml
+++ b/audio/oriole/config/bluetooth_with_le_audio_policy_configuration_7_0.xml
@@ -11,7 +11,11 @@
                      channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
         </mixPort>
         <!-- Le Audio Audio Ports -->
-        <mixPort name="le audio output" role="source" flags="AUDIO_OUTPUT_FLAG_SPATIALIZER"/>
+        <mixPort name="le audio output" role="source" flags="AUDIO_OUTPUT_FLAG_SPATIALIZER">
+            <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                     samplingRates="44100 48000"
+                     channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+        </mixPort>
         <mixPort name="le audio input" role="sink">
             <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                      samplingRates="8000 16000 24000 32000 44100 48000"
@@ -64,4 +68,4 @@
         <route type="mix" sink="BLE Speaker Out"
                sources="le audio output"/>
     </routes>
-</module>
\ No newline at end of file
+</module>
diff --git a/audio/oriole/config/mixer_paths.xml b/audio/oriole/config/mixer_paths.xml
index a39fcd0..93e3547 100644
--- a/audio/oriole/config/mixer_paths.xml
+++ b/audio/oriole/config/mixer_paths.xml
@@ -429,6 +429,18 @@
         <path name="compress-offload-playback" />
     </path>
 
+    <path name="immersive-playbackP">
+        <ctl name="TDM_0_RX Mixer EP4" value="1"/>
+    </path>
+
+    <path name="immersive-playbackP bt">
+        <ctl name="BT_RX Mixer EP4" value="1"/>
+    </path>
+
+    <path name="immersive-playbackP usb-headphone">
+        <ctl name="USB_RX Mixer EP4" value="1"/>
+    </path>
+
     <path name="voip-playbackP">
         <ctl name="TDM_0_RX Mixer VOIP" value="1"/>
     </path>
diff --git a/audio/raven/config/audio_platform_configuration.xml b/audio/raven/config/audio_platform_configuration.xml
index a4232cd..676131b 100644
--- a/audio/raven/config/audio_platform_configuration.xml
+++ b/audio/raven/config/audio_platform_configuration.xml
@@ -182,6 +182,7 @@
         <usecase id="UC_DEEP_BUFFER_PLAYBACK" dev1="5" dyn_path="true" dsp_vol="false" mmap="false" period="20" period_num="4"/>
         <!-- dev1: voice-call downlink dev2: voice-clal uplink -->
         <usecase id="UC_VOICE_CALL" dev1="4" dev2="11"/>
+        <usecase id="UC_IMMERSIVE_PLAYBACK" dev1="3"/>
         <!-- for output with AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD, 4 * 128KB buffer -->
         <usecase id="UC_COMPRESSED_OFFLOAD_PLAYBACK" dev1="6" dyn_path="true" dsp_vol="true" mmap="false" period="131072" period_num="4" pre_proc_id="14"/>
         <!-- dev1: audio dev2: haptic -->
diff --git a/audio/raven/config/audio_policy_configuration.xml b/audio/raven/config/audio_policy_configuration.xml
index 5bd7ec8..fe4eafb 100644
--- a/audio/raven/config/audio_policy_configuration.xml
+++ b/audio/raven/config/audio_policy_configuration.xml
@@ -64,6 +64,10 @@
                     <profile name="" format="AUDIO_FORMAT_PCM_FLOAT"
                              samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
                 </mixPort>
+                <mixPort name="immersive_out" role="source" flags="AUDIO_OUTPUT_FLAG_SPATIALIZER">
+                    <profile name="" format="AUDIO_FORMAT_PCM_FLOAT"
+                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+                </mixPort>
                 <mixPort name="incall playback" role="source"
                          flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC">
                     <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
@@ -196,25 +200,25 @@
             <!-- route declaration, i.e. list all available sources for a given sink -->
             <routes>
                 <route type="mix" sink="Speaker"
-                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
+                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,immersive_out"/>
                 <route type="mix" sink="Speaker Safe"
                        sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
                 <route type="mix" sink="Earpiece"
                        sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
                 <route type="mix" sink="BT A2DP Out"
-                       sources="primary output,deep buffer,haptic,compressed_offload,voip_rx"/>
+                       sources="primary output,deep buffer,haptic,compressed_offload,voip_rx,immersive_out"/>
                 <route type="mix" sink="BT A2DP Headphones"
-                       sources="primary output,deep buffer,haptic,compressed_offload,voip_rx"/>
+                       sources="primary output,deep buffer,haptic,compressed_offload,voip_rx,immersive_out"/>
                 <route type="mix" sink="BT A2DP Speaker"
-                       sources="primary output,deep buffer,haptic,compressed_offload,voip_rx"/>
+                       sources="primary output,deep buffer,haptic,compressed_offload,voip_rx,immersive_out"/>
                 <route type="mix" sink="BT BLE Headset"
-                       sources="primary output,deep buffer,haptic,compressed_offload,voip_rx"/>
+                       sources="primary output,deep buffer,haptic,compressed_offload,voip_rx,immersive_out"/>
                 <route type="mix" sink="BT BLE Speaker"
-                       sources="primary output,deep buffer,haptic,compressed_offload,voip_rx"/>
+                       sources="primary output,deep buffer,haptic,compressed_offload,voip_rx,immersive_out"/>
                 <route type="mix" sink="USB Device Out"
-                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
+                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback,immersive_out"/>
                 <route type="mix" sink="USB Headset Out"
-                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
+                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback,immersive_out"/>
                 <route type="mix" sink="BT SCO"
                        sources="primary output,deep buffer,haptic,compressed_offload,voip_rx"/>
                 <route type="mix" sink="BT SCO Headset"
diff --git a/audio/raven/config/audio_policy_configuration_a2dp_offload_disabled.xml b/audio/raven/config/audio_policy_configuration_a2dp_offload_disabled.xml
index c0f0677..29b967a 100644
--- a/audio/raven/config/audio_policy_configuration_a2dp_offload_disabled.xml
+++ b/audio/raven/config/audio_policy_configuration_a2dp_offload_disabled.xml
@@ -64,6 +64,10 @@
                     <profile name="" format="AUDIO_FORMAT_PCM_FLOAT"
                              samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
                 </mixPort>
+                <mixPort name="immersive_out" role="source" flags="AUDIO_OUTPUT_FLAG_SPATIALIZER">
+                    <profile name="" format="AUDIO_FORMAT_PCM_FLOAT"
+                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+                </mixPort>
                 <mixPort name="incall playback" role="source"
                          flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC">
                     <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
@@ -171,15 +175,15 @@
             <!-- route declaration, i.e. list all available sources for a given sink -->
             <routes>
                 <route type="mix" sink="Speaker"
-                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
+                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,immersive_out"/>
                 <route type="mix" sink="Speaker Safe"
                        sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
                 <route type="mix" sink="Earpiece"
                        sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
                 <route type="mix" sink="USB Device Out"
-                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
+                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback,immersive_out"/>
                 <route type="mix" sink="USB Headset Out"
-                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
+                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback,immersive_out"/>
                 <route type="mix" sink="BT SCO"
                        sources="primary output,deep buffer,haptic,compressed_offload,voip_rx"/>
                 <route type="mix" sink="BT SCO Headset"
diff --git a/audio/raven/config/audio_policy_configuration_le_offload_disabled.xml b/audio/raven/config/audio_policy_configuration_le_offload_disabled.xml
index 95c2dbe..224d0a2 100644
--- a/audio/raven/config/audio_policy_configuration_le_offload_disabled.xml
+++ b/audio/raven/config/audio_policy_configuration_le_offload_disabled.xml
@@ -64,6 +64,10 @@
                     <profile name="" format="AUDIO_FORMAT_PCM_FLOAT"
                              samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
                 </mixPort>
+                <mixPort name="immersive_out" role="source" flags="AUDIO_OUTPUT_FLAG_SPATIALIZER">
+                    <profile name="" format="AUDIO_FORMAT_PCM_FLOAT"
+                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+                </mixPort>
                 <mixPort name="incall playback" role="source"
                          flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC">
                     <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
@@ -186,21 +190,21 @@
             <!-- route declaration, i.e. list all available sources for a given sink -->
             <routes>
                 <route type="mix" sink="Speaker"
-                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
+                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,immersive_out"/>
                 <route type="mix" sink="Speaker Safe"
                        sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
                 <route type="mix" sink="Earpiece"
                        sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
                 <route type="mix" sink="BT A2DP Out"
-                       sources="primary output,deep buffer,haptic,compressed_offload,voip_rx"/>
+                       sources="primary output,deep buffer,haptic,compressed_offload,voip_rx,immersive_out"/>
                 <route type="mix" sink="BT A2DP Headphones"
-                       sources="primary output,deep buffer,haptic,compressed_offload,voip_rx"/>
+                       sources="primary output,deep buffer,haptic,compressed_offload,voip_rx,immersive_out"/>
                 <route type="mix" sink="BT A2DP Speaker"
-                       sources="primary output,deep buffer,haptic,compressed_offload,voip_rx"/>
+                       sources="primary output,deep buffer,haptic,compressed_offload,voip_rx,immersive_out"/>
                 <route type="mix" sink="USB Device Out"
-                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
+                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback,immersive_out"/>
                 <route type="mix" sink="USB Headset Out"
-                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
+                       sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback,immersive_out"/>
                 <route type="mix" sink="BT SCO"
                        sources="primary output,deep buffer,haptic,compressed_offload,voip_rx"/>
                 <route type="mix" sink="BT SCO Headset"
diff --git a/audio/raven/config/bluetooth_with_le_audio_policy_configuration_7_0.xml b/audio/raven/config/bluetooth_with_le_audio_policy_configuration_7_0.xml
index e1672ab..e3f27d9 100644
--- a/audio/raven/config/bluetooth_with_le_audio_policy_configuration_7_0.xml
+++ b/audio/raven/config/bluetooth_with_le_audio_policy_configuration_7_0.xml
@@ -11,7 +11,11 @@
                      channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
         </mixPort>
         <!-- Le Audio Audio Ports -->
-        <mixPort name="le audio output" role="source" flags="AUDIO_OUTPUT_FLAG_SPATIALIZER"/>
+        <mixPort name="le audio output" role="source" flags="AUDIO_OUTPUT_FLAG_SPATIALIZER">
+            <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                     samplingRates="44100 48000"
+                     channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+        </mixPort>
         <mixPort name="le audio input" role="sink">
             <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                      samplingRates="8000 16000 24000 32000 44100 48000"
diff --git a/audio/raven/config/mixer_paths.xml b/audio/raven/config/mixer_paths.xml
index a39fcd0..93e3547 100644
--- a/audio/raven/config/mixer_paths.xml
+++ b/audio/raven/config/mixer_paths.xml
@@ -429,6 +429,18 @@
         <path name="compress-offload-playback" />
     </path>
 
+    <path name="immersive-playbackP">
+        <ctl name="TDM_0_RX Mixer EP4" value="1"/>
+    </path>
+
+    <path name="immersive-playbackP bt">
+        <ctl name="BT_RX Mixer EP4" value="1"/>
+    </path>
+
+    <path name="immersive-playbackP usb-headphone">
+        <ctl name="USB_RX Mixer EP4" value="1"/>
+    </path>
+
     <path name="voip-playbackP">
         <ctl name="TDM_0_RX Mixer VOIP" value="1"/>
     </path>
diff --git a/device-oriole.mk b/device-oriole.mk
index 95b0201..f6f46a0 100644
--- a/device-oriole.mk
+++ b/device-oriole.mk
@@ -237,6 +237,13 @@
     persist.bluetooth.le_audio_test=false
 endif
 
+# declare use of spatial audio
+PRODUCT_PROPERTY_OVERRIDES += \
+    ro.audio.spatializer_enabled=true
+
+PRODUCT_PACKAGES += \
+	libspatialaudio
+
 # Device features
 PRODUCT_COPY_FILES += \
     frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml
diff --git a/device-raven.mk b/device-raven.mk
index da3ac3c..a510882 100644
--- a/device-raven.mk
+++ b/device-raven.mk
@@ -251,6 +251,13 @@
     persist.bluetooth.le_audio_test=false
 endif
 
+# declare use of spatial audio
+PRODUCT_PROPERTY_OVERRIDES += \
+    ro.audio.spatializer_enabled=true
+
+PRODUCT_PACKAGES += \
+	libspatialaudio
+
 # Device features
 PRODUCT_COPY_FILES += \
     frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml