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="primary input" role="sink"> 70 <profile name="" format="AUDIO_FORMAT_PCM_8_24_BIT" 71 samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" 72 channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_INDEX_MASK_3"/> 73 </mixPort> 74 <mixPort name="fast input" role="sink" flags="AUDIO_INPUT_FLAG_FAST"> 75 <profile name="" format="AUDIO_FORMAT_PCM_8_24_BIT" 76 samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" 77 channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_INDEX_MASK_3"/> 78 </mixPort> 79 <mixPort name="voice_rx" role="sink"> 80 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 81 samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_MONO"/> 82 </mixPort> 83 <mixPort name="mmap_no_irq_in" role="sink" flags="AUDIO_INPUT_FLAG_MMAP_NOIRQ"> 84 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 85 samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" 86 channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_INDEX_MASK_3"/> 87 </mixPort> 88 89 </mixPorts> 90 <devicePorts> 91 <devicePort tagName="Earpiece" type="AUDIO_DEVICE_OUT_EARPIECE" role="sink"> 92 </devicePort> 93 <devicePort tagName="Speaker" type="AUDIO_DEVICE_OUT_SPEAKER" role="sink"> 94 </devicePort> 95 <devicePort tagName="Wired Headset" type="AUDIO_DEVICE_OUT_WIRED_HEADSET" role="sink"> 96 </devicePort> 97 <devicePort tagName="Wired Headphones" type="AUDIO_DEVICE_OUT_WIRED_HEADPHONE" role="sink"> 98 </devicePort> 99 <devicePort tagName="Line Out" type="AUDIO_DEVICE_OUT_LINE" role="sink"> 100 </devicePort> 101 <devicePort tagName="BT SCO" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO" role="sink"> 102 </devicePort> 103 <devicePort tagName="BT SCO Headset" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET" role="sink"> 104 </devicePort> 105 <devicePort tagName="BT SCO Car Kit" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT" role="sink"> 106 </devicePort> 107 <devicePort tagName="Telephony Tx" type="AUDIO_DEVICE_OUT_TELEPHONY_TX" role="sink"> 108 </devicePort> 109 110 <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source"> 111 </devicePort> 112 <devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source"> 113 </devicePort> 114 <devicePort tagName="Wired Headset Mic" type="AUDIO_DEVICE_IN_WIRED_HEADSET" role="source"> 115 </devicePort> 116 <devicePort tagName="BT SCO Headset Mic" type="AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET" role="source"> 117 </devicePort> 118 <devicePort tagName="Telephony Rx" type="AUDIO_DEVICE_IN_TELEPHONY_RX" role="source"> 119 </devicePort> 120 </devicePorts> 121 <routes> 122 <route type="mix" sink="Earpiece" 123 sources="primary output,raw,deep_buffer,mmap_no_irq_out"/> 124 <route type="mix" sink="Speaker" 125 sources="primary output,raw,deep_buffer,compressed_offload,mmap_no_irq_out"/> 126 <route type="mix" sink="Wired Headset" 127 sources="primary output,raw,deep_buffer,compressed_offload,mmap_no_irq_out"/> 128 <route type="mix" sink="Wired Headphones" 129 sources="primary output,raw,deep_buffer,compressed_offload,mmap_no_irq_out"/> 130 <route type="mix" sink="Line Out" 131 sources="primary output,raw,deep_buffer,compressed_offload,mmap_no_irq_out"/> 132 <route type="mix" sink="BT SCO" 133 sources="primary output,raw,deep_buffer"/> 134 <route type="mix" sink="BT SCO Headset" 135 sources="primary output,raw,deep_buffer"/> 136 <route type="mix" sink="BT SCO Car Kit" 137 sources="primary output,raw,deep_buffer"/> 138 <route type="mix" sink="Telephony Tx" 139 sources="voice_tx"/> 140 <route type="mix" sink="primary input" 141 sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,BT SCO Headset Mic"/> 142 <route type="mix" sink="fast input" 143 sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,BT SCO Headset Mic"/> 144 <route type="mix" sink="voice_rx" 145 sources="Telephony Rx"/> 146 <route type="mix" sink="mmap_no_irq_in" 147 sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic"/> 148 </routes> 149 150 </module> 151 152 <!-- A2dp Audio HAL --> 153 <xi:include href="a2dp_audio_policy_configuration.xml"/> 154 155 <!-- Usb Audio HAL --> 156 <xi:include href="usb_audio_policy_configuration.xml"/> 157 158 <!-- Remote Submix Audio HAL --> 159 <xi:include href="r_submix_audio_policy_configuration.xml"/> 160 161 </modules> 162 163 <!-- Volume section --> 164 <xi:include href="audio_policy_volumes_drc.xml"/> 165 <xi:include href="default_volume_tables.xml"/> 166 167</audioPolicyConfiguration> 168