aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2019-10-16 09:27:06 +0200
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2019-10-16 09:27:06 +0200
commit8d20035c12fe63d2c4b2dd9c0c5a71b6b13c3e4a (patch)
tree1f0bedf771f94057cf7c44ea6502276ed5718261
parentb51e9a8a74eed6da15127fe5eadf515914347f76 (diff)
cec-compliance: improve Inactive Source test
If Inactive Source is sent by a TV, then it should be ignored by the remote device. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--utils/cec-compliance/cec-test.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/utils/cec-compliance/cec-test.cpp b/utils/cec-compliance/cec-test.cpp
index b6d8efee..0a2aec20 100644
--- a/utils/cec-compliance/cec-test.cpp
+++ b/utils/cec-compliance/cec-test.cpp
@@ -454,13 +454,15 @@ static int routing_control_inactive_source(struct node *node, unsigned me, unsig
CEC_MSG_ACTIVE_SOURCE, CEC_MSG_SET_STREAM_PATH);
mode = CEC_MODE_INITIATOR;
doioctl(node, CEC_S_MODE, &mode);
- fail_on_test(response < 0);
- fail_on_test(interactive && !question("Did the TV switch away from or stop showing this source?"));
+ if (me == CEC_LOG_ADDR_TV) {
+ // Inactive Source should be ignored by all other devices
+ fail_on_test(response >= 0);
+ } else {
+ fail_on_test(response < 0);
+ fail_on_test(interactive && !question("Did the TV switch away from or stop showing this source?"));
+ }
- if (interactive)
- return 0;
- else
- return PRESUMED_OK;
+ return 0;
}
static int routing_control_active_source(struct node *node, unsigned me, unsigned la, bool interactive)

Privacy Policy