aboutsummaryrefslogtreecommitdiffstats
path: root/utils/cec-compliance
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2019-03-29 12:46:14 +0100
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2019-03-29 12:47:26 +0100
commit336df387b517572f06d37bbc79a9337804291530 (patch)
tree00b59b4a02e3190efc0c57f2a711818e92da5c80 /utils/cec-compliance
parentc03f66775d675450ce709ff972ac9f4960549a7c (diff)
cec-compliance: suppress some warnings for vivid
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>
Diffstat (limited to 'utils/cec-compliance')
-rw-r--r--utils/cec-compliance/cec-compliance.cpp1
-rw-r--r--utils/cec-compliance/cec-compliance.h1
-rw-r--r--utils/cec-compliance/cec-test-adapter.cpp9
3 files changed, 9 insertions, 2 deletions
diff --git a/utils/cec-compliance/cec-compliance.cpp b/utils/cec-compliance/cec-compliance.cpp
index 1f70adef..0e4dfb0d 100644
--- a/utils/cec-compliance/cec-compliance.cpp
+++ b/utils/cec-compliance/cec-compliance.cpp
@@ -1185,6 +1185,7 @@ int main(int argc, char **argv)
doioctl(&node, CEC_ADAP_G_CAPS, &caps);
node.caps = caps.capabilities;
node.available_log_addrs = caps.available_log_addrs;
+ node.is_vivid_driver = !strcmp(caps.driver, "vivid");
if (options[OptTestAudioRateControl])
test_tags |= TAG_AUDIO_RATE_CONTROL;
diff --git a/utils/cec-compliance/cec-compliance.h b/utils/cec-compliance/cec-compliance.h
index 0a890311..a0ff0bea 100644
--- a/utils/cec-compliance/cec-compliance.h
+++ b/utils/cec-compliance/cec-compliance.h
@@ -168,6 +168,7 @@ struct node {
struct remote remote[16];
__u16 phys_addr;
bool in_standby;
+ bool is_vivid_driver;
};
struct remote_subtest {
diff --git a/utils/cec-compliance/cec-test-adapter.cpp b/utils/cec-compliance/cec-test-adapter.cpp
index 887cc2e1..a61ce9e3 100644
--- a/utils/cec-compliance/cec-test-adapter.cpp
+++ b/utils/cec-compliance/cec-test-adapter.cpp
@@ -1067,6 +1067,11 @@ int testLostMsgs(struct node *node)
__u64 last_ts = 0;
unsigned tx_repeats = 0;
+ /*
+ * Note that 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.
+ */
for (unsigned i = 0; i < 2; i++) {
msg.timeout = 3000;
@@ -1085,7 +1090,7 @@ int testLostMsgs(struct node *node)
if (last_init == initiator && initiator == me) {
tx_repeats++;
} else {
- if (tx_repeats > 2)
+ if (tx_repeats > 2 && !node->is_vivid_driver)
warn("Too many transmits (%d) without receives\n",
tx_repeats);
tx_repeats = 0;
@@ -1180,7 +1185,7 @@ int testLostMsgs(struct node *node)
if (fail_msg)
return fail("There were %d messages in the receive queue for %d transmits\n",
pending_msgs, xfer_cnt);
- if (warn_msg)
+ if (warn_msg && !node->is_vivid_driver)
warn("There were %d CEC_GET_VERSION transmits but only %d CEC_VERSION receives\n",
xfer_cnt, pending_rx_cec_version_msgs);
return 0;

Privacy Policy