You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(i2s): retain active clockless frame after DMA timeout - #5482
The classic ESP32 I2S clockless engine used to proceed after a failed DMA wait. A larger queued frame could release and reallocate the scratch buffer still used by DMA. Drop the queued frame if the wait times out and leave the active payload and driver state alone until normal completion.
The host regression reproduces the active-frame release and scratch-buffer allocation before the fix. It passes under ASan/UBSan after the fix and verifies that a later frame transmits successfully. Changed-file lint passed. Full host C++ and hosted classic ESP32 coverage are pending. The attached ESP32-C6 and LPC devices cannot exercise this peripheral.
Summary by CodeRabbit
Bug Fixes
Improved ESP32 I2S handling when a previous transmission is still active. If it does not finish within 500 ms, the new frame is not dispatched, preventing overlapping transmissions.
The pending channel remains available to be transmitted after the active frame completes.
CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.
Parsing warnings: 1
Validation error: Unrecognized key: "enabled" at "reviews.pre_merge_checks"
If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
No actionable comments were generated in the recent review.
Walkthrough
When the 500 ms wait for an active DMA transmit fails, show() clears queued channels and returns without dispatching the queued frame. A regression test checks that the active frame remains in use and that the queued frame can transmit after completion.
Changes: ESP32 I2S timeout handling
Layer / File(s)
Summary
Timeout handling and recovery src/platforms/esp/32/drivers/i2s/channel_engine_i2s_esp32dev.cpp.hpp, tests/unit/platforms/esp/32/drivers/i2s/channel_engine_i2s_esp32dev.cpp
show() now returns after clearing queued channels when the transmit wait fails. The test checks that the active frame remains in use, no buffer is allocated for the queued frame, and the queued frame transmits after completion.
On a DMA transmit timeout, the I2S engine now drops the queued frame instead of releasing the buffer the active transfer is still using. The change is small and has a regression test. No merge-blocking risk was identified, and the pending hardware and full host coverage runs should still complete.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title "fix(i2s): retain active clockless frame after DMA timeout" matches the main change. The summary and objectives describe the ESP32 I2S clockless engine dropping the queued frame when the DMA…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "fix(i2s): retain active clockless frame after DMA timeout" matches the main change. The summary and objectives describe the ESP32 I2S clockless engine dropping the queued frame when the DMA wait times out, while leaving the active frame and buffer unchanged. The title names the fix, the component, and the timeout condition, so it describes the primary change.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Fix failing CI checks
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 1 remain after this review.
Change in examples/Blink per target. The left number is this PR's image flash / attributed RAM in bytes; the colored delta is the change from the merge base (red ↑ is larger, green ↓ is smaller, Same is unchanged).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #5356.
The classic ESP32 I2S clockless engine used to proceed after a failed DMA wait. A larger queued frame could release and reallocate the scratch buffer still used by DMA. Drop the queued frame if the wait times out and leave the active payload and driver state alone until normal completion.
The host regression reproduces the active-frame release and scratch-buffer allocation before the fix. It passes under ASan/UBSan after the fix and verifies that a later frame transmits successfully. Changed-file lint passed. Full host C++ and hosted classic ESP32 coverage are pending. The attached ESP32-C6 and LPC devices cannot exercise this peripheral.
Summary by CodeRabbit