summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/alsa
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2022-12-01 20:07:45 +0300
committerTakashi Iwai <tiwai@suse.de>2022-12-01 22:02:14 +0300
commit7d721baea138696d5a6746fb5bce0a510a91bd65 (patch)
treece1319140ba2343e05a210cecd3daa664397e217 /tools/testing/selftests/alsa
parentee12040dd53ac9034a782ed80eb8e8e496c05d9b (diff)
downloadlinux-7d721baea138696d5a6746fb5bce0a510a91bd65.tar.xz
kselftest/alsa: Add more coverage of sample rates and channel counts
Now that we can skip unsupported configurations add some more test cases using that, cover 8kHz, 44.1kHz and 96kHz plus 8kHz mono and 48kHz 6 channel. 44.1kHz is a different clock base to the existing 48kHz tests and may therefore show problems with the clock configuration if only 8kHz based rates are really available (or help diagnose if bad clocking is due to only 44.1kHz based rates being supported). 8kHz mono and 48Hz 6 channel are real world formats and should show if clocking does not account for channel count properly. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20221201170745.1111236-7-broonie@kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'tools/testing/selftests/alsa')
-rw-r--r--tools/testing/selftests/alsa/pcm-test.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/testing/selftests/alsa/pcm-test.c b/tools/testing/selftests/alsa/pcm-test.c
index afa13377481d..f293c7d81009 100644
--- a/tools/testing/selftests/alsa/pcm-test.c
+++ b/tools/testing/selftests/alsa/pcm-test.c
@@ -446,9 +446,14 @@ __close:
}
static const struct time_test_def time_tests[] = {
- /* name format rate chan period buffer */
- { "S16.48k.2.small", "S16_LE", 48000, 2, 512, 4096 },
- { "S16.48k.2.big", "S16_LE", 48000, 2, 24000, 192000 },
+ /* name format rate chan period buffer */
+ { "8k.1.big", "S16_LE", 8000, 2, 8000, 32000 },
+ { "8k.2.big", "S16_LE", 8000, 2, 8000, 32000 },
+ { "44k1.2.big", "S16_LE", 44100, 2, 22050, 192000 },
+ { "48k.2.small", "S16_LE", 48000, 2, 512, 4096 },
+ { "48k.2.big", "S16_LE", 48000, 2, 24000, 192000 },
+ { "48k.6.big", "S16_LE", 48000, 6, 48000, 576000 },
+ { "96k.2.big", "S16_LE", 96000, 2, 48000, 192000 },
};
int main(void)