Skip to content

Conversation

projectgus
Copy link
Contributor

Summary

  • Fix I2S initialisation when requested DMA buffer size is small (driver always needs 2 buffers).
  • Fixes silent failure during I2S init, will now raise an exception if initialisation fails.
  • Adds support for ESP32 in the extmod/machine_i2s_rate test.

Found while testing #15523.

Testing

With these changes machine_i2s_rate test now passes on esp32.

Copy link

codecov bot commented Jul 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.43%. Comparing base (e1ecc23) to head (dd5e2f9).
Report is 6 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #15541   +/-   ##
=======================================
  Coverage   98.43%   98.43%           
=======================================
  Files         161      161           
  Lines       21275    21277    +2     
=======================================
+ Hits        20942    20944    +2     
  Misses        333      333           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

ESP-IDF driver always requires at least two DMA buffers, so ensure that's
the case.

Failures during initialisation were being lost because ESP_ERROR_CHECK is
configured as a no-op, so the failure was deferred until read() or write()
was called on the port.  Raise an error from init, instead.

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
@dpgeorge dpgeorge merged commit 6d05424 into micropython:master Aug 2, 2024
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.

2 participants