aboutsummaryrefslogtreecommitdiffstats
path: root/utils/cec-compliance/cec-test-audio.cpp
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2020-01-21 11:59:20 +0100
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2020-01-21 11:59:20 +0100
commit6c4e5b8186f01c180aef02dad3239432e14afaae (patch)
tree75767149f24f2f204c3f60df00aad3568b3e55bd /utils/cec-compliance/cec-test-audio.cpp
parent1b94254fe0c5b80fc907a9de39eb93a187822651 (diff)
cec-compliance: fail/warn if reported latency > 50ms
If the video latency > 50 ms then fail if Low Latency Mode was reported, or warn otherwise. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'utils/cec-compliance/cec-test-audio.cpp')
-rw-r--r--utils/cec-compliance/cec-test-audio.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/utils/cec-compliance/cec-test-audio.cpp b/utils/cec-compliance/cec-test-audio.cpp
index 7156f75a..af472bf4 100644
--- a/utils/cec-compliance/cec-test-audio.cpp
+++ b/utils/cec-compliance/cec-test-audio.cpp
@@ -54,8 +54,17 @@ static int dal_request_current_latency(struct node *node, unsigned me, unsigned
if (audio_out_compensated == CEC_OP_AUD_OUT_COMPENSATED_PARTIAL_DELAY) {
info("Audio out delay: %d (%dms)\n", audio_out_delay, (audio_out_delay - 1) * 2);
fail_on_test(audio_out_delay == 0 || audio_out_delay > 251);
+ // Warn if the delay is more than 50 ms
+ warn_on_test(audio_out_delay > (50 / 2) + 1);
}
fail_on_test(video_latency == 0 || video_latency > 251);
+ // Warn if the delay is more than 50 ms and low latency mode is set
+ if (video_latency > (50 / 2) + 1) {
+ if (low_latency_mode)
+ fail("Low latency mode is set, but video latency is > 50ms\n");
+ else
+ warn("Video latency is > 50ms\n");
+ }
return 0;
}

Privacy Policy