[igt-dev] [PATCH i-g-t] tests/kms_chamelium: document capture audio buffer size constraints
Simon Ser
simon.ser at intel.com
Fri May 17 10:27:09 UTC 2019
Explain why we need to choose a big enough buffer for audio capture.
Signed-off-by: Simon Ser <simon.ser at intel.com>
---
tests/kms_chamelium.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
index c8b6b22d7b4a..4db604d32cae 100644
--- a/tests/kms_chamelium.c
+++ b/tests/kms_chamelium.c
@@ -924,7 +924,14 @@ do_test_display_audio(data_t *data, struct chamelium_port *port,
/* Needs to be a multiple of 128, because that's the number of samples
* we get per channel each time we receive an audio page from the
- * Chamelium device. */
+ * Chamelium device.
+ *
+ * Additionally, this value needs to be high enough to guarantee we
+ * capture a full period of each sine we generate. If we capture 2048
+ * samples at a 192KHz sampling rate, we get a full period for a >94Hz
+ * sines. For lower sampling rates, the capture duration will be
+ * longer.
+ */
channel_len = CAPTURE_SAMPLES;
channel = malloc(sizeof(double) * channel_len);
--
2.21.0
More information about the igt-dev
mailing list