[Sound-open-firmware] [PATCH_V2] cnl: dma: fix playback failed at second time
Stop dma at the end of playback, or next time dma is not avialable for playback
--- V2: fix typo in comments
Signed-off-by: Rander Wang rander.wang@intel.com --- src/drivers/dw-dma.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/src/drivers/dw-dma.c b/src/drivers/dw-dma.c index be19e12..15d608c 100644 --- a/src/drivers/dw-dma.c +++ b/src/drivers/dw-dma.c @@ -1103,6 +1103,12 @@ static void dw_dma_irq_handler(void *data) p->chan[i].cb(p->chan[i].cb_data, DMA_IRQ_TYPE_BLOCK, &next); } + + if (next.size == DMA_RELOAD_END) { + trace_dma("LSo"); + /* disable channel, finished */ + dw_write(dma, DW_DMA_CHAN_EN, CHAN_DISABLE(i)); + } #endif /* end of a transfer */ if ((status_tfr & mask) &&
On 2018年03月02日 13:49, Rander Wang wrote:
Stop dma at the end of playback, or next time dma is not avialable for playback
V2: fix typo in comments
Signed-off-by: Rander Wang rander.wang@intel.com
src/drivers/dw-dma.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/src/drivers/dw-dma.c b/src/drivers/dw-dma.c index be19e12..15d608c 100644 --- a/src/drivers/dw-dma.c +++ b/src/drivers/dw-dma.c @@ -1103,6 +1103,12 @@ static void dw_dma_irq_handler(void *data) p->chan[i].cb(p->chan[i].cb_data, DMA_IRQ_TYPE_BLOCK, &next); }
if (next.size == DMA_RELOAD_END) {
trace_dma("LSo");
/* disable channel, finished */
dw_write(dma, DW_DMA_CHAN_EN, CHAN_DISABLE(i));
}
Bingo, I forgot add this fix for CNL handler.
Thanks, ~Keyon
#endif /* end of a transfer */ if ((status_tfr & mask) &&
On Fri, 2018-03-02 at 13:49 +0800, Rander Wang wrote:
Stop dma at the end of playback, or next time dma is not avialable for playback
typo still there: available :)
V2: fix typo in comments
Signed-off-by: Rander Wang rander.wang@intel.com
src/drivers/dw-dma.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/src/drivers/dw-dma.c b/src/drivers/dw-dma.c index be19e12..15d608c 100644 --- a/src/drivers/dw-dma.c +++ b/src/drivers/dw-dma.c @@ -1103,6 +1103,12 @@ static void dw_dma_irq_handler(void *data) p->chan[i].cb(p->chan[i].cb_data, DMA_IRQ_TYPE_BLOCK, &next); }
if (next.size == DMA_RELOAD_END) {
trace_dma("LSo");
/* disable channel, finished */
dw_write(dma, DW_DMA_CHAN_EN,
CHAN_DISABLE(i));
}
#endif /* end of a transfer */ if ((status_tfr & mask) &&
Last night I sleep too late and make my eye uncomfortable today. It is too bad to sleep too late.
-----Original Message----- From: Ranjani Sridharan [mailto:ranjani.sridharan@linux.intel.com] Sent: Friday, March 2, 2018 2:40 PM To: Wang, Rander rander.wang@intel.com; sound-open-firmware@alsa-project.org Subject: Re: [Sound-open-firmware] [PATCH_V2] cnl: dma: fix playback failed at second time
On Fri, 2018-03-02 at 13:49 +0800, Rander Wang wrote:
Stop dma at the end of playback, or next time dma is not avialable for playback
typo still there: available :)
V2: fix typo in comments
Signed-off-by: Rander Wang rander.wang@intel.com
src/drivers/dw-dma.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/src/drivers/dw-dma.c b/src/drivers/dw-dma.c index be19e12..15d608c 100644 --- a/src/drivers/dw-dma.c +++ b/src/drivers/dw-dma.c @@ -1103,6 +1103,12 @@ static void dw_dma_irq_handler(void *data) p->chan[i].cb(p->chan[i].cb_data, DMA_IRQ_TYPE_BLOCK, &next); }
if (next.size == DMA_RELOAD_END) {
trace_dma("LSo");
/* disable channel, finished */
dw_write(dma, DW_DMA_CHAN_EN,
CHAN_DISABLE(i));
}
#endif /* end of a transfer */ if ((status_tfr & mask) &&
participants (4)
-
Keyon Jie
-
Rander Wang
-
Ranjani Sridharan
-
Wang, Rander