1<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 2<!-- Copyright (C) 2019 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 24 <!-- Modules section: 25 There is one section per audio HW module present on the platform. 26 Each module section will contains two mandatory tags for audio HAL “halVersion” and “name”. 27 The module names are the same as in current .conf file: 28 “primary”, “A2DP”, “remote_submix”, “USB” 29 Each module will contain the following sections: 30 “devicePorts”: a list of device descriptors for all input and output devices accessible via this 31 module. 32 This contains both permanently attached devices and removable devices. 33 “mixPorts”: listing all output and input streams exposed by the audio HAL 34 “routes”: list of possible connections between input and output devices or between stream and 35 devices. 36 "route": is defined by an attribute: 37 -"type": <mux|mix> means all sources are mutual exclusive (mux) or can be mixed (mix) 38 -"sink": the sink involved in this route 39 -"sources": all the sources than can be connected to the sink via vis route 40 “attachedDevices”: permanently attached devices. 41 The attachedDevices section is a list of devices names. The names correspond to device names 42 defined in <devicePorts> section. 43 “defaultOutputDevice”: device to be used by default when no policy rule applies 44 --> 45 <modules> 46 <!-- Primary Audio HAL --> 47 <module name="primary" halVersion="3.0"> 48 <attachedDevices> 49 <item>Speaker</item> 50 <item>Built-In Mic</item> 51 <item>Echo Reference</item> 52 </attachedDevices> 53 <defaultOutputDevice>Speaker</defaultOutputDevice> 54 <mixPorts> 55 <mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY"> 56 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 57 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 58 </mixPort> 59 <mixPort name="HDMI output" role="source"> 60 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 61 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 62 </mixPort> 63 <mixPort name="built-in mic" role="sink"> 64 <profile name="" format="AUDIO_FORMAT_PCM_32_BIT" 65 samplingRates="16000" 66 channelMasks="AUDIO_CHANNEL_IN_STEREO"/> 67 </mixPort> 68 <mixPort name="echo reference" role="sink"> 69 <profile name="echo_reference" format="AUDIO_FORMAT_PCM_32_BIT" 70 samplingRates="48000" 71 channelMasks="AUDIO_CHANNEL_IN_STEREO"/> 72 </mixPort> 73 </mixPorts> 74 <devicePorts> 75 <!-- Output devices declaration, i.e. Sink DEVICE PORT --> 76 <devicePort tagName="Speaker" role="sink" type="AUDIO_DEVICE_OUT_SPEAKER" address=""> 77 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 78 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 79 </devicePort> 80 <devicePort tagName="HDMI Out" role="sink" type="AUDIO_DEVICE_OUT_HDMI" address=""> 81 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 82 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 83 </devicePort> 84 <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source" 85 address="top"> 86 <profile name="" format="AUDIO_FORMAT_PCM_32_BIT" 87 samplingRates="16000" 88 channelMasks="AUDIO_CHANNEL_IN_STEREO"/> 89 </devicePort> 90 <devicePort tagName="Echo Reference" type="AUDIO_DEVICE_IN_ECHO_REFERENCE" role="source"> 91 <profile name="echo_reference" format="AUDIO_FORMAT_PCM_32_BIT" 92 samplingRates="48000" 93 channelMasks="AUDIO_CHANNEL_IN_STEREO"/> 94 </devicePort> 95 </devicePorts> 96 <!-- route declaration, i.e. list all available sources for a given sink --> 97 <routes> 98 <route type="mix" sink="Speaker" 99 sources="primary output"/> 100 <route type="mix" sink="HDMI Out" 101 sources="HDMI output"/> 102 <route type="mix" sink="built-in mic" 103 sources="Built-In Mic"/> 104 <route type="mix" sink="echo reference" 105 sources="Echo Reference"/> 106 </routes> 107 108 </module> 109 110 <!-- Usb Audio HAL --> 111 <xi:include href="usb_audio_policy_configuration.xml"/> 112 113 <!-- Remote Submix Audio HAL --> 114 <xi:include href="r_submix_audio_policy_configuration.xml"/> 115 116 </modules> 117 <!-- End of Modules section --> 118 119 <!-- Volume section --> 120 121 <xi:include href="audio_policy_volumes.xml"/> 122 <xi:include href="default_volume_tables.xml"/> 123 124 <!-- End of Volume section --> 125 126</audioPolicyConfiguration> 127