APL: dw-dma: fix interrupt clear

Interrupt clear will clear all interrupt bit. If two channel is enabled
and when pause/resume one of stream, the two interrupts may happen at
same time and one of them will be wrongly cleared.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
This commit is contained in:
Pan Xiuli 2018-05-21 17:33:14 +08:00 committed by Liam Girdwood
parent e3b10cd9c7
commit 610f4c7180
1 changed files with 4 additions and 3 deletions

View File

@ -932,9 +932,11 @@ static void dw_dma_irq_handler(void *data)
dw_write(dma, DW_CLEAR_ERR, status_err & i);
}
mask = 0x1 << i;
/* clear interrupts for channel*/
dw_write(dma, DW_CLEAR_BLOCK, status_block);
dw_write(dma, DW_CLEAR_TFR, status_tfr);
dw_write(dma, DW_CLEAR_BLOCK, status_block & mask);
dw_write(dma, DW_CLEAR_TFR, status_tfr & mask);
/* skip if channel is not running */
if (p->chan[i].status != COMP_STATE_ACTIVE) {
@ -942,7 +944,6 @@ static void dw_dma_irq_handler(void *data)
return;
}
mask = 0x1 << i;
#if DW_USE_HW_LLI
/* end of a LLI block */