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    <globalConfiguration speaker_drc_enabled="true"/>
19
20    <modules>
21        <!-- Primary Audio HAL -->
22        <module name="primary" halVersion="3.0">
23            <attachedDevices>
24                <!-- One bus per context -->
25                <item>bus0_media_out</item>
26                <item>bus1_navigation_out</item>
27                <item>bus2_voice_command_out</item>
28                <item>bus3_call_ring_out</item>
29                <item>bus4_call_out</item>
30                <item>bus5_alarm_out</item>
31                <item>bus6_notification_out</item>
32                <item>bus7_system_sound_out</item>
33                <item>bus8_mmap_out</item>
34                <!-- names with _audio_zone_# are used for defined an emulator rear seat audio zone
35                    where each number # is the zone id number -->
36                <item>bus100_audio_zone_1</item>
37                <item>bus200_audio_zone_2</item>
38                <item>Built-In Mic</item>
39                <item>Built-In Back Mic</item>
40                <item>Echo-Reference Mic</item>
41                <item>FM Tuner</item>
42                <item>Tone Generator 0</item>
43                <item>Tone Generator 1</item>
44            </attachedDevices>
45            <defaultOutputDevice>bus0_media_out</defaultOutputDevice>
46            <mixPorts>
47                <mixPort name="mixport_bus0_media_out" role="source"
48                        flags="AUDIO_OUTPUT_FLAG_PRIMARY">
49                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
50                             samplingRates="48000"
51                             channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
52                </mixPort>
53                <mixPort name="mixport_bus0_media_out_atmos" role="source"
54                        flags="AUDIO_OUTPUT_FLAG_DIRECT">
55                    <profile name="" format="AUDIO_FORMAT_E_AC3_JOC"
56                             samplingRates="48000"
57                             channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_5POINT1"/>
58                </mixPort>
59                <mixPort name="mixport_bus0_media_out_atmos_pcm" role="source"
60                        flags="AUDIO_OUTPUT_FLAG_DIRECT">
61                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
62                             samplingRates="48000"
63                             channelMasks="AUDIO_CHANNEL_OUT_7POINT1POINT4"/>
64                </mixPort>
65                <mixPort name="mixport_bus1_navigation_out" role="source">
66                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
67                             samplingRates="48000"
68                             channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
69                </mixPort>
70                <mixPort name="mixport_bus2_voice_command_out" role="source">
71                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
72                             samplingRates="48000"
73                             channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
74                </mixPort>
75                <mixPort name="mixport_bus3_call_ring_out" role="source">
76                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
77                             samplingRates="48000"
78                             channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
79                </mixPort>
80                <mixPort name="mixport_bus4_call_out" role="source">
81                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
82                             samplingRates="48000"
83                             channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
84                </mixPort>
85                <mixPort name="mixport_bus5_alarm_out" role="source">
86                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
87                             samplingRates="48000"
88                             channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
89                </mixPort>
90                <mixPort name="mixport_bus6_notification_out" role="source">
91                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
92                             samplingRates="48000"
93                             channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
94                </mixPort>
95                <mixPort name="mixport_bus7_system_sound_out" role="source">
96                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
97                             samplingRates="48000"
98                             channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
99                </mixPort>
100                <mixPort name="mixport_bus8_mmap_out" role="source"
101                         flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_MMAP_NOIRQ">
102                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
103                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
104                </mixPort>
105                <mixPort name="mixport_bus100_audio_zone_1" role="source">
106                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
107                             samplingRates="48000"
108                             channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
109                </mixPort>
110                <mixPort name="mixport_bus200_audio_zone_2" role="source">
111                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
112                             samplingRates="48000"
113                             channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
114                </mixPort>
115                <mixPort name="primary input" role="sink">
116                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
117                             samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
118                             channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
119                </mixPort>
120                <mixPort name="mixport_tuner0" role="sink">
121                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
122                             samplingRates="48000"
123                             channelMasks="AUDIO_CHANNEL_IN_STEREO"/>
124                </mixPort>
125                <mixPort name="mixport_input_bus_tone_zone_0" role="sink">
126                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
127                             samplingRates="48000"
128                             channelMasks="AUDIO_CHANNEL_IN_STEREO"/>
129                </mixPort>
130                <mixPort name="mixport_input_bus_tone_zone_1" role="sink">
131                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
132                             samplingRates="48000"
133                             channelMasks="AUDIO_CHANNEL_IN_STEREO"/>
134                </mixPort>
135            </mixPorts>
136            <devicePorts>
137                <devicePort tagName="bus0_media_out" role="sink" type="AUDIO_DEVICE_OUT_BUS"
138                        address="bus0_media_out">
139                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
140                            samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
141                    <profile name="" format="AUDIO_FORMAT_E_AC3_JOC"
142                            samplingRates="48000"
143                            channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_5POINT1"/>
144                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
145                            samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_7POINT1POINT4"/>
146                    <gains>
147                        <gain name="" mode="AUDIO_GAIN_MODE_JOINT"
148                                minValueMB="-3200" maxValueMB="600" defaultValueMB="0"
149                                stepValueMB="100"/>
150                    </gains>
151                </devicePort>
152                <devicePort tagName="bus1_navigation_out" role="sink" type="AUDIO_DEVICE_OUT_BUS"
153                        address="bus1_navigation_out">
154                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
155                            samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
156                    <gains>
157                        <gain name="" mode="AUDIO_GAIN_MODE_JOINT"
158                                minValueMB="-3200" maxValueMB="600" defaultValueMB="0"
159                                stepValueMB="100"/>
160                    </gains>
161                </devicePort>
162                <devicePort tagName="bus2_voice_command_out" role="sink" type="AUDIO_DEVICE_OUT_BUS"
163                        address="bus2_voice_command_out">
164                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
165                            samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
166                    <gains>
167                        <gain name="" mode="AUDIO_GAIN_MODE_JOINT"
168                                minValueMB="-3200" maxValueMB="600" defaultValueMB="0"
169                                stepValueMB="100"/>
170                    </gains>
171                </devicePort>
172                <devicePort tagName="bus3_call_ring_out" role="sink" type="AUDIO_DEVICE_OUT_BUS"
173                        address="bus3_call_ring_out">
174                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
175                            samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
176                    <gains>
177                        <gain name="" mode="AUDIO_GAIN_MODE_JOINT"
178                                minValueMB="-3200" maxValueMB="600" defaultValueMB="0"
179                                stepValueMB="100"/>
180                    </gains>
181                </devicePort>
182                <devicePort tagName="bus4_call_out" role="sink" type="AUDIO_DEVICE_OUT_BUS"
183                        address="bus4_call_out">
184                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
185                            samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
186                    <gains>
187                        <gain name="" mode="AUDIO_GAIN_MODE_JOINT"
188                                minValueMB="-3200" maxValueMB="600" defaultValueMB="0"
189                                stepValueMB="100"/>
190                    </gains>
191                </devicePort>
192                <devicePort tagName="bus5_alarm_out" role="sink" type="AUDIO_DEVICE_OUT_BUS"
193                        address="bus5_alarm_out">
194                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
195                            samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
196                    <gains>
197                        <gain name="" mode="AUDIO_GAIN_MODE_JOINT"
198                                minValueMB="-3200" maxValueMB="600" defaultValueMB="0"
199                                stepValueMB="100"/>
200                    </gains>
201                </devicePort>
202                <devicePort tagName="bus6_notification_out" role="sink" type="AUDIO_DEVICE_OUT_BUS"
203                        address="bus6_notification_out">
204                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
205                            samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
206                    <gains>
207                        <gain name="" mode="AUDIO_GAIN_MODE_JOINT"
208                                minValueMB="-3200" maxValueMB="600" defaultValueMB="0"
209                                stepValueMB="100"/>
210                    </gains>
211                </devicePort>
212                <devicePort tagName="bus7_system_sound_out" role="sink" type="AUDIO_DEVICE_OUT_BUS"
213                        address="bus7_system_sound_out">
214                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
215                            samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
216                    <gains>
217                        <gain name="" mode="AUDIO_GAIN_MODE_JOINT"
218                                minValueMB="-3200" maxValueMB="600" defaultValueMB="0"
219                                stepValueMB="100"/>
220                    </gains>
221                </devicePort>
222                <devicePort tagName="bus8_mmap_out" role="sink" type="AUDIO_DEVICE_OUT_BUS"
223                    address="bus8_mmap_out">
224                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
225                        samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
226                    <gains>
227                        <gain name="" mode="AUDIO_GAIN_MODE_JOINT"
228                            minValueMB="-3200" maxValueMB="600" defaultValueMB="0"
229                            stepValueMB="100"/>
230                    </gains>
231                </devicePort>
232                <devicePort tagName="bus100_audio_zone_1" role="sink" type="AUDIO_DEVICE_OUT_BUS"
233                        address="bus100_audio_zone_1">
234                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
235                            samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
236                    <gains>
237                        <gain name="" mode="AUDIO_GAIN_MODE_JOINT"
238                                minValueMB="-3200" maxValueMB="600" defaultValueMB="0"
239                                stepValueMB="100"/>
240                    </gains>
241                </devicePort>
242                <devicePort tagName="bus200_audio_zone_2" role="sink" type="AUDIO_DEVICE_OUT_BUS"
243                            address="bus200_audio_zone_2">
244                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
245                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
246                    <gains>
247                        <gain name="" mode="AUDIO_GAIN_MODE_JOINT"
248                              minValueMB="-3200" maxValueMB="600" defaultValueMB="0"
249                              stepValueMB="100"/>
250                    </gains>
251                </devicePort>
252                <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
253                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
254                            samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
255                            channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
256                </devicePort>
257                <devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC"
258                        role="source">
259                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
260                            samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
261                            channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
262                </devicePort>
263                <devicePort tagName="Echo-Reference Mic" type="AUDIO_DEVICE_IN_ECHO_REFERENCE"
264                        role="source">
265                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
266                            samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
267                            channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
268                </devicePort>
269                <devicePort tagName="FM Tuner" type="AUDIO_DEVICE_IN_FM_TUNER" role="source"
270                        address="tuner0">
271                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
272                            samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_STEREO"/>
273                    <gains>
274                        <gain name="" mode="AUDIO_GAIN_MODE_JOINT"
275                                minValueMB="-3200" maxValueMB="600" defaultValueMB="0"
276                                stepValueMB="100"/>
277                    </gains>
278                </devicePort>
279                <devicePort tagName="Tone Generator 0" type="AUDIO_DEVICE_IN_BUS" role="source"
280                            address="input_bus_tone_zone_0">
281                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
282                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_STEREO"/>
283                    <gains>
284                        <gain name="" mode="AUDIO_GAIN_MODE_JOINT"
285                              minValueMB="-3200" maxValueMB="600" defaultValueMB="0"
286                              stepValueMB="100"/>
287                    </gains>
288                </devicePort>
289                <devicePort tagName="Tone Generator 1" type="AUDIO_DEVICE_IN_BUS" role="source"
290                            address="input_bus_tone_zone_1">
291                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
292                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_STEREO"/>
293                    <gains>
294                        <gain name="" mode="AUDIO_GAIN_MODE_JOINT"
295                              minValueMB="-3200" maxValueMB="600" defaultValueMB="0"
296                              stepValueMB="100"/>
297                    </gains>
298                </devicePort>
299            </devicePorts>
300            <!-- route declaration, i.e. list all available sources for a given sink -->
301            <routes>
302                <route type="mix" sink="bus0_media_out"
303                        sources="mixport_bus0_media_out,mixport_bus0_media_out_atmos,mixport_bus0_media_out_atmos_pcm"/>
304                <route type="mix" sink="bus1_navigation_out" sources="mixport_bus1_navigation_out"/>
305                <route type="mix" sink="bus2_voice_command_out"
306                        sources="mixport_bus2_voice_command_out"/>
307                <route type="mix" sink="bus3_call_ring_out" sources="mixport_bus3_call_ring_out"/>
308                <route type="mix" sink="bus4_call_out" sources="mixport_bus4_call_out"/>
309                <route type="mix" sink="bus5_alarm_out" sources="mixport_bus5_alarm_out"/>
310                <route type="mix" sink="bus6_notification_out"
311                        sources="mixport_bus6_notification_out"/>
312                <route type="mix" sink="bus7_system_sound_out"
313                        sources="mixport_bus7_system_sound_out"/>
314                <route type="mix" sink="bus8_mmap_out"
315                        sources="mixport_bus8_mmap_out"/>
316                <route type="mix" sink="bus100_audio_zone_1" sources="mixport_bus100_audio_zone_1"/>
317                <route type="mix" sink="bus200_audio_zone_2" sources="mixport_bus200_audio_zone_2"/>
318                <route type="mix" sink="primary input"
319                        sources="Built-In Mic,Built-In Back Mic,Echo-Reference Mic"/>
320                <route type="mix" sink="mixport_tuner0" sources="FM Tuner"/>
321                <route type="mix" sink="mixport_input_bus_tone_zone_0" sources="Tone Generator 0"/>
322                <route type="mix" sink="mixport_input_bus_tone_zone_1" sources="Tone Generator 1"/>
323            </routes>
324        </module>
325    </modules>
326</audioPolicyConfiguration>
327