<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 17, 2022 at 2:21 PM Nicolin Chen <<a href="mailto:nicoleotsuka@gmail.com">nicoleotsuka@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, Aug 16, 2022 at 10:41 PM Shengjiu Wang <<a href="mailto:shengjiu.wang@nxp.com" target="_blank">shengjiu.wang@nxp.com</a>> wrote:<br>
><br>
> The FIFO reset drops the words in the FIFO, which may cause<br>
> channel swap when SAI module is running, especially when the<br>
> DMA speed is low. So it is not good to do FIFO reset in ISR,<br>
> then remove the operation.<br>
<br>
I don't recall the details of adding this many years ago, but<br>
leaving underrun/overrun errors unhandled does not sound right<br>
to me either. Would it result in a channel swap also? Perhaps<br>
there needs to be a reset routine that stops and restarts the<br>
DMA as well?<br></blockquote><div><br></div><div>Remove the reset, the channel swap is gone.</div><div><br></div><div>IMO, no need to handle the underrun/overrun in driver, the SAI</div><div>hardware can handle the read/write pointer itself when xrun happen,</div><div>and we don't need reset routine.</div><div><br></div><div>For ESAI, because it can't handle read/write pointer correctly when</div><div>xrun happen, so we need reset routine.</div><div><br></div><div>Best regards</div><div>Wang shengjiu</div><div> <br></div></div></div>