-
Notifications
You must be signed in to change notification settings - Fork 33
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
SAI/I2S Support #19
Comments
I'm waiting until we have a solid DMA branch before really delving into this. DMA is something I'd like to immediately support with the driver. In the meantime I'm working on a little no_std modular synth/sampler/sequencer type library for the project I have in mind. |
I think I might be waiting forever on the audio support in usb-device unless I start looking to do it myself, which is what I was looking to see before committing time on this |
I want to use a Teensy4.1 with the audio adapter, that is attached via i2s. what needs to be done for that to work? BR, Christian |
You can do it without DMA, the chances of missing the fill for the FIFO and getting an underflow or overflow error I think increases though as now you need to constantly attempt to keep the SAI FIFO filled (for tx) and drained (for rx). |
imxrt-rs/imxrt-iomuxc#3 added SAI pins, so we're set on hardware pin support. To support an I2S adapter on the Teensy 4.1, we would need an SAI driver in the HAL.
We have a proof-of-concept DMA driver in the 0.4 HAL. There's DMA support for SPI, UART, and ADC. SAI support might look similar; just implement a few traits. |
I have just started experimenting a bit with this. I agree that DMA is the better way to go here, but if you trigger an interrupt based on the FIFO watermark, and aim to write 4-8 samples per interrupt, the CPU overhead is quite manageable. (About 2% or so, at 96 kHz in a random not-particularly-optimized RTIC hack I've been poking at) |
That of course makes perfect sense, very cool |
SAI support would be a great way to make good use of these chips as audio processors
The text was updated successfully, but these errors were encountered: