aboutsummaryrefslogtreecommitdiffstats
path: root/utils/cec-compliance
AgeCommit message (Collapse)AuthorFilesLines
2019-04-24cec-compliance: add colorsPhilipp Zabel3-7/+52
Use color codes to mark OK, warn, and FAIL messages with green, bold, and bright red accents, respectively. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-04-24cec-compliance: use warn() in warn_once()Philipp Zabel1-6/+1
Use the warn() macro in warn_once() instead of duplicating its contents. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-03-29Revert "cec-compliance: suppress some warnings for vivid"Hans Verkuil3-9/+2
Instead of changing the adapter test itself (and thus hiding the very real vivid bug), we drop the -A option in test-media instead. This reverts commit 336df387b517572f06d37bbc79a9337804291530.
2019-03-29cec-compliance: suppress some warnings for vividHans Verkuil3-2/+9
The vivid's CEC emulation isn't perfect (it doesn't handle Arbitration Lost situations properly). So disable some warnings when the vivid emulation is detected. This should be reverted once vivid is eventually fixed. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-02-25cec-compliance: fix audio output delay checkHans Verkuil1-2/+4
The check for invalid audio output delay values should only take place if the audio output is partially compensated by the TV. Only if that's true is the audio output delay value used. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-02-19cec-compliance: show latencies in ms and check valuesHans Verkuil1-2/+4
Show the audio/video latencies in ms as well, and check that the reported values are not using reserved values. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-02-04cec-compliance: add -D and -a supportHans Verkuil2-9/+45
With these options you can uniquely identify a CEC device without having to know the device node name. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-01-23cec-compliance: add 3 sec delay after Inactive SourceHans Verkuil1-0/+3
It may take a bit of time for the Inactive Source command to take effect, so add an extra delay here. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-01-14cec-compliance: show driver and device nameHans Verkuil1-2/+3
Show driver and device name in the 'Compliance test for' line and the Total line. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2018-12-11cec-compliance: really fix wrong test for no HPD in testRemote()Hans Verkuil1-1/+1
Use log_addr_mask to detect if HPD is low instead of num_log_addrs. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Fixes: 8c5a3e1d7431 ("fix wrong test for no HPD in testRemote()")
2018-12-06cec-compliance: check if SET_OSD_NAME gives valid OSD nameHans Verkuil1-0/+2
Check for empty OSD name or if there are trailing 0 bytes transmitted after the string. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2018-11-29cec-compliance: fix wrong test for no HPD in testRemote()Hans Verkuil1-1/+1
If the 'standby' flag for the test-to-be-performed is set to true, then the code needs to check is the remote device pulls down the HPD when in standby. In that case the test should be skipped since it is not a valid test for such devices. However, the check was wrong and these tests were still performed. Fix the check. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2018-11-13v4l-utils: fix SHA detectionHans Verkuil1-2/+2
Check if there is a .git directory at the top-level, and only then get the SHA of the HEAD. If the release tarball (which doesn't have a .git directory) is extracted inside another git repo, then the current SHA code would find the SHA of the enclosing git repo, which is not what you want. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2018-11-05cec-compliance: wake-up on Active Source is warn for <2.0Hans Verkuil1-3/+7
The CEC 2.0 specification explicitly forbids powering on a display when Active Source is received. The older specification does not explicitly forbid this (although it is really very clear from the spec that you shouldn't do this). Because the 1.4 spec was not crystal clear some devices expect a display to power up when receiving Active Source, and so some displays actually support this, thus failing this test. So for 1.4 displays this test will report a warning, but it will fail for 2.0 displays. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2018-10-19cec-compliance: fix inconsistent warn textHans Verkuil1-1/+1
Changed "Could not get the CEC version" to "Get CEC Version timed out" to be consistent with similar messages elsewhere. Signed-off-by: Hans Verkuil <hansverk@cisco.com>
2018-10-19cec-compliance: some standby tests should be a warningHans Verkuil2-26/+39
Tests were added to check the handling of core messages while the remote device is in standby. After testing with various devices I realized that many of those do not handle this well, causing the compliance test to fail. For now I have turned them into warnings. This might change in the future. I feel that this falls in the category of "it is really a failure, but almost everyone does this", so for the time being a warning is more appropriate. Signed-off-by: Hans Verkuil <hansverk@cisco.com>
2018-10-18cec-compliance: give proper fail msg for FAIL_CRITICALHans Verkuil1-4/+10
There are three FAIL_CRITICAL tests: neither gives a proper fail message and they also shouldn't be critical for tests done when in standby. Signed-off-by: Hans Verkuil <hansverk@cisco.com>
2018-10-17cec-compliance: show human readable Vendor IDHans Verkuil1-2/+2
The Vendor ID was only shown as a hex value instead of the actual vendor name. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2018-10-16cec-compliance: calculate and show Signal Free TimeHans Verkuil1-13/+107
Substantially improve the testLostMsgs test with better analysis and by calculating the Signal Free Time used by the received messages. This is also logged if -v is given. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2018-10-16cec-compliance: improve tracing of CEC_TRANSMIT/RECEIVEHans Verkuil1-14/+18
Give more information about the transmitted/received CEC message. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2018-10-16cec-compliance: check core messages when remote is in standbyHans Verkuil4-22/+65
Check if the remote CEC device can handle the CEC core messages when in standby. And check that what is returned is equal to the value returned when the device was on. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2018-10-10cec-compliance: further improvements to CEC_EVENT_LOST_MSGS fail infoHans Verkuil1-20/+30
Show the number of messages that can be immediately dequeued from the receive queue, and how many messages trickle in afterwards and over how many seconds. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2018-10-10cec-compliance: more improvements to fail info of CEC_EVENT_LOST_MSGSHans Verkuil1-10/+35
Split out the various errors you can get for a transmit and show what was received. That makes it easy to see how many transmits were OK, NACKed, timed out, etc. Signed-off-by: Hans Verkuil <hansverk@cisco.com>
2018-10-10cec-compliance: improve fail info for CEC_EVENT_LOST_MSGS testHans Verkuil1-11/+22
If this test fails, then instead of just showing the number of received messages, it will now show the number of timed out transmits, successful transmits and messages received from the remote side. It will also fail if timed out transmits are detected. Signed-off-by: Hans Verkuil <hansverk@cisco.com>
2018-10-08cec-compliance: retry poll in case of Arbitration LostHans Verkuil1-2/+15
Polling for remote devices can fail due to an Arbitration Lost condition. Check for this and retry if that was the reason why the poll failed. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2018-10-08cec-compliance: abort when no remote devices were foundHans Verkuil1-0/+5
These tests expect that at least one remote device is found. If not, exit with an error. Continuing without any remote devices will give weird unexpected errors, so check for this early on. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2018-10-05cec-compliance: check for new status flagsHans Verkuil1-2/+3
Also warn when the CEC_TX_STATUS_TIMEOUT flag was set: this shouldn't happen. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2018-10-04cec: move status2s functions to cec-info.cppHans Verkuil1-68/+0
All three cec utilities used the same code to construct a string with the message status. Move this code to cec-info.cpp and use it in all three utilities. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2018-10-03cec-compliance: fix bad check for transmitted vs pending msgsHans Verkuil1-1/+1
The total number of pending messages may be equal to the number of transmitted messages, so replace >= by > in the test. Signed-off-by: Hans Verkuil <hansverk@cisco.com>
2018-09-28cec-compliance: improve fail messageHans Verkuil1-3/+7
Log how many pending messages and transmitted messages there were. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2018-09-25cec-compliance: improve CEC_EVENT_LOST_MSGS testHans Verkuil1-4/+10
- Count the number of transmits and the max TX queue depth - Check that the number of transmits and the number of received messages is close to one another (keep a margin of 2) - Increase the timeout when dequeueing any remaining messages. 1000 ms was too low for some corner cases. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2018-09-20cec-compliance: split up combines testsHans Verkuil1-49/+106
There were a lot of fail_on_test(test1 || test2 || test3) checks that made debugging harder than it needs to be since you don't know which of the three tests failed. So split them all up into separate fail_on_test checks. Signed-off-by: Hans Verkuil <hansverk@cisco.com>
2018-09-14cec-compliance: improve adapter testHans Verkuil1-1/+3
There is a failure that checks the msg.len after sending a message. It fails because the transmit times out waiting for a reply. This fail is very confusing, so improve the test to make it easy to see that it timed out. Signed-off-by: Hans Verkuil <hansverk@cisco.com>
2018-09-14cec-compliance: fix set_osd_string testHans Verkuil1-1/+1
Even though cec-follower implemented SET_OSD_STRING correctly, cec-compliance would still give this warning: warn: cec-test.cpp(332): The device is in an unsuitable state or cannot display the complete message. This was due to an incorrect 'else' statement which should have checked if the received message was a Feature Abort. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2018-08-15cec-compliance: adapter test fixesHans Verkuil1-8/+16
- Don't attempt to configure the adapter as a TV if the physical address isn't 0.0.0.0. - Add a sleep(1) after testing the logical address handling: the last test there is in non-blocking mode, so you need to wait a bit until that non-blocking configuration actually finished. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2018-08-06cec-compliance: measure pings per secondHans Verkuil1-0/+51
As part of the adapter test check how many pings per second you can do towards both a valid and invalid LA and warn if it is less than the expected value. Check this for 5 full consecutive seconds since the remote side might be sending messages as well which can influence this value. Also fix a bug in DQEVENT test in testAdapLogAddrs(): you can get pin events with the CEC_EVENT_FL_INITIAL_STATE flag set, thus causing a fail. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2018-07-24cec-compliance: OK & MAX_RETRIES: report that workaround was appliedHans Verkuil1-1/+1
Previous versions of cec-compliance just reported that OK and MAX_RETRIES were both set. But now this is worked around, so mention that as well. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2018-07-24cec-compliance: if MAX_RETRIES and OK were set, mark as RX timeoutHans Verkuil1-1/+12
Fix the previous fix. Upon closer examination of when both MAX_RETRIES and OK are set it became clear that this happens when the TX succeeded, but waiting for a reply was cancelled. So return an RX_TIMEOUT in that case. Note that this CEC framework bug was fixed in kernel 4.18. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2018-07-23cec-compliance: if MAX_RETRIES and OK were set, clear OKHans Verkuil1-1/+3
There was a bug in the CEC framework where tx_status could have both OK and MAX_RETRIES flags set (this happened if a message was canceled). The cec-compliance utility did warn about this, but still passed tx_status on as-is. So clear the incorrect OK flag instead to avoid problems with this. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2018-06-28cec utils: -w implies -vHans Verkuil2-4/+5
Enabling wall clock time only makes sense for verbose reporting. So automatically enable verbose reporting for the -w option so that you don't have to do -w -v every time. Signed-off-by: Hans Verkuil <hansverk@cisco.com>
2018-06-26cec-compliance: send ACTIVE_SOURCE after IMAGE/TEXT_VIEW_ONHans Verkuil1-0/+6
Some devices will ignore a STANDBY command after an IMAGE/TEXT_VIEW_ON if it is received on an input that is not the current input. So transmit an ACTIVE_SOURCE after the display wakes up following an IMAGE/TEXT_VIEW_ON. Signed-off-by: Hans Verkuil <hansverk@cisco.com>
2018-06-25cec-compliance: add warning if a standby was ignoredHans Verkuil1-0/+6
A STANDBY was sent right after the display reports it was powered on, but that standby was ignored and had to be re-transmitted. Warn if that happens. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2018-06-06cec-compliance: add tests for Wake up TV on Image/Text View OnHans Verkuil1-3/+58
Add new tests that check if a TV wakes up when Image or Text View On is sent. Also fix several related bugs in the code that waits for power status transitions, esp. when dealing with TVs that pull the HPD low when in standby. Signed-off-by: Hans Verkuil <hansverk@cisco.com>
2018-06-06cec-compliance: improve tx_status checksHans Verkuil1-3/+6
Check that OK and MAX_RETRIES cannot both be set. If error status bits were set, then show the status instead of only showing the transmit status if there was an error, but OK was still set. Signed-off-by: Hans Verkuil <hansverk@cisco.com>
2018-06-06cec-compliance: document -s option in manpageHans Verkuil1-0/+3
When the -s option was added to cec-compliance, I forgot to update the manpage. Signed-off-by: Hans Verkuil <hansverk@cisco.com>
2018-06-01cec-compliance: add --exit-on-fail/warn optionsHans Verkuil3-0/+29
These options simplify debugging: when the first fail or warning occurs, the application will call exit(1) instead of continuing. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2018-05-15cec-compliance: add --skip-info optionHans Verkuil1-10/+18
Skips showing the device info part and the explanation of the test terminology. Signed-off-by: Hans Verkuil <hansverk@cisco.com>
2018-04-24cec-compliance: improve standby_resume_active_source_nowakeHans Verkuil1-3/+6
This shouldn't be CEC 2.0 specific, it is also valid for 1.4. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2018-03-08cec-compliance: remove outdated commentHans Verkuil1-7/+3
The comment about waiting X seconds before sending Image View On was outdated. Just remove it. The other comment explaining why we send Image View On was moved up a few lines to just before where we create the CEC message instead of where we call the CEC_TRANSMIT ioctl. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2018-03-01cec-compliance: don't poll, just send Image View OnHans Verkuil1-4/+3
If the PA is invalid, then we attempt to wake up the display by sending Image View On. Don't send a poll first as this can confuse the display. Signed-off-by: Hans Verkuil <hansverk@cisco.com>

Privacy Policy