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"> 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"> 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="Wired Headset" type="AUDIO_DEVICE_OUT_WIRED_HEADSET" role="sink"> 138 </devicePort> 139 <devicePort tagName="Wired Headphones" type="AUDIO_DEVICE_OUT_WIRED_HEADPHONE" role="sink"> 140 </devicePort> 141 <devicePort tagName="BT SCO" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO" role="sink"> 142 </devicePort> 143 <devicePort tagName="BT SCO Headset" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET" role="sink"> 144 </devicePort> 145 <devicePort tagName="BT SCO Car Kit" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT" role="sink"> 146 </devicePort> 147 <devicePort tagName="USB Device Out" type="AUDIO_DEVICE_OUT_USB_DEVICE" role="sink"> 148 </devicePort> 149 <devicePort tagName="USB Headset Out" type="AUDIO_DEVICE_OUT_USB_HEADSET" role="sink"> 150 </devicePort> 151 <devicePort tagName="HDMI Out" type="AUDIO_DEVICE_OUT_HDMI" role="sink"> 152 </devicePort> 153 <devicePort tagName="Telephony Tx" type="AUDIO_DEVICE_OUT_TELEPHONY_TX" role="sink"> 154 </devicePort> 155 <!-- Input devices declaration, i.e. Source DEVICE PORT --> 156 <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source"> 157 </devicePort> 158 <devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source"> 159 </devicePort> 160 <devicePort tagName="Wired Headset Mic" type="AUDIO_DEVICE_IN_WIRED_HEADSET" role="source"> 161 </devicePort> 162 <devicePort tagName="BT SCO Headset Mic" type="AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET" role="source"> 163 </devicePort> 164 <devicePort tagName="BT A2DP Out" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP" role="sink" 165 encodedFormats="AUDIO_FORMAT_OPUS AUDIO_FORMAT_AAC AUDIO_FORMAT_SBC"> 166 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 167 samplingRates="44100 48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 168 </devicePort> 169 <devicePort tagName="BT A2DP Headphones" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES" role="sink" 170 encodedFormats="AUDIO_FORMAT_OPUS AUDIO_FORMAT_AAC AUDIO_FORMAT_SBC"> 171 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 172 samplingRates="44100 48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 173 </devicePort> 174 <devicePort tagName="BT A2DP Speaker" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER" role="sink" 175 encodedFormats="AUDIO_FORMAT_OPUS AUDIO_FORMAT_AAC AUDIO_FORMAT_SBC"> 176 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 177 samplingRates="44100 48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 178 </devicePort> 179 <devicePort tagName="BT BLE Headset" type="AUDIO_DEVICE_OUT_BLE_HEADSET" role="sink" 180 encodedFormats="AUDIO_FORMAT_LC3"> 181 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 182 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 183 </devicePort> 184 <devicePort tagName="BT BLE Speaker" type="AUDIO_DEVICE_OUT_BLE_SPEAKER" role="sink" 185 encodedFormats="AUDIO_FORMAT_LC3"> 186 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 187 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 188 </devicePort> 189 <devicePort tagName="BT BLE Broadcast" type="AUDIO_DEVICE_OUT_BLE_BROADCAST" role="sink" 190 encodedFormats="AUDIO_FORMAT_LC3"> 191 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 192 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 193 </devicePort> 194 <devicePort tagName="BLE Headset Mic" type="AUDIO_DEVICE_IN_BLE_HEADSET" role="source"> 195 </devicePort> 196 <devicePort tagName="USB Device In" type="AUDIO_DEVICE_IN_USB_DEVICE" role="source"> 197 </devicePort> 198 <devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source"> 199 </devicePort> 200 <!-- AUDIO_DEVICE_IN_VOICE_CALL and AUDIO_DEVICE_IN_TELEPHONY_RX are in the same value --> 201 <devicePort tagName="Voice Call And Telephony Rx" type="AUDIO_DEVICE_IN_VOICE_CALL" role="source"> 202 </devicePort> 203 <devicePort tagName="Echo Ref In" type="AUDIO_DEVICE_IN_ECHO_REFERENCE" role="source"> 204 </devicePort> 205 </devicePorts> 206 <!-- route declaration, i.e. list all available sources for a given sink --> 207 <routes> 208 <route type="mix" sink="Speaker" 209 sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,compressed_offload"/> 210 <route type="mix" sink="Speaker Safe" 211 sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,compressed_offload"/> 212 <route type="mix" sink="Earpiece" 213 sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,compressed_offload"/> 214 <route type="mix" sink="BT A2DP Out" 215 sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/> 216 <route type="mix" sink="BT A2DP Headphones" 217 sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/> 218 <route type="mix" sink="BT A2DP Speaker" 219 sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/> 220 <route type="mix" sink="BT BLE Headset" 221 sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/> 222 <route type="mix" sink="BT BLE Speaker" 223 sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/> 224 <route type="mix" sink="BT BLE Broadcast" 225 sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/> 226 <route type="mix" sink="USB Device Out" 227 sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,hifi_playback,compressed_offload,immersive_out"/> 228 <route type="mix" sink="USB Headset Out" 229 sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,hifi_playback,compressed_offload,immersive_out"/> 230 <route type="mix" sink="HDMI Out" 231 sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,compressed_offload"/> 232 <route type="mix" sink="BT SCO" 233 sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out"/> 234 <route type="mix" sink="BT SCO Headset" 235 sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out"/> 236 <route type="mix" sink="BT SCO Car Kit" 237 sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out"/> 238 <route type="mix" sink="Telephony Tx" sources="incall playback,voice call tx" /> 239 <route type="mix" sink="primary input" 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="hotword 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="incall capture" sources="Voice Call And Telephony Rx" /> 244 <route type="mix" sink="voice call rx" sources="Voice Call And Telephony Rx" /> 245 <route type="mix" sink="voip_tx" 246 sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic,BLE Headset Mic"/> 247 <route type="mix" sink="fast input" 248 sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic,BLE Headset Mic"/> 249 <route type="mix" sink="mmap_no_irq_in" 250 sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic,BLE Headset Mic"/> 251 <route type="mix" sink="hifi_input" sources="USB Device In,USB Headset In" /> 252 <route type="mix" sink="echo_ref_input" sources="Echo Ref In"/> 253 </routes> 254 </module> 255 <!-- Bluetooth Audio HAL --> 256 <xi:include href="bluetooth_audio_policy_configuration_7_0.xml"/> 257 <!-- Usb Audio HAL --> 258 <module name="usbv2" halVersion="2.0"> 259 <mixPorts> 260 <mixPort name="usb_accessory output" role="source"> 261 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 262 samplingRates="44100" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 263 </mixPort> 264 </mixPorts> 265 <devicePorts> 266 <devicePort tagName="USB Host Out" type="AUDIO_DEVICE_OUT_USB_ACCESSORY" role="sink"> 267 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 268 samplingRates="44100" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 269 </devicePort> 270 </devicePorts> 271 <routes> 272 <route type="mix" sink="USB Host Out" 273 sources="usb_accessory output"/> 274 </routes> 275 </module> 276 <!-- Remote Submix Audio HAL --> 277 <xi:include href="r_submix_audio_policy_configuration.xml"/> 278 </modules> 279 <!-- End of Modules section --> 280 <!-- Volume section --> 281 <xi:include href="audio_policy_volumes.xml"/> 282 <xi:include href="default_volume_tables.xml"/> 283 <!-- End of Volume section --> 284</audioPolicyConfiguration> 285