• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 # CEC CTS testing for Android TV devices
2 
3 NOTE: CTS has two meanings here. HDMI defines a set of tests in the
4 **Compliance Test Specification** of HDMI 1.4b
5 __HDMI Compliance Test Specification 1.4b__ and
6 **Android Compatibility Test Suite**.
7 
8 The Android Compatibility Test Suite includes specific tests from the HDMI
9 Compliance Test Specification as well as other Android specific tests.
10 
11 ## Setup
12 
13 ### Source devices
14 
15 Running these CTS tests requires a specific HDMI layout with a CEC adapter.
16 
17 *   Android TV source device, e.g. a playback device or an audio system
18 *   CEC adapter, see [External CEC Adapter instructions](cec_adapter.md)
19 *   Install `cec-client` binary, see [install instructions](cec_adapter.md#software)
20 *   HDMI Display (aka a TV) with CEC disabled to avoid interference, or an HDMI fake plug
21 
22 It is recommended that the source device has an HDMI physical address of `1.0.0.0` while running
23 the tests. [DEPRECATED] In case the DUT takes a physical address other than `1.0.0.0` and this is
24 unavoidable, the tests can be configured to expect a different physical address by appending these
25 arguments to the tradefed command:
26 ```
27 --module-arg CtsHdmiCecHostTestCases:set-option:cec-phy-addr:<address_in_decimal>
28 ```
29 Thus, for a device that is taking an address `3.0.0.0`, pass `12288` as the `cec-phy-addr` argument.
30 
31 The CEC adapter may also be installed in-between the TV and the source device.
32 
33 ![drawing](setup.png)
34 
35 ### TV panel devices
36 
37 Running these CTS tests on TV panel devices requires an external CEC adapter.
38 
39 *   Android TV panel device
40 *   CEC adapter, see [External CEC Adapter instructions](cec_adapter.md)
41 *   Install `cec-client` binary, see [install instructions](cec_adapter.md#software)
42 
43 It is recommended to connect the CEC adapter to the HDMI ARC port of the TV device.
44 
45 ### Automation
46 
47 Given the setup described above you can run this test module with the following commands:
48 
49 #### cts-tradefed
50 
51 ```
52 cts-tradefed > run cts -m CtsHdmiCecHostTestCases
53 ```
54 
55 #### atest
56 ```
57 atest CtsHdmiCecHostTestCases
58 ```
59 
60 To shard the test (distribute and run the tests on multiple devices), use this
61 command -
62 ```
63 ./cts-tradefed run commandAndExit cts --enable-token-sharding --shard-count 3 -m CtsHdmiCecHostTestCases
64 ```
65 
66 The shard count corresponds to the number of DUTs connected to the host.
67