Amit Pundir | 4e37582 | 2019-04-18 16:46:10 +0530 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> |
Amit Pundir | e6732bb | 2020-09-28 12:43:59 +0530 | [diff] [blame] | 2 | <!-- Copyright (C) 2019 The Android Open Source Project |
Amit Pundir | 4e37582 | 2019-04-18 16:46:10 +0530 | [diff] [blame] | 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"> |
Amit Pundir | e6732bb | 2020-09-28 12:43:59 +0530 | [diff] [blame] | 18 | <!-- version section contains a “version” tag in the form “major.minor” e.g version=”1.0” --> |
Amit Pundir | 4e37582 | 2019-04-18 16:46:10 +0530 | [diff] [blame] | 19 | |
Amit Pundir | e6732bb | 2020-09-28 12:43:59 +0530 | [diff] [blame] | 20 | <!-- Global configuration Decalaration --> |
| 21 | <globalConfiguration speaker_drc_enabled="true"/> |
Amit Pundir | 4e37582 | 2019-04-18 16:46:10 +0530 | [diff] [blame] | 22 | |
Amit Pundir | e6732bb | 2020-09-28 12:43:59 +0530 | [diff] [blame] | 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 | --> |
Amit Pundir | 4e37582 | 2019-04-18 16:46:10 +0530 | [diff] [blame] | 45 | <modules> |
| 46 | <!-- Primary Audio HAL --> |
Amit Pundir | e6732bb | 2020-09-28 12:43:59 +0530 | [diff] [blame] | 47 | <module name="primary" halVersion="3.0"> |
Amit Pundir | 4e37582 | 2019-04-18 16:46:10 +0530 | [diff] [blame] | 48 | <attachedDevices> |
| 49 | <item>Speaker</item> |
| 50 | <item>Built-In Mic</item> |
Amit Pundir | e6732bb | 2020-09-28 12:43:59 +0530 | [diff] [blame] | 51 | <item>Echo Reference</item> |
Amit Pundir | 4e37582 | 2019-04-18 16:46:10 +0530 | [diff] [blame] | 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="primary input" role="sink"> |
| 60 | <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" |
| 61 | samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" |
| 62 | channelMasks="AUDIO_CHANNEL_IN_MONO"/> |
| 63 | </mixPort> |
Amit Pundir | e6732bb | 2020-09-28 12:43:59 +0530 | [diff] [blame] | 64 | <mixPort name="echo reference" role="sink"> |
| 65 | <profile name="echo_reference" format="AUDIO_FORMAT_PCM_32_BIT" |
| 66 | samplingRates="48000" |
| 67 | channelMasks="AUDIO_CHANNEL_IN_STEREO"/> |
| 68 | </mixPort> |
Amit Pundir | 4e37582 | 2019-04-18 16:46:10 +0530 | [diff] [blame] | 69 | </mixPorts> |
| 70 | <devicePorts> |
| 71 | <!-- Output devices declaration, i.e. Sink DEVICE PORT --> |
Amit Pundir | e6732bb | 2020-09-28 12:43:59 +0530 | [diff] [blame] | 72 | <devicePort tagName="Speaker" role="sink" type="AUDIO_DEVICE_OUT_SPEAKER" address=""> |
| 73 | <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" |
| 74 | samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> |
Amit Pundir | 4e37582 | 2019-04-18 16:46:10 +0530 | [diff] [blame] | 75 | </devicePort> |
| 76 | <devicePort tagName="Wired Headset" type="AUDIO_DEVICE_OUT_WIRED_HEADSET" role="sink"> |
| 77 | </devicePort> |
| 78 | <devicePort tagName="Wired Headphones" type="AUDIO_DEVICE_OUT_WIRED_HEADPHONE" role="sink"> |
| 79 | </devicePort> |
| 80 | <devicePort tagName="BT SCO" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO" role="sink"> |
| 81 | </devicePort> |
| 82 | <devicePort tagName="BT SCO Headset" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET" role="sink"> |
| 83 | </devicePort> |
Amit Pundir | 4e37582 | 2019-04-18 16:46:10 +0530 | [diff] [blame] | 84 | |
| 85 | <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source"> |
| 86 | </devicePort> |
| 87 | <devicePort tagName="Wired Headset Mic" type="AUDIO_DEVICE_IN_WIRED_HEADSET" role="source"> |
| 88 | </devicePort> |
| 89 | <devicePort tagName="BT SCO Headset Mic" type="AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET" role="source"> |
| 90 | </devicePort> |
Amit Pundir | e6732bb | 2020-09-28 12:43:59 +0530 | [diff] [blame] | 91 | <devicePort tagName="Echo Reference" type="AUDIO_DEVICE_IN_ECHO_REFERENCE" role="source"> |
| 92 | <profile name="echo_reference" format="AUDIO_FORMAT_PCM_32_BIT" |
| 93 | samplingRates="48000" |
| 94 | channelMasks="AUDIO_CHANNEL_IN_STEREO"/> |
| 95 | </devicePort> |
Amit Pundir | 4e37582 | 2019-04-18 16:46:10 +0530 | [diff] [blame] | 96 | </devicePorts> |
| 97 | <!-- route declaration, i.e. list all available sources for a given sink --> |
| 98 | <routes> |
| 99 | <route type="mix" sink="Speaker" |
| 100 | sources="primary output"/> |
| 101 | <route type="mix" sink="Wired Headset" |
| 102 | sources="primary output"/> |
| 103 | <route type="mix" sink="Wired Headphones" |
| 104 | sources="primary output"/> |
Amit Pundir | 4e37582 | 2019-04-18 16:46:10 +0530 | [diff] [blame] | 105 | <route type="mix" sink="BT SCO" |
| 106 | sources="primary output"/> |
| 107 | <route type="mix" sink="BT SCO Headset" |
| 108 | sources="primary output"/> |
Amit Pundir | 4e37582 | 2019-04-18 16:46:10 +0530 | [diff] [blame] | 109 | <route type="mix" sink="primary input" |
| 110 | sources="Built-In Mic,Wired Headset Mic,BT SCO Headset Mic"/> |
Amit Pundir | e6732bb | 2020-09-28 12:43:59 +0530 | [diff] [blame] | 111 | <route type="mix" sink="echo reference" |
| 112 | sources="Echo Reference"/> |
Amit Pundir | 4e37582 | 2019-04-18 16:46:10 +0530 | [diff] [blame] | 113 | </routes> |
| 114 | |
| 115 | </module> |
| 116 | |
| 117 | <!-- Usb Audio HAL --> |
| 118 | <xi:include href="usb_audio_policy_configuration.xml"/> |
| 119 | |
| 120 | <!-- Remote Submix Audio HAL --> |
| 121 | <xi:include href="r_submix_audio_policy_configuration.xml"/> |
| 122 | |
| 123 | <!-- Bluetooth Audio HAL --> |
| 124 | <xi:include href="bluetooth_audio_policy_configuration.xml"/> |
| 125 | |
| 126 | </modules> |
| 127 | <!-- End of Modules section --> |
| 128 | |
| 129 | <!-- Volume section --> |
| 130 | |
| 131 | <xi:include href="audio_policy_volumes.xml"/> |
| 132 | <xi:include href="default_volume_tables.xml"/> |
| 133 | |
| 134 | <!-- End of Volume section --> |
| 135 | |
| 136 | </audioPolicyConfiguration> |