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 </attachedDevices> 27 <defaultOutputDevice>Speaker</defaultOutputDevice> 28 <mixPorts> 29 <mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY AUDIO_OUTPUT_FLAG_FAST"> 30 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 31 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 32 </mixPort> 33 <mixPort name="deep buffer" role="source" flags="AUDIO_OUTPUT_FLAG_DEEP_BUFFER"> 34 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 35 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 36 </mixPort> 37 <mixPort name="compressed_offload" role="source" 38 flags="AUDIO_OUTPUT_FLAG_DIRECT AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD AUDIO_OUTPUT_FLAG_NON_BLOCKING"> 39 <profile name="" format="AUDIO_FORMAT_MP3" 40 samplingRates="8000 16000 24000 32000 44100 48000" 41 channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/> 42 <profile name="" format="AUDIO_FORMAT_AAC_LC" 43 samplingRates="8000 16000 24000 32000 44100 48000" 44 channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/> 45 <profile name="" format="AUDIO_FORMAT_AAC_HE_V1" 46 samplingRates="8000 16000 24000 32000 44100 48000" 47 channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/> 48 <profile name="" format="AUDIO_FORMAT_AAC_HE_V2" 49 samplingRates="8000 16000 24000 32000 44100 48000" 50 channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/> 51 </mixPort> 52 <mixPort name="raw" role="source" flags="AUDIO_OUTPUT_FLAG_RAW AUDIO_OUTPUT_FLAG_FAST"> 53 <profile name="" format="AUDIO_FORMAT_PCM_32_BIT" 54 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 55 </mixPort> 56 <mixPort name="mmap_no_irq_out" role="source" flags="AUDIO_OUTPUT_FLAG_DIRECT AUDIO_OUTPUT_FLAG_MMAP_NOIRQ"> 57 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 58 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 59 </mixPort> 60 <mixPort name="incall playback" role="source" 61 flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC"> 62 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 63 samplingRates="48000" 64 channelMasks="AUDIO_CHANNEL_OUT_STEREO" /> 65 </mixPort> 66 <mixPort name="voice call tx" role="source"> 67 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 68 samplingRates="48000" 69 channelMasks="AUDIO_CHANNEL_OUT_STEREO" /> 70 </mixPort> 71 <mixPort name="voip_rx" role="source" 72 flags="AUDIO_OUTPUT_FLAG_VOIP_RX"> 73 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 74 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 75 </mixPort> 76 <mixPort name="primary input" role="sink"> 77 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 78 samplingRates="48000" 79 channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO AUDIO_CHANNEL_INDEX_MASK_3"/> 80 </mixPort> 81 <mixPort name="hotword input" role="sink" flags="AUDIO_INPUT_FLAG_HW_HOTWORD" maxActiveCount="0" > 82 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 83 samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000" 84 channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/> 85 </mixPort> 86 <mixPort name="incall capture" role="sink"> 87 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 88 samplingRates="48000" 89 channelMasks="AUDIO_CHANNEL_IN_MONO"/> 90 </mixPort> 91 <mixPort name="voice call rx" role="sink"> 92 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 93 samplingRates="48000" 94 channelMasks="AUDIO_CHANNEL_IN_MONO"/> 95 </mixPort> 96 <mixPort name="voip_tx" role="sink" 97 flags="AUDIO_INPUT_FLAG_VOIP_TX"> 98 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 99 samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/> 100 </mixPort> 101 <mixPort name="fast input" role="sink" flags="AUDIO_INPUT_FLAG_RAW AUDIO_INPUT_FLAG_FAST"> 102 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 103 samplingRates="48000" 104 channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/> 105 </mixPort> 106 <mixPort name="mmap_no_irq_in" role="sink" flags="AUDIO_INPUT_FLAG_MMAP_NOIRQ"> 107 <profile name="" format="AUDIO_FORMAT_PCM_32_BIT" 108 samplingRates="48000" 109 channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/> 110 </mixPort> 111 <mixPort name="hifi_playback" role="source" /> 112 <mixPort name="hifi_input" role="sink" /> 113 </mixPorts> 114 <devicePorts> 115 <!-- Output devices declaration, i.e. Sink DEVICE PORT --> 116 <devicePort tagName="Earpiece" type="AUDIO_DEVICE_OUT_EARPIECE" role="sink"> 117 </devicePort> 118 <devicePort tagName="Speaker" type="AUDIO_DEVICE_OUT_SPEAKER" role="sink"> 119 </devicePort> 120 <devicePort tagName="Speaker Safe" type="AUDIO_DEVICE_OUT_SPEAKER_SAFE" role="sink"> 121 </devicePort> 122 <devicePort tagName="Wired Headset" type="AUDIO_DEVICE_OUT_WIRED_HEADSET" role="sink"> 123 </devicePort> 124 <devicePort tagName="Wired Headphones" type="AUDIO_DEVICE_OUT_WIRED_HEADPHONE" role="sink"> 125 </devicePort> 126 <devicePort tagName="BT SCO" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO" role="sink"> 127 </devicePort> 128 <devicePort tagName="BT SCO Headset" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET" role="sink"> 129 </devicePort> 130 <devicePort tagName="BT SCO Car Kit" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT" role="sink"> 131 </devicePort> 132 <devicePort tagName="USB Device Out" type="AUDIO_DEVICE_OUT_USB_DEVICE" role="sink"> 133 </devicePort> 134 <devicePort tagName="USB Headset Out" type="AUDIO_DEVICE_OUT_USB_HEADSET" role="sink"> 135 </devicePort> 136 <devicePort tagName="Aux Digital" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink"> 137 </devicePort> 138 <devicePort tagName="Telephony Tx" type="AUDIO_DEVICE_OUT_TELEPHONY_TX" role="sink"> 139 </devicePort> 140 <!-- Input devices declaration, i.e. Source DEVICE PORT --> 141 <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source"> 142 </devicePort> 143 <devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source"> 144 </devicePort> 145 <devicePort tagName="Wired Headset Mic" type="AUDIO_DEVICE_IN_WIRED_HEADSET" role="source"> 146 </devicePort> 147 <devicePort tagName="BT SCO Headset Mic" type="AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET" role="source"> 148 </devicePort> 149 <devicePort tagName="USB Device In" type="AUDIO_DEVICE_IN_USB_DEVICE" role="source"> 150 </devicePort> 151 <devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source"> 152 </devicePort> 153 <!-- AUDIO_DEVICE_IN_VOICE_CALL and AUDIO_DEVICE_IN_TELEPHONY_RX are in the same value --> 154 <devicePort tagName="Voice Call And Telephony Rx" type="AUDIO_DEVICE_IN_VOICE_CALL" role="source"> 155 </devicePort> 156 </devicePorts> 157 <!-- route declaration, i.e. list all available sources for a given sink --> 158 <routes> 159 <route type="mix" sink="Speaker" 160 sources="primary output,deep buffer,raw,compressed_offload,mmap_no_irq_out,voip_rx"/> 161 <route type="mix" sink="Speaker Safe" 162 sources="primary output,deep buffer,raw,compressed_offload,mmap_no_irq_out,voip_rx"/> 163 <route type="mix" sink="Earpiece" 164 sources="primary output,deep buffer,raw,compressed_offload,mmap_no_irq_out,voip_rx"/> 165 <route type="mix" sink="USB Device Out" 166 sources="primary output,deep buffer,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/> 167 <route type="mix" sink="USB Headset Out" 168 sources="primary output,deep buffer,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/> 169 <route type="mix" sink="BT SCO" 170 sources="primary output,deep buffer,compressed_offload,voip_rx"/> 171 <route type="mix" sink="BT SCO Headset" 172 sources="primary output,deep buffer,compressed_offload,voip_rx"/> 173 <route type="mix" sink="BT SCO Car Kit" 174 sources="primary output,deep buffer,compressed_offload,voip_rx"/> 175 <route type="mix" sink="Telephony Tx" sources="incall playback,voice call tx" /> 176 <route type="mix" sink="primary input" 177 sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/> 178 <route type="mix" sink="hotword input" 179 sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/> 180 <route type="mix" sink="incall capture" sources="Voice Call And Telephony Rx" /> 181 <route type="mix" sink="voice call rx" sources="Voice Call And Telephony Rx" /> 182 <route type="mix" sink="voip_tx" 183 sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/> 184 <route type="mix" sink="fast input" 185 sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In"/> 186 <route type="mix" sink="mmap_no_irq_in" 187 sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In"/> 188 <route type="mix" sink="hifi_input" sources="USB Device In,USB Headset In" /> 189 </routes> 190 </module> 191 <!-- Bluetooth Audio HAL --> 192 <xi:include href="bluetooth_audio_policy_configuration_7_0.xml"/> 193 <!-- Usb Audio HAL --> 194 <module name="usbv2" halVersion="2.0"> 195 <mixPorts> 196 <mixPort name="usb_accessory output" role="source"> 197 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 198 samplingRates="44100" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 199 </mixPort> 200 </mixPorts> 201 <devicePorts> 202 <devicePort tagName="USB Host Out" type="AUDIO_DEVICE_OUT_USB_ACCESSORY" role="sink"> 203 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 204 samplingRates="44100" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 205 </devicePort> 206 </devicePorts> 207 <routes> 208 <route type="mix" sink="USB Host Out" 209 sources="usb_accessory output"/> 210 </routes> 211 </module> 212 <!-- Remote Submix Audio HAL --> 213 <xi:include href="r_submix_audio_policy_configuration.xml"/> 214 </modules> 215 <!-- End of Modules section --> 216 <!-- Volume section --> 217 <xi:include href="audio_policy_volumes.xml"/> 218 <xi:include href="default_volume_tables.xml"/> 219 <!-- End of Volume section --> 220</audioPolicyConfiguration> 221