mirror of https://github.com/thesofproject/sof.git
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:
parent
e3b10cd9c7
commit
610f4c7180
|
@ -932,9 +932,11 @@ static void dw_dma_irq_handler(void *data)
|
||||||
dw_write(dma, DW_CLEAR_ERR, status_err & i);
|
dw_write(dma, DW_CLEAR_ERR, status_err & i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mask = 0x1 << i;
|
||||||
|
|
||||||
/* clear interrupts for channel*/
|
/* clear interrupts for channel*/
|
||||||
dw_write(dma, DW_CLEAR_BLOCK, status_block);
|
dw_write(dma, DW_CLEAR_BLOCK, status_block & mask);
|
||||||
dw_write(dma, DW_CLEAR_TFR, status_tfr);
|
dw_write(dma, DW_CLEAR_TFR, status_tfr & mask);
|
||||||
|
|
||||||
/* skip if channel is not running */
|
/* skip if channel is not running */
|
||||||
if (p->chan[i].status != COMP_STATE_ACTIVE) {
|
if (p->chan[i].status != COMP_STATE_ACTIVE) {
|
||||||
|
@ -942,7 +944,6 @@ static void dw_dma_irq_handler(void *data)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mask = 0x1 << i;
|
|
||||||
|
|
||||||
#if DW_USE_HW_LLI
|
#if DW_USE_HW_LLI
|
||||||
/* end of a LLI block */
|
/* end of a LLI block */
|
||||||
|
|
Loading…
Reference in New Issue