aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2021-05-21 10:48:00 +0200
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2021-05-21 10:48:00 +0200
commit3ba75420a6e29eb85a0bccd23ef7381e15e3efa9 (patch)
tree01c895892e827a196f9a033df10aef668efa8ea0
parentbf461ab00c6e3dad0d38c85b3b1292e45195c8f5 (diff)
downloadv4l-utils-3ba75420a6e29eb85a0bccd23ef7381e15e3efa9.tar.gz
cec-compliance: use the actual audio_out_delay value
cec_ops_report_current_latency() hardcodes the audio_out_delay value if it is unused, ignoring the actual value. Which is fine, except when running a compliance test, then you want the actual value. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--utils/cec-compliance/cec-test-audio.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/cec-compliance/cec-test-audio.cpp b/utils/cec-compliance/cec-test-audio.cpp
index 9471865e..bf7b3920 100644
--- a/utils/cec-compliance/cec-test-audio.cpp
+++ b/utils/cec-compliance/cec-test-audio.cpp
@@ -39,6 +39,11 @@ static int dal_request_current_latency(struct node *node, unsigned me, unsigned
cec_ops_report_current_latency(&msg, &phys_addr, &video_latency, &low_latency_mode,
&audio_out_compensated, &audio_out_delay);
+ // cec_ops_report_current_latency will hardcode audio_out_delay
+ // if it is unused, but for this test we want the real value, so
+ // get it from the actual message.
+ if (msg.len >= 7)
+ audio_out_delay = msg.msg[6];
fail_on_test(phys_addr != node->remote[la].phys_addr);
info("Video latency: %d (%dms)\n", video_latency, (video_latency - 1) * 2);
info("Low latency mode: %d\n", low_latency_mode);