blob: 7f7fb61f4dd42d5d8f5e80b6774930c2a1727a6a [file] [log] [blame]
Mikhail Naganov159260c2020-07-23 18:08:26 +00001<?xml version="1.0" encoding="UTF-8"?>
2<!-- Copyright (C) 2020 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-->
Mikhail Naganov159260c2020-07-23 18:08:26 +000016<xs:schema version="2.0"
17 elementFormDefault="qualified"
18 attributeFormDefault="unqualified"
19 xmlns:xs="http://www.w3.org/2001/XMLSchema">
20 <!-- List the config versions supported by audio policy. -->
21 <xs:simpleType name="version">
22 <xs:restriction base="xs:decimal">
Mikhail Naganov8a525812021-02-04 19:24:05 +000023 <xs:enumeration value="7.0"/>
Mikhail Naganov159260c2020-07-23 18:08:26 +000024 </xs:restriction>
25 </xs:simpleType>
26 <xs:simpleType name="halVersion">
27 <xs:annotation>
28 <xs:documentation xml:lang="en">
Mikhail Naganov7dd87f42020-08-04 23:37:05 +000029 Version of the interface the hal implements. Note that this
30 relates to legacy HAL API versions since HIDL APIs are versioned
31 using other mechanisms.
Mikhail Naganov159260c2020-07-23 18:08:26 +000032 </xs:documentation>
33 </xs:annotation>
34 <xs:restriction base="xs:decimal">
35 <!-- List of HAL versions supported by the framework. -->
36 <xs:enumeration value="2.0"/>
37 <xs:enumeration value="3.0"/>
38 </xs:restriction>
39 </xs:simpleType>
40 <xs:element name="audioPolicyConfiguration">
41 <xs:complexType>
42 <xs:sequence>
43 <xs:element name="globalConfiguration" type="globalConfiguration"/>
44 <xs:element name="modules" type="modules" maxOccurs="unbounded"/>
45 <xs:element name="volumes" type="volumes" maxOccurs="unbounded"/>
46 <xs:element name="surroundSound" type="surroundSound" minOccurs="0" />
47 </xs:sequence>
48 <xs:attribute name="version" type="version"/>
49 </xs:complexType>
50 <xs:key name="moduleNameKey">
51 <xs:selector xpath="modules/module"/>
52 <xs:field xpath="@name"/>
53 </xs:key>
54 <xs:unique name="volumeTargetUniqueness">
55 <xs:selector xpath="volumes/volume"/>
56 <xs:field xpath="@stream"/>
57 <xs:field xpath="@deviceCategory"/>
58 </xs:unique>
59 <xs:key name="volumeCurveNameKey">
60 <xs:selector xpath="volumes/reference"/>
61 <xs:field xpath="@name"/>
62 </xs:key>
63 <xs:keyref name="volumeCurveRef" refer="volumeCurveNameKey">
64 <xs:selector xpath="volumes/volume"/>
65 <xs:field xpath="@ref"/>
66 </xs:keyref>
67 </xs:element>
68 <xs:complexType name="globalConfiguration">
69 <xs:attribute name="speaker_drc_enabled" type="xs:boolean" use="required"/>
70 <xs:attribute name="call_screen_mode_supported" type="xs:boolean" use="optional"/>
71 <xs:attribute name="engine_library" type="engineSuffix" use="optional"/>
72 </xs:complexType>
73 <xs:complexType name="modules">
74 <xs:annotation>
75 <xs:documentation xml:lang="en">
76 There should be one section per audio HW module present on the platform.
77 Each <module/> contains two mandatory tags: “halVersion” and “name”.
78 The module "name" is the same as in previous .conf file.
79 Each module must contain the following sections:
80 - <devicePorts/>: a list of device descriptors for all
81 input and output devices accessible via this module.
82 This contains both permanently attached devices and removable devices.
83 - <mixPorts/>: listing all output and input streams exposed by the audio HAL
84 - <routes/>: list of possible connections between input
85 and output devices or between stream and devices.
86 A <route/> is defined by a set of 3 attributes:
87 -"type": mux|mix means all sources are mutual exclusive (mux) or can be mixed (mix)
88 -"sink": the sink involved in this route
89 -"sources": all the sources than can be connected to the sink via this route
90 - <attachedDevices/>: permanently attached devices.
91 The attachedDevices section is a list of devices names.
92 Their names correspond to device names defined in "devicePorts" section.
93 - <defaultOutputDevice/> is the device to be used when no policy rule applies
94 </xs:documentation>
95 </xs:annotation>
96 <xs:sequence>
97 <xs:element name="module" maxOccurs="unbounded">
98 <xs:complexType>
99 <xs:sequence>
100 <xs:element name="attachedDevices" type="attachedDevices" minOccurs="0">
101 <xs:unique name="attachedDevicesUniqueness">
102 <xs:selector xpath="item"/>
103 <xs:field xpath="."/>
104 </xs:unique>
105 </xs:element>
106 <xs:element name="defaultOutputDevice" type="xs:token" minOccurs="0"/>
107 <xs:element name="mixPorts" type="mixPorts" minOccurs="0"/>
108 <xs:element name="devicePorts" type="devicePorts" minOccurs="0"/>
109 <xs:element name="routes" type="routes" minOccurs="0"/>
110 </xs:sequence>
111 <xs:attribute name="name" type="xs:string" use="required"/>
112 <xs:attribute name="halVersion" type="halVersion" use="required"/>
113 </xs:complexType>
114 <xs:unique name="mixPortNameUniqueness">
115 <xs:selector xpath="mixPorts/mixPort"/>
116 <xs:field xpath="@name"/>
117 </xs:unique>
118 <xs:key name="devicePortNameKey">
119 <xs:selector xpath="devicePorts/devicePort"/>
120 <xs:field xpath="@tagName"/>
121 </xs:key>
122 <xs:unique name="devicePortUniqueness">
123 <xs:selector xpath="devicePorts/devicePort"/>
124 <xs:field xpath="@type"/>
125 <xs:field xpath="@address"/>
126 </xs:unique>
127 <xs:keyref name="defaultOutputDeviceRef" refer="devicePortNameKey">
128 <xs:selector xpath="defaultOutputDevice"/>
129 <xs:field xpath="."/>
130 </xs:keyref>
131 <xs:keyref name="attachedDeviceRef" refer="devicePortNameKey">
132 <xs:selector xpath="attachedDevices/item"/>
133 <xs:field xpath="."/>
134 </xs:keyref>
135 <!-- The following 3 constraints try to make sure each sink port
136 is reference in one an only one route. -->
137 <xs:key name="routeSinkKey">
138 <!-- predicate [@type='sink'] does not work in xsd 1.0 -->
139 <xs:selector xpath="devicePorts/devicePort|mixPorts/mixPort"/>
140 <xs:field xpath="@tagName|@name"/>
141 </xs:key>
142 <xs:keyref name="routeSinkRef" refer="routeSinkKey">
143 <xs:selector xpath="routes/route"/>
144 <xs:field xpath="@sink"/>
145 </xs:keyref>
146 <xs:unique name="routeUniqueness">
147 <xs:selector xpath="routes/route"/>
148 <xs:field xpath="@sink"/>
149 </xs:unique>
150 </xs:element>
151 </xs:sequence>
152 </xs:complexType>
153 <xs:complexType name="attachedDevices">
154 <xs:sequence>
155 <xs:element name="item" type="xs:token" minOccurs="0" maxOccurs="unbounded"/>
156 </xs:sequence>
157 </xs:complexType>
Mikhail Naganov648ec5b2020-09-24 18:00:44 +0000158 <xs:simpleType name="audioInOutFlag">
Mikhail Naganov159260c2020-07-23 18:08:26 +0000159 <xs:annotation>
160 <xs:documentation xml:lang="en">
Mikhail Naganov648ec5b2020-09-24 18:00:44 +0000161 The flags indicate suggested stream attributes supported by the profile.
Mikhail Naganov159260c2020-07-23 18:08:26 +0000162 </xs:documentation>
163 </xs:annotation>
164 <xs:restriction base="xs:string">
Mikhail Naganov648ec5b2020-09-24 18:00:44 +0000165 <xs:enumeration value="AUDIO_OUTPUT_FLAG_DIRECT" />
166 <xs:enumeration value="AUDIO_OUTPUT_FLAG_PRIMARY" />
167 <xs:enumeration value="AUDIO_OUTPUT_FLAG_FAST" />
168 <xs:enumeration value="AUDIO_OUTPUT_FLAG_DEEP_BUFFER" />
169 <xs:enumeration value="AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD" />
170 <xs:enumeration value="AUDIO_OUTPUT_FLAG_NON_BLOCKING" />
171 <xs:enumeration value="AUDIO_OUTPUT_FLAG_HW_AV_SYNC" />
172 <xs:enumeration value="AUDIO_OUTPUT_FLAG_TTS" />
173 <xs:enumeration value="AUDIO_OUTPUT_FLAG_RAW" />
174 <xs:enumeration value="AUDIO_OUTPUT_FLAG_SYNC" />
175 <xs:enumeration value="AUDIO_OUTPUT_FLAG_IEC958_NONAUDIO" />
176 <xs:enumeration value="AUDIO_OUTPUT_FLAG_DIRECT_PCM" />
177 <xs:enumeration value="AUDIO_OUTPUT_FLAG_MMAP_NOIRQ" />
178 <xs:enumeration value="AUDIO_OUTPUT_FLAG_VOIP_RX" />
179 <xs:enumeration value="AUDIO_OUTPUT_FLAG_INCALL_MUSIC" />
Eric Laurenta0ff4be2020-11-26 20:12:55 +0100180 <xs:enumeration value="AUDIO_OUTPUT_FLAG_GAPLESS_OFFLOAD" />
Mikhail Naganov648ec5b2020-09-24 18:00:44 +0000181 <xs:enumeration value="AUDIO_INPUT_FLAG_FAST" />
182 <xs:enumeration value="AUDIO_INPUT_FLAG_HW_HOTWORD" />
183 <xs:enumeration value="AUDIO_INPUT_FLAG_RAW" />
184 <xs:enumeration value="AUDIO_INPUT_FLAG_SYNC" />
185 <xs:enumeration value="AUDIO_INPUT_FLAG_MMAP_NOIRQ" />
186 <xs:enumeration value="AUDIO_INPUT_FLAG_VOIP_TX" />
187 <xs:enumeration value="AUDIO_INPUT_FLAG_HW_AV_SYNC" />
188 <xs:enumeration value="AUDIO_INPUT_FLAG_DIRECT" />
Mikhail Naganov159260c2020-07-23 18:08:26 +0000189 </xs:restriction>
190 </xs:simpleType>
Mikhail Naganov648ec5b2020-09-24 18:00:44 +0000191 <xs:simpleType name="audioInOutFlags">
192 <xs:list itemType="audioInOutFlag" />
193 </xs:simpleType>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000194 <xs:simpleType name="role">
195 <xs:restriction base="xs:string">
196 <xs:enumeration value="sink"/>
197 <xs:enumeration value="source"/>
198 </xs:restriction>
199 </xs:simpleType>
200 <xs:complexType name="mixPorts">
201 <xs:sequence>
202 <xs:element name="mixPort" minOccurs="0" maxOccurs="unbounded">
203 <xs:complexType>
204 <xs:sequence>
205 <xs:element name="profile" type="profile" minOccurs="0" maxOccurs="unbounded"/>
206 <xs:element name="gains" type="gains" minOccurs="0"/>
207 </xs:sequence>
208 <xs:attribute name="name" type="xs:token" use="required"/>
209 <xs:attribute name="role" type="role" use="required"/>
210 <xs:attribute name="flags" type="audioInOutFlags"/>
211 <xs:attribute name="maxOpenCount" type="xs:unsignedInt"/>
212 <xs:attribute name="maxActiveCount" type="xs:unsignedInt"/>
213 <xs:attribute name="preferredUsage" type="audioUsageList">
214 <xs:annotation>
215 <xs:documentation xml:lang="en">
216 When choosing the mixPort of an audio track, the audioPolicy
217 first considers the mixPorts with a preferredUsage including
218 the track AudioUsage preferred .
219 If non support the track format, the other mixPorts are considered.
220 Eg: a <mixPort preferredUsage="AUDIO_USAGE_MEDIA" /> will receive
221 the audio of all apps playing with a MEDIA usage.
222 It may receive audio from ALARM if there are no audio compatible
223 <mixPort preferredUsage="AUDIO_USAGE_ALARM" />.
224 </xs:documentation>
225 </xs:annotation>
226 </xs:attribute>
227 </xs:complexType>
228 <xs:unique name="mixPortProfileUniqueness">
229 <xs:selector xpath="profile"/>
230 <xs:field xpath="format"/>
231 <xs:field xpath="samplingRate"/>
232 <xs:field xpath="channelMasks"/>
233 </xs:unique>
234 <xs:unique name="mixPortGainUniqueness">
235 <xs:selector xpath="gains/gain"/>
236 <xs:field xpath="@name"/>
237 </xs:unique>
238 </xs:element>
239 </xs:sequence>
240 </xs:complexType>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000241 <xs:simpleType name="audioDevice">
242 <xs:restriction base="xs:string">
243 <xs:enumeration value="AUDIO_DEVICE_NONE"/>
244
245 <xs:enumeration value="AUDIO_DEVICE_OUT_EARPIECE"/>
246 <xs:enumeration value="AUDIO_DEVICE_OUT_SPEAKER"/>
247 <xs:enumeration value="AUDIO_DEVICE_OUT_WIRED_HEADSET"/>
248 <xs:enumeration value="AUDIO_DEVICE_OUT_WIRED_HEADPHONE"/>
249 <xs:enumeration value="AUDIO_DEVICE_OUT_BLUETOOTH_SCO"/>
250 <xs:enumeration value="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET"/>
251 <xs:enumeration value="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT"/>
252 <xs:enumeration value="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP"/>
253 <xs:enumeration value="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES"/>
254 <xs:enumeration value="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER"/>
Mikhail Naganovb0c4bd02020-10-20 01:29:53 +0000255 <xs:enumeration value="AUDIO_DEVICE_OUT_HDMI"/>
Andy Hung4da49452021-04-08 18:36:17 -0700256 <xs:enumeration value="AUDIO_DEVICE_OUT_HDMI_EARC"/>
Mikhail Naganovbbbec822020-09-30 20:27:12 +0000257 <xs:enumeration value="AUDIO_DEVICE_OUT_AUX_DIGITAL"/>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000258 <xs:enumeration value="AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET"/>
259 <xs:enumeration value="AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET"/>
260 <xs:enumeration value="AUDIO_DEVICE_OUT_USB_ACCESSORY"/>
261 <xs:enumeration value="AUDIO_DEVICE_OUT_USB_DEVICE"/>
262 <xs:enumeration value="AUDIO_DEVICE_OUT_REMOTE_SUBMIX"/>
263 <xs:enumeration value="AUDIO_DEVICE_OUT_TELEPHONY_TX"/>
264 <xs:enumeration value="AUDIO_DEVICE_OUT_LINE"/>
265 <xs:enumeration value="AUDIO_DEVICE_OUT_HDMI_ARC"/>
266 <xs:enumeration value="AUDIO_DEVICE_OUT_SPDIF"/>
267 <xs:enumeration value="AUDIO_DEVICE_OUT_FM"/>
268 <xs:enumeration value="AUDIO_DEVICE_OUT_AUX_LINE"/>
269 <xs:enumeration value="AUDIO_DEVICE_OUT_SPEAKER_SAFE"/>
270 <xs:enumeration value="AUDIO_DEVICE_OUT_IP"/>
271 <xs:enumeration value="AUDIO_DEVICE_OUT_BUS"/>
272 <xs:enumeration value="AUDIO_DEVICE_OUT_PROXY"/>
273 <xs:enumeration value="AUDIO_DEVICE_OUT_USB_HEADSET"/>
274 <xs:enumeration value="AUDIO_DEVICE_OUT_HEARING_AID"/>
275 <xs:enumeration value="AUDIO_DEVICE_OUT_ECHO_CANCELLER"/>
Mikhail Naganovbbbec822020-09-30 20:27:12 +0000276 <xs:enumeration value="AUDIO_DEVICE_OUT_BLE_HEADSET"/>
277 <xs:enumeration value="AUDIO_DEVICE_OUT_BLE_SPEAKER"/>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000278 <xs:enumeration value="AUDIO_DEVICE_OUT_DEFAULT"/>
279 <xs:enumeration value="AUDIO_DEVICE_OUT_STUB"/>
280
Mikhail Naganov159260c2020-07-23 18:08:26 +0000281 <xs:enumeration value="AUDIO_DEVICE_IN_COMMUNICATION"/>
282 <xs:enumeration value="AUDIO_DEVICE_IN_AMBIENT"/>
283 <xs:enumeration value="AUDIO_DEVICE_IN_BUILTIN_MIC"/>
284 <xs:enumeration value="AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET"/>
285 <xs:enumeration value="AUDIO_DEVICE_IN_WIRED_HEADSET"/>
Mikhail Naganovb0c4bd02020-10-20 01:29:53 +0000286 <xs:enumeration value="AUDIO_DEVICE_IN_HDMI"/>
Mikhail Naganovbbbec822020-09-30 20:27:12 +0000287 <xs:enumeration value="AUDIO_DEVICE_IN_AUX_DIGITAL"/>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000288 <xs:enumeration value="AUDIO_DEVICE_IN_VOICE_CALL"/>
289 <xs:enumeration value="AUDIO_DEVICE_IN_TELEPHONY_RX"/>
290 <xs:enumeration value="AUDIO_DEVICE_IN_BACK_MIC"/>
291 <xs:enumeration value="AUDIO_DEVICE_IN_REMOTE_SUBMIX"/>
292 <xs:enumeration value="AUDIO_DEVICE_IN_ANLG_DOCK_HEADSET"/>
293 <xs:enumeration value="AUDIO_DEVICE_IN_DGTL_DOCK_HEADSET"/>
294 <xs:enumeration value="AUDIO_DEVICE_IN_USB_ACCESSORY"/>
295 <xs:enumeration value="AUDIO_DEVICE_IN_USB_DEVICE"/>
296 <xs:enumeration value="AUDIO_DEVICE_IN_FM_TUNER"/>
297 <xs:enumeration value="AUDIO_DEVICE_IN_TV_TUNER"/>
298 <xs:enumeration value="AUDIO_DEVICE_IN_LINE"/>
299 <xs:enumeration value="AUDIO_DEVICE_IN_SPDIF"/>
300 <xs:enumeration value="AUDIO_DEVICE_IN_BLUETOOTH_A2DP"/>
301 <xs:enumeration value="AUDIO_DEVICE_IN_LOOPBACK"/>
302 <xs:enumeration value="AUDIO_DEVICE_IN_IP"/>
303 <xs:enumeration value="AUDIO_DEVICE_IN_BUS"/>
304 <xs:enumeration value="AUDIO_DEVICE_IN_PROXY"/>
305 <xs:enumeration value="AUDIO_DEVICE_IN_USB_HEADSET"/>
306 <xs:enumeration value="AUDIO_DEVICE_IN_BLUETOOTH_BLE"/>
307 <xs:enumeration value="AUDIO_DEVICE_IN_HDMI_ARC"/>
Andy Hung4da49452021-04-08 18:36:17 -0700308 <xs:enumeration value="AUDIO_DEVICE_IN_HDMI_EARC"/>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000309 <xs:enumeration value="AUDIO_DEVICE_IN_ECHO_REFERENCE"/>
Mikhail Naganovbbbec822020-09-30 20:27:12 +0000310 <xs:enumeration value="AUDIO_DEVICE_IN_BLE_HEADSET"/>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000311 <xs:enumeration value="AUDIO_DEVICE_IN_DEFAULT"/>
312 <xs:enumeration value="AUDIO_DEVICE_IN_STUB"/>
313 </xs:restriction>
314 </xs:simpleType>
315 <xs:simpleType name="vendorExtension">
Mikhail Naganov178317b2021-02-19 14:08:52 -0800316 <!-- Vendor extension names must be prefixed by "VX_" to distinguish them from
317 AOSP values. Vendors must namespace their names to avoid conflicts. The
318 namespace part must only use capital latin characters and decimal digits and
319 consist of at least 3 characters. The part of the extension name after the
320 namespace may in addition include underscores. Example for a hypothetical
321 Google virtual reality device:
322
323 <devicePort tagName="VR" type="VX_GOOGLE_VR" role="sink" />
Mikhail Naganov159260c2020-07-23 18:08:26 +0000324 -->
325 <xs:restriction base="xs:string">
Mikhail Naganov178317b2021-02-19 14:08:52 -0800326 <xs:pattern value="VX_[A-Z0-9]{3,}_[_A-Z0-9]+"/>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000327 </xs:restriction>
328 </xs:simpleType>
329 <xs:simpleType name="extendableAudioDevice">
330 <xs:union memberTypes="audioDevice vendorExtension"/>
331 </xs:simpleType>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000332 <xs:simpleType name="audioFormat">
333 <xs:restriction base="xs:string">
Mikhail Naganovff611982021-01-27 02:16:53 +0000334 <xs:enumeration value="AUDIO_FORMAT_DEFAULT" />
Mikhail Naganov159260c2020-07-23 18:08:26 +0000335 <xs:enumeration value="AUDIO_FORMAT_PCM_16_BIT" />
336 <xs:enumeration value="AUDIO_FORMAT_PCM_8_BIT"/>
337 <xs:enumeration value="AUDIO_FORMAT_PCM_32_BIT"/>
338 <xs:enumeration value="AUDIO_FORMAT_PCM_8_24_BIT"/>
339 <xs:enumeration value="AUDIO_FORMAT_PCM_FLOAT"/>
340 <xs:enumeration value="AUDIO_FORMAT_PCM_24_BIT_PACKED"/>
341 <xs:enumeration value="AUDIO_FORMAT_MP3"/>
342 <xs:enumeration value="AUDIO_FORMAT_AMR_NB"/>
343 <xs:enumeration value="AUDIO_FORMAT_AMR_WB"/>
344 <xs:enumeration value="AUDIO_FORMAT_AAC"/>
345 <xs:enumeration value="AUDIO_FORMAT_AAC_MAIN"/>
346 <xs:enumeration value="AUDIO_FORMAT_AAC_LC"/>
347 <xs:enumeration value="AUDIO_FORMAT_AAC_SSR"/>
348 <xs:enumeration value="AUDIO_FORMAT_AAC_LTP"/>
349 <xs:enumeration value="AUDIO_FORMAT_AAC_HE_V1"/>
350 <xs:enumeration value="AUDIO_FORMAT_AAC_SCALABLE"/>
351 <xs:enumeration value="AUDIO_FORMAT_AAC_ERLC"/>
352 <xs:enumeration value="AUDIO_FORMAT_AAC_LD"/>
353 <xs:enumeration value="AUDIO_FORMAT_AAC_HE_V2"/>
354 <xs:enumeration value="AUDIO_FORMAT_AAC_ELD"/>
Mikhail Naganovbbbec822020-09-30 20:27:12 +0000355 <xs:enumeration value="AUDIO_FORMAT_AAC_XHE"/>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000356 <xs:enumeration value="AUDIO_FORMAT_HE_AAC_V1"/>
357 <xs:enumeration value="AUDIO_FORMAT_HE_AAC_V2"/>
Mikhail Naganovbbbec822020-09-30 20:27:12 +0000358 <xs:enumeration value="AUDIO_FORMAT_VORBIS"/>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000359 <xs:enumeration value="AUDIO_FORMAT_OPUS"/>
360 <xs:enumeration value="AUDIO_FORMAT_AC3"/>
361 <xs:enumeration value="AUDIO_FORMAT_E_AC3"/>
Mikhail Naganovbbbec822020-09-30 20:27:12 +0000362 <xs:enumeration value="AUDIO_FORMAT_E_AC3_JOC"/>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000363 <xs:enumeration value="AUDIO_FORMAT_DTS"/>
364 <xs:enumeration value="AUDIO_FORMAT_DTS_HD"/>
365 <xs:enumeration value="AUDIO_FORMAT_IEC61937"/>
366 <xs:enumeration value="AUDIO_FORMAT_DOLBY_TRUEHD"/>
367 <xs:enumeration value="AUDIO_FORMAT_EVRC"/>
368 <xs:enumeration value="AUDIO_FORMAT_EVRCB"/>
369 <xs:enumeration value="AUDIO_FORMAT_EVRCWB"/>
370 <xs:enumeration value="AUDIO_FORMAT_EVRCNW"/>
371 <xs:enumeration value="AUDIO_FORMAT_AAC_ADIF"/>
372 <xs:enumeration value="AUDIO_FORMAT_WMA"/>
373 <xs:enumeration value="AUDIO_FORMAT_WMA_PRO"/>
374 <xs:enumeration value="AUDIO_FORMAT_AMR_WB_PLUS"/>
375 <xs:enumeration value="AUDIO_FORMAT_MP2"/>
376 <xs:enumeration value="AUDIO_FORMAT_QCELP"/>
377 <xs:enumeration value="AUDIO_FORMAT_DSD"/>
378 <xs:enumeration value="AUDIO_FORMAT_FLAC"/>
379 <xs:enumeration value="AUDIO_FORMAT_ALAC"/>
380 <xs:enumeration value="AUDIO_FORMAT_APE"/>
381 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS"/>
Mikhail Naganovbbbec822020-09-30 20:27:12 +0000382 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS_MAIN"/>
383 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS_LC"/>
384 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS_SSR"/>
385 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS_LTP"/>
386 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS_HE_V1"/>
387 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS_SCALABLE"/>
388 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS_ERLC"/>
389 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS_LD"/>
390 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS_HE_V2"/>
391 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS_ELD"/>
392 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS_XHE"/>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000393 <xs:enumeration value="AUDIO_FORMAT_SBC"/>
394 <xs:enumeration value="AUDIO_FORMAT_APTX"/>
395 <xs:enumeration value="AUDIO_FORMAT_APTX_HD"/>
396 <xs:enumeration value="AUDIO_FORMAT_AC4"/>
397 <xs:enumeration value="AUDIO_FORMAT_LDAC"/>
Mikhail Naganovbbbec822020-09-30 20:27:12 +0000398 <xs:enumeration value="AUDIO_FORMAT_MAT"/>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000399 <xs:enumeration value="AUDIO_FORMAT_MAT_1_0"/>
400 <xs:enumeration value="AUDIO_FORMAT_MAT_2_0"/>
401 <xs:enumeration value="AUDIO_FORMAT_MAT_2_1"/>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000402 <xs:enumeration value="AUDIO_FORMAT_AAC_LATM"/>
403 <xs:enumeration value="AUDIO_FORMAT_AAC_LATM_LC"/>
404 <xs:enumeration value="AUDIO_FORMAT_AAC_LATM_HE_V1"/>
405 <xs:enumeration value="AUDIO_FORMAT_AAC_LATM_HE_V2"/>
406 <xs:enumeration value="AUDIO_FORMAT_CELT"/>
407 <xs:enumeration value="AUDIO_FORMAT_APTX_ADAPTIVE"/>
408 <xs:enumeration value="AUDIO_FORMAT_LHDC"/>
409 <xs:enumeration value="AUDIO_FORMAT_LHDC_LL"/>
410 <xs:enumeration value="AUDIO_FORMAT_APTX_TWSP"/>
Mikhail Naganovbbbec822020-09-30 20:27:12 +0000411 <xs:enumeration value="AUDIO_FORMAT_LC3"/>
jiabin226b1192021-01-27 19:16:26 +0000412 <xs:enumeration value="AUDIO_FORMAT_MPEGH_BL_L3"/>
413 <xs:enumeration value="AUDIO_FORMAT_MPEGH_BL_L4"/>
414 <xs:enumeration value="AUDIO_FORMAT_MPEGH_LC_L3"/>
415 <xs:enumeration value="AUDIO_FORMAT_MPEGH_LC_L4"/>
Dean Wheatley4a645c32020-11-26 15:24:53 +1100416 <xs:enumeration value="AUDIO_FORMAT_IEC60958"/>
Andy Hunga468cac2021-04-06 10:16:48 -0700417 <xs:enumeration value="AUDIO_FORMAT_DTS_UHD"/>
Andy Hung9072e5f2021-04-20 19:22:22 -0700418 <xs:enumeration value="AUDIO_FORMAT_DRA"/>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000419 </xs:restriction>
420 </xs:simpleType>
421 <xs:simpleType name="extendableAudioFormat">
422 <xs:union memberTypes="audioFormat vendorExtension"/>
423 </xs:simpleType>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000424 <xs:simpleType name="audioUsage">
Mikhail Naganov7dd87f42020-08-04 23:37:05 +0000425 <xs:annotation>
426 <xs:documentation xml:lang="en">
427 Audio usage specifies the intended use case for the sound being played.
428 Please consult frameworks/base/media/java/android/media/AudioAttributes.java
429 for the description of each value.
430 </xs:documentation>
431 </xs:annotation>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000432 <xs:restriction base="xs:string">
433 <xs:enumeration value="AUDIO_USAGE_UNKNOWN" />
434 <xs:enumeration value="AUDIO_USAGE_MEDIA" />
435 <xs:enumeration value="AUDIO_USAGE_VOICE_COMMUNICATION" />
436 <xs:enumeration value="AUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING" />
437 <xs:enumeration value="AUDIO_USAGE_ALARM" />
438 <xs:enumeration value="AUDIO_USAGE_NOTIFICATION" />
439 <xs:enumeration value="AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE" />
440 <xs:enumeration value="AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY" />
441 <xs:enumeration value="AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE" />
442 <xs:enumeration value="AUDIO_USAGE_ASSISTANCE_SONIFICATION" />
443 <xs:enumeration value="AUDIO_USAGE_GAME" />
444 <xs:enumeration value="AUDIO_USAGE_VIRTUAL_SOURCE" />
445 <xs:enumeration value="AUDIO_USAGE_ASSISTANT" />
Mikhail Naganov7dd87f42020-08-04 23:37:05 +0000446 <xs:enumeration value="AUDIO_USAGE_CALL_ASSISTANT" />
447 <xs:enumeration value="AUDIO_USAGE_EMERGENCY" />
448 <xs:enumeration value="AUDIO_USAGE_SAFETY" />
449 <xs:enumeration value="AUDIO_USAGE_VEHICLE_STATUS" />
450 <xs:enumeration value="AUDIO_USAGE_ANNOUNCEMENT" />
Mikhail Naganov159260c2020-07-23 18:08:26 +0000451 </xs:restriction>
452 </xs:simpleType>
453 <xs:simpleType name="audioUsageList">
454 <xs:list itemType="audioUsage"/>
455 </xs:simpleType>
Mikhail Naganov7dd87f42020-08-04 23:37:05 +0000456 <xs:simpleType name="audioContentType">
Mikhail Naganov159260c2020-07-23 18:08:26 +0000457 <xs:annotation>
458 <xs:documentation xml:lang="en">
Mikhail Naganov7dd87f42020-08-04 23:37:05 +0000459 Audio content type expresses the general category of the content.
460 Please consult frameworks/base/media/java/android/media/AudioAttributes.java
461 for the description of each value.
Mikhail Naganov159260c2020-07-23 18:08:26 +0000462 </xs:documentation>
463 </xs:annotation>
464 <xs:restriction base="xs:string">
Mikhail Naganov7dd87f42020-08-04 23:37:05 +0000465 <xs:enumeration value="AUDIO_CONTENT_TYPE_UNKNOWN"/>
466 <xs:enumeration value="AUDIO_CONTENT_TYPE_SPEECH"/>
467 <xs:enumeration value="AUDIO_CONTENT_TYPE_MUSIC"/>
468 <xs:enumeration value="AUDIO_CONTENT_TYPE_MOVIE"/>
469 <xs:enumeration value="AUDIO_CONTENT_TYPE_SONIFICATION"/>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000470 </xs:restriction>
471 </xs:simpleType>
Mikhail Naganov7dd87f42020-08-04 23:37:05 +0000472 <xs:simpleType name="samplingRates">
473 <xs:list itemType="xs:nonNegativeInteger" />
474 </xs:simpleType>
475 <xs:simpleType name="audioChannelMask">
476 <xs:annotation>
477 <xs:documentation xml:lang="en">
478 Audio channel mask specifies presence of particular channels.
479 There are two representations:
480 - representation position (traditional discrete channel specification,
481 e.g. "left", "right");
482 - indexed (this is similar to "tracks" in audio mixing, channels
483 are represented using numbers).
484 </xs:documentation>
485 </xs:annotation>
486 <xs:restriction base="xs:string">
Mikhail Naganovbbbec822020-09-30 20:27:12 +0000487 <xs:enumeration value="AUDIO_CHANNEL_NONE"/>
Mikhail Naganov7dd87f42020-08-04 23:37:05 +0000488 <xs:enumeration value="AUDIO_CHANNEL_OUT_MONO"/>
489 <xs:enumeration value="AUDIO_CHANNEL_OUT_STEREO"/>
490 <xs:enumeration value="AUDIO_CHANNEL_OUT_2POINT1"/>
Mikhail Naganovbbbec822020-09-30 20:27:12 +0000491 <xs:enumeration value="AUDIO_CHANNEL_OUT_TRI"/>
492 <xs:enumeration value="AUDIO_CHANNEL_OUT_TRI_BACK"/>
493 <xs:enumeration value="AUDIO_CHANNEL_OUT_3POINT1"/>
Mikhail Naganov7dd87f42020-08-04 23:37:05 +0000494 <xs:enumeration value="AUDIO_CHANNEL_OUT_2POINT0POINT2"/>
495 <xs:enumeration value="AUDIO_CHANNEL_OUT_2POINT1POINT2"/>
496 <xs:enumeration value="AUDIO_CHANNEL_OUT_3POINT0POINT2"/>
497 <xs:enumeration value="AUDIO_CHANNEL_OUT_3POINT1POINT2"/>
498 <xs:enumeration value="AUDIO_CHANNEL_OUT_QUAD"/>
499 <xs:enumeration value="AUDIO_CHANNEL_OUT_QUAD_BACK"/>
500 <xs:enumeration value="AUDIO_CHANNEL_OUT_QUAD_SIDE"/>
501 <xs:enumeration value="AUDIO_CHANNEL_OUT_SURROUND"/>
502 <xs:enumeration value="AUDIO_CHANNEL_OUT_PENTA"/>
503 <xs:enumeration value="AUDIO_CHANNEL_OUT_5POINT1"/>
504 <xs:enumeration value="AUDIO_CHANNEL_OUT_5POINT1_BACK"/>
505 <xs:enumeration value="AUDIO_CHANNEL_OUT_5POINT1_SIDE"/>
506 <xs:enumeration value="AUDIO_CHANNEL_OUT_5POINT1POINT2"/>
507 <xs:enumeration value="AUDIO_CHANNEL_OUT_5POINT1POINT4"/>
508 <xs:enumeration value="AUDIO_CHANNEL_OUT_6POINT1"/>
509 <xs:enumeration value="AUDIO_CHANNEL_OUT_7POINT1"/>
510 <xs:enumeration value="AUDIO_CHANNEL_OUT_7POINT1POINT2"/>
511 <xs:enumeration value="AUDIO_CHANNEL_OUT_7POINT1POINT4"/>
Kei Murayama91ef1832021-04-13 20:48:02 +0900512 <xs:enumeration value="AUDIO_CHANNEL_OUT_13POINT_360RA"/>
Andy Hung3cc68432021-04-15 17:37:22 -0700513 <xs:enumeration value="AUDIO_CHANNEL_OUT_22POINT2"/>
Mikhail Naganov7dd87f42020-08-04 23:37:05 +0000514 <xs:enumeration value="AUDIO_CHANNEL_OUT_MONO_HAPTIC_A"/>
515 <xs:enumeration value="AUDIO_CHANNEL_OUT_STEREO_HAPTIC_A"/>
516 <xs:enumeration value="AUDIO_CHANNEL_OUT_HAPTIC_AB"/>
517 <xs:enumeration value="AUDIO_CHANNEL_OUT_MONO_HAPTIC_AB"/>
518 <xs:enumeration value="AUDIO_CHANNEL_OUT_STEREO_HAPTIC_AB"/>
519 <xs:enumeration value="AUDIO_CHANNEL_IN_MONO"/>
520 <xs:enumeration value="AUDIO_CHANNEL_IN_STEREO"/>
521 <xs:enumeration value="AUDIO_CHANNEL_IN_FRONT_BACK"/>
522 <xs:enumeration value="AUDIO_CHANNEL_IN_6"/>
523 <xs:enumeration value="AUDIO_CHANNEL_IN_2POINT0POINT2"/>
524 <xs:enumeration value="AUDIO_CHANNEL_IN_2POINT1POINT2"/>
525 <xs:enumeration value="AUDIO_CHANNEL_IN_3POINT0POINT2"/>
526 <xs:enumeration value="AUDIO_CHANNEL_IN_3POINT1POINT2"/>
527 <xs:enumeration value="AUDIO_CHANNEL_IN_5POINT1"/>
528 <xs:enumeration value="AUDIO_CHANNEL_IN_VOICE_UPLINK_MONO"/>
529 <xs:enumeration value="AUDIO_CHANNEL_IN_VOICE_DNLINK_MONO"/>
530 <xs:enumeration value="AUDIO_CHANNEL_IN_VOICE_CALL_MONO"/>
531 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_1"/>
532 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_2"/>
533 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_3"/>
534 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_4"/>
535 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_5"/>
536 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_6"/>
537 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_7"/>
538 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_8"/>
539 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_9"/>
540 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_10"/>
541 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_11"/>
542 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_12"/>
543 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_13"/>
544 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_14"/>
545 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_15"/>
546 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_16"/>
547 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_17"/>
548 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_18"/>
549 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_19"/>
550 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_20"/>
551 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_21"/>
552 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_22"/>
553 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_23"/>
554 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_24"/>
555 </xs:restriction>
556 </xs:simpleType>
557 <xs:simpleType name="channelMasks">
558 <xs:list itemType="audioChannelMask" />
559 </xs:simpleType>
jiabin574a86f2021-03-05 06:42:05 +0000560 <xs:simpleType name="audioEncapsulationType">
561 <xs:restriction base="xs:string">
562 <xs:enumeration value="AUDIO_ENCAPSULATION_TYPE_NONE"/>
563 <xs:enumeration value="AUDIO_ENCAPSULATION_TYPE_IEC61937"/>
564 </xs:restriction>
565 </xs:simpleType>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000566 <xs:complexType name="profile">
567 <xs:attribute name="name" type="xs:token" use="optional"/>
568 <xs:attribute name="format" type="extendableAudioFormat" use="optional"/>
569 <xs:attribute name="samplingRates" type="samplingRates" use="optional"/>
Mikhail Naganov7dd87f42020-08-04 23:37:05 +0000570 <xs:attribute name="channelMasks" type="channelMasks" use="optional"/>
jiabin574a86f2021-03-05 06:42:05 +0000571 <xs:attribute name="encapsulationType" type="audioEncapsulationType" use="optional"/>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000572 </xs:complexType>
Mikhail Naganovbbbec822020-09-30 20:27:12 +0000573 <xs:simpleType name="audioGainMode">
Mikhail Naganov159260c2020-07-23 18:08:26 +0000574 <xs:restriction base="xs:string">
575 <xs:enumeration value="AUDIO_GAIN_MODE_JOINT"/>
576 <xs:enumeration value="AUDIO_GAIN_MODE_CHANNELS"/>
577 <xs:enumeration value="AUDIO_GAIN_MODE_RAMP"/>
578 </xs:restriction>
579 </xs:simpleType>
Mikhail Naganovbbbec822020-09-30 20:27:12 +0000580 <xs:simpleType name="audioGainModeMaskUnrestricted">
581 <xs:list itemType="audioGainMode" />
582 </xs:simpleType>
583 <xs:simpleType name='audioGainModeMask'>
584 <xs:restriction base='audioGainModeMaskUnrestricted'>
585 <xs:minLength value='1' />
586 </xs:restriction>
587 </xs:simpleType>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000588 <xs:complexType name="gains">
589 <xs:sequence>
590 <xs:element name="gain" minOccurs="0" maxOccurs="unbounded">
591 <xs:complexType>
592 <xs:attribute name="name" type="xs:token" use="required"/>
Mikhail Naganovbbbec822020-09-30 20:27:12 +0000593 <xs:attribute name="mode" type="audioGainModeMask" use="required"/>
Mikhail Naganov7dd87f42020-08-04 23:37:05 +0000594 <xs:attribute name="channel_mask" type="audioChannelMask" use="optional"/>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000595 <xs:attribute name="minValueMB" type="xs:int" use="optional"/>
596 <xs:attribute name="maxValueMB" type="xs:int" use="optional"/>
597 <xs:attribute name="defaultValueMB" type="xs:int" use="optional"/>
598 <xs:attribute name="stepValueMB" type="xs:int" use="optional"/>
599 <xs:attribute name="minRampMs" type="xs:int" use="optional"/>
600 <xs:attribute name="maxRampMs" type="xs:int" use="optional"/>
601 <xs:attribute name="useForVolume" type="xs:boolean" use="optional"/>
602 </xs:complexType>
603 </xs:element>
604 </xs:sequence>
605 </xs:complexType>
606 <xs:complexType name="devicePorts">
607 <xs:sequence>
608 <xs:element name="devicePort" minOccurs="0" maxOccurs="unbounded">
609 <xs:complexType>
610 <xs:sequence>
611 <xs:element name="profile" type="profile" minOccurs="0" maxOccurs="unbounded"/>
612 <xs:element name="gains" type="gains" minOccurs="0"/>
613 </xs:sequence>
614 <xs:attribute name="tagName" type="xs:token" use="required"/>
615 <xs:attribute name="type" type="extendableAudioDevice" use="required"/>
616 <xs:attribute name="role" type="role" use="required"/>
617 <xs:attribute name="address" type="xs:string" use="optional" default=""/>
618 <!-- Note that XSD 1.0 can not check that a type only has one default. -->
619 <xs:attribute name="default" type="xs:boolean" use="optional">
620 <xs:annotation>
621 <xs:documentation xml:lang="en">
622 The default device will be used if multiple have the same type
623 and no explicit route request exists for a specific device of
624 that type.
625 </xs:documentation>
626 </xs:annotation>
627 </xs:attribute>
628 <xs:attribute name="encodedFormats" type="audioFormatsList" use="optional"
629 default="" />
630 </xs:complexType>
631 <xs:unique name="devicePortProfileUniqueness">
632 <xs:selector xpath="profile"/>
633 <xs:field xpath="format"/>
634 <xs:field xpath="samplingRate"/>
635 <xs:field xpath="channelMasks"/>
636 </xs:unique>
637 <xs:unique name="devicePortGainUniqueness">
638 <xs:selector xpath="gains/gain"/>
639 <xs:field xpath="@name"/>
640 </xs:unique>
641 </xs:element>
642 </xs:sequence>
643 </xs:complexType>
644 <xs:simpleType name="mixType">
645 <xs:restriction base="xs:string">
646 <xs:enumeration value="mix"/>
647 <xs:enumeration value="mux"/>
648 </xs:restriction>
649 </xs:simpleType>
650 <xs:complexType name="routes">
651 <xs:sequence>
652 <xs:element name="route" minOccurs="0" maxOccurs="unbounded">
653 <xs:annotation>
654 <xs:documentation xml:lang="en">
655 List all available sources for a given sink.
656 </xs:documentation>
657 </xs:annotation>
658 <xs:complexType>
659 <xs:attribute name="type" type="mixType" use="required"/>
660 <xs:attribute name="sink" type="xs:string" use="required"/>
661 <xs:attribute name="sources" type="xs:string" use="required"/>
662 </xs:complexType>
663 </xs:element>
664 </xs:sequence>
665 </xs:complexType>
666 <xs:complexType name="volumes">
667 <xs:sequence>
668 <xs:element name="volume" type="volume" minOccurs="0" maxOccurs="unbounded"/>
669 <xs:element name="reference" type="reference" minOccurs="0" maxOccurs="unbounded">
670 </xs:element>
671 </xs:sequence>
672 </xs:complexType>
673 <!-- TODO: Always require a ref for better xsd validations.
674 Currently a volume could have no points nor ref
675 as it can not be forbidden by xsd 1.0.-->
676 <xs:simpleType name="volumePoint">
677 <xs:annotation>
678 <xs:documentation xml:lang="en">
679 Comma separated pair of number.
680 The fist one is the framework level (between 0 and 100).
681 The second one is the volume to send to the HAL.
682 The framework will interpolate volumes not specified.
683 Their MUST be at least 2 points specified.
684 </xs:documentation>
685 </xs:annotation>
686 <xs:restriction base="xs:string">
687 <xs:pattern value="([0-9]{1,2}|100),-?[0-9]+"/>
688 </xs:restriction>
689 </xs:simpleType>
Mikhail Naganov7dd87f42020-08-04 23:37:05 +0000690 <xs:simpleType name="audioStreamType">
691 <xs:annotation>
692 <xs:documentation xml:lang="en">
693 Audio stream type describing the intended use case of a stream.
694 Please consult frameworks/base/media/java/android/media/AudioSystem.java
695 for the description of each value.
696 </xs:documentation>
697 </xs:annotation>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000698 <xs:restriction base="xs:string">
699 <xs:enumeration value="AUDIO_STREAM_VOICE_CALL"/>
700 <xs:enumeration value="AUDIO_STREAM_SYSTEM"/>
701 <xs:enumeration value="AUDIO_STREAM_RING"/>
702 <xs:enumeration value="AUDIO_STREAM_MUSIC"/>
703 <xs:enumeration value="AUDIO_STREAM_ALARM"/>
704 <xs:enumeration value="AUDIO_STREAM_NOTIFICATION"/>
705 <xs:enumeration value="AUDIO_STREAM_BLUETOOTH_SCO"/>
706 <xs:enumeration value="AUDIO_STREAM_ENFORCED_AUDIBLE"/>
707 <xs:enumeration value="AUDIO_STREAM_DTMF"/>
708 <xs:enumeration value="AUDIO_STREAM_TTS"/>
709 <xs:enumeration value="AUDIO_STREAM_ACCESSIBILITY"/>
710 <xs:enumeration value="AUDIO_STREAM_ASSISTANT"/>
Mikhail Naganovb0c4bd02020-10-20 01:29:53 +0000711 <xs:enumeration value="AUDIO_STREAM_REROUTING"/>
712 <xs:enumeration value="AUDIO_STREAM_PATCH"/>
Mikhail Naganovbbbec822020-09-30 20:27:12 +0000713 <xs:enumeration value="AUDIO_STREAM_CALL_ASSISTANT"/>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000714 </xs:restriction>
715 </xs:simpleType>
Mikhail Naganov7dd87f42020-08-04 23:37:05 +0000716 <xs:simpleType name="audioSource">
717 <xs:annotation>
718 <xs:documentation xml:lang="en">
719 An audio source defines the intended use case for the sound being recorded.
720 Please consult frameworks/base/media/java/android/media/MediaRecorder.java
721 for the description of each value.
722 </xs:documentation>
723 </xs:annotation>
724 <xs:restriction base="xs:string">
725 <xs:enumeration value="AUDIO_SOURCE_DEFAULT"/>
726 <xs:enumeration value="AUDIO_SOURCE_MIC"/>
727 <xs:enumeration value="AUDIO_SOURCE_VOICE_UPLINK"/>
728 <xs:enumeration value="AUDIO_SOURCE_VOICE_DOWNLINK"/>
729 <xs:enumeration value="AUDIO_SOURCE_VOICE_CALL"/>
730 <xs:enumeration value="AUDIO_SOURCE_CAMCORDER"/>
731 <xs:enumeration value="AUDIO_SOURCE_VOICE_RECOGNITION"/>
732 <xs:enumeration value="AUDIO_SOURCE_VOICE_COMMUNICATION"/>
733 <xs:enumeration value="AUDIO_SOURCE_REMOTE_SUBMIX"/>
734 <xs:enumeration value="AUDIO_SOURCE_UNPROCESSED"/>
735 <xs:enumeration value="AUDIO_SOURCE_VOICE_PERFORMANCE"/>
736 <xs:enumeration value="AUDIO_SOURCE_ECHO_REFERENCE"/>
737 <xs:enumeration value="AUDIO_SOURCE_FM_TUNER"/>
738 <xs:enumeration value="AUDIO_SOURCE_HOTWORD"/>
739 </xs:restriction>
740 </xs:simpleType>
741 <!-- Enum values of device_category from Volume.h. -->
Mikhail Naganov159260c2020-07-23 18:08:26 +0000742 <xs:simpleType name="deviceCategory">
743 <xs:restriction base="xs:string">
744 <xs:enumeration value="DEVICE_CATEGORY_HEADSET"/>
745 <xs:enumeration value="DEVICE_CATEGORY_SPEAKER"/>
746 <xs:enumeration value="DEVICE_CATEGORY_EARPIECE"/>
747 <xs:enumeration value="DEVICE_CATEGORY_EXT_MEDIA"/>
748 <xs:enumeration value="DEVICE_CATEGORY_HEARING_AID"/>
749 </xs:restriction>
750 </xs:simpleType>
751 <xs:complexType name="volume">
752 <xs:annotation>
753 <xs:documentation xml:lang="en">
754 Volume section defines a volume curve for a given use case and device category.
755 It contains a list of points of this curve expressing the attenuation in Millibels
756 for a given volume index from 0 to 100.
757 <volume stream="AUDIO_STREAM_MUSIC" deviceCategory="DEVICE_CATEGORY_SPEAKER">
758 <point>0,-9600</point>
759 <point>100,0</point>
760 </volume>
761
762 It may also reference a reference/@name to avoid duplicating curves.
763 <volume stream="AUDIO_STREAM_MUSIC" deviceCategory="DEVICE_CATEGORY_SPEAKER"
764 ref="DEFAULT_MEDIA_VOLUME_CURVE"/>
765 <reference name="DEFAULT_MEDIA_VOLUME_CURVE">
766 <point>0,-9600</point>
767 <point>100,0</point>
768 </reference>
769 </xs:documentation>
770 </xs:annotation>
771 <xs:sequence>
772 <xs:element name="point" type="volumePoint" minOccurs="0" maxOccurs="unbounded"/>
773 </xs:sequence>
Mikhail Naganov7dd87f42020-08-04 23:37:05 +0000774 <xs:attribute name="stream" type="audioStreamType"/>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000775 <xs:attribute name="deviceCategory" type="deviceCategory"/>
776 <xs:attribute name="ref" type="xs:token" use="optional"/>
777 </xs:complexType>
778 <xs:complexType name="reference">
779 <xs:sequence>
780 <xs:element name="point" type="volumePoint" minOccurs="2" maxOccurs="unbounded"/>
781 </xs:sequence>
782 <xs:attribute name="name" type="xs:token" use="required"/>
783 </xs:complexType>
784 <xs:complexType name="surroundSound">
785 <xs:annotation>
786 <xs:documentation xml:lang="en">
787 Surround Sound section provides configuration related to handling of
788 multi-channel formats.
789 </xs:documentation>
790 </xs:annotation>
791 <xs:sequence>
792 <xs:element name="formats" type="surroundFormats"/>
793 </xs:sequence>
794 </xs:complexType>
795 <xs:simpleType name="audioFormatsList">
Mikhail Naganov5b8a1442020-10-29 13:08:05 -0700796 <xs:list itemType="extendableAudioFormat" />
Mikhail Naganov159260c2020-07-23 18:08:26 +0000797 </xs:simpleType>
798 <xs:complexType name="surroundFormats">
799 <xs:sequence>
800 <xs:element name="format" minOccurs="0" maxOccurs="unbounded">
801 <xs:complexType>
Mikhail Naganov5b8a1442020-10-29 13:08:05 -0700802 <xs:attribute name="name" type="extendableAudioFormat" use="required"/>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000803 <xs:attribute name="subformats" type="audioFormatsList" />
804 </xs:complexType>
805 </xs:element>
806 </xs:sequence>
807 </xs:complexType>
808 <xs:simpleType name="engineSuffix">
809 <xs:restriction base="xs:string">
810 <xs:enumeration value="default"/>
811 <xs:enumeration value="configurable"/>
812 </xs:restriction>
813 </xs:simpleType>
814</xs:schema>