blob: 007e2501cf2c9ca30cb043d4f8d680cb607e2009 [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">
Mikhail Naganov8a525812021-02-04 19:24:05 +000023 <xs:enumeration value="7.0"/>
Mikhail Naganov60ced762020-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 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 Naganov60ced762020-07-23 18:08:26 +0000162 </xs:documentation>
163 </xs:annotation>
164 <xs:restriction base="xs:string">
Mikhail Naganov355dd062020-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" />
180 <xs:enumeration value="AUDIO_INPUT_FLAG_FAST" />
181 <xs:enumeration value="AUDIO_INPUT_FLAG_HW_HOTWORD" />
182 <xs:enumeration value="AUDIO_INPUT_FLAG_RAW" />
183 <xs:enumeration value="AUDIO_INPUT_FLAG_SYNC" />
184 <xs:enumeration value="AUDIO_INPUT_FLAG_MMAP_NOIRQ" />
185 <xs:enumeration value="AUDIO_INPUT_FLAG_VOIP_TX" />
186 <xs:enumeration value="AUDIO_INPUT_FLAG_HW_AV_SYNC" />
187 <xs:enumeration value="AUDIO_INPUT_FLAG_DIRECT" />
Mikhail Naganov60ced762020-07-23 18:08:26 +0000188 </xs:restriction>
189 </xs:simpleType>
Mikhail Naganov355dd062020-09-24 18:00:44 +0000190 <xs:simpleType name="audioInOutFlags">
191 <xs:list itemType="audioInOutFlag" />
192 </xs:simpleType>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000193 <xs:simpleType name="role">
194 <xs:restriction base="xs:string">
195 <xs:enumeration value="sink"/>
196 <xs:enumeration value="source"/>
197 </xs:restriction>
198 </xs:simpleType>
199 <xs:complexType name="mixPorts">
200 <xs:sequence>
201 <xs:element name="mixPort" minOccurs="0" maxOccurs="unbounded">
202 <xs:complexType>
203 <xs:sequence>
204 <xs:element name="profile" type="profile" minOccurs="0" maxOccurs="unbounded"/>
205 <xs:element name="gains" type="gains" minOccurs="0"/>
206 </xs:sequence>
207 <xs:attribute name="name" type="xs:token" use="required"/>
208 <xs:attribute name="role" type="role" use="required"/>
209 <xs:attribute name="flags" type="audioInOutFlags"/>
210 <xs:attribute name="maxOpenCount" type="xs:unsignedInt"/>
211 <xs:attribute name="maxActiveCount" type="xs:unsignedInt"/>
212 <xs:attribute name="preferredUsage" type="audioUsageList">
213 <xs:annotation>
214 <xs:documentation xml:lang="en">
215 When choosing the mixPort of an audio track, the audioPolicy
216 first considers the mixPorts with a preferredUsage including
217 the track AudioUsage preferred .
218 If non support the track format, the other mixPorts are considered.
219 Eg: a <mixPort preferredUsage="AUDIO_USAGE_MEDIA" /> will receive
220 the audio of all apps playing with a MEDIA usage.
221 It may receive audio from ALARM if there are no audio compatible
222 <mixPort preferredUsage="AUDIO_USAGE_ALARM" />.
223 </xs:documentation>
224 </xs:annotation>
225 </xs:attribute>
226 </xs:complexType>
227 <xs:unique name="mixPortProfileUniqueness">
228 <xs:selector xpath="profile"/>
229 <xs:field xpath="format"/>
230 <xs:field xpath="samplingRate"/>
231 <xs:field xpath="channelMasks"/>
232 </xs:unique>
233 <xs:unique name="mixPortGainUniqueness">
234 <xs:selector xpath="gains/gain"/>
235 <xs:field xpath="@name"/>
236 </xs:unique>
237 </xs:element>
238 </xs:sequence>
239 </xs:complexType>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000240 <xs:simpleType name="audioDevice">
241 <xs:restriction base="xs:string">
242 <xs:enumeration value="AUDIO_DEVICE_NONE"/>
243
244 <xs:enumeration value="AUDIO_DEVICE_OUT_EARPIECE"/>
245 <xs:enumeration value="AUDIO_DEVICE_OUT_SPEAKER"/>
246 <xs:enumeration value="AUDIO_DEVICE_OUT_WIRED_HEADSET"/>
247 <xs:enumeration value="AUDIO_DEVICE_OUT_WIRED_HEADPHONE"/>
248 <xs:enumeration value="AUDIO_DEVICE_OUT_BLUETOOTH_SCO"/>
249 <xs:enumeration value="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET"/>
250 <xs:enumeration value="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT"/>
251 <xs:enumeration value="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP"/>
252 <xs:enumeration value="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES"/>
253 <xs:enumeration value="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000254 <xs:enumeration value="AUDIO_DEVICE_OUT_HDMI"/>
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000255 <xs:enumeration value="AUDIO_DEVICE_OUT_AUX_DIGITAL"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000256 <xs:enumeration value="AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET"/>
257 <xs:enumeration value="AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET"/>
258 <xs:enumeration value="AUDIO_DEVICE_OUT_USB_ACCESSORY"/>
259 <xs:enumeration value="AUDIO_DEVICE_OUT_USB_DEVICE"/>
260 <xs:enumeration value="AUDIO_DEVICE_OUT_REMOTE_SUBMIX"/>
261 <xs:enumeration value="AUDIO_DEVICE_OUT_TELEPHONY_TX"/>
262 <xs:enumeration value="AUDIO_DEVICE_OUT_LINE"/>
263 <xs:enumeration value="AUDIO_DEVICE_OUT_HDMI_ARC"/>
264 <xs:enumeration value="AUDIO_DEVICE_OUT_SPDIF"/>
265 <xs:enumeration value="AUDIO_DEVICE_OUT_FM"/>
266 <xs:enumeration value="AUDIO_DEVICE_OUT_AUX_LINE"/>
267 <xs:enumeration value="AUDIO_DEVICE_OUT_SPEAKER_SAFE"/>
268 <xs:enumeration value="AUDIO_DEVICE_OUT_IP"/>
269 <xs:enumeration value="AUDIO_DEVICE_OUT_BUS"/>
270 <xs:enumeration value="AUDIO_DEVICE_OUT_PROXY"/>
271 <xs:enumeration value="AUDIO_DEVICE_OUT_USB_HEADSET"/>
272 <xs:enumeration value="AUDIO_DEVICE_OUT_HEARING_AID"/>
273 <xs:enumeration value="AUDIO_DEVICE_OUT_ECHO_CANCELLER"/>
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000274 <xs:enumeration value="AUDIO_DEVICE_OUT_BLE_HEADSET"/>
275 <xs:enumeration value="AUDIO_DEVICE_OUT_BLE_SPEAKER"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000276 <xs:enumeration value="AUDIO_DEVICE_OUT_DEFAULT"/>
277 <xs:enumeration value="AUDIO_DEVICE_OUT_STUB"/>
278
Mikhail Naganov60ced762020-07-23 18:08:26 +0000279 <xs:enumeration value="AUDIO_DEVICE_IN_COMMUNICATION"/>
280 <xs:enumeration value="AUDIO_DEVICE_IN_AMBIENT"/>
281 <xs:enumeration value="AUDIO_DEVICE_IN_BUILTIN_MIC"/>
282 <xs:enumeration value="AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET"/>
283 <xs:enumeration value="AUDIO_DEVICE_IN_WIRED_HEADSET"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000284 <xs:enumeration value="AUDIO_DEVICE_IN_HDMI"/>
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000285 <xs:enumeration value="AUDIO_DEVICE_IN_AUX_DIGITAL"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000286 <xs:enumeration value="AUDIO_DEVICE_IN_VOICE_CALL"/>
287 <xs:enumeration value="AUDIO_DEVICE_IN_TELEPHONY_RX"/>
288 <xs:enumeration value="AUDIO_DEVICE_IN_BACK_MIC"/>
289 <xs:enumeration value="AUDIO_DEVICE_IN_REMOTE_SUBMIX"/>
290 <xs:enumeration value="AUDIO_DEVICE_IN_ANLG_DOCK_HEADSET"/>
291 <xs:enumeration value="AUDIO_DEVICE_IN_DGTL_DOCK_HEADSET"/>
292 <xs:enumeration value="AUDIO_DEVICE_IN_USB_ACCESSORY"/>
293 <xs:enumeration value="AUDIO_DEVICE_IN_USB_DEVICE"/>
294 <xs:enumeration value="AUDIO_DEVICE_IN_FM_TUNER"/>
295 <xs:enumeration value="AUDIO_DEVICE_IN_TV_TUNER"/>
296 <xs:enumeration value="AUDIO_DEVICE_IN_LINE"/>
297 <xs:enumeration value="AUDIO_DEVICE_IN_SPDIF"/>
298 <xs:enumeration value="AUDIO_DEVICE_IN_BLUETOOTH_A2DP"/>
299 <xs:enumeration value="AUDIO_DEVICE_IN_LOOPBACK"/>
300 <xs:enumeration value="AUDIO_DEVICE_IN_IP"/>
301 <xs:enumeration value="AUDIO_DEVICE_IN_BUS"/>
302 <xs:enumeration value="AUDIO_DEVICE_IN_PROXY"/>
303 <xs:enumeration value="AUDIO_DEVICE_IN_USB_HEADSET"/>
304 <xs:enumeration value="AUDIO_DEVICE_IN_BLUETOOTH_BLE"/>
305 <xs:enumeration value="AUDIO_DEVICE_IN_HDMI_ARC"/>
306 <xs:enumeration value="AUDIO_DEVICE_IN_ECHO_REFERENCE"/>
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000307 <xs:enumeration value="AUDIO_DEVICE_IN_BLE_HEADSET"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000308 <xs:enumeration value="AUDIO_DEVICE_IN_DEFAULT"/>
309 <xs:enumeration value="AUDIO_DEVICE_IN_STUB"/>
310 </xs:restriction>
311 </xs:simpleType>
312 <xs:simpleType name="vendorExtension">
Mikhail Naganov178317b2021-02-19 14:08:52 -0800313 <!-- Vendor extension names must be prefixed by "VX_" to distinguish them from
314 AOSP values. Vendors must namespace their names to avoid conflicts. The
315 namespace part must only use capital latin characters and decimal digits and
316 consist of at least 3 characters. The part of the extension name after the
317 namespace may in addition include underscores. Example for a hypothetical
318 Google virtual reality device:
319
320 <devicePort tagName="VR" type="VX_GOOGLE_VR" role="sink" />
Mikhail Naganov60ced762020-07-23 18:08:26 +0000321 -->
322 <xs:restriction base="xs:string">
Mikhail Naganov178317b2021-02-19 14:08:52 -0800323 <xs:pattern value="VX_[A-Z0-9]{3,}_[_A-Z0-9]+"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000324 </xs:restriction>
325 </xs:simpleType>
326 <xs:simpleType name="extendableAudioDevice">
327 <xs:union memberTypes="audioDevice vendorExtension"/>
328 </xs:simpleType>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000329 <xs:simpleType name="audioFormat">
330 <xs:restriction base="xs:string">
Mikhail Naganovff611982021-01-27 02:16:53 +0000331 <xs:enumeration value="AUDIO_FORMAT_DEFAULT" />
Mikhail Naganov60ced762020-07-23 18:08:26 +0000332 <xs:enumeration value="AUDIO_FORMAT_PCM_16_BIT" />
333 <xs:enumeration value="AUDIO_FORMAT_PCM_8_BIT"/>
334 <xs:enumeration value="AUDIO_FORMAT_PCM_32_BIT"/>
335 <xs:enumeration value="AUDIO_FORMAT_PCM_8_24_BIT"/>
336 <xs:enumeration value="AUDIO_FORMAT_PCM_FLOAT"/>
337 <xs:enumeration value="AUDIO_FORMAT_PCM_24_BIT_PACKED"/>
338 <xs:enumeration value="AUDIO_FORMAT_MP3"/>
339 <xs:enumeration value="AUDIO_FORMAT_AMR_NB"/>
340 <xs:enumeration value="AUDIO_FORMAT_AMR_WB"/>
341 <xs:enumeration value="AUDIO_FORMAT_AAC"/>
342 <xs:enumeration value="AUDIO_FORMAT_AAC_MAIN"/>
343 <xs:enumeration value="AUDIO_FORMAT_AAC_LC"/>
344 <xs:enumeration value="AUDIO_FORMAT_AAC_SSR"/>
345 <xs:enumeration value="AUDIO_FORMAT_AAC_LTP"/>
346 <xs:enumeration value="AUDIO_FORMAT_AAC_HE_V1"/>
347 <xs:enumeration value="AUDIO_FORMAT_AAC_SCALABLE"/>
348 <xs:enumeration value="AUDIO_FORMAT_AAC_ERLC"/>
349 <xs:enumeration value="AUDIO_FORMAT_AAC_LD"/>
350 <xs:enumeration value="AUDIO_FORMAT_AAC_HE_V2"/>
351 <xs:enumeration value="AUDIO_FORMAT_AAC_ELD"/>
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000352 <xs:enumeration value="AUDIO_FORMAT_AAC_XHE"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000353 <xs:enumeration value="AUDIO_FORMAT_HE_AAC_V1"/>
354 <xs:enumeration value="AUDIO_FORMAT_HE_AAC_V2"/>
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000355 <xs:enumeration value="AUDIO_FORMAT_VORBIS"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000356 <xs:enumeration value="AUDIO_FORMAT_OPUS"/>
357 <xs:enumeration value="AUDIO_FORMAT_AC3"/>
358 <xs:enumeration value="AUDIO_FORMAT_E_AC3"/>
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000359 <xs:enumeration value="AUDIO_FORMAT_E_AC3_JOC"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000360 <xs:enumeration value="AUDIO_FORMAT_DTS"/>
361 <xs:enumeration value="AUDIO_FORMAT_DTS_HD"/>
362 <xs:enumeration value="AUDIO_FORMAT_IEC61937"/>
363 <xs:enumeration value="AUDIO_FORMAT_DOLBY_TRUEHD"/>
364 <xs:enumeration value="AUDIO_FORMAT_EVRC"/>
365 <xs:enumeration value="AUDIO_FORMAT_EVRCB"/>
366 <xs:enumeration value="AUDIO_FORMAT_EVRCWB"/>
367 <xs:enumeration value="AUDIO_FORMAT_EVRCNW"/>
368 <xs:enumeration value="AUDIO_FORMAT_AAC_ADIF"/>
369 <xs:enumeration value="AUDIO_FORMAT_WMA"/>
370 <xs:enumeration value="AUDIO_FORMAT_WMA_PRO"/>
371 <xs:enumeration value="AUDIO_FORMAT_AMR_WB_PLUS"/>
372 <xs:enumeration value="AUDIO_FORMAT_MP2"/>
373 <xs:enumeration value="AUDIO_FORMAT_QCELP"/>
374 <xs:enumeration value="AUDIO_FORMAT_DSD"/>
375 <xs:enumeration value="AUDIO_FORMAT_FLAC"/>
376 <xs:enumeration value="AUDIO_FORMAT_ALAC"/>
377 <xs:enumeration value="AUDIO_FORMAT_APE"/>
378 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS"/>
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000379 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS_MAIN"/>
380 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS_LC"/>
381 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS_SSR"/>
382 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS_LTP"/>
383 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS_HE_V1"/>
384 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS_SCALABLE"/>
385 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS_ERLC"/>
386 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS_LD"/>
387 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS_HE_V2"/>
388 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS_ELD"/>
389 <xs:enumeration value="AUDIO_FORMAT_AAC_ADTS_XHE"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000390 <xs:enumeration value="AUDIO_FORMAT_SBC"/>
391 <xs:enumeration value="AUDIO_FORMAT_APTX"/>
392 <xs:enumeration value="AUDIO_FORMAT_APTX_HD"/>
393 <xs:enumeration value="AUDIO_FORMAT_AC4"/>
394 <xs:enumeration value="AUDIO_FORMAT_LDAC"/>
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000395 <xs:enumeration value="AUDIO_FORMAT_MAT"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000396 <xs:enumeration value="AUDIO_FORMAT_MAT_1_0"/>
397 <xs:enumeration value="AUDIO_FORMAT_MAT_2_0"/>
398 <xs:enumeration value="AUDIO_FORMAT_MAT_2_1"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000399 <xs:enumeration value="AUDIO_FORMAT_AAC_LATM"/>
400 <xs:enumeration value="AUDIO_FORMAT_AAC_LATM_LC"/>
401 <xs:enumeration value="AUDIO_FORMAT_AAC_LATM_HE_V1"/>
402 <xs:enumeration value="AUDIO_FORMAT_AAC_LATM_HE_V2"/>
403 <xs:enumeration value="AUDIO_FORMAT_CELT"/>
404 <xs:enumeration value="AUDIO_FORMAT_APTX_ADAPTIVE"/>
405 <xs:enumeration value="AUDIO_FORMAT_LHDC"/>
406 <xs:enumeration value="AUDIO_FORMAT_LHDC_LL"/>
407 <xs:enumeration value="AUDIO_FORMAT_APTX_TWSP"/>
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000408 <xs:enumeration value="AUDIO_FORMAT_LC3"/>
jiabin66e55bf2021-01-27 19:16:26 +0000409 <xs:enumeration value="AUDIO_FORMAT_MPEGH_BL_L3"/>
410 <xs:enumeration value="AUDIO_FORMAT_MPEGH_BL_L4"/>
411 <xs:enumeration value="AUDIO_FORMAT_MPEGH_LC_L3"/>
412 <xs:enumeration value="AUDIO_FORMAT_MPEGH_LC_L4"/>
Dean Wheatley4a645c32020-11-26 15:24:53 +1100413 <xs:enumeration value="AUDIO_FORMAT_IEC60958"/>
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>
jiabin574a86f2021-03-05 06:42:05 +0000553 <xs:simpleType name="audioEncapsulationType">
554 <xs:restriction base="xs:string">
555 <xs:enumeration value="AUDIO_ENCAPSULATION_TYPE_NONE"/>
556 <xs:enumeration value="AUDIO_ENCAPSULATION_TYPE_IEC61937"/>
557 </xs:restriction>
558 </xs:simpleType>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000559 <xs:complexType name="profile">
560 <xs:attribute name="name" type="xs:token" use="optional"/>
561 <xs:attribute name="format" type="extendableAudioFormat" use="optional"/>
562 <xs:attribute name="samplingRates" type="samplingRates" use="optional"/>
Mikhail Naganovfda20422020-08-04 23:37:05 +0000563 <xs:attribute name="channelMasks" type="channelMasks" use="optional"/>
jiabin574a86f2021-03-05 06:42:05 +0000564 <xs:attribute name="encapsulationType" type="audioEncapsulationType" use="optional"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000565 </xs:complexType>
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000566 <xs:simpleType name="audioGainMode">
Mikhail Naganov60ced762020-07-23 18:08:26 +0000567 <xs:restriction base="xs:string">
568 <xs:enumeration value="AUDIO_GAIN_MODE_JOINT"/>
569 <xs:enumeration value="AUDIO_GAIN_MODE_CHANNELS"/>
570 <xs:enumeration value="AUDIO_GAIN_MODE_RAMP"/>
571 </xs:restriction>
572 </xs:simpleType>
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000573 <xs:simpleType name="audioGainModeMaskUnrestricted">
574 <xs:list itemType="audioGainMode" />
575 </xs:simpleType>
576 <xs:simpleType name='audioGainModeMask'>
577 <xs:restriction base='audioGainModeMaskUnrestricted'>
578 <xs:minLength value='1' />
579 </xs:restriction>
580 </xs:simpleType>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000581 <xs:complexType name="gains">
582 <xs:sequence>
583 <xs:element name="gain" minOccurs="0" maxOccurs="unbounded">
584 <xs:complexType>
585 <xs:attribute name="name" type="xs:token" use="required"/>
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000586 <xs:attribute name="mode" type="audioGainModeMask" use="required"/>
Mikhail Naganovfda20422020-08-04 23:37:05 +0000587 <xs:attribute name="channel_mask" type="audioChannelMask" use="optional"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000588 <xs:attribute name="minValueMB" type="xs:int" use="optional"/>
589 <xs:attribute name="maxValueMB" type="xs:int" use="optional"/>
590 <xs:attribute name="defaultValueMB" type="xs:int" use="optional"/>
591 <xs:attribute name="stepValueMB" type="xs:int" use="optional"/>
592 <xs:attribute name="minRampMs" type="xs:int" use="optional"/>
593 <xs:attribute name="maxRampMs" type="xs:int" use="optional"/>
594 <xs:attribute name="useForVolume" type="xs:boolean" use="optional"/>
595 </xs:complexType>
596 </xs:element>
597 </xs:sequence>
598 </xs:complexType>
599 <xs:complexType name="devicePorts">
600 <xs:sequence>
601 <xs:element name="devicePort" minOccurs="0" maxOccurs="unbounded">
602 <xs:complexType>
603 <xs:sequence>
604 <xs:element name="profile" type="profile" minOccurs="0" maxOccurs="unbounded"/>
605 <xs:element name="gains" type="gains" minOccurs="0"/>
606 </xs:sequence>
607 <xs:attribute name="tagName" type="xs:token" use="required"/>
608 <xs:attribute name="type" type="extendableAudioDevice" use="required"/>
609 <xs:attribute name="role" type="role" use="required"/>
610 <xs:attribute name="address" type="xs:string" use="optional" default=""/>
611 <!-- Note that XSD 1.0 can not check that a type only has one default. -->
612 <xs:attribute name="default" type="xs:boolean" use="optional">
613 <xs:annotation>
614 <xs:documentation xml:lang="en">
615 The default device will be used if multiple have the same type
616 and no explicit route request exists for a specific device of
617 that type.
618 </xs:documentation>
619 </xs:annotation>
620 </xs:attribute>
621 <xs:attribute name="encodedFormats" type="audioFormatsList" use="optional"
622 default="" />
623 </xs:complexType>
624 <xs:unique name="devicePortProfileUniqueness">
625 <xs:selector xpath="profile"/>
626 <xs:field xpath="format"/>
627 <xs:field xpath="samplingRate"/>
628 <xs:field xpath="channelMasks"/>
629 </xs:unique>
630 <xs:unique name="devicePortGainUniqueness">
631 <xs:selector xpath="gains/gain"/>
632 <xs:field xpath="@name"/>
633 </xs:unique>
634 </xs:element>
635 </xs:sequence>
636 </xs:complexType>
637 <xs:simpleType name="mixType">
638 <xs:restriction base="xs:string">
639 <xs:enumeration value="mix"/>
640 <xs:enumeration value="mux"/>
641 </xs:restriction>
642 </xs:simpleType>
643 <xs:complexType name="routes">
644 <xs:sequence>
645 <xs:element name="route" minOccurs="0" maxOccurs="unbounded">
646 <xs:annotation>
647 <xs:documentation xml:lang="en">
648 List all available sources for a given sink.
649 </xs:documentation>
650 </xs:annotation>
651 <xs:complexType>
652 <xs:attribute name="type" type="mixType" use="required"/>
653 <xs:attribute name="sink" type="xs:string" use="required"/>
654 <xs:attribute name="sources" type="xs:string" use="required"/>
655 </xs:complexType>
656 </xs:element>
657 </xs:sequence>
658 </xs:complexType>
659 <xs:complexType name="volumes">
660 <xs:sequence>
661 <xs:element name="volume" type="volume" minOccurs="0" maxOccurs="unbounded"/>
662 <xs:element name="reference" type="reference" minOccurs="0" maxOccurs="unbounded">
663 </xs:element>
664 </xs:sequence>
665 </xs:complexType>
666 <!-- TODO: Always require a ref for better xsd validations.
667 Currently a volume could have no points nor ref
668 as it can not be forbidden by xsd 1.0.-->
669 <xs:simpleType name="volumePoint">
670 <xs:annotation>
671 <xs:documentation xml:lang="en">
672 Comma separated pair of number.
673 The fist one is the framework level (between 0 and 100).
674 The second one is the volume to send to the HAL.
675 The framework will interpolate volumes not specified.
676 Their MUST be at least 2 points specified.
677 </xs:documentation>
678 </xs:annotation>
679 <xs:restriction base="xs:string">
680 <xs:pattern value="([0-9]{1,2}|100),-?[0-9]+"/>
681 </xs:restriction>
682 </xs:simpleType>
Mikhail Naganovfda20422020-08-04 23:37:05 +0000683 <xs:simpleType name="audioStreamType">
684 <xs:annotation>
685 <xs:documentation xml:lang="en">
686 Audio stream type describing the intended use case of a stream.
687 Please consult frameworks/base/media/java/android/media/AudioSystem.java
688 for the description of each value.
689 </xs:documentation>
690 </xs:annotation>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000691 <xs:restriction base="xs:string">
692 <xs:enumeration value="AUDIO_STREAM_VOICE_CALL"/>
693 <xs:enumeration value="AUDIO_STREAM_SYSTEM"/>
694 <xs:enumeration value="AUDIO_STREAM_RING"/>
695 <xs:enumeration value="AUDIO_STREAM_MUSIC"/>
696 <xs:enumeration value="AUDIO_STREAM_ALARM"/>
697 <xs:enumeration value="AUDIO_STREAM_NOTIFICATION"/>
698 <xs:enumeration value="AUDIO_STREAM_BLUETOOTH_SCO"/>
699 <xs:enumeration value="AUDIO_STREAM_ENFORCED_AUDIBLE"/>
700 <xs:enumeration value="AUDIO_STREAM_DTMF"/>
701 <xs:enumeration value="AUDIO_STREAM_TTS"/>
702 <xs:enumeration value="AUDIO_STREAM_ACCESSIBILITY"/>
703 <xs:enumeration value="AUDIO_STREAM_ASSISTANT"/>
704 <xs:enumeration value="AUDIO_STREAM_REROUTING"/>
705 <xs:enumeration value="AUDIO_STREAM_PATCH"/>
Mikhail Naganovc9dbca52020-09-30 20:27:12 +0000706 <xs:enumeration value="AUDIO_STREAM_CALL_ASSISTANT"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000707 </xs:restriction>
708 </xs:simpleType>
Mikhail Naganovfda20422020-08-04 23:37:05 +0000709 <xs:simpleType name="audioSource">
710 <xs:annotation>
711 <xs:documentation xml:lang="en">
712 An audio source defines the intended use case for the sound being recorded.
713 Please consult frameworks/base/media/java/android/media/MediaRecorder.java
714 for the description of each value.
715 </xs:documentation>
716 </xs:annotation>
717 <xs:restriction base="xs:string">
718 <xs:enumeration value="AUDIO_SOURCE_DEFAULT"/>
719 <xs:enumeration value="AUDIO_SOURCE_MIC"/>
720 <xs:enumeration value="AUDIO_SOURCE_VOICE_UPLINK"/>
721 <xs:enumeration value="AUDIO_SOURCE_VOICE_DOWNLINK"/>
722 <xs:enumeration value="AUDIO_SOURCE_VOICE_CALL"/>
723 <xs:enumeration value="AUDIO_SOURCE_CAMCORDER"/>
724 <xs:enumeration value="AUDIO_SOURCE_VOICE_RECOGNITION"/>
725 <xs:enumeration value="AUDIO_SOURCE_VOICE_COMMUNICATION"/>
726 <xs:enumeration value="AUDIO_SOURCE_REMOTE_SUBMIX"/>
727 <xs:enumeration value="AUDIO_SOURCE_UNPROCESSED"/>
728 <xs:enumeration value="AUDIO_SOURCE_VOICE_PERFORMANCE"/>
729 <xs:enumeration value="AUDIO_SOURCE_ECHO_REFERENCE"/>
730 <xs:enumeration value="AUDIO_SOURCE_FM_TUNER"/>
731 <xs:enumeration value="AUDIO_SOURCE_HOTWORD"/>
732 </xs:restriction>
733 </xs:simpleType>
734 <!-- Enum values of device_category from Volume.h. -->
Mikhail Naganov60ced762020-07-23 18:08:26 +0000735 <xs:simpleType name="deviceCategory">
736 <xs:restriction base="xs:string">
737 <xs:enumeration value="DEVICE_CATEGORY_HEADSET"/>
738 <xs:enumeration value="DEVICE_CATEGORY_SPEAKER"/>
739 <xs:enumeration value="DEVICE_CATEGORY_EARPIECE"/>
740 <xs:enumeration value="DEVICE_CATEGORY_EXT_MEDIA"/>
741 <xs:enumeration value="DEVICE_CATEGORY_HEARING_AID"/>
742 </xs:restriction>
743 </xs:simpleType>
744 <xs:complexType name="volume">
745 <xs:annotation>
746 <xs:documentation xml:lang="en">
747 Volume section defines a volume curve for a given use case and device category.
748 It contains a list of points of this curve expressing the attenuation in Millibels
749 for a given volume index from 0 to 100.
750 <volume stream="AUDIO_STREAM_MUSIC" deviceCategory="DEVICE_CATEGORY_SPEAKER">
751 <point>0,-9600</point>
752 <point>100,0</point>
753 </volume>
754
755 It may also reference a reference/@name to avoid duplicating curves.
756 <volume stream="AUDIO_STREAM_MUSIC" deviceCategory="DEVICE_CATEGORY_SPEAKER"
757 ref="DEFAULT_MEDIA_VOLUME_CURVE"/>
758 <reference name="DEFAULT_MEDIA_VOLUME_CURVE">
759 <point>0,-9600</point>
760 <point>100,0</point>
761 </reference>
762 </xs:documentation>
763 </xs:annotation>
764 <xs:sequence>
765 <xs:element name="point" type="volumePoint" minOccurs="0" maxOccurs="unbounded"/>
766 </xs:sequence>
Mikhail Naganovfda20422020-08-04 23:37:05 +0000767 <xs:attribute name="stream" type="audioStreamType"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000768 <xs:attribute name="deviceCategory" type="deviceCategory"/>
769 <xs:attribute name="ref" type="xs:token" use="optional"/>
770 </xs:complexType>
771 <xs:complexType name="reference">
772 <xs:sequence>
773 <xs:element name="point" type="volumePoint" minOccurs="2" maxOccurs="unbounded"/>
774 </xs:sequence>
775 <xs:attribute name="name" type="xs:token" use="required"/>
776 </xs:complexType>
777 <xs:complexType name="surroundSound">
778 <xs:annotation>
779 <xs:documentation xml:lang="en">
780 Surround Sound section provides configuration related to handling of
781 multi-channel formats.
782 </xs:documentation>
783 </xs:annotation>
784 <xs:sequence>
785 <xs:element name="formats" type="surroundFormats"/>
786 </xs:sequence>
787 </xs:complexType>
788 <xs:simpleType name="audioFormatsList">
Mikhail Naganov1b444a52020-10-29 13:08:05 -0700789 <xs:list itemType="extendableAudioFormat" />
Mikhail Naganov60ced762020-07-23 18:08:26 +0000790 </xs:simpleType>
791 <xs:complexType name="surroundFormats">
792 <xs:sequence>
793 <xs:element name="format" minOccurs="0" maxOccurs="unbounded">
794 <xs:complexType>
Mikhail Naganov1b444a52020-10-29 13:08:05 -0700795 <xs:attribute name="name" type="extendableAudioFormat" use="required"/>
Mikhail Naganov60ced762020-07-23 18:08:26 +0000796 <xs:attribute name="subformats" type="audioFormatsList" />
797 </xs:complexType>
798 </xs:element>
799 </xs:sequence>
800 </xs:complexType>
801 <xs:simpleType name="engineSuffix">
802 <xs:restriction base="xs:string">
803 <xs:enumeration value="default"/>
804 <xs:enumeration value="configurable"/>
805 </xs:restriction>
806 </xs:simpleType>
807</xs:schema>