From ffe44144a2285788ae07768a9240b27ea8182d5c Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 23 Apr 2019 16:04:58 +0300 Subject: tests/kms_chamelium: run audio test with multiple sampling rates The audio test is now run multiple times with a variety of playback sampling rates. We now query the capture audio format from the Chamelium XML-RPC API instead of hardcoding it. One limitation is that we need to start sending an audio signal before being able to query the capture audio format. However we need the capture sample rate to decide which frequencies we generate. For now we use the playback rate and check that it's the same as the capture rate. Another limitation is that the DP receiver reports an unknown sampling rate during the 44.1KHz test. In this case we assume the capture rate is the same as the playback rate. We'll fail later anyway if this assumption is incorrect since we check the signal we receive. Chameleon bug: https://crbug.com/950913 Signed-off-by: Simon Ser Reviewed-by: Martin Peres --- lib/igt_chamelium.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/igt_chamelium.h') diff --git a/lib/igt_chamelium.h b/lib/igt_chamelium.h index 728d16ea..f47b84cb 100644 --- a/lib/igt_chamelium.h +++ b/lib/igt_chamelium.h @@ -109,6 +109,9 @@ void chamelium_capture(struct chamelium *chamelium, struct chamelium_port *port, void chamelium_get_audio_channel_mapping(struct chamelium *chamelium, struct chamelium_port *port, int mapping[static 8]); +void chamelium_get_audio_format(struct chamelium *chamelium, + struct chamelium_port *port, + int *rate, int *channels); void chamelium_start_capturing_audio(struct chamelium *chamelium, struct chamelium_port *port, bool save_to_file); struct chamelium_audio_file *chamelium_stop_capturing_audio(struct chamelium *chamelium, -- cgit v1.2.3