aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2021-07-28 13:52:45 +0200
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2021-07-28 13:52:45 +0200
commitc86aab9cc7f1f001502c70a5e342f7816de3a3d6 (patch)
treed58b3a1867edad81d235fc1a5066cd808d235fd6 /utils
parenta4f2e3a6f306f0bef6664451b44d5a7a18b26803 (diff)
cec-compliance: improve warning about late reply
The warning about a late reply or Feature Abort to a transmitted message was rather vague. Show whether it is a late reply or a late Feature Abort and report the opcode in human readable format. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'utils')
-rw-r--r--utils/cec-compliance/cec-compliance.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/utils/cec-compliance/cec-compliance.cpp b/utils/cec-compliance/cec-compliance.cpp
index 72199762..ce8fde3d 100644
--- a/utils/cec-compliance/cec-compliance.cpp
+++ b/utils/cec-compliance/cec-compliance.cpp
@@ -609,7 +609,6 @@ static bool wait_for_hpd(struct node *node, bool send_image_view_on)
bool transmit_timeout(struct node *node, struct cec_msg *msg, unsigned timeout)
{
struct cec_msg original_msg = *msg;
- __u8 opcode = cec_msg_opcode(msg);
bool retried = false;
int res;
@@ -640,7 +639,10 @@ retry:
if (((msg->rx_status & CEC_RX_STATUS_OK) || (msg->rx_status & CEC_RX_STATUS_FEATURE_ABORT))
&& response_time_ms(msg) > reply_threshold)
- warn("Waited %4ums for reply to msg 0x%02x.\n", response_time_ms(msg), opcode);
+ warn("Waited %4ums for %s to msg %s.\n",
+ response_time_ms(msg),
+ (msg->rx_status & CEC_RX_STATUS_OK) ? "reply" : "Feature Abort",
+ opcode2s(&original_msg).c_str());
if (!cec_msg_status_is_abort(msg))
return true;

Privacy Policy