blob: 685e84a1af8def9d84e06f8445a92d1a12bb001c [file] [log] [blame]
Mikhail Naganov60ced762020-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 Naganov60ced762020-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">
23 <xs:enumeration value="1.0"/>
24 </xs:restriction>
25 </xs:simpleType>
26 <xs:simpleType name="halVersion">
27 <xs:annotation>
28 <xs:documentation xml:lang="en">
Mikhail Naganovfda20422020-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 Naganov60ced762020-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 Naganov355dd062020-09-24 18:00:44 +0000158 <xs:simpleType name="audioInOutFlag">
Mikhail Naganov60ced762020-07-23 18:08:26 +0000159 <xs:annotation>
160 <xs:documentation xml:lang="en">
Mikhail Naganov355dd062020-09-24 18:00:44 +0000161 The flags indicate suggested stream attributes supported by the profile.
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000162 Use of AUDIO_{INPUT|OUTPUT}_FLAG_NONE in the XML file isn't required
163 as empty flag lists are allowed. However these constants are useful for
164 representing an empty enum value.
Mikhail Naganov60ced762020-07-23 18:08:26 +0000165 </xs:documentation>
166 </xs:annotation>
167 <xs:restriction base="xs:string">
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000168 <xs:enumeration value="AUDIO_OUTPUT_FLAG_NONE" />
Mikhail Naganov355dd062020-09-24 18:00:44 +0000169 <xs:enumeration value="AUDIO_OUTPUT_FLAG_DIRECT" />
170 <xs:enumeration value="AUDIO_OUTPUT_FLAG_PRIMARY" />
171 <xs:enumeration value="AUDIO_OUTPUT_FLAG_FAST" />
172 <xs:enumeration value="AUDIO_OUTPUT_FLAG_DEEP_BUFFER" />
173 <xs:enumeration value="AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD" />
174 <xs:enumeration value="AUDIO_OUTPUT_FLAG_NON_BLOCKING" />
175 <xs:enumeration value="AUDIO_OUTPUT_FLAG_HW_AV_SYNC" />
176 <xs:enumeration value="AUDIO_OUTPUT_FLAG_TTS" />
177 <xs:enumeration value="AUDIO_OUTPUT_FLAG_RAW" />
178 <xs:enumeration value="AUDIO_OUTPUT_FLAG_SYNC" />
179 <xs:enumeration value="AUDIO_OUTPUT_FLAG_IEC958_NONAUDIO" />
180 <xs:enumeration value="AUDIO_OUTPUT_FLAG_DIRECT_PCM" />
181 <xs:enumeration value="AUDIO_OUTPUT_FLAG_MMAP_NOIRQ" />
182 <xs:enumeration value="AUDIO_OUTPUT_FLAG_VOIP_RX" />
183 <xs:enumeration value="AUDIO_OUTPUT_FLAG_INCALL_MUSIC" />
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000184 <xs:enumeration value="AUDIO_INPUT_FLAG_NONE" />
Mikhail Naganov355dd062020-09-24 18:00:44 +0000185 <xs:enumeration value="AUDIO_INPUT_FLAG_FAST" />
186 <xs:enumeration value="AUDIO_INPUT_FLAG_HW_HOTWORD" />
187 <xs:enumeration value="AUDIO_INPUT_FLAG_RAW" />
188 <xs:enumeration value="AUDIO_INPUT_FLAG_SYNC" />
189 <xs:enumeration value="AUDIO_INPUT_FLAG_MMAP_NOIRQ" />
190 <xs:enumeration value="AUDIO_INPUT_FLAG_VOIP_TX" />
191 <xs:enumeration value="AUDIO_INPUT_FLAG_HW_AV_SYNC" />
192 <xs:enumeration value="AUDIO_INPUT_FLAG_DIRECT" />
Mikhail Naganov60ced762020-07-23 18:08:26 +0000193 </xs:restriction>
194 </xs:simpleType>
Mikhail Naganov355dd062020-09-24 18:00:44 +0000195 <xs:simpleType name="audioInOutFlags">
196 <xs:list itemType="audioInOutFlag" />
197 </xs:simpleType>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000198 <xs:simpleType name="role">
199 <xs:restriction base="xs:string">
200 <xs:enumeration value="sink"/>
201 <xs:enumeration value="source"/>
202 </xs:restriction>
203 </xs:simpleType>
204 <xs:complexType name="mixPorts">
205 <xs:sequence>
206 <xs:element name="mixPort" minOccurs="0" maxOccurs="unbounded">
207 <xs:complexType>
208 <xs:sequence>
209 <xs:element name="profile" type="profile" minOccurs="0" maxOccurs="unbounded"/>
210 <xs:element name="gains" type="gains" minOccurs="0"/>
211 </xs:sequence>
212 <xs:attribute name="name" type="xs:token" use="required"/>
213 <xs:attribute name="role" type="role" use="required"/>
214 <xs:attribute name="flags" type="audioInOutFlags"/>
215 <xs:attribute name="maxOpenCount" type="xs:unsignedInt"/>
216 <xs:attribute name="maxActiveCount" type="xs:unsignedInt"/>
217 <xs:attribute name="preferredUsage" type="audioUsageList">
218 <xs:annotation>
219 <xs:documentation xml:lang="en">
220 When choosing the mixPort of an audio track, the audioPolicy
221 first considers the mixPorts with a preferredUsage including
222 the track AudioUsage preferred .
223 If non support the track format, the other mixPorts are considered.
224 Eg: a <mixPort preferredUsage="AUDIO_USAGE_MEDIA" /> will receive
225 the audio of all apps playing with a MEDIA usage.
226 It may receive audio from ALARM if there are no audio compatible
227 <mixPort preferredUsage="AUDIO_USAGE_ALARM" />.
228 </xs:documentation>
229 </xs:annotation>
230 </xs:attribute>
231 </xs:complexType>
232 <xs:unique name="mixPortProfileUniqueness">
233 <xs:selector xpath="profile"/>
234 <xs:field xpath="format"/>
235 <xs:field xpath="samplingRate"/>
236 <xs:field xpath="channelMasks"/>
237 </xs:unique>
238 <xs:unique name="mixPortGainUniqueness">
239 <xs:selector xpath="gains/gain"/>
240 <xs:field xpath="@name"/>
241 </xs:unique>
242 </xs:element>
243 </xs:sequence>
244 </xs:complexType>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000245 <xs:simpleType name="audioDevice">
246 <xs:restriction base="xs:string">
247 <xs:enumeration value="AUDIO_DEVICE_NONE"/>
248
249 <xs:enumeration value="AUDIO_DEVICE_OUT_EARPIECE"/>
250 <xs:enumeration value="AUDIO_DEVICE_OUT_SPEAKER"/>
251 <xs:enumeration value="AUDIO_DEVICE_OUT_WIRED_HEADSET"/>
252 <xs:enumeration value="AUDIO_DEVICE_OUT_WIRED_HEADPHONE"/>
253 <xs:enumeration value="AUDIO_DEVICE_OUT_BLUETOOTH_SCO"/>
254 <xs:enumeration value="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET"/>
255 <xs:enumeration value="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT"/>
256 <xs:enumeration value="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP"/>
257 <xs:enumeration value="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES"/>
258 <xs:enumeration value="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000259 <xs:enumeration value="AUDIO_DEVICE_OUT_HDMI"/>
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000260 <xs:enumeration value="AUDIO_DEVICE_OUT_AUX_DIGITAL"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000261 <xs:enumeration value="AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET"/>
262 <xs:enumeration value="AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET"/>
263 <xs:enumeration value="AUDIO_DEVICE_OUT_USB_ACCESSORY"/>
264 <xs:enumeration value="AUDIO_DEVICE_OUT_USB_DEVICE"/>
265 <xs:enumeration value="AUDIO_DEVICE_OUT_REMOTE_SUBMIX"/>
266 <xs:enumeration value="AUDIO_DEVICE_OUT_TELEPHONY_TX"/>
267 <xs:enumeration value="AUDIO_DEVICE_OUT_LINE"/>
268 <xs:enumeration value="AUDIO_DEVICE_OUT_HDMI_ARC"/>
269 <xs:enumeration value="AUDIO_DEVICE_OUT_SPDIF"/>
270 <xs:enumeration value="AUDIO_DEVICE_OUT_FM"/>
271 <xs:enumeration value="AUDIO_DEVICE_OUT_AUX_LINE"/>
272 <xs:enumeration value="AUDIO_DEVICE_OUT_SPEAKER_SAFE"/>
273 <xs:enumeration value="AUDIO_DEVICE_OUT_IP"/>
274 <xs:enumeration value="AUDIO_DEVICE_OUT_BUS"/>
275 <xs:enumeration value="AUDIO_DEVICE_OUT_PROXY"/>
276 <xs:enumeration value="AUDIO_DEVICE_OUT_USB_HEADSET"/>
277 <xs:enumeration value="AUDIO_DEVICE_OUT_HEARING_AID"/>
278 <xs:enumeration value="AUDIO_DEVICE_OUT_ECHO_CANCELLER"/>
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000279 <xs:enumeration value="AUDIO_DEVICE_OUT_BLE_HEADSET"/>
280 <xs:enumeration value="AUDIO_DEVICE_OUT_BLE_SPEAKER"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000281 <xs:enumeration value="AUDIO_DEVICE_OUT_DEFAULT"/>
282 <xs:enumeration value="AUDIO_DEVICE_OUT_STUB"/>
283
Mikhail Naganov60ced762020-07-23 18:08:26 +0000284 <xs:enumeration value="AUDIO_DEVICE_IN_COMMUNICATION"/>
285 <xs:enumeration value="AUDIO_DEVICE_IN_AMBIENT"/>
286 <xs:enumeration value="AUDIO_DEVICE_IN_BUILTIN_MIC"/>
287 <xs:enumeration value="AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET"/>
288 <xs:enumeration value="AUDIO_DEVICE_IN_WIRED_HEADSET"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000289 <xs:enumeration value="AUDIO_DEVICE_IN_HDMI"/>
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000290 <xs:enumeration value="AUDIO_DEVICE_IN_AUX_DIGITAL"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000291 <xs:enumeration value="AUDIO_DEVICE_IN_VOICE_CALL"/>
292 <xs:enumeration value="AUDIO_DEVICE_IN_TELEPHONY_RX"/>
293 <xs:enumeration value="AUDIO_DEVICE_IN_BACK_MIC"/>
294 <xs:enumeration value="AUDIO_DEVICE_IN_REMOTE_SUBMIX"/>
295 <xs:enumeration value="AUDIO_DEVICE_IN_ANLG_DOCK_HEADSET"/>
296 <xs:enumeration value="AUDIO_DEVICE_IN_DGTL_DOCK_HEADSET"/>
297 <xs:enumeration value="AUDIO_DEVICE_IN_USB_ACCESSORY"/>
298 <xs:enumeration value="AUDIO_DEVICE_IN_USB_DEVICE"/>
299 <xs:enumeration value="AUDIO_DEVICE_IN_FM_TUNER"/>
300 <xs:enumeration value="AUDIO_DEVICE_IN_TV_TUNER"/>
301 <xs:enumeration value="AUDIO_DEVICE_IN_LINE"/>
302 <xs:enumeration value="AUDIO_DEVICE_IN_SPDIF"/>
303 <xs:enumeration value="AUDIO_DEVICE_IN_BLUETOOTH_A2DP"/>
304 <xs:enumeration value="AUDIO_DEVICE_IN_LOOPBACK"/>
305 <xs:enumeration value="AUDIO_DEVICE_IN_IP"/>
306 <xs:enumeration value="AUDIO_DEVICE_IN_BUS"/>
307 <xs:enumeration value="AUDIO_DEVICE_IN_PROXY"/>
308 <xs:enumeration value="AUDIO_DEVICE_IN_USB_HEADSET"/>
309 <xs:enumeration value="AUDIO_DEVICE_IN_BLUETOOTH_BLE"/>
310 <xs:enumeration value="AUDIO_DEVICE_IN_HDMI_ARC"/>
311 <xs:enumeration value="AUDIO_DEVICE_IN_ECHO_REFERENCE"/>
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000312 <xs:enumeration value="AUDIO_DEVICE_IN_BLE_HEADSET"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000313 <xs:enumeration value="AUDIO_DEVICE_IN_DEFAULT"/>
314 <xs:enumeration value="AUDIO_DEVICE_IN_STUB"/>
315 </xs:restriction>
316 </xs:simpleType>
317 <xs:simpleType name="vendorExtension">
318 <!-- Vendor extension names must be prefixed by "VX_" to distinguish them from AOSP values.
319 Vendor are encouraged to namespace their module names to avoid conflicts.
320 Example for an hypothetical Google virtual reality device:
321 <devicePort tagName="VR" type="VX_GOOGLE_VR" role="sink">
322 -->
323 <xs:restriction base="xs:string">
324 <xs:pattern value="VX_[_a-zA-Z0-9]+"/>
325 </xs:restriction>
326 </xs:simpleType>
327 <xs:simpleType name="extendableAudioDevice">
328 <xs:union memberTypes="audioDevice vendorExtension"/>
329 </xs:simpleType>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000330 <xs:simpleType name="audioFormat">
331 <xs:restriction base="xs:string">
Mikhail Naganovff611982021-01-27 02:16:53 +0000332 <xs:enumeration value="AUDIO_FORMAT_DEFAULT" />
Mikhail Naganov60ced762020-07-23 18:08:26 +0000333 <xs:enumeration value="AUDIO_FORMAT_PCM_16_BIT" />
334 <xs:enumeration value="AUDIO_FORMAT_PCM_8_BIT"/>
335 <xs:enumeration value="AUDIO_FORMAT_PCM_32_BIT"/>
336 <xs:enumeration value="AUDIO_FORMAT_PCM_8_24_BIT"/>
337 <xs:enumeration value="AUDIO_FORMAT_PCM_FLOAT"/>
338 <xs:enumeration value="AUDIO_FORMAT_PCM_24_BIT_PACKED"/>
339 <xs:enumeration value="AUDIO_FORMAT_MP3"/>
340 <xs:enumeration value="AUDIO_FORMAT_AMR_NB"/>
341 <xs:enumeration value="AUDIO_FORMAT_AMR_WB"/>
342 <xs:enumeration value="AUDIO_FORMAT_AAC"/>
343 <xs:enumeration value="AUDIO_FORMAT_AAC_MAIN"/>
344 <xs:enumeration value="AUDIO_FORMAT_AAC_LC"/>
345 <xs:enumeration value="AUDIO_FORMAT_AAC_SSR"/>
346 <xs:enumeration value="AUDIO_FORMAT_AAC_LTP"/>
347 <xs:enumeration value="AUDIO_FORMAT_AAC_HE_V1"/>
348 <xs:enumeration value="AUDIO_FORMAT_AAC_SCALABLE"/>
349 <xs:enumeration value="AUDIO_FORMAT_AAC_ERLC"/>
350 <xs:enumeration value="AUDIO_FORMAT_AAC_LD"/>
351 <xs:enumeration value="AUDIO_FORMAT_AAC_HE_V2"/>
352 <xs:enumeration value="AUDIO_FORMAT_AAC_ELD"/>
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000353 <xs:enumeration value="AUDIO_FORMAT_AAC_XHE"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000354 <xs:enumeration value="AUDIO_FORMAT_HE_AAC_V1"/>
355 <xs:enumeration value="AUDIO_FORMAT_HE_AAC_V2"/>
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000356 <xs:enumeration value="AUDIO_FORMAT_VORBIS"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000357 <xs:enumeration value="AUDIO_FORMAT_OPUS"/>
358 <xs:enumeration value="AUDIO_FORMAT_AC3"/>
359 <xs:enumeration value="AUDIO_FORMAT_E_AC3"/>
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000360 <xs:enumeration value="AUDIO_FORMAT_E_AC3_JOC"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000361 <xs:enumeration value="AUDIO_FORMAT_DTS"/>
362 <xs:enumeration value="AUDIO_FORMAT_DTS_HD"/>
363 <xs:enumeration value="AUDIO_FORMAT_IEC61937"/>
364 <xs:enumeration value="AUDIO_FORMAT_DOLBY_TRUEHD"/>
365 <xs:enumeration value="AUDIO_FORMAT_EVRC"/>
366 <xs:enumeration value="AUDIO_FORMAT_EVRCB"/>
367 <xs:enumeration value="AUDIO_FORMAT_EVRCWB"/>
368 <xs:enumeration value="AUDIO_FORMAT_EVRCNW"/>
369 <xs:enumeration value="AUDIO_FORMAT_AAC_ADIF"/>
370 <xs:enumeration value="AUDIO_FORMAT_WMA"/>
371 <xs:enumeration value="AUDIO_FORMAT_WMA_PRO"/>
372 <xs:enumeration value="AUDIO_FORMAT_AMR_WB_PLUS"/>
373 <xs:enumeration value="AUDIO_FORMAT_MP2"/>
374 <xs:enumeration value="AUDIO_FORMAT_QCELP"/>
375 <xs:enumeration value="AUDIO_FORMAT_DSD"/>
376 <xs:enumeration value="AUDIO_FORMAT_FLAC"/>
377 <xs:enumeration value="AUDIO_FORMAT_ALAC"/>
378 <xs:enumeration value="AUDIO_FORMAT_APE"/>
379 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS"/>
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000380 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS_MAIN"/>
381 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS_LC"/>
382 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS_SSR"/>
383 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS_LTP"/>
384 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS_HE_V1"/>
385 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS_SCALABLE"/>
386 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS_ERLC"/>
387 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS_LD"/>
388 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS_HE_V2"/>
389 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS_ELD"/>
390 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS_XHE"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000391 <xs:enumeration value="AUDIO_FORMAT_SBC"/>
392 <xs:enumeration value="AUDIO_FORMAT_APTX"/>
393 <xs:enumeration value="AUDIO_FORMAT_APTX_HD"/>
394 <xs:enumeration value="AUDIO_FORMAT_AC4"/>
395 <xs:enumeration value="AUDIO_FORMAT_LDAC"/>
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000396 <xs:enumeration value="AUDIO_FORMAT_MAT"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000397 <xs:enumeration value="AUDIO_FORMAT_MAT_1_0"/>
398 <xs:enumeration value="AUDIO_FORMAT_MAT_2_0"/>
399 <xs:enumeration value="AUDIO_FORMAT_MAT_2_1"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000400 <xs:enumeration value="AUDIO_FORMAT_AAC_LATM"/>
401 <xs:enumeration value="AUDIO_FORMAT_AAC_LATM_LC"/>
402 <xs:enumeration value="AUDIO_FORMAT_AAC_LATM_HE_V1"/>
403 <xs:enumeration value="AUDIO_FORMAT_AAC_LATM_HE_V2"/>
404 <xs:enumeration value="AUDIO_FORMAT_CELT"/>
405 <xs:enumeration value="AUDIO_FORMAT_APTX_ADAPTIVE"/>
406 <xs:enumeration value="AUDIO_FORMAT_LHDC"/>
407 <xs:enumeration value="AUDIO_FORMAT_LHDC_LL"/>
408 <xs:enumeration value="AUDIO_FORMAT_APTX_TWSP"/>
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000409 <xs:enumeration value="AUDIO_FORMAT_LC3"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000410 </xs:restriction>
411 </xs:simpleType>
412 <xs:simpleType name="extendableAudioFormat">
413 <xs:union memberTypes="audioFormat vendorExtension"/>
414 </xs:simpleType>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000415 <xs:simpleType name="audioUsage">
Mikhail Naganovfda20422020-08-04 23:37:05 +0000416 <xs:annotation>
417 <xs:documentation xml:lang="en">
418 Audio usage specifies the intended use case for the sound being played.
419 Please consult frameworks/base/media/java/android/media/AudioAttributes.java
420 for the description of each value.
421 </xs:documentation>
422 </xs:annotation>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000423 <xs:restriction base="xs:string">
424 <xs:enumeration value="AUDIO_USAGE_UNKNOWN" />
425 <xs:enumeration value="AUDIO_USAGE_MEDIA" />
426 <xs:enumeration value="AUDIO_USAGE_VOICE_COMMUNICATION" />
427 <xs:enumeration value="AUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING" />
428 <xs:enumeration value="AUDIO_USAGE_ALARM" />
429 <xs:enumeration value="AUDIO_USAGE_NOTIFICATION" />
430 <xs:enumeration value="AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE" />
431 <xs:enumeration value="AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY" />
432 <xs:enumeration value="AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE" />
433 <xs:enumeration value="AUDIO_USAGE_ASSISTANCE_SONIFICATION" />
434 <xs:enumeration value="AUDIO_USAGE_GAME" />
435 <xs:enumeration value="AUDIO_USAGE_VIRTUAL_SOURCE" />
436 <xs:enumeration value="AUDIO_USAGE_ASSISTANT" />
Mikhail Naganovfda20422020-08-04 23:37:05 +0000437 <xs:enumeration value="AUDIO_USAGE_CALL_ASSISTANT" />
438 <xs:enumeration value="AUDIO_USAGE_EMERGENCY" />
439 <xs:enumeration value="AUDIO_USAGE_SAFETY" />
440 <xs:enumeration value="AUDIO_USAGE_VEHICLE_STATUS" />
441 <xs:enumeration value="AUDIO_USAGE_ANNOUNCEMENT" />
Mikhail Naganov60ced762020-07-23 18:08:26 +0000442 </xs:restriction>
443 </xs:simpleType>
444 <xs:simpleType name="audioUsageList">
445 <xs:list itemType="audioUsage"/>
446 </xs:simpleType>
Mikhail Naganovfda20422020-08-04 23:37:05 +0000447 <xs:simpleType name="audioContentType">
Mikhail Naganov60ced762020-07-23 18:08:26 +0000448 <xs:annotation>
449 <xs:documentation xml:lang="en">
Mikhail Naganovfda20422020-08-04 23:37:05 +0000450 Audio content type expresses the general category of the content.
451 Please consult frameworks/base/media/java/android/media/AudioAttributes.java
452 for the description of each value.
Mikhail Naganov60ced762020-07-23 18:08:26 +0000453 </xs:documentation>
454 </xs:annotation>
455 <xs:restriction base="xs:string">
Mikhail Naganovfda20422020-08-04 23:37:05 +0000456 <xs:enumeration value="AUDIO_CONTENT_TYPE_UNKNOWN"/>
457 <xs:enumeration value="AUDIO_CONTENT_TYPE_SPEECH"/>
458 <xs:enumeration value="AUDIO_CONTENT_TYPE_MUSIC"/>
459 <xs:enumeration value="AUDIO_CONTENT_TYPE_MOVIE"/>
460 <xs:enumeration value="AUDIO_CONTENT_TYPE_SONIFICATION"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000461 </xs:restriction>
462 </xs:simpleType>
Mikhail Naganovfda20422020-08-04 23:37:05 +0000463 <xs:simpleType name="samplingRates">
464 <xs:list itemType="xs:nonNegativeInteger" />
465 </xs:simpleType>
466 <xs:simpleType name="audioChannelMask">
467 <xs:annotation>
468 <xs:documentation xml:lang="en">
469 Audio channel mask specifies presence of particular channels.
470 There are two representations:
471 - representation position (traditional discrete channel specification,
472 e.g. "left", "right");
473 - indexed (this is similar to "tracks" in audio mixing, channels
474 are represented using numbers).
475 </xs:documentation>
476 </xs:annotation>
477 <xs:restriction base="xs:string">
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000478 <xs:enumeration value="AUDIO_CHANNEL_NONE"/>
Mikhail Naganovfda20422020-08-04 23:37:05 +0000479 <xs:enumeration value="AUDIO_CHANNEL_OUT_MONO"/>
480 <xs:enumeration value="AUDIO_CHANNEL_OUT_STEREO"/>
481 <xs:enumeration value="AUDIO_CHANNEL_OUT_2POINT1"/>
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000482 <xs:enumeration value="AUDIO_CHANNEL_OUT_TRI"/>
483 <xs:enumeration value="AUDIO_CHANNEL_OUT_TRI_BACK"/>
484 <xs:enumeration value="AUDIO_CHANNEL_OUT_3POINT1"/>
Mikhail Naganovfda20422020-08-04 23:37:05 +0000485 <xs:enumeration value="AUDIO_CHANNEL_OUT_2POINT0POINT2"/>
486 <xs:enumeration value="AUDIO_CHANNEL_OUT_2POINT1POINT2"/>
487 <xs:enumeration value="AUDIO_CHANNEL_OUT_3POINT0POINT2"/>
488 <xs:enumeration value="AUDIO_CHANNEL_OUT_3POINT1POINT2"/>
489 <xs:enumeration value="AUDIO_CHANNEL_OUT_QUAD"/>
490 <xs:enumeration value="AUDIO_CHANNEL_OUT_QUAD_BACK"/>
491 <xs:enumeration value="AUDIO_CHANNEL_OUT_QUAD_SIDE"/>
492 <xs:enumeration value="AUDIO_CHANNEL_OUT_SURROUND"/>
493 <xs:enumeration value="AUDIO_CHANNEL_OUT_PENTA"/>
494 <xs:enumeration value="AUDIO_CHANNEL_OUT_5POINT1"/>
495 <xs:enumeration value="AUDIO_CHANNEL_OUT_5POINT1_BACK"/>
496 <xs:enumeration value="AUDIO_CHANNEL_OUT_5POINT1_SIDE"/>
497 <xs:enumeration value="AUDIO_CHANNEL_OUT_5POINT1POINT2"/>
498 <xs:enumeration value="AUDIO_CHANNEL_OUT_5POINT1POINT4"/>
499 <xs:enumeration value="AUDIO_CHANNEL_OUT_6POINT1"/>
500 <xs:enumeration value="AUDIO_CHANNEL_OUT_7POINT1"/>
501 <xs:enumeration value="AUDIO_CHANNEL_OUT_7POINT1POINT2"/>
502 <xs:enumeration value="AUDIO_CHANNEL_OUT_7POINT1POINT4"/>
503 <xs:enumeration value="AUDIO_CHANNEL_OUT_MONO_HAPTIC_A"/>
504 <xs:enumeration value="AUDIO_CHANNEL_OUT_STEREO_HAPTIC_A"/>
505 <xs:enumeration value="AUDIO_CHANNEL_OUT_HAPTIC_AB"/>
506 <xs:enumeration value="AUDIO_CHANNEL_OUT_MONO_HAPTIC_AB"/>
507 <xs:enumeration value="AUDIO_CHANNEL_OUT_STEREO_HAPTIC_AB"/>
508 <xs:enumeration value="AUDIO_CHANNEL_IN_MONO"/>
509 <xs:enumeration value="AUDIO_CHANNEL_IN_STEREO"/>
510 <xs:enumeration value="AUDIO_CHANNEL_IN_FRONT_BACK"/>
511 <xs:enumeration value="AUDIO_CHANNEL_IN_6"/>
512 <xs:enumeration value="AUDIO_CHANNEL_IN_2POINT0POINT2"/>
513 <xs:enumeration value="AUDIO_CHANNEL_IN_2POINT1POINT2"/>
514 <xs:enumeration value="AUDIO_CHANNEL_IN_3POINT0POINT2"/>
515 <xs:enumeration value="AUDIO_CHANNEL_IN_3POINT1POINT2"/>
516 <xs:enumeration value="AUDIO_CHANNEL_IN_5POINT1"/>
517 <xs:enumeration value="AUDIO_CHANNEL_IN_VOICE_UPLINK_MONO"/>
518 <xs:enumeration value="AUDIO_CHANNEL_IN_VOICE_DNLINK_MONO"/>
519 <xs:enumeration value="AUDIO_CHANNEL_IN_VOICE_CALL_MONO"/>
520 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_1"/>
521 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_2"/>
522 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_3"/>
523 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_4"/>
524 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_5"/>
525 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_6"/>
526 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_7"/>
527 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_8"/>
528 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_9"/>
529 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_10"/>
530 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_11"/>
531 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_12"/>
532 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_13"/>
533 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_14"/>
534 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_15"/>
535 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_16"/>
536 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_17"/>
537 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_18"/>
538 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_19"/>
539 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_20"/>
540 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_21"/>
541 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_22"/>
542 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_23"/>
543 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_24"/>
544 </xs:restriction>
545 </xs:simpleType>
546 <xs:simpleType name="channelMasks">
547 <xs:list itemType="audioChannelMask" />
548 </xs:simpleType>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000549 <xs:complexType name="profile">
550 <xs:attribute name="name" type="xs:token" use="optional"/>
551 <xs:attribute name="format" type="extendableAudioFormat" use="optional"/>
552 <xs:attribute name="samplingRates" type="samplingRates" use="optional"/>
Mikhail Naganovfda20422020-08-04 23:37:05 +0000553 <xs:attribute name="channelMasks" type="channelMasks" use="optional"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000554 </xs:complexType>
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000555 <xs:simpleType name="audioGainMode">
Mikhail Naganov60ced762020-07-23 18:08:26 +0000556 <xs:restriction base="xs:string">
557 <xs:enumeration value="AUDIO_GAIN_MODE_JOINT"/>
558 <xs:enumeration value="AUDIO_GAIN_MODE_CHANNELS"/>
559 <xs:enumeration value="AUDIO_GAIN_MODE_RAMP"/>
560 </xs:restriction>
561 </xs:simpleType>
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000562 <xs:simpleType name="audioGainModeMaskUnrestricted">
563 <xs:list itemType="audioGainMode" />
564 </xs:simpleType>
565 <xs:simpleType name='audioGainModeMask'>
566 <xs:restriction base='audioGainModeMaskUnrestricted'>
567 <xs:minLength value='1' />
568 </xs:restriction>
569 </xs:simpleType>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000570 <xs:complexType name="gains">
571 <xs:sequence>
572 <xs:element name="gain" minOccurs="0" maxOccurs="unbounded">
573 <xs:complexType>
574 <xs:attribute name="name" type="xs:token" use="required"/>
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000575 <xs:attribute name="mode" type="audioGainModeMask" use="required"/>
Mikhail Naganovfda20422020-08-04 23:37:05 +0000576 <xs:attribute name="channel_mask" type="audioChannelMask" use="optional"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000577 <xs:attribute name="minValueMB" type="xs:int" use="optional"/>
578 <xs:attribute name="maxValueMB" type="xs:int" use="optional"/>
579 <xs:attribute name="defaultValueMB" type="xs:int" use="optional"/>
580 <xs:attribute name="stepValueMB" type="xs:int" use="optional"/>
581 <xs:attribute name="minRampMs" type="xs:int" use="optional"/>
582 <xs:attribute name="maxRampMs" type="xs:int" use="optional"/>
583 <xs:attribute name="useForVolume" type="xs:boolean" use="optional"/>
584 </xs:complexType>
585 </xs:element>
586 </xs:sequence>
587 </xs:complexType>
588 <xs:complexType name="devicePorts">
589 <xs:sequence>
590 <xs:element name="devicePort" minOccurs="0" maxOccurs="unbounded">
591 <xs:complexType>
592 <xs:sequence>
593 <xs:element name="profile" type="profile" minOccurs="0" maxOccurs="unbounded"/>
594 <xs:element name="gains" type="gains" minOccurs="0"/>
595 </xs:sequence>
596 <xs:attribute name="tagName" type="xs:token" use="required"/>
597 <xs:attribute name="type" type="extendableAudioDevice" use="required"/>
598 <xs:attribute name="role" type="role" use="required"/>
599 <xs:attribute name="address" type="xs:string" use="optional" default=""/>
600 <!-- Note that XSD 1.0 can not check that a type only has one default. -->
601 <xs:attribute name="default" type="xs:boolean" use="optional">
602 <xs:annotation>
603 <xs:documentation xml:lang="en">
604 The default device will be used if multiple have the same type
605 and no explicit route request exists for a specific device of
606 that type.
607 </xs:documentation>
608 </xs:annotation>
609 </xs:attribute>
610 <xs:attribute name="encodedFormats" type="audioFormatsList" use="optional"
611 default="" />
612 </xs:complexType>
613 <xs:unique name="devicePortProfileUniqueness">
614 <xs:selector xpath="profile"/>
615 <xs:field xpath="format"/>
616 <xs:field xpath="samplingRate"/>
617 <xs:field xpath="channelMasks"/>
618 </xs:unique>
619 <xs:unique name="devicePortGainUniqueness">
620 <xs:selector xpath="gains/gain"/>
621 <xs:field xpath="@name"/>
622 </xs:unique>
623 </xs:element>
624 </xs:sequence>
625 </xs:complexType>
626 <xs:simpleType name="mixType">
627 <xs:restriction base="xs:string">
628 <xs:enumeration value="mix"/>
629 <xs:enumeration value="mux"/>
630 </xs:restriction>
631 </xs:simpleType>
632 <xs:complexType name="routes">
633 <xs:sequence>
634 <xs:element name="route" minOccurs="0" maxOccurs="unbounded">
635 <xs:annotation>
636 <xs:documentation xml:lang="en">
637 List all available sources for a given sink.
638 </xs:documentation>
639 </xs:annotation>
640 <xs:complexType>
641 <xs:attribute name="type" type="mixType" use="required"/>
642 <xs:attribute name="sink" type="xs:string" use="required"/>
643 <xs:attribute name="sources" type="xs:string" use="required"/>
644 </xs:complexType>
645 </xs:element>
646 </xs:sequence>
647 </xs:complexType>
648 <xs:complexType name="volumes">
649 <xs:sequence>
650 <xs:element name="volume" type="volume" minOccurs="0" maxOccurs="unbounded"/>
651 <xs:element name="reference" type="reference" minOccurs="0" maxOccurs="unbounded">
652 </xs:element>
653 </xs:sequence>
654 </xs:complexType>
655 <!-- TODO: Always require a ref for better xsd validations.
656 Currently a volume could have no points nor ref
657 as it can not be forbidden by xsd 1.0.-->
658 <xs:simpleType name="volumePoint">
659 <xs:annotation>
660 <xs:documentation xml:lang="en">
661 Comma separated pair of number.
662 The fist one is the framework level (between 0 and 100).
663 The second one is the volume to send to the HAL.
664 The framework will interpolate volumes not specified.
665 Their MUST be at least 2 points specified.
666 </xs:documentation>
667 </xs:annotation>
668 <xs:restriction base="xs:string">
669 <xs:pattern value="([0-9]{1,2}|100),-?[0-9]+"/>
670 </xs:restriction>
671 </xs:simpleType>
Mikhail Naganovfda20422020-08-04 23:37:05 +0000672 <xs:simpleType name="audioStreamType">
673 <xs:annotation>
674 <xs:documentation xml:lang="en">
675 Audio stream type describing the intended use case of a stream.
676 Please consult frameworks/base/media/java/android/media/AudioSystem.java
677 for the description of each value.
678 </xs:documentation>
679 </xs:annotation>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000680 <xs:restriction base="xs:string">
681 <xs:enumeration value="AUDIO_STREAM_VOICE_CALL"/>
682 <xs:enumeration value="AUDIO_STREAM_SYSTEM"/>
683 <xs:enumeration value="AUDIO_STREAM_RING"/>
684 <xs:enumeration value="AUDIO_STREAM_MUSIC"/>
685 <xs:enumeration value="AUDIO_STREAM_ALARM"/>
686 <xs:enumeration value="AUDIO_STREAM_NOTIFICATION"/>
687 <xs:enumeration value="AUDIO_STREAM_BLUETOOTH_SCO"/>
688 <xs:enumeration value="AUDIO_STREAM_ENFORCED_AUDIBLE"/>
689 <xs:enumeration value="AUDIO_STREAM_DTMF"/>
690 <xs:enumeration value="AUDIO_STREAM_TTS"/>
691 <xs:enumeration value="AUDIO_STREAM_ACCESSIBILITY"/>
692 <xs:enumeration value="AUDIO_STREAM_ASSISTANT"/>
693 <xs:enumeration value="AUDIO_STREAM_REROUTING"/>
694 <xs:enumeration value="AUDIO_STREAM_PATCH"/>
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000695 <xs:enumeration value="AUDIO_STREAM_CALL_ASSISTANT"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000696 </xs:restriction>
697 </xs:simpleType>
Mikhail Naganovfda20422020-08-04 23:37:05 +0000698 <xs:simpleType name="audioSource">
699 <xs:annotation>
700 <xs:documentation xml:lang="en">
701 An audio source defines the intended use case for the sound being recorded.
702 Please consult frameworks/base/media/java/android/media/MediaRecorder.java
703 for the description of each value.
704 </xs:documentation>
705 </xs:annotation>
706 <xs:restriction base="xs:string">
707 <xs:enumeration value="AUDIO_SOURCE_DEFAULT"/>
708 <xs:enumeration value="AUDIO_SOURCE_MIC"/>
709 <xs:enumeration value="AUDIO_SOURCE_VOICE_UPLINK"/>
710 <xs:enumeration value="AUDIO_SOURCE_VOICE_DOWNLINK"/>
711 <xs:enumeration value="AUDIO_SOURCE_VOICE_CALL"/>
712 <xs:enumeration value="AUDIO_SOURCE_CAMCORDER"/>
713 <xs:enumeration value="AUDIO_SOURCE_VOICE_RECOGNITION"/>
714 <xs:enumeration value="AUDIO_SOURCE_VOICE_COMMUNICATION"/>
715 <xs:enumeration value="AUDIO_SOURCE_REMOTE_SUBMIX"/>
716 <xs:enumeration value="AUDIO_SOURCE_UNPROCESSED"/>
717 <xs:enumeration value="AUDIO_SOURCE_VOICE_PERFORMANCE"/>
718 <xs:enumeration value="AUDIO_SOURCE_ECHO_REFERENCE"/>
719 <xs:enumeration value="AUDIO_SOURCE_FM_TUNER"/>
720 <xs:enumeration value="AUDIO_SOURCE_HOTWORD"/>
721 </xs:restriction>
722 </xs:simpleType>
723 <!-- Enum values of device_category from Volume.h. -->
Mikhail Naganov60ced762020-07-23 18:08:26 +0000724 <xs:simpleType name="deviceCategory">
725 <xs:restriction base="xs:string">
726 <xs:enumeration value="DEVICE_CATEGORY_HEADSET"/>
727 <xs:enumeration value="DEVICE_CATEGORY_SPEAKER"/>
728 <xs:enumeration value="DEVICE_CATEGORY_EARPIECE"/>
729 <xs:enumeration value="DEVICE_CATEGORY_EXT_MEDIA"/>
730 <xs:enumeration value="DEVICE_CATEGORY_HEARING_AID"/>
731 </xs:restriction>
732 </xs:simpleType>
733 <xs:complexType name="volume">
734 <xs:annotation>
735 <xs:documentation xml:lang="en">
736 Volume section defines a volume curve for a given use case and device category.
737 It contains a list of points of this curve expressing the attenuation in Millibels
738 for a given volume index from 0 to 100.
739 <volume stream="AUDIO_STREAM_MUSIC" deviceCategory="DEVICE_CATEGORY_SPEAKER">
740 <point>0,-9600</point>
741 <point>100,0</point>
742 </volume>
743
744 It may also reference a reference/@name to avoid duplicating curves.
745 <volume stream="AUDIO_STREAM_MUSIC" deviceCategory="DEVICE_CATEGORY_SPEAKER"
746 ref="DEFAULT_MEDIA_VOLUME_CURVE"/>
747 <reference name="DEFAULT_MEDIA_VOLUME_CURVE">
748 <point>0,-9600</point>
749 <point>100,0</point>
750 </reference>
751 </xs:documentation>
752 </xs:annotation>
753 <xs:sequence>
754 <xs:element name="point" type="volumePoint" minOccurs="0" maxOccurs="unbounded"/>
755 </xs:sequence>
Mikhail Naganovfda20422020-08-04 23:37:05 +0000756 <xs:attribute name="stream" type="audioStreamType"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000757 <xs:attribute name="deviceCategory" type="deviceCategory"/>
758 <xs:attribute name="ref" type="xs:token" use="optional"/>
759 </xs:complexType>
760 <xs:complexType name="reference">
761 <xs:sequence>
762 <xs:element name="point" type="volumePoint" minOccurs="2" maxOccurs="unbounded"/>
763 </xs:sequence>
764 <xs:attribute name="name" type="xs:token" use="required"/>
765 </xs:complexType>
766 <xs:complexType name="surroundSound">
767 <xs:annotation>
768 <xs:documentation xml:lang="en">
769 Surround Sound section provides configuration related to handling of
770 multi-channel formats.
771 </xs:documentation>
772 </xs:annotation>
773 <xs:sequence>
774 <xs:element name="formats" type="surroundFormats"/>
775 </xs:sequence>
776 </xs:complexType>
777 <xs:simpleType name="audioFormatsList">
Mikhail Naganov1b444a52020-10-29 13:08:05 -0700778 <xs:list itemType="extendableAudioFormat" />
Mikhail Naganov60ced762020-07-23 18:08:26 +0000779 </xs:simpleType>
780 <xs:complexType name="surroundFormats">
781 <xs:sequence>
782 <xs:element name="format" minOccurs="0" maxOccurs="unbounded">
783 <xs:complexType>
Mikhail Naganov1b444a52020-10-29 13:08:05 -0700784 <xs:attribute name="name" type="extendableAudioFormat" use="required"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000785 <xs:attribute name="subformats" type="audioFormatsList" />
786 </xs:complexType>
787 </xs:element>
788 </xs:sequence>
789 </xs:complexType>
790 <xs:simpleType name="engineSuffix">
791 <xs:restriction base="xs:string">
792 <xs:enumeration value="default"/>
793 <xs:enumeration value="configurable"/>
794 </xs:restriction>
795 </xs:simpleType>
796</xs:schema>