Skip to content

tests: drivers: i2s: Add i2s_additional tests #90732

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

nordic-segl
Copy link
Collaborator

@nordic-segl nordic-segl commented May 28, 2025

Extend I2S testing with additional test cases that verify I2S/TDM driver operation at various configurations.

Check:

  • word sizes of 8, 16, 24, 32 and 48 bits;
  • one, two, four and eight audio channels configuration;
  • data format I2S, Left Justified, Right Justified, PCM Long, PCM Short;
  • data order MSB and LSB first;
  • bit clock and frame clock inversion;
  • block size of 6 bytes;
  • bit clock continuous and gated;
  • internal loopback;
  • pingpong option.

nordic-piks
nordic-piks previously approved these changes May 28, 2025
@nordic-segl nordic-segl force-pushed the NRFX-7013_Add-i2s_additional-tests branch 5 times, most recently from 068a111 to 32a154c Compare June 3, 2025 07:58
@nordic-segl nordic-segl force-pushed the NRFX-7013_Add-i2s_additional-tests branch from 32a154c to 7b2b8dc Compare June 6, 2025 06:00
{
struct i2s_config i2s_cfg = default_i2s_cfg;

i2s_cfg.block_size = 6;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is block size 6 so special that it needs to be tested?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, they only support sizes that are multiples of 32-bit words. But I don't think there's actually a need to check this. This test case looks quite weird.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It tests API - i2s_configure() shall return -EINVAL when invalid argument was passed.
https://docs.zephyrproject.org/apidoc/latest/group__i2s__interface.html#ga299003d72146c127f88d7c12c08889cc

Extend I2S testing with additional test cases that verify
I2S/TDM driver operation at various configurations.

Check:
- word sizes of 8, 16, 24, 32 and 48 bits;
- one, two, four and eight audio channels configuration;
- data format I2S, Left Justified, Right Justified,
  PCM Long, PCM Short;
- data order MSB and LSB first;
- bit clock and frame clock inversion;
- block size of 6 bytes;
- bit clock continuous and gated;
- internal loopback;
- pingpong option.

Signed-off-by: Sebastian Głąb <[email protected]>
@nordic-segl nordic-segl force-pushed the NRFX-7013_Add-i2s_additional-tests branch from 7b2b8dc to 42b583f Compare June 16, 2025 11:10
Copy link

@nordic-segl nordic-segl requested a review from anangl June 16, 2025 11:52
@kartben kartben merged commit a58684d into zephyrproject-rtos:main Jun 18, 2025
21 checks passed
@nordic-segl nordic-segl deleted the NRFX-7013_Add-i2s_additional-tests branch June 18, 2025 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants