[Sound-open-firmware] [PATCH] dw-dma: Fix channel status

From: Pan Xiuli xiuli.pan@linux.intel.com
At the end of the DMA, we need to set the channel status into parapre, otherwise next dma start will fail. This will fix APL pause resume issues.
Signed-off-by: Pan Xiuli xiuli.pan@linux.intel.com
-- Test with: Mininow max rt5651 and GP-MRB nocodec SOF master: 728f1ff3e32e14e19847ba513f8b0e3af80762c0 SOF-Tool master: 5b5bbe31e6d914079707bfa6c129c2730ea7aeff https://github.com/plbossart/sound/tree/topic/sof-v4.14: fe5e29155127a717ba5ae454b4bdde99afa67723 --- src/drivers/dw-dma.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/src/drivers/dw-dma.c b/src/drivers/dw-dma.c index f6f776a..ff0f74a 100644 --- a/src/drivers/dw-dma.c +++ b/src/drivers/dw-dma.c @@ -953,6 +953,7 @@ static void dw_dma_irq_handler(void *data) trace_dma("LSo"); /* disable channel, finished */ dw_write(dma, DW_DMA_CHAN_EN, CHAN_DISABLE(i)); + p->chan[i].status = COMP_STATE_PREPARE; } } #endif

On 3/9/2018 16:48, Xiuli Pan wrote:
From: Pan Xiuli xiuli.pan@linux.intel.com
At the end of the DMA, we need to set the channel status into parapre, otherwise next dma start will fail. This will fix APL pause resume issues.
Signed-off-by: Pan Xiuli xiuli.pan@linux.intel.com
-- Test with: Mininow max rt5651 and GP-MRB nocodec SOF master: 728f1ff3e32e14e19847ba513f8b0e3af80762c0 SOF-Tool master: 5b5bbe31e6d914079707bfa6c129c2730ea7aeff https://github.com/plbossart/sound/tree/topic/sof-v4.14: fe5e29155127a717ba5ae454b4bdde99afa67723
src/drivers/dw-dma.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/src/drivers/dw-dma.c b/src/drivers/dw-dma.c index f6f776a..ff0f74a 100644 --- a/src/drivers/dw-dma.c +++ b/src/drivers/dw-dma.c @@ -953,6 +953,7 @@ static void dw_dma_irq_handler(void *data) trace_dma("LSo"); /* disable channel, finished */ dw_write(dma, DW_DMA_CHAN_EN, CHAN_DISABLE(i));
} #endifp->chan[i].status = COMP_STATE_PREPARE; }
This patch may still cause random pause resume fail. Still need to check with the pipeline.

On 3/9/2018 16:48, Xiuli Pan wrote:
From: Pan Xiuli xiuli.pan@linux.intel.com
At the end of the DMA, we need to set the channel status into parapre, otherwise next dma start will fail. This will fix APL pause resume issues.
Signed-off-by: Pan Xiuli xiuli.pan@linux.intel.com
-- Test with: Mininow max rt5651 and GP-MRB nocodec SOF master: 728f1ff3e32e14e19847ba513f8b0e3af80762c0 SOF-Tool master: 5b5bbe31e6d914079707bfa6c129c2730ea7aeff https://github.com/plbossart/sound/tree/topic/sof-v4.14: fe5e29155127a717ba5ae454b4bdde99afa67723
src/drivers/dw-dma.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/src/drivers/dw-dma.c b/src/drivers/dw-dma.c index f6f776a..ff0f74a 100644 --- a/src/drivers/dw-dma.c +++ b/src/drivers/dw-dma.c @@ -953,6 +953,7 @@ static void dw_dma_irq_handler(void *data) trace_dma("LSo"); /* disable channel, finished */ dw_write(dma, DW_DMA_CHAN_EN, CHAN_DISABLE(i));
} #endifp->chan[i].status = COMP_STATE_PREPARE; }
Ping for review.
Thanks Xiuli

On Wed, 2018-03-14 at 11:09 +0800, Pan, Xiuli wrote:
On 3/9/2018 16:48, Xiuli Pan wrote:
From: Pan Xiuli xiuli.pan@linux.intel.com
At the end of the DMA, we need to set the channel status into parapre, otherwise next dma start will fail. This will fix APL pause resume issues.
Signed-off-by: Pan Xiuli xiuli.pan@linux.intel.com
Applied.
Thanks
Liam
participants (3)
-
Liam Girdwood
-
Pan, Xiuli
-
Xiuli Pan