blob: 6604bb6e02bee02c7f88437522163296ebb36ae7 [file] [log] [blame]
Mikhail Naganov159260c2020-07-23 18:08:26 +00001<?xml version="1.0" encoding="UTF-8"?>
2<!-- Copyright (C) 2020 The Android Open Source Project
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15-->
Mikhail Naganov159260c2020-07-23 18:08:26 +000016<xs:schema version="2.0"
17 elementFormDefault="qualified"
18 attributeFormDefault="unqualified"
19 xmlns:xs="http://www.w3.org/2001/XMLSchema">
20 <!-- List the config versions supported by audio policy. -->
21 <xs:simpleType name="version">
22 <xs:restriction base="xs:decimal">
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 Naganov7dd87f42020-08-04 23:37:05 +000029 Version of the interface the hal implements. Note that this
30 relates to legacy HAL API versions since HIDL APIs are versioned
31 using other mechanisms.
Mikhail Naganov159260c2020-07-23 18:08:26 +000032 </xs:documentation>
33 </xs:annotation>
34 <xs:restriction base="xs:decimal">
35 <!-- List of HAL versions supported by the framework. -->
36 <xs:enumeration value="2.0"/>
37 <xs:enumeration value="3.0"/>
38 </xs:restriction>
39 </xs:simpleType>
40 <xs:element name="audioPolicyConfiguration">
41 <xs:complexType>
42 <xs:sequence>
43 <xs:element name="globalConfiguration" type="globalConfiguration"/>
44 <xs:element name="modules" type="modules" maxOccurs="unbounded"/>
45 <xs:element name="volumes" type="volumes" maxOccurs="unbounded"/>
46 <xs:element name="surroundSound" type="surroundSound" minOccurs="0" />
47 </xs:sequence>
48 <xs:attribute name="version" type="version"/>
49 </xs:complexType>
50 <xs:key name="moduleNameKey">
51 <xs:selector xpath="modules/module"/>
52 <xs:field xpath="@name"/>
53 </xs:key>
54 <xs:unique name="volumeTargetUniqueness">
55 <xs:selector xpath="volumes/volume"/>
56 <xs:field xpath="@stream"/>
57 <xs:field xpath="@deviceCategory"/>
58 </xs:unique>
59 <xs:key name="volumeCurveNameKey">
60 <xs:selector xpath="volumes/reference"/>
61 <xs:field xpath="@name"/>
62 </xs:key>
63 <xs:keyref name="volumeCurveRef" refer="volumeCurveNameKey">
64 <xs:selector xpath="volumes/volume"/>
65 <xs:field xpath="@ref"/>
66 </xs:keyref>
67 </xs:element>
68 <xs:complexType name="globalConfiguration">
69 <xs:attribute name="speaker_drc_enabled" type="xs:boolean" use="required"/>
70 <xs:attribute name="call_screen_mode_supported" type="xs:boolean" use="optional"/>
71 <xs:attribute name="engine_library" type="engineSuffix" use="optional"/>
72 </xs:complexType>
73 <xs:complexType name="modules">
74 <xs:annotation>
75 <xs:documentation xml:lang="en">
76 There should be one section per audio HW module present on the platform.
77 Each <module/> contains two mandatory tags: “halVersion” and “name”.
78 The module "name" is the same as in previous .conf file.
79 Each module must contain the following sections:
80 - <devicePorts/>: a list of device descriptors for all
81 input and output devices accessible via this module.
82 This contains both permanently attached devices and removable devices.
83 - <mixPorts/>: listing all output and input streams exposed by the audio HAL
84 - <routes/>: list of possible connections between input
85 and output devices or between stream and devices.
86 A <route/> is defined by a set of 3 attributes:
87 -"type": mux|mix means all sources are mutual exclusive (mux) or can be mixed (mix)
88 -"sink": the sink involved in this route
89 -"sources": all the sources than can be connected to the sink via this route
90 - <attachedDevices/>: permanently attached devices.
91 The attachedDevices section is a list of devices names.
92 Their names correspond to device names defined in "devicePorts" section.
93 - <defaultOutputDevice/> is the device to be used when no policy rule applies
94 </xs:documentation>
95 </xs:annotation>
96 <xs:sequence>
97 <xs:element name="module" maxOccurs="unbounded">
98 <xs:complexType>
99 <xs:sequence>
100 <xs:element name="attachedDevices" type="attachedDevices" minOccurs="0">
101 <xs:unique name="attachedDevicesUniqueness">
102 <xs:selector xpath="item"/>
103 <xs:field xpath="."/>
104 </xs:unique>
105 </xs:element>
106 <xs:element name="defaultOutputDevice" type="xs:token" minOccurs="0"/>
107 <xs:element name="mixPorts" type="mixPorts" minOccurs="0"/>
108 <xs:element name="devicePorts" type="devicePorts" minOccurs="0"/>
109 <xs:element name="routes" type="routes" minOccurs="0"/>
110 </xs:sequence>
111 <xs:attribute name="name" type="xs:string" use="required"/>
112 <xs:attribute name="halVersion" type="halVersion" use="required"/>
113 </xs:complexType>
114 <xs:unique name="mixPortNameUniqueness">
115 <xs:selector xpath="mixPorts/mixPort"/>
116 <xs:field xpath="@name"/>
117 </xs:unique>
118 <xs:key name="devicePortNameKey">
119 <xs:selector xpath="devicePorts/devicePort"/>
120 <xs:field xpath="@tagName"/>
121 </xs:key>
122 <xs:unique name="devicePortUniqueness">
123 <xs:selector xpath="devicePorts/devicePort"/>
124 <xs:field xpath="@type"/>
125 <xs:field xpath="@address"/>
126 </xs:unique>
127 <xs:keyref name="defaultOutputDeviceRef" refer="devicePortNameKey">
128 <xs:selector xpath="defaultOutputDevice"/>
129 <xs:field xpath="."/>
130 </xs:keyref>
131 <xs:keyref name="attachedDeviceRef" refer="devicePortNameKey">
132 <xs:selector xpath="attachedDevices/item"/>
133 <xs:field xpath="."/>
134 </xs:keyref>
135 <!-- The following 3 constraints try to make sure each sink port
136 is reference in one an only one route. -->
137 <xs:key name="routeSinkKey">
138 <!-- predicate [@type='sink'] does not work in xsd 1.0 -->
139 <xs:selector xpath="devicePorts/devicePort|mixPorts/mixPort"/>
140 <xs:field xpath="@tagName|@name"/>
141 </xs:key>
142 <xs:keyref name="routeSinkRef" refer="routeSinkKey">
143 <xs:selector xpath="routes/route"/>
144 <xs:field xpath="@sink"/>
145 </xs:keyref>
146 <xs:unique name="routeUniqueness">
147 <xs:selector xpath="routes/route"/>
148 <xs:field xpath="@sink"/>
149 </xs:unique>
150 </xs:element>
151 </xs:sequence>
152 </xs:complexType>
153 <xs:complexType name="attachedDevices">
154 <xs:sequence>
155 <xs:element name="item" type="xs:token" minOccurs="0" maxOccurs="unbounded"/>
156 </xs:sequence>
157 </xs:complexType>
Mikhail Naganov648ec5b2020-09-24 18:00:44 +0000158 <xs:simpleType name="audioInOutFlag">
Mikhail Naganov159260c2020-07-23 18:08:26 +0000159 <xs:annotation>
160 <xs:documentation xml:lang="en">
Mikhail Naganov648ec5b2020-09-24 18:00:44 +0000161 The flags indicate suggested stream attributes supported by the profile.
Mikhail Naganov8d8dfcd2020-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 Naganov159260c2020-07-23 18:08:26 +0000165 </xs:documentation>
166 </xs:annotation>
167 <xs:restriction base="xs:string">
Mikhail Naganov8d8dfcd2020-09-30 20:27:12 +0000168 <xs:enumeration value="AUDIO_OUTPUT_FLAG_NONE" />
Mikhail Naganov648ec5b2020-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 Naganov8d8dfcd2020-09-30 20:27:12 +0000184 <xs:enumeration value="AUDIO_INPUT_FLAG_NONE" />
Mikhail Naganov648ec5b2020-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 Naganov159260c2020-07-23 18:08:26 +0000193 </xs:restriction>
194 </xs:simpleType>
Mikhail Naganov648ec5b2020-09-24 18:00:44 +0000195 <xs:simpleType name="audioInOutFlags">
196 <xs:list itemType="audioInOutFlag" />
197 </xs:simpleType>
Mikhail Naganov159260c2020-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 Naganov159260c2020-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 Naganov159260c2020-07-23 18:08:26 +0000259 <xs:enumeration value="AUDIO_DEVICE_OUT_HDMI"/>
Mikhail Naganov8d8dfcd2020-09-30 20:27:12 +0000260 <xs:enumeration value="AUDIO_DEVICE_OUT_AUX_DIGITAL"/>
Mikhail Naganov159260c2020-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 Naganov8d8dfcd2020-09-30 20:27:12 +0000279 <xs:enumeration value="AUDIO_DEVICE_OUT_BLE_HEADSET"/>
280 <xs:enumeration value="AUDIO_DEVICE_OUT_BLE_SPEAKER"/>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000281 <xs:enumeration value="AUDIO_DEVICE_OUT_DEFAULT"/>
282 <xs:enumeration value="AUDIO_DEVICE_OUT_STUB"/>
283
Mikhail Naganov159260c2020-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 Naganov159260c2020-07-23 18:08:26 +0000289 <xs:enumeration value="AUDIO_DEVICE_IN_HDMI"/>
Mikhail Naganov8d8dfcd2020-09-30 20:27:12 +0000290 <xs:enumeration value="AUDIO_DEVICE_IN_AUX_DIGITAL"/>
Mikhail Naganov159260c2020-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 Naganov8d8dfcd2020-09-30 20:27:12 +0000312 <xs:enumeration value="AUDIO_DEVICE_IN_BLE_HEADSET"/>
Mikhail Naganov159260c2020-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 Naganov159260c2020-07-23 18:08:26 +0000330 <xs:simpleType name="audioFormat">
331 <xs:restriction base="xs:string">
332 <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 Naganov8d8dfcd2020-09-30 20:27:12 +0000352 <xs:enumeration value="AUDIO_FORMAT_AAC_XHE"/>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000353 <xs:enumeration value="AUDIO_FORMAT_HE_AAC_V1"/>
354 <xs:enumeration value="AUDIO_FORMAT_HE_AAC_V2"/>
Mikhail Naganov8d8dfcd2020-09-30 20:27:12 +0000355 <xs:enumeration value="AUDIO_FORMAT_VORBIS"/>
Mikhail Naganov159260c2020-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 Naganov8d8dfcd2020-09-30 20:27:12 +0000359 <xs:enumeration value="AUDIO_FORMAT_E_AC3_JOC"/>
Mikhail Naganov159260c2020-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 Naganov8d8dfcd2020-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 Naganov159260c2020-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 Naganov8d8dfcd2020-09-30 20:27:12 +0000395 <xs:enumeration value="AUDIO_FORMAT_MAT"/>
Mikhail Naganov159260c2020-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 Naganov159260c2020-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 Naganov8d8dfcd2020-09-30 20:27:12 +0000408 <xs:enumeration value="AUDIO_FORMAT_LC3"/>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000409 </xs:restriction>
410 </xs:simpleType>
411 <xs:simpleType name="extendableAudioFormat">
412 <xs:union memberTypes="audioFormat vendorExtension"/>
413 </xs:simpleType>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000414 <xs:simpleType name="audioUsage">
Mikhail Naganov7dd87f42020-08-04 23:37:05 +0000415 <xs:annotation>
416 <xs:documentation xml:lang="en">
417 Audio usage specifies the intended use case for the sound being played.
418 Please consult frameworks/base/media/java/android/media/AudioAttributes.java
419 for the description of each value.
420 </xs:documentation>
421 </xs:annotation>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000422 <xs:restriction base="xs:string">
423 <xs:enumeration value="AUDIO_USAGE_UNKNOWN" />
424 <xs:enumeration value="AUDIO_USAGE_MEDIA" />
425 <xs:enumeration value="AUDIO_USAGE_VOICE_COMMUNICATION" />
426 <xs:enumeration value="AUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING" />
427 <xs:enumeration value="AUDIO_USAGE_ALARM" />
428 <xs:enumeration value="AUDIO_USAGE_NOTIFICATION" />
429 <xs:enumeration value="AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE" />
430 <xs:enumeration value="AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY" />
431 <xs:enumeration value="AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE" />
432 <xs:enumeration value="AUDIO_USAGE_ASSISTANCE_SONIFICATION" />
433 <xs:enumeration value="AUDIO_USAGE_GAME" />
434 <xs:enumeration value="AUDIO_USAGE_VIRTUAL_SOURCE" />
435 <xs:enumeration value="AUDIO_USAGE_ASSISTANT" />
Mikhail Naganov7dd87f42020-08-04 23:37:05 +0000436 <xs:enumeration value="AUDIO_USAGE_CALL_ASSISTANT" />
437 <xs:enumeration value="AUDIO_USAGE_EMERGENCY" />
438 <xs:enumeration value="AUDIO_USAGE_SAFETY" />
439 <xs:enumeration value="AUDIO_USAGE_VEHICLE_STATUS" />
440 <xs:enumeration value="AUDIO_USAGE_ANNOUNCEMENT" />
Mikhail Naganov159260c2020-07-23 18:08:26 +0000441 </xs:restriction>
442 </xs:simpleType>
443 <xs:simpleType name="audioUsageList">
444 <xs:list itemType="audioUsage"/>
445 </xs:simpleType>
Mikhail Naganov7dd87f42020-08-04 23:37:05 +0000446 <xs:simpleType name="audioContentType">
Mikhail Naganov159260c2020-07-23 18:08:26 +0000447 <xs:annotation>
448 <xs:documentation xml:lang="en">
Mikhail Naganov7dd87f42020-08-04 23:37:05 +0000449 Audio content type expresses the general category of the content.
450 Please consult frameworks/base/media/java/android/media/AudioAttributes.java
451 for the description of each value.
Mikhail Naganov159260c2020-07-23 18:08:26 +0000452 </xs:documentation>
453 </xs:annotation>
454 <xs:restriction base="xs:string">
Mikhail Naganov7dd87f42020-08-04 23:37:05 +0000455 <xs:enumeration value="AUDIO_CONTENT_TYPE_UNKNOWN"/>
456 <xs:enumeration value="AUDIO_CONTENT_TYPE_SPEECH"/>
457 <xs:enumeration value="AUDIO_CONTENT_TYPE_MUSIC"/>
458 <xs:enumeration value="AUDIO_CONTENT_TYPE_MOVIE"/>
459 <xs:enumeration value="AUDIO_CONTENT_TYPE_SONIFICATION"/>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000460 </xs:restriction>
461 </xs:simpleType>
Mikhail Naganov7dd87f42020-08-04 23:37:05 +0000462 <xs:simpleType name="samplingRates">
463 <xs:list itemType="xs:nonNegativeInteger" />
464 </xs:simpleType>
465 <xs:simpleType name="audioChannelMask">
466 <xs:annotation>
467 <xs:documentation xml:lang="en">
468 Audio channel mask specifies presence of particular channels.
469 There are two representations:
470 - representation position (traditional discrete channel specification,
471 e.g. "left", "right");
472 - indexed (this is similar to "tracks" in audio mixing, channels
473 are represented using numbers).
474 </xs:documentation>
475 </xs:annotation>
476 <xs:restriction base="xs:string">
Mikhail Naganov8d8dfcd2020-09-30 20:27:12 +0000477 <xs:enumeration value="AUDIO_CHANNEL_NONE"/>
Mikhail Naganov7dd87f42020-08-04 23:37:05 +0000478 <xs:enumeration value="AUDIO_CHANNEL_OUT_MONO"/>
479 <xs:enumeration value="AUDIO_CHANNEL_OUT_STEREO"/>
480 <xs:enumeration value="AUDIO_CHANNEL_OUT_2POINT1"/>
Mikhail Naganov8d8dfcd2020-09-30 20:27:12 +0000481 <xs:enumeration value="AUDIO_CHANNEL_OUT_TRI"/>
482 <xs:enumeration value="AUDIO_CHANNEL_OUT_TRI_BACK"/>
483 <xs:enumeration value="AUDIO_CHANNEL_OUT_3POINT1"/>
Mikhail Naganov7dd87f42020-08-04 23:37:05 +0000484 <xs:enumeration value="AUDIO_CHANNEL_OUT_2POINT0POINT2"/>
485 <xs:enumeration value="AUDIO_CHANNEL_OUT_2POINT1POINT2"/>
486 <xs:enumeration value="AUDIO_CHANNEL_OUT_3POINT0POINT2"/>
487 <xs:enumeration value="AUDIO_CHANNEL_OUT_3POINT1POINT2"/>
488 <xs:enumeration value="AUDIO_CHANNEL_OUT_QUAD"/>
489 <xs:enumeration value="AUDIO_CHANNEL_OUT_QUAD_BACK"/>
490 <xs:enumeration value="AUDIO_CHANNEL_OUT_QUAD_SIDE"/>
491 <xs:enumeration value="AUDIO_CHANNEL_OUT_SURROUND"/>
492 <xs:enumeration value="AUDIO_CHANNEL_OUT_PENTA"/>
493 <xs:enumeration value="AUDIO_CHANNEL_OUT_5POINT1"/>
494 <xs:enumeration value="AUDIO_CHANNEL_OUT_5POINT1_BACK"/>
495 <xs:enumeration value="AUDIO_CHANNEL_OUT_5POINT1_SIDE"/>
496 <xs:enumeration value="AUDIO_CHANNEL_OUT_5POINT1POINT2"/>
497 <xs:enumeration value="AUDIO_CHANNEL_OUT_5POINT1POINT4"/>
498 <xs:enumeration value="AUDIO_CHANNEL_OUT_6POINT1"/>
499 <xs:enumeration value="AUDIO_CHANNEL_OUT_7POINT1"/>
500 <xs:enumeration value="AUDIO_CHANNEL_OUT_7POINT1POINT2"/>
501 <xs:enumeration value="AUDIO_CHANNEL_OUT_7POINT1POINT4"/>
502 <xs:enumeration value="AUDIO_CHANNEL_OUT_MONO_HAPTIC_A"/>
503 <xs:enumeration value="AUDIO_CHANNEL_OUT_STEREO_HAPTIC_A"/>
504 <xs:enumeration value="AUDIO_CHANNEL_OUT_HAPTIC_AB"/>
505 <xs:enumeration value="AUDIO_CHANNEL_OUT_MONO_HAPTIC_AB"/>
506 <xs:enumeration value="AUDIO_CHANNEL_OUT_STEREO_HAPTIC_AB"/>
507 <xs:enumeration value="AUDIO_CHANNEL_IN_MONO"/>
508 <xs:enumeration value="AUDIO_CHANNEL_IN_STEREO"/>
509 <xs:enumeration value="AUDIO_CHANNEL_IN_FRONT_BACK"/>
510 <xs:enumeration value="AUDIO_CHANNEL_IN_6"/>
511 <xs:enumeration value="AUDIO_CHANNEL_IN_2POINT0POINT2"/>
512 <xs:enumeration value="AUDIO_CHANNEL_IN_2POINT1POINT2"/>
513 <xs:enumeration value="AUDIO_CHANNEL_IN_3POINT0POINT2"/>
514 <xs:enumeration value="AUDIO_CHANNEL_IN_3POINT1POINT2"/>
515 <xs:enumeration value="AUDIO_CHANNEL_IN_5POINT1"/>
516 <xs:enumeration value="AUDIO_CHANNEL_IN_VOICE_UPLINK_MONO"/>
517 <xs:enumeration value="AUDIO_CHANNEL_IN_VOICE_DNLINK_MONO"/>
518 <xs:enumeration value="AUDIO_CHANNEL_IN_VOICE_CALL_MONO"/>
519 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_1"/>
520 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_2"/>
521 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_3"/>
522 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_4"/>
523 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_5"/>
524 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_6"/>
525 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_7"/>
526 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_8"/>
527 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_9"/>
528 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_10"/>
529 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_11"/>
530 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_12"/>
531 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_13"/>
532 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_14"/>
533 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_15"/>
534 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_16"/>
535 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_17"/>
536 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_18"/>
537 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_19"/>
538 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_20"/>
539 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_21"/>
540 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_22"/>
541 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_23"/>
542 <xs:enumeration value="AUDIO_CHANNEL_INDEX_MASK_24"/>
543 </xs:restriction>
544 </xs:simpleType>
545 <xs:simpleType name="channelMasks">
546 <xs:list itemType="audioChannelMask" />
547 </xs:simpleType>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000548 <xs:complexType name="profile">
549 <xs:attribute name="name" type="xs:token" use="optional"/>
550 <xs:attribute name="format" type="extendableAudioFormat" use="optional"/>
551 <xs:attribute name="samplingRates" type="samplingRates" use="optional"/>
Mikhail Naganov7dd87f42020-08-04 23:37:05 +0000552 <xs:attribute name="channelMasks" type="channelMasks" use="optional"/>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000553 </xs:complexType>
Mikhail Naganov8d8dfcd2020-09-30 20:27:12 +0000554 <xs:simpleType name="audioGainMode">
Mikhail Naganov159260c2020-07-23 18:08:26 +0000555 <xs:restriction base="xs:string">
556 <xs:enumeration value="AUDIO_GAIN_MODE_JOINT"/>
557 <xs:enumeration value="AUDIO_GAIN_MODE_CHANNELS"/>
558 <xs:enumeration value="AUDIO_GAIN_MODE_RAMP"/>
559 </xs:restriction>
560 </xs:simpleType>
Mikhail Naganov8d8dfcd2020-09-30 20:27:12 +0000561 <xs:simpleType name="audioGainModeMaskUnrestricted">
562 <xs:list itemType="audioGainMode" />
563 </xs:simpleType>
564 <xs:simpleType name='audioGainModeMask'>
565 <xs:restriction base='audioGainModeMaskUnrestricted'>
566 <xs:minLength value='1' />
567 </xs:restriction>
568 </xs:simpleType>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000569 <xs:complexType name="gains">
570 <xs:sequence>
571 <xs:element name="gain" minOccurs="0" maxOccurs="unbounded">
572 <xs:complexType>
573 <xs:attribute name="name" type="xs:token" use="required"/>
Mikhail Naganov8d8dfcd2020-09-30 20:27:12 +0000574 <xs:attribute name="mode" type="audioGainModeMask" use="required"/>
Mikhail Naganov7dd87f42020-08-04 23:37:05 +0000575 <xs:attribute name="channel_mask" type="audioChannelMask" use="optional"/>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000576 <xs:attribute name="minValueMB" type="xs:int" use="optional"/>
577 <xs:attribute name="maxValueMB" type="xs:int" use="optional"/>
578 <xs:attribute name="defaultValueMB" type="xs:int" use="optional"/>
579 <xs:attribute name="stepValueMB" type="xs:int" use="optional"/>
580 <xs:attribute name="minRampMs" type="xs:int" use="optional"/>
581 <xs:attribute name="maxRampMs" type="xs:int" use="optional"/>
582 <xs:attribute name="useForVolume" type="xs:boolean" use="optional"/>
583 </xs:complexType>
584 </xs:element>
585 </xs:sequence>
586 </xs:complexType>
587 <xs:complexType name="devicePorts">
588 <xs:sequence>
589 <xs:element name="devicePort" minOccurs="0" maxOccurs="unbounded">
590 <xs:complexType>
591 <xs:sequence>
592 <xs:element name="profile" type="profile" minOccurs="0" maxOccurs="unbounded"/>
593 <xs:element name="gains" type="gains" minOccurs="0"/>
594 </xs:sequence>
595 <xs:attribute name="tagName" type="xs:token" use="required"/>
596 <xs:attribute name="type" type="extendableAudioDevice" use="required"/>
597 <xs:attribute name="role" type="role" use="required"/>
598 <xs:attribute name="address" type="xs:string" use="optional" default=""/>
599 <!-- Note that XSD 1.0 can not check that a type only has one default. -->
600 <xs:attribute name="default" type="xs:boolean" use="optional">
601 <xs:annotation>
602 <xs:documentation xml:lang="en">
603 The default device will be used if multiple have the same type
604 and no explicit route request exists for a specific device of
605 that type.
606 </xs:documentation>
607 </xs:annotation>
608 </xs:attribute>
609 <xs:attribute name="encodedFormats" type="audioFormatsList" use="optional"
610 default="" />
611 </xs:complexType>
612 <xs:unique name="devicePortProfileUniqueness">
613 <xs:selector xpath="profile"/>
614 <xs:field xpath="format"/>
615 <xs:field xpath="samplingRate"/>
616 <xs:field xpath="channelMasks"/>
617 </xs:unique>
618 <xs:unique name="devicePortGainUniqueness">
619 <xs:selector xpath="gains/gain"/>
620 <xs:field xpath="@name"/>
621 </xs:unique>
622 </xs:element>
623 </xs:sequence>
624 </xs:complexType>
625 <xs:simpleType name="mixType">
626 <xs:restriction base="xs:string">
627 <xs:enumeration value="mix"/>
628 <xs:enumeration value="mux"/>
629 </xs:restriction>
630 </xs:simpleType>
631 <xs:complexType name="routes">
632 <xs:sequence>
633 <xs:element name="route" minOccurs="0" maxOccurs="unbounded">
634 <xs:annotation>
635 <xs:documentation xml:lang="en">
636 List all available sources for a given sink.
637 </xs:documentation>
638 </xs:annotation>
639 <xs:complexType>
640 <xs:attribute name="type" type="mixType" use="required"/>
641 <xs:attribute name="sink" type="xs:string" use="required"/>
642 <xs:attribute name="sources" type="xs:string" use="required"/>
643 </xs:complexType>
644 </xs:element>
645 </xs:sequence>
646 </xs:complexType>
647 <xs:complexType name="volumes">
648 <xs:sequence>
649 <xs:element name="volume" type="volume" minOccurs="0" maxOccurs="unbounded"/>
650 <xs:element name="reference" type="reference" minOccurs="0" maxOccurs="unbounded">
651 </xs:element>
652 </xs:sequence>
653 </xs:complexType>
654 <!-- TODO: Always require a ref for better xsd validations.
655 Currently a volume could have no points nor ref
656 as it can not be forbidden by xsd 1.0.-->
657 <xs:simpleType name="volumePoint">
658 <xs:annotation>
659 <xs:documentation xml:lang="en">
660 Comma separated pair of number.
661 The fist one is the framework level (between 0 and 100).
662 The second one is the volume to send to the HAL.
663 The framework will interpolate volumes not specified.
664 Their MUST be at least 2 points specified.
665 </xs:documentation>
666 </xs:annotation>
667 <xs:restriction base="xs:string">
668 <xs:pattern value="([0-9]{1,2}|100),-?[0-9]+"/>
669 </xs:restriction>
670 </xs:simpleType>
Mikhail Naganov7dd87f42020-08-04 23:37:05 +0000671 <xs:simpleType name="audioStreamType">
672 <xs:annotation>
673 <xs:documentation xml:lang="en">
674 Audio stream type describing the intended use case of a stream.
675 Please consult frameworks/base/media/java/android/media/AudioSystem.java
676 for the description of each value.
677 </xs:documentation>
678 </xs:annotation>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000679 <xs:restriction base="xs:string">
680 <xs:enumeration value="AUDIO_STREAM_VOICE_CALL"/>
681 <xs:enumeration value="AUDIO_STREAM_SYSTEM"/>
682 <xs:enumeration value="AUDIO_STREAM_RING"/>
683 <xs:enumeration value="AUDIO_STREAM_MUSIC"/>
684 <xs:enumeration value="AUDIO_STREAM_ALARM"/>
685 <xs:enumeration value="AUDIO_STREAM_NOTIFICATION"/>
686 <xs:enumeration value="AUDIO_STREAM_BLUETOOTH_SCO"/>
687 <xs:enumeration value="AUDIO_STREAM_ENFORCED_AUDIBLE"/>
688 <xs:enumeration value="AUDIO_STREAM_DTMF"/>
689 <xs:enumeration value="AUDIO_STREAM_TTS"/>
690 <xs:enumeration value="AUDIO_STREAM_ACCESSIBILITY"/>
691 <xs:enumeration value="AUDIO_STREAM_ASSISTANT"/>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000692 </xs:restriction>
693 </xs:simpleType>
Mikhail Naganov7dd87f42020-08-04 23:37:05 +0000694 <xs:simpleType name="audioSource">
695 <xs:annotation>
696 <xs:documentation xml:lang="en">
697 An audio source defines the intended use case for the sound being recorded.
698 Please consult frameworks/base/media/java/android/media/MediaRecorder.java
699 for the description of each value.
700 </xs:documentation>
701 </xs:annotation>
702 <xs:restriction base="xs:string">
703 <xs:enumeration value="AUDIO_SOURCE_DEFAULT"/>
704 <xs:enumeration value="AUDIO_SOURCE_MIC"/>
705 <xs:enumeration value="AUDIO_SOURCE_VOICE_UPLINK"/>
706 <xs:enumeration value="AUDIO_SOURCE_VOICE_DOWNLINK"/>
707 <xs:enumeration value="AUDIO_SOURCE_VOICE_CALL"/>
708 <xs:enumeration value="AUDIO_SOURCE_CAMCORDER"/>
709 <xs:enumeration value="AUDIO_SOURCE_VOICE_RECOGNITION"/>
710 <xs:enumeration value="AUDIO_SOURCE_VOICE_COMMUNICATION"/>
711 <xs:enumeration value="AUDIO_SOURCE_REMOTE_SUBMIX"/>
712 <xs:enumeration value="AUDIO_SOURCE_UNPROCESSED"/>
713 <xs:enumeration value="AUDIO_SOURCE_VOICE_PERFORMANCE"/>
714 <xs:enumeration value="AUDIO_SOURCE_ECHO_REFERENCE"/>
715 <xs:enumeration value="AUDIO_SOURCE_FM_TUNER"/>
716 <xs:enumeration value="AUDIO_SOURCE_HOTWORD"/>
717 </xs:restriction>
718 </xs:simpleType>
719 <!-- Enum values of device_category from Volume.h. -->
Mikhail Naganov159260c2020-07-23 18:08:26 +0000720 <xs:simpleType name="deviceCategory">
721 <xs:restriction base="xs:string">
722 <xs:enumeration value="DEVICE_CATEGORY_HEADSET"/>
723 <xs:enumeration value="DEVICE_CATEGORY_SPEAKER"/>
724 <xs:enumeration value="DEVICE_CATEGORY_EARPIECE"/>
725 <xs:enumeration value="DEVICE_CATEGORY_EXT_MEDIA"/>
726 <xs:enumeration value="DEVICE_CATEGORY_HEARING_AID"/>
727 </xs:restriction>
728 </xs:simpleType>
729 <xs:complexType name="volume">
730 <xs:annotation>
731 <xs:documentation xml:lang="en">
732 Volume section defines a volume curve for a given use case and device category.
733 It contains a list of points of this curve expressing the attenuation in Millibels
734 for a given volume index from 0 to 100.
735 <volume stream="AUDIO_STREAM_MUSIC" deviceCategory="DEVICE_CATEGORY_SPEAKER">
736 <point>0,-9600</point>
737 <point>100,0</point>
738 </volume>
739
740 It may also reference a reference/@name to avoid duplicating curves.
741 <volume stream="AUDIO_STREAM_MUSIC" deviceCategory="DEVICE_CATEGORY_SPEAKER"
742 ref="DEFAULT_MEDIA_VOLUME_CURVE"/>
743 <reference name="DEFAULT_MEDIA_VOLUME_CURVE">
744 <point>0,-9600</point>
745 <point>100,0</point>
746 </reference>
747 </xs:documentation>
748 </xs:annotation>
749 <xs:sequence>
750 <xs:element name="point" type="volumePoint" minOccurs="0" maxOccurs="unbounded"/>
751 </xs:sequence>
Mikhail Naganov7dd87f42020-08-04 23:37:05 +0000752 <xs:attribute name="stream" type="audioStreamType"/>
Mikhail Naganov159260c2020-07-23 18:08:26 +0000753 <xs:attribute name="deviceCategory" type="deviceCategory"/>
754 <xs:attribute name="ref" type="xs:token" use="optional"/>
755 </xs:complexType>
756 <xs:complexType name="reference">
757 <xs:sequence>
758 <xs:element name="point" type="volumePoint" minOccurs="2" maxOccurs="unbounded"/>
759 </xs:sequence>
760 <xs:attribute name="name" type="xs:token" use="required"/>
761 </xs:complexType>
762 <xs:complexType name="surroundSound">
763 <xs:annotation>
764 <xs:documentation xml:lang="en">
765 Surround Sound section provides configuration related to handling of
766 multi-channel formats.
767 </xs:documentation>
768 </xs:annotation>
769 <xs:sequence>
770 <xs:element name="formats" type="surroundFormats"/>
771 </xs:sequence>
772 </xs:complexType>
773 <xs:simpleType name="audioFormatsList">
774 <xs:list itemType="audioFormat" />
775 </xs:simpleType>
776 <xs:complexType name="surroundFormats">
777 <xs:sequence>
778 <xs:element name="format" minOccurs="0" maxOccurs="unbounded">
779 <xs:complexType>
780 <xs:attribute name="name" type="audioFormat" use="required"/>
781 <xs:attribute name="subformats" type="audioFormatsList" />
782 </xs:complexType>
783 </xs:element>
784 </xs:sequence>
785 </xs:complexType>
786 <xs:simpleType name="engineSuffix">
787 <xs:restriction base="xs:string">
788 <xs:enumeration value="default"/>
789 <xs:enumeration value="configurable"/>
790 </xs:restriction>
791 </xs:simpleType>
792</xs:schema>