blob: 946548582513a4c78a05ea34e3b3ff999060dc02 [file] [log] [blame]
.TH "CEC-COMPLIANCE" "1" "August 2016" "v4l-utils @PACKAGE_VERSION@" "User Commands"
.SH NAME
cec-compliance - An application to verify remote CEC devices
.SH SYNOPSIS
.B cec-compliance
[\fI-h\fR] [\fI-d <dev>\fR] [other options]
.SH DESCRIPTION
The cec-compliance utility can be used to test how well remote CEC devices
comply with the CEC specification. It can also be used to test the local
CEC adapter (with the \fI-A\fR option).
By default it will run through all tests, but if one or more of the feature
test options is given, then only those tests will be performed. A set of core
tests is always run.
The CEC adapter needs to be configured before it is used to run tests with
\fBcec-compliance\fR. Use \fBcec-ctl\fR for configuration.
If the CEC adapter has claimed several logical addresses, the test set is run
from each logical address in succession. The remote device needs to report a
valid physical address in order to run tests on it.
When running compliance tests, \fBcec-follower\fR should be run on the same
adapter. \fBcec-follower\fR will reply to messages that are not handled by
\fBcec-compliance\fR. \fBcec-follower\fR will also monitor the device under test
for behaviors that are not compliant with the specification. Before each test-run
\fBcec-follower\fR should be restarted if it is already running, to initialize
the emulated device with a clean and known initial state.
Some tests require interactive mode (with the \fI-i\fR option) to confirm that
the test passed. When in interactive mode, the user is asked to observe or
perform actions on the remote device. Some tests also give conclusive test
results when run in interactive mode.
When testing the local CEC adapter's compliance with the CEC API, there must be
at least one remote device present in order to test transmitting and receiving.
The compliance tests can have several possible outcomes besides passing and
failing:
OK The test passed.
OK (Unexpected) The test passed, but it was unexpected for the device
under test to support it. This might for example occur
when a TV replies to messages in the Deck Control
feature.
OK (Not Supported) The feature that was tested is not supported by the
device under test, and that feature was not mandatory for
the device to pass.
OK (Presumed) Nothing went wrong during the test, but the test cannot
positively verify that the required effects of the test
occurred. The test runner should verify that the test
passed by manually observing the device under test. This
is typically the test result for tests that send
messages that are not replied to, but which induce some
side effect on the device under test, such as a TV
switching to another input or sending a Remote Control
command.
OK (Refused) The device supports the feature or message being tested,
but responded <Feature Abort> ["Refused"] to indicate
that it cannot perform the given operation. This might
for example occur when trying to test the One Touch
Record feature on a TV with copy protection enabled.
FAIL The test failed and was expected to pass on the device.
OK (Expected Failure) Failed but this was expected. This can only happen
if the \fB\-\-expect\fR option was used that specified
that a particular test would return a FAIL result.
FAIL (Expected X, got Y) The test returned a different result than was expected.
This can only happen if the \fB\-\-expect\fR option was used
that specified that a particular test would return a specific
non-FAIL result.
Some tests depend on other tests being successful. These are not run if the
tests they depend on failed, and they will not be shown in the test listing.
.SH OPTIONS
.TP
\fB\-d\fR, \fB\-\-device\fR \fI<dev>\fR
Use device <dev> as the CEC device. If <dev> is a number, then /dev/cec<dev> is used.
.TP
\fB\-D\fR, \fB\-\-driver\fR \fI<drv>\fR
Use a cec device that has driver name \fI<drv>\fR, as returned by the CEC_ADAP_G_CAPS ioctl.
This option can be combined with \fB\-a\fR to uniquely identify a CEC device without
having to rely on the device node number.
.TP
\fB\-a\fR, \fB\-\-adapter\fR \fI<adap-name>\fR
Use a cec device that has adapter name \fI<adap-name>\fR, as returned by the CEC_ADAP_G_CAPS ioctl.
This option can be combined with \fB\-D\fR to uniquely identify a CEC device without
having to rely on the device node number.
.TP
\fB\-E\fR, \fB\-\-exit\-on\-fail\fR
Exit this application when the first failure occurs instead of continuing
with a possible inconsistent state.
.TP
\fB\-l\fR, \fB\-\-list\-tests\fR
List all tests and the possible test results. This is used by the \fB\-\-expect\fR
option.
.TP
\fB\-e\fR, \fB\-\-expect\fR \fI<test>\fR=\fI<result>\fR
\fB\-n\fR, \fB\-\-expect-with-no-warnings\fR \fI<test>\fR=\fI<result>\fR
Fail if the test gave a different result. The \fB\-\-list\-tests\fR option
lists all the possible tests and what result values can be used.
This can be used in test scripts to verify that a specific result was returned
by the test. One use-case is to verify that an optional feature is actually
supported, so an \fIOK\fR result instead of an \fIOK (Not Supported)\fR result is expected.
It can also be used to accept known failures. In that case the test will not
fail, but return an \fIOK (Expected Failure)\fR result.
The \fB\-\-expect-with-no-warnings\fR variant is more strict and will also
check that the test produced no warnings.
.TP
\fB\-v\fR, \fB\-\-verbose\fR
Turn on verbose reporting.
.TP
\fB\-\-version\fR
Show version information.
.TP
\fB\-w\fR, \fB\-\-wall\-clock\fR
Show timestamps as wall-clock time. This also turns on verbose reporting.
.TP
\fB\-T\fR, \fB\-\-trace\fR
Trace all called ioctls. Useful for debugging.
.TP
\fB\-h\fR, \fB\-\-help\fR
Prints the help message.
.TP
\fB\-W\fR, \fB\-\-exit\-on\-warn\fR
Exit this application when the first warning occurs instead of continuing.
.TP
\fB\-s\fR, \fB\-\-skip\-info\fR
Skip the Driver Info output section.
.TP
\fB\-C\fR, \fB\-\-color\fR \fI<when>\fR
Highlight OK/warn/fail/FAIL strings with colors. OK is marked green, warn is
marked bold, and fail/FAIL are marked bright red if enabled. \fI<when>\fR can
be \fIalways\fR, \fInever\fR, or \fIauto\fR (the default).
.TP
\fB\-N\fR, \fB\-\-no\-warnings\fR
Turn off warning messages.
.TP
\fB\-r\fR, \fB\-\-remote\fR \fI<la>\fR
As initiator test the remote logical address <la> or all LAs if no LA was given.
.TP
\fB\-i\fR, \fB\-\-interactive\fR
Interactive mode when doing remote tests.
.TP
\fB\-R\fR, \fB\-\-reply\-threshold\fR \fI<timeout>\fR
Warn if replies take longer than this threshold (default 1000ms).
.TP
\fB\-t\fR, \fB\-\-timeout\fR \fI<secs>\fR
Set the standby/resume timeout to the given number of seconds. Default is 60s.
.TP
\fB\-A\fR, \fB\-\-test\-adapter\fR
Test the CEC adapter API
.TP
\fB\-F\fR, \fB\-\-test\-fuzzing\fR
Test the remote CEC adapter by randomly creating CEC messages.
This runs forever until an error occurs.
.TP
\fB\-\-test\-core\fR
Test the core functionality
.TP
\fB\-\-test\-audio\-rate\-control\fR
Test the Audio Rate Control feature
.TP
\fB\-\-test\-audio\-return\-channel\-control\fR
Test the Audio Return Channel Control feature
.TP
\fB\-\-test\-capability\-discovery\-and\-control\fR
Test the Capability Discovery and Control feature
.TP
\fB\-\-test\-deck\-control\fR
Test the Deck Control feature
.TP
\fB\-\-test\-device\-menu\-control\fR
Test the Device Menu Control feature
.TP
\fB\-\-test\-device\-osd\-transfer\fR
Test the Device OSD Transfer feature
.TP
\fB\-\-test\-dynamic\-audio\-lipsync\fR
Test the Dynamic Audio Lipsync feature
.TP
\fB\-\-test\-osd\-display\fR
Test the OSD Display feature
.TP
\fB\-\-test\-one\-touch\-play\fR
Test the One Touch Play feature
.TP
\fB\-\-test\-one\-touch\-record\fR
Test the One Touch Record feature
.TP
\fB\-\-test\-power\-status\fR
Test the Power Status feature
.TP
\fB\-\-test\-remote\-control\-passthrough\fR
Test the Remote Control Passthrough feature
.TP
\fB\-\-test\-routing\-control\fR
Test the Routing Control feature
.TP
\fB\-\-test\-system\-audio\-control\fR
Test the System Audio Control feature
.TP
\fB\-\-test\-system\-information\fR
Test the System Information feature
.TP
\fB\-\-test\-timer\-programming\fR
Test the Timer Programming feature
.TP
\fB\-\-test\-tuner\-control\fR
Test the Tuner Control feature
.TP
\fB\-\-test\-vendor\-specific\-commands\fR
Test the Vendor Specific Commands feature
.TP
\fB\-\-test\-standby\-resume\fR
Test standby and resume functionality. This will activate
testing of Standby, Give Device Power Status and One Touch Play.
.SH EXIT STATUS
On success, it returns 0. Otherwise, it will return the error code.
.SH EXAMPLE
We want to test the compliance of a TV when it is interacting with a Playback
device. The device node of the CEC adapter which the TV is connected to is
/dev/cec1.
The local CEC adapter first needs to be configured as a Playback device, and it
must have an appropriate physical address. It is important that the physical
address is correct, so as to not confuse the device under test. For example, if
the CEC adapter is connected to the first input of the TV, the physical address
1.0.0.0 should generally be used.
cec-ctl -d1 --playback --phys-addr 1.0.0.0
Most CEC adapters will automatically detect the physical address, and for those
adapters the \fI--phys-addr\fR option is not needed.
Next, \fBcec-follower\fR also has to be started on the same device:
cec-follower -d1
\fBcec-compliance\fR can now be run towards the TV by supplying the \fI-r\fR
option with the logical address 0:
cec-compliance -d1 -r0
.SH BUGS
This manual page is a work in progress.
Bug reports or questions about this utility should be sent to the linux-media@vger.kernel.org
mailinglist.
.SH SEE ALSO
\fBcec-follower\fR(1), \fBcec-ctl\fR(1)