From 524bdd39bfbf65d858feda4d805944a94d25dcc5 Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Wed, 17 May 2017 18:32:36 -0700 Subject: [PATCH] Audio: Add XML schema for audio policy configuration The schema describes the XML format for audio policy configuration. It will be enforced in a follow up vts test. Bug: 35700978 Test: schema is parsed with xmllint with no errors Test: xmllint --xinclude --noout --schema audio_policy_configuration.xsd out/target/product/sailfish/vendor/etc/audio_policy_configuration.xml Change-Id: Ic6830446b54b3e02e4bca9b0a392523a8fb359e1 Signed-off-by: Kevin Rocard --- .../2.0/config/audio_policy_configuration.xsd | 496 ++++++++++++++++++ 1 file changed, 496 insertions(+) create mode 100644 audio/2.0/config/audio_policy_configuration.xsd diff --git a/audio/2.0/config/audio_policy_configuration.xsd b/audio/2.0/config/audio_policy_configuration.xsd new file mode 100644 index 0000000000..48b9a9b910 --- /dev/null +++ b/audio/2.0/config/audio_policy_configuration.xsd @@ -0,0 +1,496 @@ + + + + + + + + + + + + + + Version of the interface the hal implements. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + There should be one section per audio HW module present on the platform. + Each contains two mandatory tags: “halVersion” and “name”. + The module "name" is the same as in previous .conf file. + Each module must contain the following sections: + - : a list of device descriptors for all + input and output devices accessible via this module. + This contains both permanently attached devices and removable devices. + - : listing all output and input streams exposed by the audio HAL + - : list of possible connections between input + and output devices or between stream and devices. + A is defined by a set of 3 attributes: + -"type": mux|mix means all sources are mutual exclusive (mux) or can be mixed (mix) + -"sink": the sink involved in this route + -"sources": all the sources than can be connected to the sink via this route + - : permanently attached devices. + The attachedDevices section is a list of devices names. + Their names correspond to device names defined in "devicePorts" section. + - is the device to be used when no policy rule applies + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "|" separated list of audio_output_flags_t or audio_input_flags_t. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Comma (",") separated list of channel flags + from audio_channel_mask_t. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + List all available sources for a given sink. + + + + + + + + + + + + + + + + + + + + + + Comma separated pair of number. + The fist one is the framework level (between 0 and 100). + The second one is the volume to send to the HAL. + The framework will interpolate volumes not specified. + Their MUST be at least 2 points specified. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Volume section defines a volume curve for a given use case and device category. + It contains a list of points of this curve expressing the attenuation in Millibels + for a given volume index from 0 to 100. + + 0,-9600 + 100,0 + + + It may also reference a reference/@name to avoid duplicating curves. + + + 0,-9600 + 100,0 + + + + + + + + + + + + + + + + +