Skip to content

Commit 1e9477b

Browse files
committed
[nrf fromtree] tests: drivers: i2s: Add tests at typical audio sample rates
Add short transfer test at 8000, 16000, 32000, 44100, 48000, 88200 and 96000 frame clock frequency. Add KConfigs to skip test cases based on value of sample rate. Add configuration for nrf5340dk where i2s peripheral is clocked from ACLK. Signed-off-by: Sebastian Głąb <[email protected]> (cherry picked from commit c42513a)
1 parent 6bf2702 commit 1e9477b

File tree

4 files changed

+290
-34
lines changed

4 files changed

+290
-34
lines changed

tests/drivers/i2s/i2s_speed/Kconfig

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,45 @@ config I2S_TEST_ALLOWED_DATA_OFFSET
3737
help
3838
Maximum allowed offset between sent and received samples. Non-zero
3939
value of this option may be needed when GPIO loopback is used.
40+
41+
config I2S_TEST_SKIP_SAMPLERATE_8000
42+
bool "Skip short transfer tests at 8000 samples per socond"
43+
help
44+
When set to 'y', short transfer tests at 8000 samples per second
45+
will be skipped.
46+
47+
config I2S_TEST_SKIP_SAMPLERATE_16000
48+
bool "Skip short transfer tests at 16000 samples per socond"
49+
help
50+
When set to 'y', short transfer tests at 16000 samples per second
51+
will be skipped.
52+
53+
config I2S_TEST_SKIP_SAMPLERATE_32000
54+
bool "Skip short transfer tests at 32000 samples per socond"
55+
help
56+
When set to 'y', short transfer tests at 32000 samples per second
57+
will be skipped.
58+
59+
config I2S_TEST_SKIP_SAMPLERATE_44100
60+
bool "Skip short transfer tests at 44100 samples per socond"
61+
help
62+
When set to 'y', short transfer tests at 44100 samples per second
63+
will be skipped.
64+
65+
config I2S_TEST_SKIP_SAMPLERATE_48000
66+
bool "Skip short transfer tests at 48000 samples per socond"
67+
help
68+
When set to 'y', short transfer tests at 48000 samples per second
69+
will be skipped.
70+
71+
config I2S_TEST_SKIP_SAMPLERATE_88200
72+
bool "Skip short transfer tests at 88200 samples per socond"
73+
help
74+
When set to 'y', short transfer tests at 88200 samples per second
75+
will be skipped.
76+
77+
config I2S_TEST_SKIP_SAMPLERATE_96000
78+
bool "Skip short transfer tests at 96000 samples per socond"
79+
help
80+
When set to 'y', short transfer tests at 96000 samples per second
81+
will be skipped.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/* Drive i2s peripheral from ACLK. */
2+
3+
&clock {
4+
hfclkaudio-frequency = <11289600>;
5+
};
6+
7+
&i2s0 {
8+
clock-source = "ACLK";
9+
};

0 commit comments

Comments
 (0)