blob: a72c8ac1284ce479e020232fa9ce6daf2ff2cb9c [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"/>
jiabin66e55bf2021-01-27 19:16:26 +0000410 <xs:enumeration value="AUDIO_FORMAT_MPEGH_BL_L3"/>
411 <xs:enumeration value="AUDIO_FORMAT_MPEGH_BL_L4"/>
412 <xs:enumeration value="AUDIO_FORMAT_MPEGH_LC_L3"/>
413 <xs:enumeration value="AUDIO_FORMAT_MPEGH_LC_L4"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000414 </xs:restriction>
415 </xs:simpleType>
416 <xs:simpleType name="extendableAudioFormat">
417 <xs:union memberTypes="audioFormat vendorExtension"/>
418 </xs:simpleType>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000419 <xs:simpleType name="audioUsage">
Mikhail Naganovfda20422020-08-04 23:37:05 +0000420 <xs:annotation>
421 <xs:documentation xml:lang="en">
422 Audio usage specifies the intended use case for the sound being played.
423 Please consult frameworks/base/media/java/android/media/AudioAttributes.java
424 for the description of each value.
425 </xs:documentation>
426 </xs:annotation>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000427 <xs:restriction base="xs:string">
428 <xs:enumeration value="AUDIO_USAGE_UNKNOWN" />
429 <xs:enumeration value="AUDIO_USAGE_MEDIA" />
430 <xs:enumeration value="AUDIO_USAGE_VOICE_COMMUNICATION" />
431 <xs:enumeration value="AUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING" />
432 <xs:enumeration value="AUDIO_USAGE_ALARM" />
433 <xs:enumeration value="AUDIO_USAGE_NOTIFICATION" />
434 <xs:enumeration value="AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE" />
435 <xs:enumeration value="AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY" />
436 <xs:enumeration value="AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE" />
437 <xs:enumeration value="AUDIO_USAGE_ASSISTANCE_SONIFICATION" />
438 <xs:enumeration value="AUDIO_USAGE_GAME" />
439 <xs:enumeration value="AUDIO_USAGE_VIRTUAL_SOURCE" />
440 <xs:enumeration value="AUDIO_USAGE_ASSISTANT" />
Mikhail Naganovfda20422020-08-04 23:37:05 +0000441 <xs:enumeration value="AUDIO_USAGE_CALL_ASSISTANT" />
442 <xs:enumeration value="AUDIO_USAGE_EMERGENCY" />
443 <xs:enumeration value="AUDIO_USAGE_SAFETY" />
444 <xs:enumeration value="AUDIO_USAGE_VEHICLE_STATUS" />
445 <xs:enumeration value="AUDIO_USAGE_ANNOUNCEMENT" />
Mikhail Naganov60ced762020-07-23 18:08:26 +0000446 </xs:restriction>
447 </xs:simpleType>
448 <xs:simpleType name="audioUsageList">
449 <xs:list itemType="audioUsage"/>
450 </xs:simpleType>
Mikhail Naganovfda20422020-08-04 23:37:05 +0000451 <xs:simpleType name="audioContentType">
Mikhail Naganov60ced762020-07-23 18:08:26 +0000452 <xs:annotation>
453 <xs:documentation xml:lang="en">
Mikhail Naganovfda20422020-08-04 23:37:05 +0000454 Audio content type expresses the general category of the content.
455 Please consult frameworks/base/media/java/android/media/AudioAttributes.java
456 for the description of each value.
Mikhail Naganov60ced762020-07-23 18:08:26 +0000457 </xs:documentation>
458 </xs:annotation>
459 <xs:restriction base="xs:string">
Mikhail Naganovfda20422020-08-04 23:37:05 +0000460 <xs:enumeration value="AUDIO_CONTENT_TYPE_UNKNOWN"/>
461 <xs:enumeration value="AUDIO_CONTENT_TYPE_SPEECH"/>
462 <xs:enumeration value="AUDIO_CONTENT_TYPE_MUSIC"/>
463 <xs:enumeration value="AUDIO_CONTENT_TYPE_MOVIE"/>
464 <xs:enumeration value="AUDIO_CONTENT_TYPE_SONIFICATION"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000465 </xs:restriction>
466 </xs:simpleType>
Mikhail Naganovfda20422020-08-04 23:37:05 +0000467 <xs:simpleType name="samplingRates">
468 <xs:list itemType="xs:nonNegativeInteger" />
469 </xs:simpleType>
470 <xs:simpleType name="audioChannelMask">
471 <xs:annotation>
472 <xs:documentation xml:lang="en">
473 Audio channel mask specifies presence of particular channels.
474 There are two representations:
475 - representation position (traditional discrete channel specification,
476 e.g. "left", "right");
477 - indexed (this is similar to "tracks" in audio mixing, channels
478 are represented using numbers).
479 </xs:documentation>
480 </xs:annotation>
481 <xs:restriction base="xs:string">
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000482 <xs:enumeration value="AUDIO_CHANNEL_NONE"/>
Mikhail Naganovfda20422020-08-04 23:37:05 +0000483 <xs:enumeration value="AUDIO_CHANNEL_OUT_MONO"/>
484 <xs:enumeration value="AUDIO_CHANNEL_OUT_STEREO"/>
485 <xs:enumeration value="AUDIO_CHANNEL_OUT_2POINT1"/>
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000486 <xs:enumeration value="AUDIO_CHANNEL_OUT_TRI"/>
487 <xs:enumeration value="AUDIO_CHANNEL_OUT_TRI_BACK"/>
488 <xs:enumeration value="AUDIO_CHANNEL_OUT_3POINT1"/>
Mikhail Naganovfda20422020-08-04 23:37:05 +0000489 <xs:enumeration value="AUDIO_CHANNEL_OUT_2POINT0POINT2"/>
490 <xs:enumeration value="AUDIO_CHANNEL_OUT_2POINT1POINT2"/>
491 <xs:enumeration value="AUDIO_CHANNEL_OUT_3POINT0POINT2"/>
492 <xs:enumeration value="AUDIO_CHANNEL_OUT_3POINT1POINT2"/>
493 <xs:enumeration value="AUDIO_CHANNEL_OUT_QUAD"/>
494 <xs:enumeration value="AUDIO_CHANNEL_OUT_QUAD_BACK"/>
495 <xs:enumeration value="AUDIO_CHANNEL_OUT_QUAD_SIDE"/>
496 <xs:enumeration value="AUDIO_CHANNEL_OUT_SURROUND"/>
497 <xs:enumeration value="AUDIO_CHANNEL_OUT_PENTA"/>
498 <xs:enumeration value="AUDIO_CHANNEL_OUT_5POINT1"/>
499 <xs:enumeration value="AUDIO_CHANNEL_OUT_5POINT1_BACK"/>
500 <xs:enumeration value="AUDIO_CHANNEL_OUT_5POINT1_SIDE"/>
501 <xs:enumeration value="AUDIO_CHANNEL_OUT_5POINT1POINT2"/>
502 <xs:enumeration value="AUDIO_CHANNEL_OUT_5POINT1POINT4"/>
503 <xs:enumeration value="AUDIO_CHANNEL_OUT_6POINT1"/>
504 <xs:enumeration value="AUDIO_CHANNEL_OUT_7POINT1"/>
505 <xs:enumeration value="AUDIO_CHANNEL_OUT_7POINT1POINT2"/>
506 <xs:enumeration value="AUDIO_CHANNEL_OUT_7POINT1POINT4"/>
507 <xs:enumeration value="AUDIO_CHANNEL_OUT_MONO_HAPTIC_A"/>
508 <xs:enumeration value="AUDIO_CHANNEL_OUT_STEREO_HAPTIC_A"/>
509 <xs:enumeration value="AUDIO_CHANNEL_OUT_HAPTIC_AB"/>
510 <xs:enumeration value="AUDIO_CHANNEL_OUT_MONO_HAPTIC_AB"/>
511 <xs:enumeration value="AUDIO_CHANNEL_OUT_STEREO_HAPTIC_AB"/>
512 <xs:enumeration value="AUDIO_CHANNEL_IN_MONO"/>
513 <xs:enumeration value="AUDIO_CHANNEL_IN_STEREO"/>
514 <xs:enumeration value="AUDIO_CHANNEL_IN_FRONT_BACK"/>
515 <xs:enumeration value="AUDIO_CHANNEL_IN_6"/>
516 <xs:enumeration value="AUDIO_CHANNEL_IN_2POINT0POINT2"/>
517 <xs:enumeration value="AUDIO_CHANNEL_IN_2POINT1POINT2"/>
518 <xs:enumeration value="AUDIO_CHANNEL_IN_3POINT0POINT2"/>
519 <xs:enumeration value="AUDIO_CHANNEL_IN_3POINT1POINT2"/>
520 <xs:enumeration value="AUDIO_CHANNEL_IN_5POINT1"/>
521 <xs:enumeration value="AUDIO_CHANNEL_IN_VOICE_UPLINK_MONO"/>
522 <xs:enumeration value="AUDIO_CHANNEL_IN_VOICE_DNLINK_MONO"/>
523 <xs:enumeration value="AUDIO_CHANNEL_IN_VOICE_CALL_MONO"/>
524 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_1"/>
525 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_2"/>
526 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_3"/>
527 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_4"/>
528 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_5"/>
529 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_6"/>
530 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_7"/>
531 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_8"/>
532 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_9"/>
533 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_10"/>
534 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_11"/>
535 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_12"/>
536 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_13"/>
537 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_14"/>
538 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_15"/>
539 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_16"/>
540 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_17"/>
541 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_18"/>
542 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_19"/>
543 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_20"/>
544 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_21"/>
545 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_22"/>
546 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_23"/>
547 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_24"/>
548 </xs:restriction>
549 </xs:simpleType>
550 <xs:simpleType name="channelMasks">
551 <xs:list itemType="audioChannelMask" />
552 </xs:simpleType>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000553 <xs:complexType name="profile">
554 <xs:attribute name="name" type="xs:token" use="optional"/>
555 <xs:attribute name="format" type="extendableAudioFormat" use="optional"/>
556 <xs:attribute name="samplingRates" type="samplingRates" use="optional"/>
Mikhail Naganovfda20422020-08-04 23:37:05 +0000557 <xs:attribute name="channelMasks" type="channelMasks" use="optional"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000558 </xs:complexType>
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000559 <xs:simpleType name="audioGainMode">
Mikhail Naganov60ced762020-07-23 18:08:26 +0000560 <xs:restriction base="xs:string">
561 <xs:enumeration value="AUDIO_GAIN_MODE_JOINT"/>
562 <xs:enumeration value="AUDIO_GAIN_MODE_CHANNELS"/>
563 <xs:enumeration value="AUDIO_GAIN_MODE_RAMP"/>
564 </xs:restriction>
565 </xs:simpleType>
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000566 <xs:simpleType name="audioGainModeMaskUnrestricted">
567 <xs:list itemType="audioGainMode" />
568 </xs:simpleType>
569 <xs:simpleType name='audioGainModeMask'>
570 <xs:restriction base='audioGainModeMaskUnrestricted'>
571 <xs:minLength value='1' />
572 </xs:restriction>
573 </xs:simpleType>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000574 <xs:complexType name="gains">
575 <xs:sequence>
576 <xs:element name="gain" minOccurs="0" maxOccurs="unbounded">
577 <xs:complexType>
578 <xs:attribute name="name" type="xs:token" use="required"/>
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000579 <xs:attribute name="mode" type="audioGainModeMask" use="required"/>
Mikhail Naganovfda20422020-08-04 23:37:05 +0000580 <xs:attribute name="channel_mask" type="audioChannelMask" use="optional"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000581 <xs:attribute name="minValueMB" type="xs:int" use="optional"/>
582 <xs:attribute name="maxValueMB" type="xs:int" use="optional"/>
583 <xs:attribute name="defaultValueMB" type="xs:int" use="optional"/>
584 <xs:attribute name="stepValueMB" type="xs:int" use="optional"/>
585 <xs:attribute name="minRampMs" type="xs:int" use="optional"/>
586 <xs:attribute name="maxRampMs" type="xs:int" use="optional"/>
587 <xs:attribute name="useForVolume" type="xs:boolean" use="optional"/>
588 </xs:complexType>
589 </xs:element>
590 </xs:sequence>
591 </xs:complexType>
592 <xs:complexType name="devicePorts">
593 <xs:sequence>
594 <xs:element name="devicePort" minOccurs="0" maxOccurs="unbounded">
595 <xs:complexType>
596 <xs:sequence>
597 <xs:element name="profile" type="profile" minOccurs="0" maxOccurs="unbounded"/>
598 <xs:element name="gains" type="gains" minOccurs="0"/>
599 </xs:sequence>
600 <xs:attribute name="tagName" type="xs:token" use="required"/>
601 <xs:attribute name="type" type="extendableAudioDevice" use="required"/>
602 <xs:attribute name="role" type="role" use="required"/>
603 <xs:attribute name="address" type="xs:string" use="optional" default=""/>
604 <!-- Note that XSD 1.0 can not check that a type only has one default. -->
605 <xs:attribute name="default" type="xs:boolean" use="optional">
606 <xs:annotation>
607 <xs:documentation xml:lang="en">
608 The default device will be used if multiple have the same type
609 and no explicit route request exists for a specific device of
610 that type.
611 </xs:documentation>
612 </xs:annotation>
613 </xs:attribute>
614 <xs:attribute name="encodedFormats" type="audioFormatsList" use="optional"
615 default="" />
616 </xs:complexType>
617 <xs:unique name="devicePortProfileUniqueness">
618 <xs:selector xpath="profile"/>
619 <xs:field xpath="format"/>
620 <xs:field xpath="samplingRate"/>
621 <xs:field xpath="channelMasks"/>
622 </xs:unique>
623 <xs:unique name="devicePortGainUniqueness">
624 <xs:selector xpath="gains/gain"/>
625 <xs:field xpath="@name"/>
626 </xs:unique>
627 </xs:element>
628 </xs:sequence>
629 </xs:complexType>
630 <xs:simpleType name="mixType">
631 <xs:restriction base="xs:string">
632 <xs:enumeration value="mix"/>
633 <xs:enumeration value="mux"/>
634 </xs:restriction>
635 </xs:simpleType>
636 <xs:complexType name="routes">
637 <xs:sequence>
638 <xs:element name="route" minOccurs="0" maxOccurs="unbounded">
639 <xs:annotation>
640 <xs:documentation xml:lang="en">
641 List all available sources for a given sink.
642 </xs:documentation>
643 </xs:annotation>
644 <xs:complexType>
645 <xs:attribute name="type" type="mixType" use="required"/>
646 <xs:attribute name="sink" type="xs:string" use="required"/>
647 <xs:attribute name="sources" type="xs:string" use="required"/>
648 </xs:complexType>
649 </xs:element>
650 </xs:sequence>
651 </xs:complexType>
652 <xs:complexType name="volumes">
653 <xs:sequence>
654 <xs:element name="volume" type="volume" minOccurs="0" maxOccurs="unbounded"/>
655 <xs:element name="reference" type="reference" minOccurs="0" maxOccurs="unbounded">
656 </xs:element>
657 </xs:sequence>
658 </xs:complexType>
659 <!-- TODO: Always require a ref for better xsd validations.
660 Currently a volume could have no points nor ref
661 as it can not be forbidden by xsd 1.0.-->
662 <xs:simpleType name="volumePoint">
663 <xs:annotation>
664 <xs:documentation xml:lang="en">
665 Comma separated pair of number.
666 The fist one is the framework level (between 0 and 100).
667 The second one is the volume to send to the HAL.
668 The framework will interpolate volumes not specified.
669 Their MUST be at least 2 points specified.
670 </xs:documentation>
671 </xs:annotation>
672 <xs:restriction base="xs:string">
673 <xs:pattern value="([0-9]{1,2}|100),-?[0-9]+"/>
674 </xs:restriction>
675 </xs:simpleType>
Mikhail Naganovfda20422020-08-04 23:37:05 +0000676 <xs:simpleType name="audioStreamType">
677 <xs:annotation>
678 <xs:documentation xml:lang="en">
679 Audio stream type describing the intended use case of a stream.
680 Please consult frameworks/base/media/java/android/media/AudioSystem.java
681 for the description of each value.
682 </xs:documentation>
683 </xs:annotation>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000684 <xs:restriction base="xs:string">
685 <xs:enumeration value="AUDIO_STREAM_VOICE_CALL"/>
686 <xs:enumeration value="AUDIO_STREAM_SYSTEM"/>
687 <xs:enumeration value="AUDIO_STREAM_RING"/>
688 <xs:enumeration value="AUDIO_STREAM_MUSIC"/>
689 <xs:enumeration value="AUDIO_STREAM_ALARM"/>
690 <xs:enumeration value="AUDIO_STREAM_NOTIFICATION"/>
691 <xs:enumeration value="AUDIO_STREAM_BLUETOOTH_SCO"/>
692 <xs:enumeration value="AUDIO_STREAM_ENFORCED_AUDIBLE"/>
693 <xs:enumeration value="AUDIO_STREAM_DTMF"/>
694 <xs:enumeration value="AUDIO_STREAM_TTS"/>
695 <xs:enumeration value="AUDIO_STREAM_ACCESSIBILITY"/>
696 <xs:enumeration value="AUDIO_STREAM_ASSISTANT"/>
697 <xs:enumeration value="AUDIO_STREAM_REROUTING"/>
698 <xs:enumeration value="AUDIO_STREAM_PATCH"/>
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000699 <xs:enumeration value="AUDIO_STREAM_CALL_ASSISTANT"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000700 </xs:restriction>
701 </xs:simpleType>
Mikhail Naganovfda20422020-08-04 23:37:05 +0000702 <xs:simpleType name="audioSource">
703 <xs:annotation>
704 <xs:documentation xml:lang="en">
705 An audio source defines the intended use case for the sound being recorded.
706 Please consult frameworks/base/media/java/android/media/MediaRecorder.java
707 for the description of each value.
708 </xs:documentation>
709 </xs:annotation>
710 <xs:restriction base="xs:string">
711 <xs:enumeration value="AUDIO_SOURCE_DEFAULT"/>
712 <xs:enumeration value="AUDIO_SOURCE_MIC"/>
713 <xs:enumeration value="AUDIO_SOURCE_VOICE_UPLINK"/>
714 <xs:enumeration value="AUDIO_SOURCE_VOICE_DOWNLINK"/>
715 <xs:enumeration value="AUDIO_SOURCE_VOICE_CALL"/>
716 <xs:enumeration value="AUDIO_SOURCE_CAMCORDER"/>
717 <xs:enumeration value="AUDIO_SOURCE_VOICE_RECOGNITION"/>
718 <xs:enumeration value="AUDIO_SOURCE_VOICE_COMMUNICATION"/>
719 <xs:enumeration value="AUDIO_SOURCE_REMOTE_SUBMIX"/>
720 <xs:enumeration value="AUDIO_SOURCE_UNPROCESSED"/>
721 <xs:enumeration value="AUDIO_SOURCE_VOICE_PERFORMANCE"/>
722 <xs:enumeration value="AUDIO_SOURCE_ECHO_REFERENCE"/>
723 <xs:enumeration value="AUDIO_SOURCE_FM_TUNER"/>
724 <xs:enumeration value="AUDIO_SOURCE_HOTWORD"/>
725 </xs:restriction>
726 </xs:simpleType>
727 <!-- Enum values of device_category from Volume.h. -->
Mikhail Naganov60ced762020-07-23 18:08:26 +0000728 <xs:simpleType name="deviceCategory">
729 <xs:restriction base="xs:string">
730 <xs:enumeration value="DEVICE_CATEGORY_HEADSET"/>
731 <xs:enumeration value="DEVICE_CATEGORY_SPEAKER"/>
732 <xs:enumeration value="DEVICE_CATEGORY_EARPIECE"/>
733 <xs:enumeration value="DEVICE_CATEGORY_EXT_MEDIA"/>
734 <xs:enumeration value="DEVICE_CATEGORY_HEARING_AID"/>
735 </xs:restriction>
736 </xs:simpleType>
737 <xs:complexType name="volume">
738 <xs:annotation>
739 <xs:documentation xml:lang="en">
740 Volume section defines a volume curve for a given use case and device category.
741 It contains a list of points of this curve expressing the attenuation in Millibels
742 for a given volume index from 0 to 100.
743 <volume stream="AUDIO_STREAM_MUSIC" deviceCategory="DEVICE_CATEGORY_SPEAKER">
744 <point>0,-9600</point>
745 <point>100,0</point>
746 </volume>
747
748 It may also reference a reference/@name to avoid duplicating curves.
749 <volume stream="AUDIO_STREAM_MUSIC" deviceCategory="DEVICE_CATEGORY_SPEAKER"
750 ref="DEFAULT_MEDIA_VOLUME_CURVE"/>
751 <reference name="DEFAULT_MEDIA_VOLUME_CURVE">
752 <point>0,-9600</point>
753 <point>100,0</point>
754 </reference>
755 </xs:documentation>
756 </xs:annotation>
757 <xs:sequence>
758 <xs:element name="point" type="volumePoint" minOccurs="0" maxOccurs="unbounded"/>
759 </xs:sequence>
Mikhail Naganovfda20422020-08-04 23:37:05 +0000760 <xs:attribute name="stream" type="audioStreamType"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000761 <xs:attribute name="deviceCategory" type="deviceCategory"/>
762 <xs:attribute name="ref" type="xs:token" use="optional"/>
763 </xs:complexType>
764 <xs:complexType name="reference">
765 <xs:sequence>
766 <xs:element name="point" type="volumePoint" minOccurs="2" maxOccurs="unbounded"/>
767 </xs:sequence>
768 <xs:attribute name="name" type="xs:token" use="required"/>
769 </xs:complexType>
770 <xs:complexType name="surroundSound">
771 <xs:annotation>
772 <xs:documentation xml:lang="en">
773 Surround Sound section provides configuration related to handling of
774 multi-channel formats.
775 </xs:documentation>
776 </xs:annotation>
777 <xs:sequence>
778 <xs:element name="formats" type="surroundFormats"/>
779 </xs:sequence>
780 </xs:complexType>
781 <xs:simpleType name="audioFormatsList">
Mikhail Naganov1b444a52020-10-29 13:08:05 -0700782 <xs:list itemType="extendableAudioFormat" />
Mikhail Naganov60ced762020-07-23 18:08:26 +0000783 </xs:simpleType>
784 <xs:complexType name="surroundFormats">
785 <xs:sequence>
786 <xs:element name="format" minOccurs="0" maxOccurs="unbounded">
787 <xs:complexType>
Mikhail Naganov1b444a52020-10-29 13:08:05 -0700788 <xs:attribute name="name" type="extendableAudioFormat" use="required"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000789 <xs:attribute name="subformats" type="audioFormatsList" />
790 </xs:complexType>
791 </xs:element>
792 </xs:sequence>
793 </xs:complexType>
794 <xs:simpleType name="engineSuffix">
795 <xs:restriction base="xs:string">
796 <xs:enumeration value="default"/>
797 <xs:enumeration value="configurable"/>
798 </xs:restriction>
799 </xs:simpleType>
800</xs:schema>