-
Notifications
You must be signed in to change notification settings - Fork 205
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
[Proposal] I2S/SAI traits - take 3 #426
base: master
Are you sure you want to change the base?
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @ryankurte (or someone else) soon. Please see the contribution instructions for more information. |
Thank you for your work! |
May I ask what is the intent in having a separate crate for I2S? |
The motivation is twofold:
Once the traits have proved themselves, we can start the integration discussion. However, in the case of |
Is this going anywhere? I do wonder why TDM API is treated differently from I2S at the API level? Can't it all be thought of as 'an audio interface with n channels', and the details for the formatting dealt with at a lower level? There obviously needs to be some method of specifying whether the hardware goes into TDM or I2S mode, and how many channels. |
This is exactly what I did on my branch, and the code is quite generic over any type of SAI interface, and some parts are even already tested on hardware :) |
Hey there, I've started implementing I2S on the ESP32 (well, the peripheral is called I2S but is also supporting TDM and I2S left-aligned which are not per se standard I2S), and since there is no trait here for that that works for different modes (#385 wouldn't support TDM for example) I'd like to propose one.
I called the module "SAI" for "Serial Audio Interface" which is also used by different manufacturers to qualify their "I2S" peripheral, and use generics so one implement only the modes supported by their chips, and works for different number of channel for TDM.
Still in draft, I prefer finishing testing my implementation to make sure this design makes sense before asking for a proper review, but if anyone want to take a look, any suggestion is welcome.