summaryrefslogtreecommitdiff
path: root/lib/igt_audio.c
diff options
context:
space:
mode:
authorSimon Ser <simon.ser@intel.com>2019-04-23 16:04:54 +0300
committerArkadiusz Hiler <arkadiusz.hiler@intel.com>2019-04-25 13:07:41 +0300
commit9a0770f04f7e24fb9eb41308dd0435166d467323 (patch)
tree2d65105f9b182d14d96e7a3ee5b486a41178915f /lib/igt_audio.c
parente5fc41b102ec50210646449822cb7f2f81d7f99a (diff)
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 <simon.ser@intel.com> Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
Diffstat (limited to 'lib/igt_audio.c')
-rw-r--r--lib/igt_audio.c5
1 files changed, 4 insertions, 1 deletions
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