1 <?xml version="1.0" encoding="UTF-8" standalone="yes"?> 2 <!-- Copyright (C) 2016 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="1.0" xmlns:xi="http://www.w3.org/2001/XInclude"> 18 <globalConfiguration speaker_drc_enabled="true"/> 19 20 <modules> 21 <module name="primary" halVersion="2.0"> 22 <attachedDevices> 23 <item>Speaker</item> 24 <item>Earpiece</item> 25 <item>Telephony Tx</item> 26 <item>Built-In Mic</item> 27 <item>Built-In Back Mic</item> 28 <item>Telephony Rx</item> 29 </attachedDevices> 30 <defaultOutputDevice>Speaker</defaultOutputDevice> 31 <mixPorts> 32 <mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY|AUDIO_OUTPUT_FLAG_FAST"> 33 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 34 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 35 </mixPort> 36 <mixPort name="raw" role="source" flags="AUDIO_OUTPUT_FLAG_RAW|AUDIO_OUTPUT_FLAG_FAST"> 37 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 38 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 39 </mixPort> 40 <mixPort name="mmap_no_irq_out" role="source" flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_MMAP_NOIRQ"> 41 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 42 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 43 </mixPort> 44 <mixPort name="deep_buffer" role="source" 45 flags="AUDIO_OUTPUT_FLAG_DEEP_BUFFER"> 46 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 47 samplingRates="44100,48000" 48 channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 49 </mixPort> 50 <mixPort name="compressed_offload" role="source" 51 flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING"> 52 <profile name="" format="AUDIO_FORMAT_MP3" 53 samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" 54 channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/> 55 <profile name="" format="AUDIO_FORMAT_AAC_LC" 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_HE_V1" 59 samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" 60 channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/> 61 <profile name="" format="AUDIO_FORMAT_AAC_HE_V2" 62 samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" 63 channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/> 64 </mixPort> 65 <mixPort name="voice_tx" role="source"> 66 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 67 samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/> 68 </mixPort> 69 <mixPort name="incall_music_uplink" role="source" 70 flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC"> 71 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 72 samplingRates="8000,16000,48000" 73 channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 74 </mixPort> 75 <mixPort name="primary input" role="sink"> 76 <profile name="" format="AUDIO_FORMAT_PCM_8_24_BIT" 77 samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" 78 channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_INDEX_MASK_3"/> 79 </mixPort> 80 <mixPort name="fast input" role="sink" flags="AUDIO_INPUT_FLAG_FAST"> 81 <profile name="" format="AUDIO_FORMAT_PCM_8_24_BIT" 82 samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" 83 channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_INDEX_MASK_3"/> 84 </mixPort> 85 <mixPort name="voice_rx" role="sink"> 86 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 87 samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_MONO"/> 88 </mixPort> 89 <mixPort name="mmap_no_irq_in" role="sink" flags="AUDIO_INPUT_FLAG_MMAP_NOIRQ"> 90 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 91 samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" 92 channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_INDEX_MASK_3"/> 93 </mixPort> 94 95 </mixPorts> 96 <devicePorts> 97 <devicePort tagName="Earpiece" type="AUDIO_DEVICE_OUT_EARPIECE" role="sink"> 98 </devicePort> 99 <devicePort tagName="Speaker" type="AUDIO_DEVICE_OUT_SPEAKER" role="sink"> 100 </devicePort> 101 <devicePort tagName="Wired Headset" type="AUDIO_DEVICE_OUT_WIRED_HEADSET" role="sink"> 102 </devicePort> 103 <devicePort tagName="Wired Headphones" type="AUDIO_DEVICE_OUT_WIRED_HEADPHONE" role="sink"> 104 </devicePort> 105 <devicePort tagName="Line Out" type="AUDIO_DEVICE_OUT_LINE" role="sink"> 106 </devicePort> 107 <devicePort tagName="BT SCO" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO" role="sink"> 108 </devicePort> 109 <devicePort tagName="BT SCO Headset" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET" role="sink"> 110 </devicePort> 111 <devicePort tagName="BT SCO Car Kit" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT" role="sink"> 112 </devicePort> 113 <devicePort tagName="Telephony Tx" type="AUDIO_DEVICE_OUT_TELEPHONY_TX" role="sink"> 114 </devicePort> 115 116 <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source"> 117 </devicePort> 118 <devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source"> 119 </devicePort> 120 <devicePort tagName="Wired Headset Mic" type="AUDIO_DEVICE_IN_WIRED_HEADSET" role="source"> 121 </devicePort> 122 <devicePort tagName="BT SCO Headset Mic" type="AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET" role="source"> 123 </devicePort> 124 <devicePort tagName="Telephony Rx" type="AUDIO_DEVICE_IN_TELEPHONY_RX" role="source"> 125 </devicePort> 126 </devicePorts> 127 <routes> 128 <route type="mix" sink="Earpiece" 129 sources="primary output,raw,deep_buffer,mmap_no_irq_out"/> 130 <route type="mix" sink="Speaker" 131 sources="primary output,raw,deep_buffer,compressed_offload,mmap_no_irq_out"/> 132 <route type="mix" sink="Wired Headset" 133 sources="primary output,raw,deep_buffer,compressed_offload,mmap_no_irq_out"/> 134 <route type="mix" sink="Wired Headphones" 135 sources="primary output,raw,deep_buffer,compressed_offload,mmap_no_irq_out"/> 136 <route type="mix" sink="Line Out" 137 sources="primary output,raw,deep_buffer,compressed_offload,mmap_no_irq_out"/> 138 <route type="mix" sink="BT SCO" 139 sources="primary output,raw,deep_buffer"/> 140 <route type="mix" sink="BT SCO Headset" 141 sources="primary output,raw,deep_buffer"/> 142 <route type="mix" sink="BT SCO Car Kit" 143 sources="primary output,raw,deep_buffer"/> 144 <route type="mix" sink="Telephony Tx" 145 sources="voice_tx,incall_music_uplink"/> 146 <route type="mix" sink="primary input" 147 sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,BT SCO Headset Mic"/> 148 <route type="mix" sink="fast input" 149 sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,BT SCO Headset Mic"/> 150 <route type="mix" sink="voice_rx" 151 sources="Telephony Rx"/> 152 <route type="mix" sink="mmap_no_irq_in" 153 sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic"/> 154 </routes> 155 156 </module> 157 158 <!-- A2dp Audio HAL --> 159 <xi:include href="a2dp_audio_policy_configuration.xml"/> 160 161 <!-- Usb Audio HAL --> 162 <xi:include href="usb_audio_policy_configuration.xml"/> 163 164 <!-- Remote Submix Audio HAL --> 165 <xi:include href="r_submix_audio_policy_configuration.xml"/> 166 167 <!-- Hearing aid Audio HAL --> 168 <xi:include href="hearing_aid_audio_policy_configuration.xml"/> 169 170 </modules> 171 172 <!-- Volume section --> 173 <xi:include href="audio_policy_volumes_drc.xml"/> 174 <xi:include href="default_volume_tables.xml"/> 175 176 </audioPolicyConfiguration> 177