mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-02 10:05:19 +00:00
Audio policy config: Device port (type,address) must be unique
Device port are not identified by names but by their type and address
and the module they are in.
As a result, enforce this constraint in the XSD. Violating it results in
a policy parsing crash.
Bug: 69442986
Test: xmllint invalidates an XML with two devices of the same type
and address
Test: vts-tradefed run commandAndExit vts --module VtsHalAudioV2_0Target -t CheckConfig.audioPolicyConfigurationValidation
Change-Id: I84245f0fa80fef786a002c98073c166b6aaf2be4
Signed-off-by: Kevin Rocard <krocard@google.com>
This commit is contained in:
@@ -148,6 +148,11 @@
|
||||
<xs:selector xpath="devicePorts/devicePort"/>
|
||||
<xs:field xpath="@tagName"/>
|
||||
</xs:key>
|
||||
<xs:unique name="devicePortUniqueness">
|
||||
<xs:selector xpath="devicePorts/devicePort"/>
|
||||
<xs:field xpath="@type"/>
|
||||
<xs:field xpath="@address"/>
|
||||
</xs:unique>
|
||||
<xs:keyref name="defaultOutputDeviceRef" refer="devicePortNameKey">
|
||||
<xs:selector xpath="defaultOutputDevice"/>
|
||||
<xs:field xpath="."/>
|
||||
@@ -419,7 +424,7 @@
|
||||
<xs:attribute name="tagName" type="xs:token" use="required"/>
|
||||
<xs:attribute name="type" type="audioDevice" use="required"/>
|
||||
<xs:attribute name="role" type="role" use="required"/>
|
||||
<xs:attribute name="address" type="xs:string" use="optional"/>
|
||||
<xs:attribute name="address" type="xs:string" use="optional" default=""/>
|
||||
</xs:complexType>
|
||||
<xs:unique name="devicePortProfileUniqueness">
|
||||
<xs:selector xpath="profile"/>
|
||||
|
||||
Reference in New Issue
Block a user