-
Notifications
You must be signed in to change notification settings - Fork 1.3k
arch/xtensa: Add common I2S support for esp32[- |-s2|-s3] #16155
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
arch/xtensa: Add common I2S support for esp32[- |-s2|-s3] #16155
Conversation
[Experimental Bot, please feedback here] This PR description mostly meets the NuttX requirements but could be improved in a few areas. Strengths:
Weaknesses & Suggestions:
Revised Example (incorporating suggestions): SummaryRefactors the ESP32, ESP32-S2, and ESP32-S3 I2S drivers to use a common architecture layer to address RX/TX concurrency issues and improve maintainability and testability. This common layer abstracts hardware-specific register access into a unified API, enabling easier bug fixing and future feature expansion (e.g., supporting different I2S modes). Related NuttX Issue (If applicable) Impact
TestingI confirm that changes are verified on local setup and works as intended:
Testing logs before change:
Testing logs after change:
(Include Build commands and Running instructions as before) By addressing these points, your PR will be clearer, easier to review, and more likely to be accepted. Remember to replace the placeholders (e.g., issue number, before/after logs) with the actual information. |
@eren-terzioglu Please check the conflict. Thanks :-) |
ee5cbe6
to
9d171f3
Compare
Add dma function to use peripheral more efficiently Signed-off-by: Eren Terzioglu <[email protected]>
Add common I2S arch layer support for Xtensa based Espressif devices Signed-off-by: Eren Terzioglu <[email protected]>
Add common I2S board layer support for Xtensa based Espressif devices Signed-off-by: Eren Terzioglu <[email protected]>
Update common layer version of Xtensa based Espressif devices Signed-off-by: Eren Terzioglu <[email protected]>
Add I2S defconfig documentation to esp32s3-devkit board Signed-off-by: Eren Terzioglu <[email protected]>
9d171f3
to
ae977ff
Compare
Remove legacy I2S implementation without breaking defconfigs for Xtensa based Espressif devices Signed-off-by: Eren Terzioglu <[email protected]>
Remove legacy I2S implementation without breaking defconfigs for Xtensa based Espressif devices Signed-off-by: Eren Terzioglu <[email protected]>
Summary
I2S driver changed to a common layer approach to fix RX/TX concurrency working problems on esp32[-|-s2] and fixing bugs easier with using one/common implementation instead of dealing to work on every chip register by register. This approach helps to increase testability with using same configuration values and minimizing potentially missing bugs for each chip. Also we had more capability to implement different modes (e.g. STD, PDM) if supported by hardware.
arch/xtensa/esp32[s3]: Add more dma functions
arch/esp32[s2|s3]: Add common I2S arch layer support
boards/esp32[s2|s3]: Add common I2S board layer support
arch/esp[s2|s3]: Update common layer version
Documentation/esp32s3: Add I2S defconfig documentation
boards/xtensa: Remove legacy I2S implementation for esp32[-|-s2|s3]
arch/xtensa: Remove legacy I2S implementation for esp32[-|-s2|s3]
Impact
Impact on user: No, they can use their defconfigs.
Impact on build: No, Current I2S can be used without any issue
Impact on hardware: Yes, but new I2S interface can work with old defconfigs
Impact on documentation: Yes, missing i2schar defconfigs doc added for esp32s3
Impact on security: No
Impact on compatibility: No, older defconfigs should work fine
Testing
Building
Build command for esp32
Build command for esp32s2
Build command for esp32s3
Running
After build step Dout (esp32/esp32s3: 18, esp32s2: 36 default) and Din (esp32/esp32s3: 19, esp32s2: 37 default) pins connected together via wire (or pointed to the same pin in menuconfig). After that
i2schar
command used to test it.Results
Expected output should be like this:
Note: Default pins for devices: