1<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 2<!-- Copyright (C) 2020 The Android Open Source Project 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15--> 16 17<audioPolicyConfiguration version="7.0" xmlns:xi="http://www.w3.org/2001/XInclude"> 18 <globalConfiguration speaker_drc_enabled="true" call_screen_mode_supported="true"/> 19 20 <modules> 21 <module name="primary" halVersion="2.0"> 22 <attachedDevices> 23 <item>Speaker</item> 24 <item>Speaker Safe</item> 25 <item>Earpiece</item> 26 <item>Telephony Tx</item> 27 <item>Built-In Mic</item> 28 <item>Built-In Back Mic</item> 29 <item>Telephony Rx</item> 30 </attachedDevices> 31 <defaultOutputDevice>Speaker</defaultOutputDevice> 32 <mixPorts> 33 <mixPort name="voip_rx" role="source" 34 flags="AUDIO_OUTPUT_FLAG_VOIP_RX"> 35 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 36 samplingRates="8000 16000 32000 48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 37 </mixPort> 38 <mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY AUDIO_OUTPUT_FLAG_FAST"> 39 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 40 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 41 </mixPort> 42 <mixPort name="raw" role="source" flags="AUDIO_OUTPUT_FLAG_RAW AUDIO_OUTPUT_FLAG_FAST"> 43 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 44 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 45 </mixPort> 46 <mixPort name="hifi_playback" role="source" /> 47 <mixPort name="deep_buffer" role="source" 48 flags="AUDIO_OUTPUT_FLAG_DEEP_BUFFER"> 49 <profile name="" format="AUDIO_FORMAT_PCM_24_BIT_PACKED" 50 samplingRates="44100 48000" 51 channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 52 </mixPort> 53 <mixPort name="compressed_offload" role="source" 54 flags="AUDIO_OUTPUT_FLAG_DIRECT AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD AUDIO_OUTPUT_FLAG_NON_BLOCKING AUDIO_OUTPUT_FLAG_GAPLESS_OFFLOAD"> 55 <profile name="" format="AUDIO_FORMAT_MP3" 56 samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000" 57 channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/> 58 <profile name="" format="AUDIO_FORMAT_AAC_LC" 59 samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 64000 88200 96000" 60 channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/> 61 <profile name="" format="AUDIO_FORMAT_AAC_HE_V1" 62 samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 64000 88200 96000" 63 channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/> 64 <profile name="" format="AUDIO_FORMAT_AAC_HE_V2" 65 samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000" 66 channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/> 67 </mixPort> 68 <mixPort name="voice_tx" role="source"> 69 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 70 samplingRates="8000 16000 48000" channelMasks="AUDIO_CHANNEL_OUT_MONO AUDIO_CHANNEL_OUT_STEREO"/> 71 </mixPort> 72 <mixPort name="mmap_no_irq_out" role="source" flags="AUDIO_OUTPUT_FLAG_DIRECT AUDIO_OUTPUT_FLAG_MMAP_NOIRQ"> 73 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 74 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 75 </mixPort> 76 <mixPort name="incall_music_uplink" role="source" 77 flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC"> 78 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 79 samplingRates="8000 16000 48000" 80 channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 81 </mixPort> 82 <mixPort name="primary input" role="sink" maxActiveCount="0"> 83 <profile name="" format="AUDIO_FORMAT_PCM_8_24_BIT" 84 samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000" 85 channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO AUDIO_CHANNEL_IN_FRONT_BACK AUDIO_CHANNEL_INDEX_MASK_2"/> 86 </mixPort> 87 <mixPort name="fast input" role="sink" flags="AUDIO_INPUT_FLAG_FAST"> 88 <profile name="" format="AUDIO_FORMAT_PCM_8_24_BIT" 89 samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000" 90 channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO AUDIO_CHANNEL_IN_FRONT_BACK AUDIO_CHANNEL_INDEX_MASK_2"/> 91 </mixPort> 92 <mixPort name="hifi_input" role="sink" /> 93 <mixPort name="voice_rx" role="sink"> 94 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 95 samplingRates="8000 16000 48000" channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/> 96 </mixPort> 97 <mixPort name="mmap_no_irq_in" role="sink" flags="AUDIO_INPUT_FLAG_MMAP_NOIRQ"> 98 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 99 samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000" 100 channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO AUDIO_CHANNEL_IN_FRONT_BACK AUDIO_CHANNEL_INDEX_MASK_2"/> 101 </mixPort> 102 <mixPort name="voip_tx" role="sink" 103 flags="AUDIO_INPUT_FLAG_VOIP_TX"> 104 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 105 samplingRates="8000 16000 32000 48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/> 106 </mixPort> 107 </mixPorts> 108 <devicePorts> 109 <devicePort tagName="Earpiece" type="AUDIO_DEVICE_OUT_EARPIECE" role="sink"> 110 </devicePort> 111 <devicePort tagName="Speaker" type="AUDIO_DEVICE_OUT_SPEAKER" role="sink"> 112 </devicePort> 113 <devicePort tagName="Speaker Safe" type="AUDIO_DEVICE_OUT_SPEAKER_SAFE" role="sink"> 114 </devicePort> 115 <devicePort tagName="Wired Headset" type="AUDIO_DEVICE_OUT_WIRED_HEADSET" role="sink"> 116 </devicePort> 117 <devicePort tagName="Wired Headphones" type="AUDIO_DEVICE_OUT_WIRED_HEADPHONE" role="sink"> 118 </devicePort> 119 <devicePort tagName="Line Out" type="AUDIO_DEVICE_OUT_LINE" role="sink"> 120 </devicePort> 121 <devicePort tagName="BT SCO" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO" role="sink"> 122 </devicePort> 123 <devicePort tagName="BT SCO Headset" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET" role="sink"> 124 </devicePort> 125 <devicePort tagName="BT SCO Car Kit" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT" role="sink"> 126 </devicePort> 127 <devicePort tagName="Telephony Tx" type="AUDIO_DEVICE_OUT_TELEPHONY_TX" role="sink"> 128 </devicePort> 129 <devicePort tagName="USB Device Out" type="AUDIO_DEVICE_OUT_USB_DEVICE" role="sink"> 130 </devicePort> 131 <devicePort tagName="USB Headset Out" type="AUDIO_DEVICE_OUT_USB_HEADSET" role="sink"> 132 </devicePort> 133 <devicePort tagName="BT A2DP Out" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP" role="sink" 134 encodedFormats="AUDIO_FORMAT_LDAC AUDIO_FORMAT_APTX AUDIO_FORMAT_APTX_HD AUDIO_FORMAT_AAC AUDIO_FORMAT_SBC"> 135 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 136 samplingRates="44100 48000 88200 96000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 137 </devicePort> 138 <devicePort tagName="BT A2DP Headphones" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES" role="sink" 139 encodedFormats="AUDIO_FORMAT_LDAC AUDIO_FORMAT_APTX AUDIO_FORMAT_APTX_HD AUDIO_FORMAT_AAC AUDIO_FORMAT_SBC"> 140 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 141 samplingRates="44100 48000 88200 96000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 142 </devicePort> 143 <devicePort tagName="BT A2DP Speaker" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER" role="sink" 144 encodedFormats="AUDIO_FORMAT_LDAC AUDIO_FORMAT_APTX AUDIO_FORMAT_APTX_HD AUDIO_FORMAT_AAC AUDIO_FORMAT_SBC"> 145 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 146 samplingRates="44100 48000 88200 96000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 147 </devicePort> 148 <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source"> 149 </devicePort> 150 <devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source"> 151 </devicePort> 152 <devicePort tagName="Wired Headset Mic" type="AUDIO_DEVICE_IN_WIRED_HEADSET" role="source"> 153 </devicePort> 154 <devicePort tagName="BT SCO Headset Mic" type="AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET" role="source"> 155 </devicePort> 156 <devicePort tagName="Telephony Rx" type="AUDIO_DEVICE_IN_TELEPHONY_RX" role="source"> 157 </devicePort> 158 <!-- TODO: Enable multi-channel recording --> 159 <devicePort tagName="USB Device In" type="AUDIO_DEVICE_IN_USB_DEVICE" role="source"> 160 </devicePort> 161 <devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source"> 162 </devicePort> 163 </devicePorts> 164 <routes> 165 <route type="mix" sink="Earpiece" 166 sources="primary output,raw,deep_buffer,mmap_no_irq_out,voip_rx"/> 167 <route type="mix" sink="Speaker" 168 sources="primary output,raw,deep_buffer,compressed_offload,mmap_no_irq_out,voip_rx"/> 169 <route type="mix" sink="Speaker Safe" 170 sources="primary output,raw,deep_buffer,compressed_offload,mmap_no_irq_out,voip_rx"/> 171 <route type="mix" sink="Wired Headset" 172 sources="primary output,raw,deep_buffer,compressed_offload,mmap_no_irq_out,voip_rx"/> 173 <route type="mix" sink="Wired Headphones" 174 sources="primary output,raw,deep_buffer,compressed_offload,mmap_no_irq_out,voip_rx"/> 175 <route type="mix" sink="Line Out" 176 sources="primary output,raw,deep_buffer,compressed_offload,mmap_no_irq_out,voip_rx"/> 177 <route type="mix" sink="BT SCO" 178 sources="primary output,raw,deep_buffer,voip_rx"/> 179 <route type="mix" sink="BT SCO Headset" 180 sources="primary output,raw,deep_buffer,voip_rx"/> 181 <route type="mix" sink="BT SCO Car Kit" 182 sources="primary output,raw,deep_buffer,voip_rx"/> 183 <route type="mix" sink="USB Device Out" 184 sources="primary output,raw,deep_buffer,compressed_offload,hifi_playback,mmap_no_irq_out,voip_rx"/> 185 <route type="mix" sink="USB Headset Out" 186 sources="primary output,raw,deep_buffer,compressed_offload,hifi_playback,mmap_no_irq_out,voip_rx"/> 187 <route type="mix" sink="Telephony Tx" 188 sources="voice_tx,incall_music_uplink"/> 189 <route type="mix" sink="primary input" 190 sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,BT SCO Headset Mic,USB Device In,USB Headset In"/> 191 <route type="mix" sink="fast input" 192 sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,BT SCO Headset Mic,USB Device In,USB Headset In"/> 193 <route type="mix" sink="voice_rx" 194 sources="Telephony Rx"/> 195 <route type="mix" sink="hifi_input" sources="USB Device In,USB Headset In" /> 196 <route type="mix" sink="mmap_no_irq_in" 197 sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,USB Device In,USB Headset In"/> 198 <route type="mix" sink="voip_tx" 199 sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,BT SCO Headset Mic,USB Device In,USB Headset In"/> 200 <route type="mix" sink="BT A2DP Out" 201 sources="primary output,deep_buffer,compressed_offload"/> 202 <route type="mix" sink="BT A2DP Headphones" 203 sources="primary output,deep_buffer,compressed_offload"/> 204 <route type="mix" sink="BT A2DP Speaker" 205 sources="primary output,deep_buffer,compressed_offload"/> 206 </routes> 207 </module> 208 209 <!-- Usb Audio HAL --> 210 <module name="usb" halVersion="2.0"> 211 <mixPorts> 212 <mixPort name="usb_accessory output" role="source"> 213 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 214 samplingRates="44100" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 215 </mixPort> 216 </mixPorts> 217 <devicePorts> 218 <devicePort tagName="USB Host Out" type="AUDIO_DEVICE_OUT_USB_ACCESSORY" role="sink"> 219 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 220 samplingRates="44100" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 221 </devicePort> 222 </devicePorts> 223 <routes> 224 <route type="mix" sink="USB Host Out" 225 sources="usb_accessory output"/> 226 </routes> 227 </module> 228 229 <!-- Remote Submix Audio HAL --> 230 <xi:include href="r_submix_audio_policy_configuration.xml"/> 231 232 <!-- Bluetooth Audio HAL for Hearing aid --> 233 <xi:include href="bluetooth_hearing_aid_audio_policy_configuration.xml"/> 234 235 </modules> 236 237 <!-- Volume section --> 238 239 <xi:include href="audio_policy_volumes.xml"/> 240 <xi:include href="default_volume_tables.xml"/> 241 242</audioPolicyConfiguration> 243