• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2<!-- Copyright (C) 2020 The Android Open Source Project
3     Licensed under the Apache License, Version 2.0 (the "License");
4     you may not use this file except in compliance with the License.
5     You may obtain a copy of the License at
6          http://www.apache.org/licenses/LICENSE-2.0
7     Unless required by applicable law or agreed to in writing, software
8     distributed under the License is distributed on an "AS IS" BASIS,
9     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10     See the License for the specific language governing permissions and
11     limitations under the License.
12-->
13<audioPolicyConfiguration version="7.0" xmlns:xi="http://www.w3.org/2001/XInclude">
14    <globalConfiguration speaker_drc_enabled="false" call_screen_mode_supported="true" />
15    <modules>
16        <!-- Primary Audio HAL -->
17        <module name="primary" halVersion="2.0">
18            <attachedDevices>
19                <item>Speaker</item>
20                <item>Speaker Safe</item>
21                <item>Earpiece</item>
22                <item>Built-In Mic</item>
23                <item>Built-In Back Mic</item>
24                <item>Telephony Tx</item>
25                <item>Voice Call And Telephony Rx</item>
26                <item>Echo Ref In</item>
27            </attachedDevices>
28            <defaultOutputDevice>Speaker</defaultOutputDevice>
29            <mixPorts>
30                <mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY AUDIO_OUTPUT_FLAG_FAST"
31                         recommendedMuteDurationMs="40">
32                    <profile name="" format="AUDIO_FORMAT_PCM_FLOAT"
33                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
34                </mixPort>
35                <mixPort name="deep buffer" role="source" flags="AUDIO_OUTPUT_FLAG_DEEP_BUFFER">
36                    <profile name="" format="AUDIO_FORMAT_PCM_FLOAT"
37                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
38                </mixPort>
39                <mixPort name="compressed_offload" role="source"
40                         flags="AUDIO_OUTPUT_FLAG_DIRECT AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD AUDIO_OUTPUT_FLAG_NON_BLOCKING AUDIO_OUTPUT_FLAG_GAPLESS_OFFLOAD">
41                    <profile name="" format="AUDIO_FORMAT_MP3"
42                             samplingRates="8000 16000 24000 32000 44100 48000"
43                             channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
44                    <profile name="" format="AUDIO_FORMAT_AAC_LC"
45                             samplingRates="8000 16000 24000 32000 44100 48000"
46                             channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
47                    <profile name="" format="AUDIO_FORMAT_AAC_HE_V1"
48                             samplingRates="8000 16000 24000 32000 44100 48000"
49                             channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
50                    <profile name="" format="AUDIO_FORMAT_AAC_HE_V2"
51                             samplingRates="8000 16000 24000 32000 44100 48000"
52                             channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
53                </mixPort>
54                <mixPort name="haptic" role="source">
55                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
56                             samplingRates="48000"
57                             channelMasks="AUDIO_CHANNEL_OUT_STEREO_HAPTIC_AB" />
58                </mixPort>
59                <mixPort name="raw" role="source" flags="AUDIO_OUTPUT_FLAG_RAW AUDIO_OUTPUT_FLAG_FAST">
60                    <profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
61                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
62                </mixPort>
63                <mixPort name="mmap_no_irq_out" role="source" flags="AUDIO_OUTPUT_FLAG_DIRECT AUDIO_OUTPUT_FLAG_MMAP_NOIRQ">
64                    <profile name="" format="AUDIO_FORMAT_PCM_FLOAT"
65                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
66                </mixPort>
67                <mixPort name="immersive_out" role="source" flags="AUDIO_OUTPUT_FLAG_SPATIALIZER">
68                    <profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
69                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
70                </mixPort>
71                <mixPort name="incall playback" role="source"
72                         flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC">
73                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
74                             samplingRates="48000"
75                             channelMasks="AUDIO_CHANNEL_OUT_STEREO" />
76                </mixPort>
77                <mixPort name="voice call tx" role="source">
78                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
79                             samplingRates="48000"
80                             channelMasks="AUDIO_CHANNEL_OUT_STEREO" />
81                </mixPort>
82                <mixPort name="voip_rx" role="source"
83                         flags="AUDIO_OUTPUT_FLAG_VOIP_RX">
84                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
85                           samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
86                </mixPort>
87                <mixPort name="primary input" role="sink">
88                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
89                             samplingRates="48000"
90                             channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO AUDIO_CHANNEL_INDEX_MASK_3"/>
91                </mixPort>
92                <mixPort name="hotword input" role="sink" flags="AUDIO_INPUT_FLAG_HW_HOTWORD" maxActiveCount="0" >
93                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
94                             samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000"
95                             channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
96                </mixPort>
97                <mixPort name="incall capture" role="sink">
98                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
99                             samplingRates="48000"
100                             channelMasks="AUDIO_CHANNEL_IN_MONO"/>
101                </mixPort>
102                <mixPort name="voice call rx" role="sink">
103                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
104                             samplingRates="48000"
105                             channelMasks="AUDIO_CHANNEL_IN_MONO"/>
106                </mixPort>
107                <mixPort name="voip_tx" role="sink"
108                         flags="AUDIO_INPUT_FLAG_VOIP_TX">
109                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
110                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
111                </mixPort>
112                <mixPort name="fast input" role="sink" flags="AUDIO_INPUT_FLAG_RAW AUDIO_INPUT_FLAG_FAST">
113                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
114                             samplingRates="48000"
115                             channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
116                </mixPort>
117                <mixPort name="mmap_no_irq_in" role="sink" flags="AUDIO_INPUT_FLAG_MMAP_NOIRQ">
118                    <profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
119                             samplingRates="48000"
120                             channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
121                </mixPort>
122                <mixPort name="hifi_playback" role="source" />
123                <mixPort name="hifi_input" role="sink" />
124                <mixPort name="echo_ref_input" role="sink">
125                    <profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
126                             samplingRates="48000"
127                             channelMasks="AUDIO_CHANNEL_IN_STEREO"/>
128                </mixPort>
129            </mixPorts>
130            <devicePorts>
131                <!-- Output devices declaration, i.e. Sink DEVICE PORT -->
132                <devicePort tagName="Earpiece" type="AUDIO_DEVICE_OUT_EARPIECE" role="sink">
133                </devicePort>
134                <devicePort tagName="Speaker" type="AUDIO_DEVICE_OUT_SPEAKER" role="sink">
135                </devicePort>
136                <devicePort tagName="Speaker Safe" type="AUDIO_DEVICE_OUT_SPEAKER_SAFE" role="sink">
137                </devicePort>
138                <devicePort tagName="Wired Headset" type="AUDIO_DEVICE_OUT_WIRED_HEADSET" role="sink">
139                </devicePort>
140                <devicePort tagName="Wired Headphones" type="AUDIO_DEVICE_OUT_WIRED_HEADPHONE" role="sink">
141                </devicePort>
142                <devicePort tagName="BT SCO" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO" role="sink">
143                </devicePort>
144                <devicePort tagName="BT SCO Headset" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET" role="sink">
145                </devicePort>
146                <devicePort tagName="BT SCO Car Kit" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT" role="sink">
147                </devicePort>
148                <devicePort tagName="USB Device Out" type="AUDIO_DEVICE_OUT_USB_DEVICE" role="sink">
149                </devicePort>
150                <devicePort tagName="USB Headset Out" type="AUDIO_DEVICE_OUT_USB_HEADSET" role="sink">
151                </devicePort>
152                <devicePort tagName="HDMI Out" type="AUDIO_DEVICE_OUT_HDMI" role="sink">
153                </devicePort>
154                <devicePort tagName="Telephony Tx" type="AUDIO_DEVICE_OUT_TELEPHONY_TX" role="sink">
155                </devicePort>
156                <!-- Input devices declaration, i.e. Source DEVICE PORT -->
157                <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
158                </devicePort>
159                <devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source">
160                </devicePort>
161                <devicePort tagName="Wired Headset Mic" type="AUDIO_DEVICE_IN_WIRED_HEADSET" role="source">
162                </devicePort>
163                <devicePort tagName="BT SCO Headset Mic" type="AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET" role="source">
164                </devicePort>
165                <devicePort tagName="BT A2DP Out" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP" role="sink"
166                            encodedFormats="AUDIO_FORMAT_OPUS AUDIO_FORMAT_AAC AUDIO_FORMAT_SBC">
167                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
168                             samplingRates="44100 48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
169                </devicePort>
170                <devicePort tagName="BT A2DP Headphones" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES" role="sink"
171                            encodedFormats="AUDIO_FORMAT_OPUS AUDIO_FORMAT_AAC AUDIO_FORMAT_SBC">
172                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
173                             samplingRates="44100 48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
174                </devicePort>
175                <devicePort tagName="BT A2DP Speaker" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER" role="sink"
176                            encodedFormats="AUDIO_FORMAT_OPUS AUDIO_FORMAT_AAC AUDIO_FORMAT_SBC">
177                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
178                             samplingRates="44100 48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
179                </devicePort>
180                <devicePort tagName="BT BLE Headset" type="AUDIO_DEVICE_OUT_BLE_HEADSET" role="sink"
181                            encodedFormats="AUDIO_FORMAT_LC3">
182                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
183                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
184                </devicePort>
185                <devicePort tagName="BT BLE Speaker" type="AUDIO_DEVICE_OUT_BLE_SPEAKER" role="sink"
186                            encodedFormats="AUDIO_FORMAT_LC3">
187                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
188                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
189                </devicePort>
190                <devicePort tagName="BT BLE Broadcast" type="AUDIO_DEVICE_OUT_BLE_BROADCAST" role="sink"
191                            encodedFormats="AUDIO_FORMAT_LC3">
192                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
193                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
194                </devicePort>
195                <devicePort tagName="BLE Headset Mic" type="AUDIO_DEVICE_IN_BLE_HEADSET" role="source">
196                </devicePort>
197                <devicePort tagName="USB Device In" type="AUDIO_DEVICE_IN_USB_DEVICE" role="source">
198                </devicePort>
199                <devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source">
200                </devicePort>
201                <!-- AUDIO_DEVICE_IN_VOICE_CALL and AUDIO_DEVICE_IN_TELEPHONY_RX are in the same value -->
202                <devicePort tagName="Voice Call And Telephony Rx" type="AUDIO_DEVICE_IN_VOICE_CALL" role="source">
203                </devicePort>
204                <devicePort tagName="Echo Ref In" type="AUDIO_DEVICE_IN_ECHO_REFERENCE" role="source">
205                </devicePort>
206            </devicePorts>
207            <!-- route declaration, i.e. list all available sources for a given sink -->
208            <routes>
209                <route type="mix" sink="Speaker"
210                       sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,compressed_offload"/>
211                <route type="mix" sink="Speaker Safe"
212                       sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,compressed_offload"/>
213                <route type="mix" sink="Earpiece"
214                       sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,compressed_offload"/>
215                <route type="mix" sink="BT A2DP Out"
216                       sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/>
217                <route type="mix" sink="BT A2DP Headphones"
218                       sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/>
219                <route type="mix" sink="BT A2DP Speaker"
220                       sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/>
221                <route type="mix" sink="BT BLE Headset"
222                       sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/>
223                <route type="mix" sink="BT BLE Speaker"
224                       sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/>
225                <route type="mix" sink="BT BLE Broadcast"
226                       sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/>
227                <route type="mix" sink="USB Device Out"
228                       sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,hifi_playback,compressed_offload,immersive_out"/>
229                <route type="mix" sink="USB Headset Out"
230                       sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,hifi_playback,compressed_offload,immersive_out"/>
231                <route type="mix" sink="HDMI Out"
232                       sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,compressed_offload"/>
233                <route type="mix" sink="BT SCO"
234                       sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out"/>
235                <route type="mix" sink="BT SCO Headset"
236                       sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out"/>
237                <route type="mix" sink="BT SCO Car Kit"
238                       sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out"/>
239                <route type="mix" sink="Telephony Tx" sources="incall playback,voice call tx" />
240                <route type="mix" sink="primary input"
241                       sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic,BLE Headset Mic"/>
242                <route type="mix" sink="hotword input"
243                       sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic,BLE Headset Mic"/>
244                <route type="mix" sink="incall capture" sources="Voice Call And Telephony Rx" />
245                <route type="mix" sink="voice call rx" sources="Voice Call And Telephony Rx" />
246                <route type="mix" sink="voip_tx"
247                       sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic,BLE Headset Mic"/>
248                <route type="mix" sink="fast input"
249                       sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic,BLE Headset Mic"/>
250                <route type="mix" sink="mmap_no_irq_in"
251                       sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic,BLE Headset Mic"/>
252                <route type="mix" sink="hifi_input" sources="USB Device In,USB Headset In" />
253                <route type="mix" sink="echo_ref_input" sources="Echo Ref In"/>
254            </routes>
255        </module>
256        <!-- Bluetooth Audio HAL -->
257        <xi:include href="bluetooth_audio_policy_configuration_7_0.xml"/>
258        <!-- Usb Audio HAL -->
259        <module name="usbv2" halVersion="2.0">
260            <mixPorts>
261                <mixPort name="usb_accessory output" role="source">
262                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
263                             samplingRates="44100" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
264                </mixPort>
265            </mixPorts>
266            <devicePorts>
267                <devicePort tagName="USB Host Out" type="AUDIO_DEVICE_OUT_USB_ACCESSORY" role="sink">
268                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
269                             samplingRates="44100" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
270                </devicePort>
271            </devicePorts>
272            <routes>
273                <route type="mix" sink="USB Host Out"
274                       sources="usb_accessory output"/>
275            </routes>
276        </module>
277        <!-- Remote Submix Audio HAL -->
278        <xi:include href="r_submix_audio_policy_configuration.xml"/>
279    </modules>
280    <!-- End of Modules section -->
281    <!-- Volume section -->
282    <xi:include href="audio_policy_volumes.xml"/>
283    <xi:include href="default_volume_tables.xml"/>
284    <!-- End of Volume section -->
285</audioPolicyConfiguration>
286