[igt-dev] [PATCH i-g-t] tests/kms_chamelium: document capture audio buffer size constraints
Martin Peres
martin.peres at intel.com
Fri May 17 11:52:55 UTC 2019
On 17/05/2019 13:27, Simon Ser wrote:
> Explain why we need to choose a big enough buffer for audio capture.
>
> Signed-off-by: Simon Ser <simon.ser at intel.com>
Reviewed-by: Martin Peres <martin.peres at linux.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
>
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki
Business Identity Code: 0357606 - 4
Domiciled in Helsinki
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
More information about the igt-dev
mailing list