RE: [RESEND PATCH v2 1/1] ASoC: dwc: fix dma stop transferring issue
Date: Wed Sep 30 2015 - 22:26:34 EST
> From: linux-arm-kernel
> [mailto:linux-arm-kernel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Mark
> Sent: Thursday, October 1, 2015 2:22 AM
> To: yitian <yitian.bu@xxxxxxxxxxxxxx>
> Cc: alsa-devel@xxxxxxxxxxxxxxxx; wsa@xxxxxxxxxxxxx;
> linux-kernel@xxxxxxxxxxxxxxx; Andrew.Jackson@xxxxxxx; tiwai@xxxxxxxx;
> lgirdwood@xxxxxxxxx; perex@xxxxxxxx;
> Subject: Re: [RESEND PATCH v2 1/1] ASoC: dwc: fix dma stop transferring
> On Tue, Sep 29, 2015 at 10:43:17PM +0800, yitian wrote:
> > Designware I2S uses tx empty and rx available signals as the DMA
> > handshaking signals. during music playing, if XRUN occurs,
> > i2s_stop() function will be executed and both tx and rx irq are
> > masked, when music continues to be played, i2s_start() is executed
> > but both tx and rx irq are not unmasked which cause I2S stop
> > sending DMA handshaking signal to DMA controller, and it finally
> > causes music playing will be stopped once XRUN occurs for the first
> > time.
> I'm a bit concerned about how this code ever worked given the above
> description - is there some race condition which allows things to work
> if we're lucky?
Thanks for your comments.
I think maybe two reasons:
1. designware I2S IP in my chipset(new design) is using tx empty and rx
available signal as the DMA handshaking signal, but it may be not true
for all chipsets. If I2S has separate signal as DMA handshaking signal, mask
irq should not impact DMA transfer. But Synopsys's engineer recommend us to
tx and rx irq signal as the DMA handshaking signal, meanwhile we cannot find
separate DMA handshaking signal from designware's IP spec, that's why tx/rx
will impact DMA transfer.
2. I am using a FPGA for test, the cpu frequency of it is only 26MHz, that
XRUN is very easy to happen on my board. But I guess most of the developers
are using real chipset which can have at least 600MHz frequency so XRUN is
not easy to be reproduced. As my test, No XUN, no this bug...
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/