Configure audio effects libraries with relative path

audio effects.conf legacy format had the libraries specified
in absolute path.
Nevertheless those libraries must be in specific folders.
The .conf loader used to strip the prefix of the paths then
try to load the libraries in those specific folders.

With new xml format the user only has to specify the name of the library
and the loader will load it from the known folders.

Test: run xmllint against a config with absolute paths
Bug: 37492580
Change-Id: I2863e04b3cdf0c6758d9f7be33796621fee527ed
Signed-off-by: Kevin Rocard <krocard@google.com>
This commit is contained in:
Kevin Rocard
2017-06-26 15:50:33 -07:00
committed by Mikhail Naganov
parent 627fdaae3d
commit 3296cee7e5

View File

@@ -56,17 +56,22 @@
<xs:enumeration value="tts"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="relativePathType">
<xs:restriction base="xs:string">
<xs:pattern value="[^/].*"/>
</xs:restriction>
</xs:simpleType>
<!-- Complex types -->
<xs:complexType name="librariesType">
<xs:annotation>
<xs:documentation xml:lang="en">
List of effect libraries to load. Each library element must have "name" and
"path" attributes. The latter is giving the full path of the library .so file.
"path" attributes. The latter is giving the path of the library .so file
relative to the standard effect folders: /(vendor|odm|system)/lib(64)?/soundfx/
Example:
<library name="name" path="/vendor/lib/soundfx/lib.so"/>
Example for a library in "/vendor/lib/soundfx/lib.so":
<library name="name" path="lib.so"/>
</xs:documentation>
</xs:annotation>
@@ -74,7 +79,7 @@
<xs:element name="library" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="path" type="xs:string" use="required"/>
<xs:attribute name="path" type="aec:relativePathType" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>