From 9a0770f04f7e24fb9eb41308dd0435166d467323 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 23 Apr 2019 16:04:54 +0300 Subject: lib/igt_{alsa, audio}: improve logging - Print matched audio devices - Print min/max values when alsa_test_configuration fails - Print debug log line when skipping a frequency Signed-off-by: Simon Ser Reviewed-by: Martin Peres --- lib/igt_audio.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/igt_audio.c') diff --git a/lib/igt_audio.c b/lib/igt_audio.c index 7624f565..5822fed7 100644 --- a/lib/igt_audio.c +++ b/lib/igt_audio.c @@ -102,8 +102,11 @@ int audio_signal_add_frequency(struct audio_signal *signal, int frequency) return -1; /* Stay within the Nyquist–Shannon sampling theorem. */ - if (frequency > signal->sampling_rate / 2) + if (frequency > signal->sampling_rate / 2) { + igt_debug("Skipping frequency %d: too high for a %d Hz " + "sampling rate\n", frequency, signal->sampling_rate); return -1; + } /* Clip the frequency to an integer multiple of the sampling rate. * This to be able to store a full period of it and use that for -- cgit v1.2.3