Skip to content

Conversation

@michal-chvatal
Copy link

This PR introduces get_caps() API to DMIC, I2S, and Codec subsystems, enabling
drivers to report their audio capabilities such as supported sample rates, bit widths,
channel counts, buffer requirements, and frame timing.

It implements the API for MCUX I2S Flexcomm, DMIC, and WM8904 audio drivers.

It also introduces common audio definitions in audio_caps.h to unify capability
flags across subsystems.

Changes are related to new MediaPipe library.

Introduce `get_caps()` API to DMIC, I2S, and Codec subsystems to expose
driver-specific audio capabilities such as supported sample rates,
bit widths, channel counts, buffer requirements, and frame timing.

Introduce common audio definitions in `audio_caps.h` to unify capability
flags across subsystems.

Signed-off-by: Michal Chvatal <michal.chvatal@nxp.com>
Implement the `get_caps()` API for MCUX I2S Flexcomm, DMIC, and
WM8904 audio drivers to expose driver-specific capabilities
including supported sample rates, bit widths, channel counts, and
buffer requirements.

All drivers set temporary 10ms minimum frame interval as workaround
for MediaPipe library compatibility.

Signed-off-by: Michal Chvatal <michal.chvatal@nxp.com>
Changes affect:
- drivers: i2s_mcux_flexcomm, dmic_mcux and wm8904
- audio subsystem headers: i2s.h, codec.h, dmic.h

No functional changes, formatting improvements only.

Signed-off-by: Michal Chvatal <michal.chvatal@nxp.com>
Add test for the `get_caps()` API in both I2S and DMIC
driver test suites. Tests validate successful operation,
capability value ranges, and error handling with NULL parameters.

Tests handle drivers that don't implement get_caps by gracefully
skipping when -ENOSYS is returned, ensuring compatibility
across different driver implementations.

Signed-off-by: Michal Chvatal <michal.chvatal@nxp.com>
@zephyrbot zephyrbot added the area: Tests Issues related to a particular existing or missing test label Nov 11, 2025
@zephyrbot zephyrbot requested a review from nashif November 11, 2025 12:23
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Audio area: I2S area: Tests Issues related to a particular existing or missing test platform: NXP NXP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants