Jelajahi Sumber

audio: add compressed offload to the AIDL audio_policy_configuration.xml

Bug: 270552159
Test: n/a
Change-Id: Ia0b57de95b72b17d16fe6cad4917cfdd559cafbc
David Li 2 tahun lalu
induk
melakukan
608f8ceaf1

+ 17 - 2
audio/lynx/aidl_config/audio_policy_configuration.xml

@@ -36,6 +36,21 @@
                     <profile name="" format="AUDIO_FORMAT_PCM_FLOAT"
                              samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
                 </mixPort>
+                <mixPort name="compressed offload" role="source"
+                         flags="AUDIO_OUTPUT_FLAG_DIRECT AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD AUDIO_OUTPUT_FLAG_NON_BLOCKING AUDIO_OUTPUT_FLAG_GAPLESS_OFFLOAD">
+                    <profile name="" format="AUDIO_FORMAT_MP3"
+                             samplingRates="8000 16000 24000 32000 44100 48000"
+                             channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
+                    <profile name="" format="AUDIO_FORMAT_AAC_LC"
+                             samplingRates="8000 16000 24000 32000 44100 48000"
+                             channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
+                    <profile name="" format="AUDIO_FORMAT_AAC_HE_V1"
+                             samplingRates="8000 16000 24000 32000 44100 48000"
+                             channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
+                    <profile name="" format="AUDIO_FORMAT_AAC_HE_V2"
+                             samplingRates="8000 16000 24000 32000 44100 48000"
+                             channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
+                </mixPort>
                 <mixPort name="haptic" role="source">
                     <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                              samplingRates="48000"
@@ -152,9 +167,9 @@
             <!-- route declaration, i.e. list all available sources for a given sink -->
             <routes>
                 <route type="mix" sink="Earpiece"
-                       sources="primary output,deep buffer,haptic,voip_rx"/>
+                       sources="primary output,deep buffer,haptic,voip_rx,compressed offload"/>
                 <route type="mix" sink="Speaker"
-                       sources="primary output,deep buffer,haptic,voip_rx"/>
+                       sources="primary output,deep buffer,haptic,voip_rx,compressed offload"/>
                 <route type="mix" sink="primary input"
                        sources="Built-In Mic,Built-In Back Mic"/>
                 <route type="mix" sink="voip_tx"

+ 1 - 1
audio/lynx/aidl_config/mixer_paths_aidl.xml

@@ -310,7 +310,7 @@
   <ctl name="Incall Sink Mute" value="0" />
   <ctl name="Incall Mic Mute" value="0" />
 
-  <!-- Decoder Reference Enable is controlled in aoc_control -->
+  <ctl name="Compress Offload Volume" value="1000" />
   <ctl name="Decoder Reference Enable" value="0" />
   <ctl name="LVM Enable" value="0" />