[igt-dev] [PATCH i-g-t] tests/kms_chamelium: document audio test frequencies

Simon Ser simon.ser at intel.com
Fri May 17 10:46:53 UTC 2019


Explain that they can get dropped depending on the sampling rate and why.

Signed-off-by: Simon Ser <simon.ser at intel.com>
---
 tests/kms_chamelium.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
index c8b6b22d7b4a..0dd8c41ad2d5 100644
--- a/tests/kms_chamelium.c
+++ b/tests/kms_chamelium.c
@@ -785,12 +785,20 @@ static int test_sampling_rates[] = {

 static int test_sampling_rates_count = sizeof(test_sampling_rates) / sizeof(int);

+/* Test frequencies (Hz): a sine signal will be generated for each.
+ *
+ * Depending on the sampling rate chosen, it might not be possible to properly
+ * detect the generated sine (see Nyquist–Shannon sampling theorem).
+ * Frequencies that can't be reliably detected will be automatically pruned in
+ * #audio_signal_add_frequency. For instance, the 80KHz frequency can only be
+ * tested with a 192KHz sampling rate.
+ */
 static int test_frequencies[] = {
 	300,
 	600,
 	1200,
-	80000,
 	10000,
+	80000,
 };

 static int test_frequencies_count = sizeof(test_frequencies) / sizeof(int);
--
2.21.0



More information about the igt-dev mailing list