• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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="7.0" xmlns:xi="http://www.w3.org/2001/XInclude">
18    <!-- version section contains a “version” tag in the form “major.minore.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>Built-In Back Mic</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="deep_buffer" role="source"
60                        flags="AUDIO_OUTPUT_FLAG_DEEP_BUFFER">
61                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
62                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
63                </mixPort>
64                <mixPort name="compressed_offload" role="source"
65                         flags="AUDIO_OUTPUT_FLAG_DIRECT AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD AUDIO_OUTPUT_FLAG_NON_BLOCKING">
66                    <profile name="" format="AUDIO_FORMAT_MP3"
67                             samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000"
68                             channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
69                    <profile name="" format="AUDIO_FORMAT_AAC"
70                             samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000"
71                             channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
72                    <profile name="" format="AUDIO_FORMAT_AAC_LC"
73                             samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000"
74                             channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
75                </mixPort>
76                <mixPort name="voice_tx" role="source">
77                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
78                             samplingRates="8000 16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
79                </mixPort>
80                <mixPort name="primary input" role="sink">
81                    <profile name="" format="AUDIO_FORMAT_PCM_16_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"/>
84                </mixPort>
85                <mixPort name="voice_rx" role="sink">
86                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
87                             samplingRates="8000 16000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
88                </mixPort>
89            </mixPorts>
90            <devicePorts>
91                <!-- Output devices declaration, i.e. Sink DEVICE PORT -->
92                <devicePort tagName="Earpiece" type="AUDIO_DEVICE_OUT_EARPIECE" role="sink">
93                   <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
94                            samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
95                </devicePort>
96                <devicePort tagName="Speaker" role="sink" type="AUDIO_DEVICE_OUT_SPEAKER" address="">
97                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
98                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
99                    <gains>
100                        <gain name="gain_1" mode="AUDIO_GAIN_MODE_JOINT"
101                              minValueMB="-8400"
102                              maxValueMB="4000"
103                              defaultValueMB="0"
104                              stepValueMB="100"/>
105                    </gains>
106                </devicePort>
107                <devicePort tagName="Wired Headset" type="AUDIO_DEVICE_OUT_WIRED_HEADSET" role="sink">
108                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
109                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
110                </devicePort>
111                <devicePort tagName="Wired Headphones" type="AUDIO_DEVICE_OUT_WIRED_HEADPHONE" role="sink">
112                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
113                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
114                </devicePort>
115                <devicePort tagName="BT SCO" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO" role="sink">
116                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
117                             samplingRates="8000 16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
118                </devicePort>
119                <devicePort tagName="BT SCO Headset" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET" role="sink">
120                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
121                             samplingRates="8000 16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
122                </devicePort>
123                <devicePort tagName="BT SCO Car Kit" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT" role="sink">
124                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
125                             samplingRates="8000 16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
126                </devicePort>
127                <devicePort tagName="Telephony Tx" type="AUDIO_DEVICE_OUT_TELEPHONY_TX" role="sink">
128                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
129                             samplingRates="8000 16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
130                </devicePort>
131
132                <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
133                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
134                             samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000"
135                             channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO AUDIO_CHANNEL_IN_FRONT_BACK"/>
136                </devicePort>
137                <devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source">
138                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
139                             samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000"
140                             channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO AUDIO_CHANNEL_IN_FRONT_BACK"/>
141                </devicePort>
142                <devicePort tagName="Wired Headset Mic" type="AUDIO_DEVICE_IN_WIRED_HEADSET" role="source">
143                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
144                             samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000"
145                             channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO AUDIO_CHANNEL_IN_FRONT_BACK"/>
146                </devicePort>
147                <devicePort tagName="BT SCO Headset Mic" type="AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET" role="source">
148                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
149                             samplingRates="8000 16000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
150                </devicePort>
151                <devicePort tagName="Telephony Rx" type="AUDIO_DEVICE_IN_TELEPHONY_RX" role="source">
152                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
153                             samplingRates="8000 16000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
154                </devicePort>
155            </devicePorts>
156            <!-- route declaration, i.e. list all available sources for a given sink -->
157            <routes>
158                <route type="mix" sink="Earpiece"
159                       sources="primary output,deep_buffer,BT SCO Headset Mic"/>
160                <route type="mix" sink="Speaker"
161                       sources="primary output,deep_buffer,compressed_offload,BT SCO Headset Mic,Telephony Rx"/>
162                <route type="mix" sink="Wired Headset"
163                       sources="primary output,deep_buffer,compressed_offload,BT SCO Headset Mic,Telephony Rx"/>
164                <route type="mix" sink="Wired Headphones"
165                       sources="primary output,deep_buffer,compressed_offload,BT SCO Headset Mic,Telephony Rx"/>
166                <route type="mix" sink="primary input"
167                       sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,BT SCO Headset Mic"/>
168                <route type="mix" sink="Telephony Tx"
169                       sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,BT SCO Headset Mic, voice_tx"/>
170                <route type="mix" sink="voice_rx"
171                       sources="Telephony Rx"/>
172            </routes>
173
174        </module>
175
176        <!-- A2dp Input Audio HAL -->
177        <xi:include href="a2dp_in_audio_policy_configuration_7_0.xml"/>
178
179        <!-- Usb Audio HAL -->
180        <xi:include href="usb_audio_policy_configuration.xml"/>
181
182        <!-- Remote Submix Audio HAL -->
183        <xi:include href="r_submix_audio_policy_configuration.xml"/>
184
185        <!-- Bluetooth Audio HAL -->
186        <xi:include href="bluetooth_audio_policy_configuration_7_0.xml"/>
187
188        <!-- MSD Audio HAL (optional) -->
189        <xi:include href="msd_audio_policy_configuration_7_0.xml"/>
190
191    </modules>
192    <!-- End of Modules section -->
193
194    <!-- Volume section:
195        IMPORTANT NOTE: Volume tables have been moved to engine configuration.
196                        Keep it here for legacy.
197                        Engine will fallback on these files if none are provided by engine.
198     -->
199
200    <xi:include href="audio_policy_volumes.xml"/>
201    <xi:include href="default_volume_tables.xml"/>
202
203    <!-- End of Volume section -->
204
205    <!-- Surround Sound configuration -->
206
207    <xi:include href="surround_sound_configuration_5_0.xml"/>
208
209    <!-- End of Surround Sound configuration -->
210
211</audioPolicyConfiguration>
212