-
Notifications
You must be signed in to change notification settings - Fork 307
Use move based api for I2S #3639
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
base: main
Are you sure you want to change the base?
Conversation
I'm very glad to see someone else getting the DMA move stuff to the finish line. (I was struggling to find the motivation to touch the I2S driver)
There isn't a one size fits all solution for this one. Some peripherals will tell you when this happens, and other won't. There's probably other DMA registers that can be polled to check for this condition but I haven't looked yet. I'm leaning towards leaving this problem to the user, because regardless of whatever solution you choose here, it is still up to the user to restart the I2S/DMA transfer when it stops. |
b1a1e82
to
50ee962
Compare
50ee962
to
de67c31
Compare
NOTE: `rx_start` now doesn't take buf length into account for `rx_eof_num`
2b8bb3d
to
578b2c8
Compare
06c00ca
to
5737d41
Compare
Think this may be ready. Added the TxStreamBuf that basically works symmetrically with the RxStreamBuf implementation. A few problems I couldn't get my heads around
I'll fix the docs and also changelog once I get a basic review. |
This is to fix #3285, as in #3612 @Dominaezzz laid out reasons for a move-based i2s API so I thought I may help a bit about #2269 . Haven't tested or anything, just to put the draft PR here to see if I'm in the right direction. Also I'm very aware of #3219 but it seems to be dormant for a bit. I really need to make i2s working for my little project with mic and speaker so let me know if anyone's already working on this and I'll be glad to close my PR.
DmaTxStreamBuf
similar toDmaRxStreamBuf
, tested on an ESP32-S3 with MAX98357A to output soundGDMA_OUT_TOTAL_EOF_CHn_INT
, so the other ways around maybecheck_owner
and listen to error