Skip to content

Commit 7d721ba

Browse files
broonietiwai
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent ee12040 commit 7d721ba

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

tools/testing/selftests/alsa/pcm-test.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -446,9 +446,14 @@ static void test_pcm_time1(struct pcm_data *data,
446446
}
447447

448448
static const struct time_test_def time_tests[] = {
449-
/* name format rate chan period buffer */
450-
{ "S16.48k.2.small", "S16_LE", 48000, 2, 512, 4096 },
451-
{ "S16.48k.2.big", "S16_LE", 48000, 2, 24000, 192000 },
449+
/* name format rate chan period buffer */
450+
{ "8k.1.big", "S16_LE", 8000, 2, 8000, 32000 },
451+
{ "8k.2.big", "S16_LE", 8000, 2, 8000, 32000 },
452+
{ "44k1.2.big", "S16_LE", 44100, 2, 22050, 192000 },
453+
{ "48k.2.small", "S16_LE", 48000, 2, 512, 4096 },
454+
{ "48k.2.big", "S16_LE", 48000, 2, 24000, 192000 },
455+
{ "48k.6.big", "S16_LE", 48000, 6, 48000, 576000 },
456+
{ "96k.2.big", "S16_LE", 96000, 2, 48000, 192000 },
452457
};
453458

454459
int main(void)

0 commit comments

Comments
 (0)