| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- Copyright (C) 2021 The Android Open Source Project |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <xs:schema version="2.0" |
| elementFormDefault="qualified" |
| attributeFormDefault="unqualified" |
| xmlns:xs="http://www.w3.org/2001/XMLSchema"> |
| <!-- List the dynamic config versions supported by tuner testing. --> |
| <xs:simpleType name="version"> |
| <xs:restriction base="xs:decimal"> |
| <xs:enumeration value="1.0"/> |
| </xs:restriction> |
| </xs:simpleType> |
| |
| <!-- FRONTEND SESSION --> |
| <xs:simpleType name="frontendId"> |
| <!-- Frontend id must be either FE_DEFAULT or FE_TYPE_NUM |
| <frontend id="FE_DVBS_0"/> |
| --> |
| <xs:restriction base="xs:string"> |
| <xs:pattern value="FE_DEFAULT|FE_[A-Z]+_[0-9]+"/> |
| </xs:restriction> |
| </xs:simpleType> |
| |
| <xs:simpleType name="frontendTypeEnum"> |
| <xs:restriction base="xs:string"> |
| <xs:enumeration value="UNDEFINED" /> |
| <xs:enumeration value="ANALOG" /> |
| <xs:enumeration value="ATSC" /> |
| <xs:enumeration value="ATSC3"/> |
| <xs:enumeration value="DVBC"/> |
| <xs:enumeration value="DVBS"/> |
| <xs:enumeration value="DVBT"/> |
| <xs:enumeration value="ISDBS"/> |
| <xs:enumeration value="ISDBS3"/> |
| <xs:enumeration value="ISDBT"/> |
| <xs:enumeration value="DTMB"/> |
| </xs:restriction> |
| </xs:simpleType> |
| |
| <xs:complexType name="dvbtFrontendSettings"> |
| <xs:attribute name="bandwidth" type="xs:nonNegativeInteger" use="required"/> |
| <xs:attribute name="transmissionMode" type="xs:nonNegativeInteger" use="required"/> |
| <xs:attribute name="isHighPriority" type="xs:nonNegativeInteger" use="required"/> |
| </xs:complexType> |
| <xs:complexType name="dvbsFrontendSettings"> |
| <xs:attribute name="inputStreamId" type="xs:nonNegativeInteger" use="required"/> |
| <xs:attribute name="symbolRate" type="xs:nonNegativeInteger" use="required"/> |
| </xs:complexType> |
| |
| <xs:complexType name="frontend"> |
| <xs:annotation> |
| <xs:documentation> |
| Each frontend element contain the following attributes: |
| "id": unique id of the frontend that could be used to connect to the test the |
| "dataFlowConfiguration" |
| "type": the frontend type. The enums are defined in the xsd. |
| "isSoftwareFrontend": if the test environment is using hardware or software |
| frontend. If using software, a ts input file path needs to be configured. |
| "softwareFeInputPath": used as the source of the software frontend. |
| "connectToCicamId": if the device supports frontend connecting to cicam, the |
| target cicam id needs to be configured here. Supported in Tuner 1.1 or |
| higher. |
| "frequency": the frequency used to configure tune and scan. |
| "endFrequency": the end frequency of scan. Supported in Tuner 1.1 or higher. |
| |
| Each frontend element also contains at most one type-related "frontendSettings". |
| - The settings type should match the frontend "type" attribute. |
| - For example, when frontend type="DVBT", dvbtFrontendSettings can be |
| configured. |
| - This is optional and skipping the settings would pass a setting with frequency |
| config only to the hal. |
| </xs:documentation> |
| </xs:annotation> |
| <xs:choice minOccurs="0" maxOccurs="1"> |
| <!-- TODO: finish all the frontend settings structures. --> |
| <!--xs:element name="analog" type="analogSettings"/> |
| <xs:element name="atsc" type="atscSettings"/> |
| <xs:element name="atsc3" type="atsc3Settings"/> |
| <xs:element name="dvbc" type="dvbcSettings"/--> |
| <xs:element name="dvbsFrontendSettings" type="dvbsFrontendSettings"/> |
| <xs:element name="dvbtFrontendSettings" type="dvbtFrontendSettings"/> |
| <!--xs:element name="isdbs" type="isdbsSettings"/> |
| <xs:element name="isdbs3" type="isdbs3Settings"/> |
| <xs:element name="isdbt" type="isdbtSettings"/> |
| <xs:element name="dtmb" type="dtmbSettings"/--> |
| </xs:choice> |
| <xs:attribute name="id" type="frontendId" use="required"/> |
| <xs:attribute name="type" type="frontendTypeEnum" use="required"/> |
| <xs:attribute name="isSoftwareFrontend" type="xs:boolean" use="required"/> |
| <!-- A dvr connection is required in the data flow config section when |
| "isSoftwareFrontend" is true. --> |
| <xs:attribute name="frequency" type="xs:nonNegativeInteger" use="required"/> |
| <xs:attribute name="connectToCicamId" type="xs:nonNegativeInteger" use="optional"/> |
| <xs:attribute name="endFrequency" type="xs:nonNegativeInteger" use="optional"/> |
| </xs:complexType> |
| |
| <!-- HARDWARE CONFIGURATION SESSION --> |
| <xs:complexType name="hardwareConfiguration"> |
| <xs:sequence> |
| <xs:element name="frontends" minOccurs="0" maxOccurs="1"> |
| <xs:complexType> |
| <xs:annotation> |
| <xs:documentation xml:lang="en"> |
| This section contains configurations of all the frontends that would be |
| used in the tests. |
| - This section is optional and can be skipped to use the default |
| fe settings. |
| - The default settings can be found in the |
| sample_tuner_vts_configurations.xml. |
| - The users can also override the default frontend settings using |
| id="FE_DEFAULT". |
| - The users can configure 1 or more frontend elements in the |
| frontends sections. |
| </xs:documentation> |
| </xs:annotation> |
| <xs:sequence> |
| <xs:element name="frontend" type="frontend" minOccurs="1" maxOccurs="unbounded"/> |
| </xs:sequence> |
| </xs:complexType> |
| </xs:element> |
| </xs:sequence> |
| </xs:complexType> |
| |
| <!-- DATA FLOW CONFIGURATION SESSION --> |
| <xs:complexType name="dataFlowConfiguration"> |
| <xs:sequence> |
| <xs:element name="clearLiveBroadcast" minOccurs="1" maxOccurs="1"> |
| <xs:complexType> |
| <!-- TODO: add optional dvr config for software input --> |
| <xs:attribute name="frontendConnection" type="frontendId" use="required"/> |
| </xs:complexType> |
| </xs:element> |
| <xs:element name="scan" minOccurs="1" maxOccurs="1"> |
| <xs:complexType> |
| <xs:attribute name="frontendConnection" type="frontendId" use="required"/> |
| </xs:complexType> |
| </xs:element> |
| <xs:element name="descrambling" minOccurs="0" maxOccurs="1"> |
| <xs:complexType> |
| <xs:attribute name="frontendConnection" type="frontendId" use="required"/> |
| </xs:complexType> |
| </xs:element> |
| <xs:element name="dvrRecord" minOccurs="0" maxOccurs="1"> |
| <xs:complexType> |
| <xs:attribute name="frontendConnection" type="frontendId" use="required"/> |
| </xs:complexType> |
| </xs:element> |
| <xs:element name="lnbLive" minOccurs="0" maxOccurs="1"> |
| <xs:complexType> |
| <xs:attribute name="frontendConnection" type="frontendId" use="required"/> |
| </xs:complexType> |
| </xs:element> |
| <xs:element name="lnbRecord" minOccurs="0" maxOccurs="1"> |
| <xs:complexType> |
| <xs:attribute name="frontendConnection" type="frontendId" use="required"/> |
| </xs:complexType> |
| </xs:element> |
| </xs:sequence> |
| </xs:complexType> |
| |
| <!-- Full Tuner Configuration. This is the root element of the configuration xml. --> |
| <xs:element name="TunerConfiguration"> |
| <xs:complexType> |
| <xs:sequence> |
| <xs:element name="hardwareConfiguration" type="hardwareConfiguration" minOccurs="1" maxOccurs="1"/> |
| <xs:element name="dataFlowConfiguration" type="dataFlowConfiguration" minOccurs="1" maxOccurs="1"/> |
| </xs:sequence> |
| <xs:attribute name="version" type="version"/> |
| </xs:complexType> |
| <xs:key name="frontendIdUniqueness"> |
| <xs:selector xpath="hardwareConfiguration/frontends/frontend"/> |
| <xs:field xpath="@id"/> |
| </xs:key> |
| </xs:element> |
| </xs:schema> |