cec¶
Source code: cec.py
Test and check cec power control feature on Chrome OS device.
Description¶
This test checks cec power control feature by turning off and turning on the display power. Cec power control consists of following functions: (1) Wake up a monitor. (2) Put a monitor on standby. (3) Get the display status of a monitor.
To check if a ChromeOS device support this feature or not:
(1) It depends on the HW design. There is an HDMI CEC pin in the HDMI connector.
(2) CEC function(i.e. cec-ctl
) has to be implemented to support it.
In case when a monitor cannot return the power status, we can set
manual_mode
to check the power status manually.
Test Procedure¶
This is an automated test without user interaction. The HDMI port should be connected to a CEC-enabled TV.
If manual_mode
is set, the operator has to press the key to indicate the
display status is on. Else the display status is off.
Dependency¶
HDMI-CEC support for display control in ChromeOS(cec-ctl)
The driver of specified button source: GPIO.
Examples¶
Read system information and power status for the monitor in /dev/cec1 and verify that it is on:
{
"pytest_name": "cec",
"args": {
"index": 1,
"power_on": true
}
}
Read system information for the monitor in /dev/cec0 and check power status manually. Verify that display can be turned on/off via CEC:
{
"pytest_name": "cec",
"args": {
"manual_mode": true,
"power_on": true,
"power_off": true
}
}
Test Arguments¶
Name |
Type |
Description |
---|---|---|
standby_wait_time |
float |
(optional; default: |
image_view_on_wait_time |
float |
(optional; default: |
description_wait_time |
float |
(optional; default: |
initial_status |
int |
(optional; default: |
power_on |
bool |
(optional; default: |
power_off |
bool |
(optional; default: |
controller_type |
str |
(optional; default: |
index |
int |
(optional; default: |
manual_mode |
bool |
(optional; default: |