aboutsummaryrefslogtreecommitdiffstats
path: root/utils/cec-compliance/cec-test.cpp
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2017-02-16 12:20:45 +0100
committerHans Verkuil <hans.verkuil@cisco.com>2017-02-16 12:20:45 +0100
commit8d8a29521a3a202268def8c3e648376fb5f4047e (patch)
tree874916415c6a666416af4dbebad880743684d96b /utils/cec-compliance/cec-test.cpp
parent13d54896bb9d984e41cb13175ba84e64ee522ba2 (diff)
cec-compliance: add --timeout option
The default timeout for power-related messages is 60 seconds. Add the --timeout option to make this configurable. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Diffstat (limited to 'utils/cec-compliance/cec-test.cpp')
-rw-r--r--utils/cec-compliance/cec-test.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/cec-compliance/cec-test.cpp b/utils/cec-compliance/cec-test.cpp
index 3d78bfd1..d68da5ef 100644
--- a/utils/cec-compliance/cec-test.cpp
+++ b/utils/cec-compliance/cec-test.cpp
@@ -477,17 +477,17 @@ static int routing_control_set_stream_path(struct node *node, unsigned me, unsig
__u16 phys_addr;
/* Send Set Stream Path with the remote physical address. We expect the
- source to eventually send Active Source. The timeout of 60 seconds is
- necessary because the device might have to wake up from standby.
+ source to eventually send Active Source. The timeout of long_timeout
+ seconds is necessary because the device might have to wake up from standby.
In CEC 2.0 it is mandatory for sources to send Active Source. */
if (is_tv(la, node->remote[la].prim_type))
interactive_info(true, "Please ensure that the device is in standby.");
- announce("Sending Set Stream Path and waiting for reply. This may take up to 60 s.");
+ announce("Sending Set Stream Path and waiting for reply. This may take up to %u s.", long_timeout);
cec_msg_init(&msg, me, la);
cec_msg_set_stream_path(&msg, node->remote[la].phys_addr);
msg.reply = CEC_MSG_ACTIVE_SOURCE;
- fail_on_test(!transmit_timeout(node, &msg, 60000));
+ fail_on_test(!transmit_timeout(node, &msg, long_timeout * 1000));
if (timed_out(&msg) && is_tv(la, node->remote[la].prim_type))
return NOTSUPPORTED;
if (timed_out(&msg) && node->remote[la].cec_version < CEC_OP_CEC_VERSION_2_0) {

Privacy Policy