1<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 2<!-- Copyright (C) 2020 The Android Open Source Project 3 Licensed under the Apache License, Version 2.0 (the "License"); 4 you may not use this file except in compliance with the License. 5 You may obtain a copy of the License at 6 http://www.apache.org/licenses/LICENSE-2.0 7 Unless required by applicable law or agreed to in writing, software 8 distributed under the License is distributed on an "AS IS" BASIS, 9 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 See the License for the specific language governing permissions and 11 limitations under the License. 12--> 13<audioPolicyConfiguration version="7.0" xmlns:xi="http://www.w3.org/2001/XInclude"> 14 <globalConfiguration speaker_drc_enabled="false" call_screen_mode_supported="true" /> 15 <modules> 16 <!-- Primary Audio HAL --> 17 <module name="primary" halVersion="2.0"> 18 <attachedDevices> 19 <item>Speaker</item> 20 <item>Speaker Safe</item> 21 <item>Earpiece</item> 22 <item>Built-In Mic</item> 23 <item>Built-In Back Mic</item> 24 <item>Telephony Tx</item> 25 <item>Voice Call And Telephony Rx</item> 26 <item>Echo Ref In</item> 27 </attachedDevices> 28 <defaultOutputDevice>Speaker</defaultOutputDevice> 29 <mixPorts> 30 <mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY AUDIO_OUTPUT_FLAG_FAST"> 31 <profile name="" format="AUDIO_FORMAT_PCM_FLOAT" 32 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 33 </mixPort> 34 <mixPort name="deep buffer" role="source" flags="AUDIO_OUTPUT_FLAG_DEEP_BUFFER"> 35 <profile name="" format="AUDIO_FORMAT_PCM_FLOAT" 36 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 37 </mixPort> 38 <mixPort name="compressed_offload" role="source" 39 flags="AUDIO_OUTPUT_FLAG_DIRECT AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD AUDIO_OUTPUT_FLAG_NON_BLOCKING AUDIO_OUTPUT_FLAG_GAPLESS_OFFLOAD"> 40 <profile name="" format="AUDIO_FORMAT_MP3" 41 samplingRates="8000 16000 24000 32000 44100 48000" 42 channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/> 43 <profile name="" format="AUDIO_FORMAT_AAC_LC" 44 samplingRates="8000 16000 24000 32000 44100 48000" 45 channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/> 46 <profile name="" format="AUDIO_FORMAT_AAC_HE_V1" 47 samplingRates="8000 16000 24000 32000 44100 48000" 48 channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/> 49 <profile name="" format="AUDIO_FORMAT_AAC_HE_V2" 50 samplingRates="8000 16000 24000 32000 44100 48000" 51 channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/> 52 </mixPort> 53 <mixPort name="haptic" role="source"> 54 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 55 samplingRates="48000" 56 channelMasks="AUDIO_CHANNEL_OUT_STEREO_HAPTIC_AB" /> 57 </mixPort> 58 <mixPort name="raw" role="source" flags="AUDIO_OUTPUT_FLAG_RAW AUDIO_OUTPUT_FLAG_FAST"> 59 <profile name="" format="AUDIO_FORMAT_PCM_32_BIT" 60 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 61 </mixPort> 62 <mixPort name="mmap_no_irq_out" role="source" flags="AUDIO_OUTPUT_FLAG_DIRECT AUDIO_OUTPUT_FLAG_MMAP_NOIRQ"> 63 <profile name="" format="AUDIO_FORMAT_PCM_FLOAT" 64 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 65 </mixPort> 66 <mixPort name="immersive_out" role="source" flags="AUDIO_OUTPUT_FLAG_SPATIALIZER"> 67 <profile name="" format="AUDIO_FORMAT_PCM_32_BIT" 68 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 69 </mixPort> 70 <mixPort name="incall playback" role="source" 71 flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC"> 72 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 73 samplingRates="48000" 74 channelMasks="AUDIO_CHANNEL_OUT_STEREO" /> 75 </mixPort> 76 <mixPort name="voice call tx" role="source"> 77 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 78 samplingRates="48000" 79 channelMasks="AUDIO_CHANNEL_OUT_STEREO" /> 80 </mixPort> 81 <mixPort name="voip_rx" role="source" 82 flags="AUDIO_OUTPUT_FLAG_VOIP_RX"> 83 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 84 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 85 </mixPort> 86 <mixPort name="primary input" role="sink"> 87 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 88 samplingRates="48000" 89 channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO AUDIO_CHANNEL_INDEX_MASK_3"/> 90 </mixPort> 91 <mixPort name="hotword input" role="sink" flags="AUDIO_INPUT_FLAG_HW_HOTWORD" maxActiveCount="0" > 92 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 93 samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000" 94 channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/> 95 </mixPort> 96 <mixPort name="incall capture" role="sink" maxActiveCount="2" maxOpenCount="2"> 97 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 98 samplingRates="48000" 99 channelMasks="AUDIO_CHANNEL_IN_MONO"/> 100 </mixPort> 101 <mixPort name="voice call rx" role="sink"> 102 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 103 samplingRates="48000" 104 channelMasks="AUDIO_CHANNEL_IN_MONO"/> 105 </mixPort> 106 <mixPort name="voip_tx" role="sink" 107 flags="AUDIO_INPUT_FLAG_VOIP_TX"> 108 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 109 samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/> 110 </mixPort> 111 <mixPort name="fast input" role="sink" flags="AUDIO_INPUT_FLAG_RAW AUDIO_INPUT_FLAG_FAST"> 112 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 113 samplingRates="48000" 114 channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/> 115 </mixPort> 116 <mixPort name="mmap_no_irq_in" role="sink" flags="AUDIO_INPUT_FLAG_MMAP_NOIRQ"> 117 <profile name="" format="AUDIO_FORMAT_PCM_32_BIT" 118 samplingRates="48000" 119 channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/> 120 </mixPort> 121 <mixPort name="hifi_playback" role="source" /> 122 <mixPort name="hifi_input" role="sink" /> 123 <mixPort name="echo_ref_input" role="sink"> 124 <profile name="" format="AUDIO_FORMAT_PCM_32_BIT" 125 samplingRates="48000" 126 channelMasks="AUDIO_CHANNEL_IN_STEREO"/> 127 </mixPort> 128 </mixPorts> 129 <devicePorts> 130 <!-- Output devices declaration, i.e. Sink DEVICE PORT --> 131 <devicePort tagName="Earpiece" type="AUDIO_DEVICE_OUT_EARPIECE" role="sink"> 132 </devicePort> 133 <devicePort tagName="Speaker" type="AUDIO_DEVICE_OUT_SPEAKER" role="sink"> 134 </devicePort> 135 <devicePort tagName="Speaker Safe" type="AUDIO_DEVICE_OUT_SPEAKER_SAFE" role="sink"> 136 </devicePort> 137 <devicePort tagName="BT SCO" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO" role="sink"> 138 </devicePort> 139 <devicePort tagName="BT SCO Headset" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET" role="sink"> 140 </devicePort> 141 <devicePort tagName="BT SCO Car Kit" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT" role="sink"> 142 </devicePort> 143 <devicePort tagName="USB Device Out" type="AUDIO_DEVICE_OUT_USB_DEVICE" role="sink"> 144 </devicePort> 145 <devicePort tagName="USB Headset Out" type="AUDIO_DEVICE_OUT_USB_HEADSET" role="sink"> 146 </devicePort> 147 <devicePort tagName="HDMI Out" type="AUDIO_DEVICE_OUT_HDMI" role="sink"> 148 </devicePort> 149 <devicePort tagName="Telephony Tx" type="AUDIO_DEVICE_OUT_TELEPHONY_TX" role="sink"> 150 </devicePort> 151 <!-- Input devices declaration, i.e. Source DEVICE PORT --> 152 <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source"> 153 </devicePort> 154 <devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source"> 155 </devicePort> 156 <devicePort tagName="BT SCO Headset Mic" type="AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET" role="source"> 157 </devicePort> 158 <devicePort tagName="BT A2DP Out" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP" role="sink" 159 encodedFormats="AUDIO_FORMAT_OPUS AUDIO_FORMAT_AAC AUDIO_FORMAT_SBC"> 160 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 161 samplingRates="44100 48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 162 </devicePort> 163 <devicePort tagName="BT A2DP Headphones" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES" role="sink" 164 encodedFormats="AUDIO_FORMAT_OPUS AUDIO_FORMAT_AAC AUDIO_FORMAT_SBC"> 165 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 166 samplingRates="44100 48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 167 </devicePort> 168 <devicePort tagName="BT A2DP Speaker" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER" role="sink" 169 encodedFormats="AUDIO_FORMAT_OPUS AUDIO_FORMAT_AAC AUDIO_FORMAT_SBC"> 170 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 171 samplingRates="44100 48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 172 </devicePort> 173 <devicePort tagName="BT BLE Headset" type="AUDIO_DEVICE_OUT_BLE_HEADSET" role="sink" 174 encodedFormats="AUDIO_FORMAT_LC3"> 175 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 176 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 177 </devicePort> 178 <devicePort tagName="BT BLE Speaker" type="AUDIO_DEVICE_OUT_BLE_SPEAKER" role="sink" 179 encodedFormats="AUDIO_FORMAT_LC3"> 180 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 181 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 182 </devicePort> 183 <devicePort tagName="BT BLE Broadcast" type="AUDIO_DEVICE_OUT_BLE_BROADCAST" role="sink" 184 encodedFormats="AUDIO_FORMAT_LC3"> 185 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 186 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 187 </devicePort> 188 <devicePort tagName="BLE Headset Mic" type="AUDIO_DEVICE_IN_BLE_HEADSET" role="source"> 189 </devicePort> 190 <devicePort tagName="USB Device In" type="AUDIO_DEVICE_IN_USB_DEVICE" role="source"> 191 </devicePort> 192 <devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source"> 193 </devicePort> 194 <!-- AUDIO_DEVICE_IN_VOICE_CALL and AUDIO_DEVICE_IN_TELEPHONY_RX are in the same value --> 195 <devicePort tagName="Voice Call And Telephony Rx" type="AUDIO_DEVICE_IN_VOICE_CALL" role="source"> 196 </devicePort> 197 <devicePort tagName="Echo Ref In" type="AUDIO_DEVICE_IN_ECHO_REFERENCE" role="source"> 198 </devicePort> 199 </devicePorts> 200 <!-- route declaration, i.e. list all available sources for a given sink --> 201 <routes> 202 <route type="mix" sink="Speaker" 203 sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,compressed_offload"/> 204 <route type="mix" sink="Speaker Safe" 205 sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,compressed_offload"/> 206 <route type="mix" sink="Earpiece" 207 sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,compressed_offload"/> 208 <route type="mix" sink="BT A2DP Out" 209 sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/> 210 <route type="mix" sink="BT A2DP Headphones" 211 sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/> 212 <route type="mix" sink="BT A2DP Speaker" 213 sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/> 214 <route type="mix" sink="BT BLE Headset" 215 sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/> 216 <route type="mix" sink="BT BLE Speaker" 217 sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/> 218 <route type="mix" sink="BT BLE Broadcast" 219 sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/> 220 <route type="mix" sink="USB Device Out" 221 sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,hifi_playback,compressed_offload,immersive_out"/> 222 <route type="mix" sink="USB Headset Out" 223 sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,hifi_playback,compressed_offload,immersive_out"/> 224 <route type="mix" sink="HDMI Out" 225 sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,compressed_offload"/> 226 <route type="mix" sink="BT SCO" 227 sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out"/> 228 <route type="mix" sink="BT SCO Headset" 229 sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out"/> 230 <route type="mix" sink="BT SCO Car Kit" 231 sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out"/> 232 <route type="mix" sink="Telephony Tx" sources="incall playback,voice call tx" /> 233 <route type="mix" sink="primary input" 234 sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic,BLE Headset Mic"/> 235 <route type="mix" sink="hotword input" 236 sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic,BLE Headset Mic"/> 237 <route type="mix" sink="incall capture" sources="Voice Call And Telephony Rx" /> 238 <route type="mix" sink="voice call rx" sources="Voice Call And Telephony Rx" /> 239 <route type="mix" sink="voip_tx" 240 sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic,BLE Headset Mic"/> 241 <route type="mix" sink="fast input" 242 sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic,BLE Headset Mic"/> 243 <route type="mix" sink="mmap_no_irq_in" 244 sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic,BLE Headset Mic"/> 245 <route type="mix" sink="hifi_input" sources="USB Device In,USB Headset In" /> 246 <route type="mix" sink="echo_ref_input" sources="Echo Ref In"/> 247 </routes> 248 </module> 249 <!-- Bluetooth Audio HAL --> 250 <xi:include href="bluetooth_audio_policy_configuration_7_0.xml"/> 251 <!-- Usb Audio HAL --> 252 <module name="usbv2" halVersion="2.0"> 253 <mixPorts> 254 <mixPort name="usb_accessory output" role="source"> 255 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 256 samplingRates="44100" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 257 </mixPort> 258 </mixPorts> 259 <devicePorts> 260 <devicePort tagName="USB Host Out" type="AUDIO_DEVICE_OUT_USB_ACCESSORY" role="sink"> 261 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 262 samplingRates="44100" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 263 </devicePort> 264 </devicePorts> 265 <routes> 266 <route type="mix" sink="USB Host Out" 267 sources="usb_accessory output"/> 268 </routes> 269 </module> 270 <!-- Remote Submix Audio HAL --> 271 <xi:include href="r_submix_audio_policy_configuration.xml"/> 272 </modules> 273 <!-- End of Modules section --> 274 <!-- Volume section --> 275 <xi:include href="audio_policy_volumes.xml"/> 276 <xi:include href="default_volume_tables.xml"/> 277 <!-- End of Volume section --> 278</audioPolicyConfiguration> 279