[PATCH] ASoC: fsl_sai: Remove unnecessary FIFO reset in ISR

Shengjiu Wang shengjiu.wang at gmail.com
Wed Aug 17 16:29:42 AEST 2022


On Wed, Aug 17, 2022 at 2:21 PM Nicolin Chen <nicoleotsuka at gmail.com> wrote:

> On Tue, Aug 16, 2022 at 10:41 PM Shengjiu Wang <shengjiu.wang at nxp.com>
> wrote:
> >
> > The FIFO reset drops the words in the FIFO, which may cause
> > channel swap when SAI module is running, especially when the
> > DMA speed is low. So it is not good to do FIFO reset in ISR,
> > then remove the operation.
>
> I don't recall the details of adding this many years ago, but
> leaving underrun/overrun errors unhandled does not sound right
> to me either. Would it result in a channel swap also? Perhaps
> there needs to be a reset routine that stops and restarts the
> DMA as well?
>

Remove the reset, the channel swap is gone.

IMO, no need to handle the underrun/overrun in driver, the SAI
hardware can handle the read/write pointer itself when xrun happen,
and we don't need reset routine.

For ESAI, because it can't handle read/write pointer correctly when
xrun happen, so we need reset routine.

Best regards
Wang shengjiu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20220817/58153240/attachment.htm>


More information about the Linuxppc-dev mailing list