-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
[TW#19859] Zero i2s dma buffer after write, so we have silence after buffer underflow #1789
Comments
I guess that some code has been changed in esp-idf ( memset(finish_desc->buf, 0, finish_desc->size); |
this doesn't result in a compiler-warning: but is that correct? does it zero all the dma buffers? i still have problems with earlephilhower/ESP8266Audio#48 even with this patch. |
It has been observed that, in case of underflow (data unavailability) in I2S transmission, previously filled up tx descriptors continue to get transmitted on line, causing noise in case of audio use case. This change adds optional `tx_desc_auto_clear` field during I2S driver intialization than can zero initialize tx descriptor in case of underflow situation in interrupt handler itself. Closes: #1789 (cherry picked from commit 765bf67)
It has been observed that, in case of underflow (data unavailability) in I2S transmission, previously filled up tx descriptors continue to get transmitted on line, causing noise in case of audio use case. This change adds optional `tx_desc_auto_clear` field during I2S driver intialization than can zero initialize tx descriptor in case of underflow situation in interrupt handler itself. Closes: espressif/esp-idf#1789 (cherry picked from commit 765bf67)
See also: earlephilhower/ESP8266Audio#48
If a ets_memset(finish_desc->buf, 0, finish_desc->buf_size);
is added before
esp-idf/components/driver/i2s.c
Line 504 in da27816
It would give us silence when a i2s buffer underflow happens, instead of the looping noise we get now :)
The text was updated successfully, but these errors were encountered: