1<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 2<!-- Copyright (C) 2018 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 <!-- version section contains a “version” tag in the form “major.minor” e.g version=”1.0” --> 19 20 <!-- Global configuration Decalaration --> 21 <globalConfiguration speaker_drc_enabled="true"/> 22 23 <!-- Modules section: 24 There is one section per audio HW module present on the platform. 25 Each module section will contains two mandatory tags for audio HAL “halVersion” and “name”. 26 The module names are the same as in current .conf file: 27 “primary”, “A2DP”, “remote_submix”, “USB” 28 Each module will contain the following sections: 29 “devicePorts”: a list of device descriptors for all input and output devices accessible via 30 this module. 31 This contains both permanently attached devices and removable devices. 32 "gain": constraints applied to the millibel values: 33 - maxValueMB >= minValueMB 34 - defaultValueMB >= minValueMB && defaultValueMB <= maxValueMB 35 - (maxValueMB - minValueMB) % stepValueMB == 0 36 - (defaultValueMB - minValueMB) % stepValueMB == 0 37 “mixPorts”: listing all output and input streams exposed by the audio HAL 38 “routes”: list of possible connections between input and output devices or between stream 39 and devices. 40 "route": is defined by an attribute: 41 -"type": <mux|mix> means all sources are mutual exclusive (mux) or can be mixed (mix) 42 -"sink": the sink involved in this route 43 -"sources": all the sources than can be connected to the sink via vis route 44 “attachedDevices”: permanently attached devices. 45 The attachedDevices section is a list of devices names. The names correspond to device names 46 defined in <devicePorts> section. 47 “defaultOutputDevice”: device to be used by default when no policy rule applies 48 --> 49 <modules> 50 <!-- Primary Audio HAL --> 51 <module name="primary" halVersion="3.0"> 52 <attachedDevices> 53 <!-- One bus per context --> 54 <item>bus0_media_out</item> 55 <item>bus1_navigation_out</item> 56 <item>bus2_voice_command_out</item> 57 <item>bus3_call_ring_out</item> 58 <item>bus4_call_out</item> 59 <item>bus5_alarm_out</item> 60 <item>bus6_notification_out</item> 61 <item>bus7_system_sound_out</item> 62 <!-- names with _audio_zone_# are used for defined an emulator rear seat audio zone 63 where each number # is the zone id number --> 64 <item>bus100_audio_zone_1</item> 65 <item>bus200_audio_zone_2</item> 66 <item>Built-In Mic</item> 67 <item>Built-In Back Mic</item> 68 <item>Echo-Reference Mic</item> 69 <item>FM Tuner</item> 70 <item>Tone Generator 0</item> 71 <item>Tone Generator 1</item> 72 </attachedDevices> 73 <defaultOutputDevice>bus0_media_out</defaultOutputDevice> 74 <mixPorts> 75 <mixPort name="mixport_bus0_media_out" role="source" 76 flags="AUDIO_OUTPUT_FLAG_PRIMARY"> 77 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 78 samplingRates="48000" 79 channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 80 </mixPort> 81 <mixPort name="mixport_bus1_navigation_out" role="source"> 82 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 83 samplingRates="48000" 84 channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 85 </mixPort> 86 <mixPort name="mixport_bus2_voice_command_out" role="source"> 87 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 88 samplingRates="48000" 89 channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 90 </mixPort> 91 <mixPort name="mixport_bus3_call_ring_out" role="source"> 92 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 93 samplingRates="48000" 94 channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 95 </mixPort> 96 <mixPort name="mixport_bus4_call_out" role="source"> 97 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 98 samplingRates="48000" 99 channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 100 </mixPort> 101 <mixPort name="mixport_bus5_alarm_out" role="source"> 102 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 103 samplingRates="48000" 104 channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 105 </mixPort> 106 <mixPort name="mixport_bus6_notification_out" role="source"> 107 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 108 samplingRates="48000" 109 channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 110 </mixPort> 111 <mixPort name="mixport_bus7_system_sound_out" role="source"> 112 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 113 samplingRates="48000" 114 channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 115 </mixPort> 116 <mixPort name="mixport_bus100_audio_zone_1" role="source"> 117 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 118 samplingRates="48000" 119 channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 120 </mixPort> 121 <mixPort name="mixport_bus200_audio_zone_2" role="source"> 122 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 123 samplingRates="48000" 124 channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 125 </mixPort> 126 <mixPort name="primary input" role="sink"> 127 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 128 samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" 129 channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/> 130 </mixPort> 131 <mixPort name="mixport_tuner0" role="sink"> 132 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 133 samplingRates="48000" 134 channelMasks="AUDIO_CHANNEL_IN_STEREO"/> 135 </mixPort> 136 <mixPort name="mixport_input_bus_tone_zone_0" role="sink"> 137 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 138 samplingRates="48000" 139 channelMasks="AUDIO_CHANNEL_IN_STEREO"/> 140 </mixPort> 141 <mixPort name="mixport_input_bus_tone_zone_1" role="sink"> 142 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 143 samplingRates="48000" 144 channelMasks="AUDIO_CHANNEL_IN_STEREO"/> 145 </mixPort> 146 </mixPorts> 147 <devicePorts> 148 <devicePort tagName="bus0_media_out" role="sink" type="AUDIO_DEVICE_OUT_BUS" 149 address="bus0_media_out"> 150 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 151 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 152 <gains> 153 <gain name="" mode="AUDIO_GAIN_MODE_JOINT" 154 minValueMB="-3200" maxValueMB="600" 155 defaultValueMB="0" stepValueMB="100"/> 156 </gains> 157 </devicePort> 158 <devicePort tagName="bus1_navigation_out" role="sink" type="AUDIO_DEVICE_OUT_BUS" 159 address="bus1_navigation_out"> 160 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 161 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 162 <gains> 163 <gain name="" mode="AUDIO_GAIN_MODE_JOINT" 164 minValueMB="-3200" maxValueMB="600" 165 defaultValueMB="0" stepValueMB="100"/> 166 </gains> 167 </devicePort> 168 <devicePort tagName="bus2_voice_command_out" role="sink" type="AUDIO_DEVICE_OUT_BUS" 169 address="bus2_voice_command_out"> 170 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 171 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 172 <gains> 173 <gain name="" mode="AUDIO_GAIN_MODE_JOINT" 174 minValueMB="-3200" maxValueMB="600" 175 defaultValueMB="0" stepValueMB="100"/> 176 </gains> 177 </devicePort> 178 <devicePort tagName="bus3_call_ring_out" role="sink" type="AUDIO_DEVICE_OUT_BUS" 179 address="bus3_call_ring_out"> 180 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 181 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 182 <gains> 183 <gain name="" mode="AUDIO_GAIN_MODE_JOINT" 184 minValueMB="-3200" maxValueMB="600" 185 defaultValueMB="0" stepValueMB="100"/> 186 </gains> 187 </devicePort> 188 <devicePort tagName="bus4_call_out" role="sink" type="AUDIO_DEVICE_OUT_BUS" 189 address="bus4_call_out"> 190 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 191 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 192 <gains> 193 <gain name="" mode="AUDIO_GAIN_MODE_JOINT" 194 minValueMB="-3200" maxValueMB="600" 195 defaultValueMB="0" stepValueMB="100"/> 196 </gains> 197 </devicePort> 198 <devicePort tagName="bus5_alarm_out" role="sink" type="AUDIO_DEVICE_OUT_BUS" 199 address="bus5_alarm_out"> 200 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 201 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 202 <gains> 203 <gain name="" mode="AUDIO_GAIN_MODE_JOINT" 204 minValueMB="-3200" maxValueMB="600" 205 defaultValueMB="0" stepValueMB="100"/> 206 </gains> 207 </devicePort> 208 <devicePort tagName="bus6_notification_out" role="sink" type="AUDIO_DEVICE_OUT_BUS" 209 address="bus6_notification_out"> 210 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 211 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 212 <gains> 213 <gain name="" mode="AUDIO_GAIN_MODE_JOINT" 214 minValueMB="-3200" maxValueMB="600" 215 defaultValueMB="0" stepValueMB="100"/> 216 </gains> 217 </devicePort> 218 <devicePort tagName="bus7_system_sound_out" role="sink" type="AUDIO_DEVICE_OUT_BUS" 219 address="bus7_system_sound_out"> 220 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 221 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 222 <gains> 223 <gain name="" mode="AUDIO_GAIN_MODE_JOINT" 224 minValueMB="-3200" maxValueMB="600" 225 defaultValueMB="0" stepValueMB="100"/> 226 </gains> 227 </devicePort> 228 <devicePort tagName="bus100_audio_zone_1" role="sink" type="AUDIO_DEVICE_OUT_BUS" 229 address="bus100_audio_zone_1"> 230 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 231 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 232 <gains> 233 <gain name="" mode="AUDIO_GAIN_MODE_JOINT" 234 minValueMB="-3200" maxValueMB="600" 235 defaultValueMB="0" stepValueMB="100"/> 236 </gains> 237 </devicePort> 238 <devicePort tagName="bus200_audio_zone_2" role="sink" type="AUDIO_DEVICE_OUT_BUS" 239 address="bus200_audio_zone_2"> 240 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 241 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 242 <gains> 243 <gain name="" mode="AUDIO_GAIN_MODE_JOINT" 244 minValueMB="-3200" maxValueMB="600" 245 defaultValueMB="0" stepValueMB="100"/> 246 </gains> 247 </devicePort> 248 <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source" 249 address="Built-In Mic" > 250 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 251 samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" 252 channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/> 253 </devicePort> 254 <devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" 255 role="source" address="Built-In Back Mic"> 256 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 257 samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" 258 channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/> 259 </devicePort> 260 <devicePort tagName="Echo-Reference Mic" type="AUDIO_DEVICE_IN_ECHO_REFERENCE" role="source" 261 address="Echo-Reference Mic"> 262 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 263 samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" 264 channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/> 265 </devicePort> 266 <devicePort tagName="FM Tuner" type="AUDIO_DEVICE_IN_FM_TUNER" role="source" 267 address="tuner0"> 268 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 269 samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_STEREO"/> 270 <gains> 271 <gain name="" mode="AUDIO_GAIN_MODE_JOINT" 272 minValueMB="-3200" maxValueMB="600" defaultValueMB="0" stepValueMB="100"/> 273 </gains> 274 </devicePort> 275 <devicePort tagName="Tone Generator 0" type="AUDIO_DEVICE_IN_BUS" role="source" 276 address="input_bus_tone_zone_0"> 277 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 278 samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_STEREO"/> 279 <gains> 280 <gain name="" mode="AUDIO_GAIN_MODE_JOINT" 281 minValueMB="-3200" maxValueMB="600" 282 defaultValueMB="0" stepValueMB="100"/> 283 </gains> 284 </devicePort> 285 <devicePort tagName="Tone Generator 1" type="AUDIO_DEVICE_IN_BUS" role="source" 286 address="input_bus_tone_zone_1"> 287 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 288 samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_STEREO"/> 289 <gains> 290 <gain name="" mode="AUDIO_GAIN_MODE_JOINT" 291 minValueMB="-3200" maxValueMB="600" 292 defaultValueMB="0" stepValueMB="100"/> 293 </gains> 294 </devicePort> 295 </devicePorts> 296 <!-- route declaration, i.e. list all available sources for a given sink --> 297 <routes> 298 <route type="mix" sink="bus0_media_out" sources="mixport_bus0_media_out"/> 299 <route type="mix" sink="bus1_navigation_out" sources="mixport_bus1_navigation_out"/> 300 <route type="mix" sink="bus2_voice_command_out" 301 sources="mixport_bus2_voice_command_out"/> 302 <route type="mix" sink="bus3_call_ring_out" sources="mixport_bus3_call_ring_out"/> 303 <route type="mix" sink="bus4_call_out" sources="mixport_bus4_call_out"/> 304 <route type="mix" sink="bus5_alarm_out" sources="mixport_bus5_alarm_out"/> 305 <route type="mix" sink="bus6_notification_out" 306 sources="mixport_bus6_notification_out"/> 307 <route type="mix" sink="bus7_system_sound_out" 308 sources="mixport_bus7_system_sound_out"/> 309 <route type="mix" sink="bus100_audio_zone_1" sources="mixport_bus100_audio_zone_1"/> 310 <route type="mix" sink="bus200_audio_zone_2" sources="mixport_bus200_audio_zone_2"/> 311 <route type="mix" sink="primary input" 312 sources="Built-In Mic,Built-In Back Mic,Echo-Reference Mic"/> 313 <route type="mix" sink="mixport_tuner0" sources="FM Tuner"/> 314 <route type="mix" sink="mixport_input_bus_tone_zone_0" sources="Tone Generator 0"/> 315 <route type="mix" sink="mixport_input_bus_tone_zone_1" sources="Tone Generator 1"/> 316 </routes> 317 318 </module> 319 320 <!-- A2dp Audio HAL --> 321 <xi:include href="a2dp_audio_policy_configuration.xml"/> 322 323 <!-- Usb Audio HAL --> 324 <xi:include href="usb_audio_policy_configuration.xml"/> 325 326 <!-- Remote Submix Audio HAL --> 327 <xi:include href="r_submix_audio_policy_configuration.xml"/> 328 329 </modules> 330 <!-- End of Modules section --> 331 332 <!-- Volume section --> 333 334 <xi:include href="audio_policy_volumes.xml"/> 335 <xi:include href="default_volume_tables.xml"/> 336 337 <!-- End of Volume section --> 338 <!-- End of Modules section --> 339 340</audioPolicyConfiguration> 341