blob: bd0a2b8f00254c2b5841683e688f8ab5954e2c34
1 | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> |
2 | <!-- Copyright (C) 2015 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 | <!-- version section contains a “version” tag in the form “major.minor” e.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 | </attachedDevices> |
52 | <defaultOutputDevice>Speaker</defaultOutputDevice> |
53 | <mixPorts> |
54 | <mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY"> |
55 | <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" |
56 | samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> |
57 | </mixPort> |
58 | <mixPort name="compressed_offload" role="source" |
59 | flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_NON_BLOCKING|AUDIO_OUTPUT_FLAG_HW_AV_SYNC"> |
60 | <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" |
61 | samplingRates="48000,96000,192000" |
62 | channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_7POINT1"/> |
63 | <profile name="" format="AUDIO_FORMAT_AC3" |
64 | samplingRates="44100,48000,96000,192000" |
65 | channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_7POINT1"/> |
66 | <profile name="" format="AUDIO_FORMAT_E_AC3" |
67 | samplingRates="44100,48000,96000,192000" |
68 | channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_7POINT1"/> |
69 | <profile name="" format="AUDIO_FORMAT_DTS" |
70 | samplingRates="48000,96000,192000" |
71 | channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_7POINT1"/> |
72 | <profile name="" format="AUDIO_FORMAT_DTS_HD" |
73 | samplingRates="48000,96000,192000" |
74 | channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_7POINT1"/> |
75 | </mixPort> |
76 | <mixPort name="primary input" role="sink"> |
77 | <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" |
78 | samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" |
79 | channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/> |
80 | </mixPort> |
81 | </mixPorts> |
82 | <devicePorts> |
83 | <!-- Output devices declaration, i.e. Sink DEVICE PORT --> |
84 | <devicePort tagName="Speaker" role="sink" type="AUDIO_DEVICE_OUT_SPEAKER"> |
85 | <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" |
86 | samplingRates="48000,96000,192000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> |
87 | </devicePort> |
88 | <devicePort tagName="Wired Headset" type="AUDIO_DEVICE_OUT_WIRED_HEADSET" role="sink"> |
89 | <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" |
90 | samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> |
91 | </devicePort> |
92 | <devicePort tagName="Wired Headphones" type="AUDIO_DEVICE_OUT_WIRED_HEADPHONE" role="sink"> |
93 | <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" |
94 | samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> |
95 | </devicePort> |
96 | <devicePort tagName="BT SCO" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO" role="sink"> |
97 | <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" |
98 | samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/> |
99 | </devicePort> |
100 | <devicePort tagName="BT SCO Headset" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET" role="sink"> |
101 | <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" |
102 | samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/> |
103 | </devicePort> |
104 | <devicePort tagName="BT SCO Car Kit" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT" role="sink"> |
105 | <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" |
106 | samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/> |
107 | </devicePort> |
108 | <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source"> |
109 | <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" |
110 | samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" |
111 | channelMasks="AUDIO_CHANNEL_IN_STEREO"/> |
112 | </devicePort> |
113 | <devicePort tagName="Wired Headset Mic" type="AUDIO_DEVICE_IN_WIRED_HEADSET" role="source"> |
114 | <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" |
115 | samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" |
116 | channelMasks="AUDIO_CHANNEL_IN_STEREO"/> |
117 | </devicePort> |
118 | <devicePort tagName="BT SCO Headset Mic" type="AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET" role="source"> |
119 | <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" |
120 | samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_IN_MONO"/> |
121 | </devicePort> |
122 | </devicePorts> |
123 | <!-- route declaration, i.e. list all available sources for a given sink --> |
124 | <routes> |
125 | <route type="mix" sink="Speaker" |
126 | sources="primary output,compressed_offload,BT SCO Headset Mic"/> |
127 | <!-- route type="mix" sink="HDMI Out" |
128 | sources="primary output,deep_buffer,BT SCO Headset Mic"/--> |
129 | <route type="mix" sink="Wired Headset" |
130 | sources="primary output,compressed_offload,BT SCO Headset Mic"/> |
131 | <route type="mix" sink="Wired Headphones" |
132 | sources="primary output,compressed_offload,BT SCO Headset Mic"/> |
133 | <route type="mix" sink="BT SCO" |
134 | sources="primary output,compressed_offload,BT SCO Headset Mic"/> |
135 | <route type="mix" sink="BT SCO Headset" |
136 | sources="primary output,compressed_offload,BT SCO Headset Mic"/> |
137 | <route type="mix" sink="primary input" |
138 | sources="Built-In Mic,Wired Headset Mic,BT SCO Headset Mic"/> |
139 | </routes> |
140 | |
141 | </module> |
142 | |
143 | <!-- HDMI Audio HAL --> |
144 | <!-- module description="HDMI Audio HAL" name="hdmi" version="2.0"> |
145 | <attachedDevices> |
146 | <item>HDMI Out</item> |
147 | </attachedDevices> |
148 | <mixPorts> |
149 | <mixPort name="hdmi output" role="source"> |
150 | <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" samplingRates="48000"/> |
151 | </mixPort> |
152 | </mixPorts> |
153 | <devicePorts> |
154 | <devicePort tagName="HDMI Out" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink"> |
155 | <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" |
156 | samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> |
157 | </devicePort> |
158 | </devicePorts> |
159 | <routes> |
160 | <route type="mix" sink="HDMI Out" |
161 | sources="hdmi output"/> |
162 | </routes> |
163 | </module--> |
164 | |
165 | <!-- A2dp Audio HAL --> |
166 | <xi:include href="a2dp_audio_policy_configuration.xml"/> |
167 | |
168 | <!-- Usb Audio HAL --> |
169 | <xi:include href="usb_audio_policy_configuration.xml"/> |
170 | |
171 | <!-- Remote Submix Audio HAL --> |
172 | <xi:include href="r_submix_audio_policy_configuration.xml"/> |
173 | |
174 | </modules> |
175 | <!-- End of Modules section --> |
176 | |
177 | <!-- Volume section --> |
178 | |
179 | <xi:include href="audio_policy_volumes.xml"/> |
180 | <xi:include href="default_volume_tables.xml"/> |
181 | |
182 | <!-- End of Volume section --> |
183 | |
184 | </audioPolicyConfiguration> |
185 |