Skip to content

delay(1) after non-blocking I2S::write() returned 0 causes audio distortion (No underflow) #1491

Answered by earlephilhower
LinusHeu asked this question in Q&A
Discussion options

You must be logged in to vote

Just as suspected from (4) above, the DMA swapover had an issue. Please try the very simple change in #1500 (with `setBuffers(4, 64) just for sanity since OTW your IRQs are pretty hot and heavy). Your MCVE seems to play fine now with that change, with either delay or busy_wait_ms.

--edit-- setBuffers(32, 16) w/delay(1) also seems to work too. Higher IRQ load, but enough buffers to handle 1ms sleeps every now and then.

Replies: 5 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@earlephilhower
Comment options

@LinusHeu
Comment options

@earlephilhower
Comment options

@earlephilhower
Comment options

Answer selected by LinusHeu
@LinusHeu
Comment options

@lyusupov
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants