blob: 498fc6167a951ef8d27021e058e0b3771afacc6c [file] [log] [blame]
Chris Friesdc2b50d2017-06-27 12:02:00 -05001<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2<!-- Copyright (C) 2016 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 <module name="primary" halVersion="2.0">
22 <attachedDevices>
23 <item>Speaker</item>
24 <item>Speaker Safe</item>
25 <item>Earpiece</item>
26 <item>Telephony Tx</item>
27 <item>Built-In Mic</item>
28 <item>Built-In Back Mic</item>
29 <item>Telephony Rx</item>
30 </attachedDevices>
31 <defaultOutputDevice>Speaker</defaultOutputDevice>
32 <mixPorts>
33 <mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY|AUDIO_OUTPUT_FLAG_FAST">
34 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
35 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
36 </mixPort>
37 <mixPort name="raw" role="source" flags="AUDIO_OUTPUT_FLAG_RAW|AUDIO_OUTPUT_FLAG_FAST">
38 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
39 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
40 </mixPort>
41 <mixPort name="hifi_playback" role="source" />
42 <mixPort name="deep_buffer" role="source"
43 flags="AUDIO_OUTPUT_FLAG_DEEP_BUFFER">
44 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
45 samplingRates="44100,48000"
46 channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
47 </mixPort>
48 <mixPort name="compressed_offload" role="source"
49 flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING">
50 <profile name="" format="AUDIO_FORMAT_MP3"
51 samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
52 channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
53 <profile name="" format="AUDIO_FORMAT_AAC_LC"
54 samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000"
55 channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
56 <profile name="" format="AUDIO_FORMAT_AAC_HE_V1"
57 samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000"
58 channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
59 <profile name="" format="AUDIO_FORMAT_AAC_HE_V2"
60 samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
61 channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
62 </mixPort>
63 <mixPort name="voice_tx" role="source">
64 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
65 samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO"/>
66 </mixPort>
67 <mixPort name="mmap_no_irq_out" role="source" flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_MMAP_NOIRQ">
68 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
69 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
70 </mixPort>
71 <mixPort name="voip_rx" role="source"
72 flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_VOIP_RX">
73 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
74 samplingRates="8000,16000,32000,48000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
75 </mixPort>
Nadav Bar2ac62142018-01-07 11:50:01 +020076 <mixPort name="incall_music_uplink" role="source"
77 flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC">
78 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
79 samplingRates="8000,16000,48000"
80 channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
81 </mixPort>
Chris Friesdc2b50d2017-06-27 12:02:00 -050082 <mixPort name="primary input" role="sink">
83 <profile name="" format="AUDIO_FORMAT_PCM_8_24_BIT"
84 samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
85 channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_INDEX_MASK_3"/>
86 </mixPort>
87 <mixPort name="fast input" role="sink" flags="AUDIO_INPUT_FLAG_FAST">
88 <profile name="" format="AUDIO_FORMAT_PCM_8_24_BIT"
89 samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
90 channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_INDEX_MASK_3"/>
91 </mixPort>
92 <mixPort name="hifi_input" role="sink" />
93 <mixPort name="voice_rx" role="sink">
94 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
95 samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
96 </mixPort>
97 <mixPort name="mmap_no_irq_in" role="sink" flags="AUDIO_INPUT_FLAG_MMAP_NOIRQ">
98 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
99 samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
100 channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_INDEX_MASK_3"/>
101 </mixPort>
102 <mixPort name="voip_tx" role="sink"
103 flags="AUDIO_INPUT_FLAG_VOIP_TX">
104 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
105 samplingRates="8000,16000,32000,48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
106 </mixPort>
107 </mixPorts>
108 <devicePorts>
109 <devicePort tagName="Earpiece" type="AUDIO_DEVICE_OUT_EARPIECE" role="sink">
110 </devicePort>
111 <devicePort tagName="Speaker" type="AUDIO_DEVICE_OUT_SPEAKER" role="sink">
112 </devicePort>
113 <devicePort tagName="Speaker Safe" type="AUDIO_DEVICE_OUT_SPEAKER_SAFE" role="sink">
114 </devicePort>
115 <devicePort tagName="BT SCO" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO" role="sink">
116 </devicePort>
117 <devicePort tagName="BT SCO Headset" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET" role="sink">
118 </devicePort>
119 <devicePort tagName="BT SCO Car Kit" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT" role="sink">
120 </devicePort>
121 <devicePort tagName="Telephony Tx" type="AUDIO_DEVICE_OUT_TELEPHONY_TX" role="sink">
122 </devicePort>
123 <devicePort tagName="USB Device Out" type="AUDIO_DEVICE_OUT_USB_DEVICE" role="sink">
124 </devicePort>
125 <devicePort tagName="USB Headset Out" type="AUDIO_DEVICE_OUT_USB_HEADSET" role="sink">
126 </devicePort>
127 <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
128 </devicePort>
129 <devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source">
130 </devicePort>
131 <devicePort tagName="BT SCO Headset Mic" type="AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET" role="source">
132 </devicePort>
133 <devicePort tagName="Telephony Rx" type="AUDIO_DEVICE_IN_TELEPHONY_RX" role="source">
134 </devicePort>
135 <!-- TODO: Enable multi-channel recording -->
136 <devicePort tagName="USB Device In" type="AUDIO_DEVICE_IN_USB_DEVICE" role="source">
137 </devicePort>
138 <devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source">
139 </devicePort>
140 </devicePorts>
141 <routes>
142 <route type="mix" sink="Earpiece"
143 sources="primary output,raw,deep_buffer,mmap_no_irq_out,voip_rx"/>
144 <route type="mix" sink="Speaker"
145 sources="primary output,raw,deep_buffer,compressed_offload,mmap_no_irq_out,voip_rx"/>
146 <route type="mix" sink="Speaker Safe"
147 sources="primary output,raw,deep_buffer,compressed_offload,mmap_no_irq_out,voip_rx"/>
148 <route type="mix" sink="BT SCO"
149 sources="primary output,raw,deep_buffer,voip_rx"/>
150 <route type="mix" sink="BT SCO Headset"
151 sources="primary output,raw,deep_buffer,voip_rx"/>
152 <route type="mix" sink="BT SCO Car Kit"
153 sources="primary output,raw,deep_buffer,voip_rx"/>
154 <route type="mix" sink="USB Device Out"
155 sources="primary output,raw,deep_buffer,compressed_offload,hifi_playback,mmap_no_irq_out,voip_rx"/>
156 <route type="mix" sink="USB Headset Out"
157 sources="primary output,raw,deep_buffer,compressed_offload,hifi_playback,mmap_no_irq_out,voip_rx"/>
158 <route type="mix" sink="Telephony Tx"
Nadav Bar2ac62142018-01-07 11:50:01 +0200159 sources="voice_tx,incall_music_uplink"/>
Chris Friesdc2b50d2017-06-27 12:02:00 -0500160 <route type="mix" sink="primary input"
161 sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In"/>
162 <route type="mix" sink="fast input"
163 sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In"/>
164 <route type="mix" sink="voice_rx"
165 sources="Telephony Rx"/>
166 <route type="mix" sink="hifi_input" sources="USB Device In,USB Headset In" />
167 <route type="mix" sink="mmap_no_irq_in"
168 sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In"/>
169 <route type="mix" sink="voip_tx"
170 sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In"/>
171 </routes>
172 </module>
173
174 <!-- A2dp Audio HAL -->
175 <xi:include href="a2dp_audio_policy_configuration.xml"/>
176
177 <!-- Usb Audio HAL -->
178 <module name="usb" halVersion="2.0">
179 <mixPorts>
180 <mixPort name="usb_accessory output" role="source">
181 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
182 samplingRates="44100" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
183 </mixPort>
184 </mixPorts>
185 <devicePorts>
186 <devicePort tagName="USB Host Out" type="AUDIO_DEVICE_OUT_USB_ACCESSORY" role="sink">
187 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
188 samplingRates="44100" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
189 </devicePort>
190 </devicePorts>
191 <routes>
192 <route type="mix" sink="USB Host Out"
193 sources="usb_accessory output"/>
194 </routes>
195 </module>
196
197 <!-- Remote Submix Audio HAL -->
198 <xi:include href="r_submix_audio_policy_configuration.xml"/>
199
200 </modules>
201
202 <!-- Volume section -->
203
204 <xi:include href="audio_policy_volumes.xml"/>
205 <xi:include href="default_volume_tables.xml"/>
206
207</audioPolicyConfiguration>