Skip to content

Commit 7f91f01

Browse files
vijendarmukundabroonie
authored andcommitted
ASoC: amd: ps: fix for irq handler return status
If any Soundwire manager interrupt is reported, and wake interrupt is not reported, in this scenario irq_flag will be set to zero, which results in interrupt handler return status as IRQ_NONE. Add new irq flag 'wake_irq_flag' check for SoundWire wake interrupt handling to fix incorrect irq handling return status. Fixes: 3898b18 ("ASoC: amd: ps: add soundwire wake interrupt handling") Signed-off-by: Vijendar Mukunda <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 3cc393d commit 7f91f01

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sound/soc/amd/ps/pci-ps.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ static irqreturn_t acp63_irq_handler(int irq, void *dev_id)
193193
struct amd_sdw_manager *amd_manager;
194194
u32 ext_intr_stat, ext_intr_stat1;
195195
u16 irq_flag = 0;
196+
u16 wake_irq_flag = 0;
196197
u16 sdw_dma_irq_flag = 0;
197198

198199
adata = dev_id;
@@ -231,7 +232,7 @@ static irqreturn_t acp63_irq_handler(int irq, void *dev_id)
231232
}
232233

233234
if (adata->acp_rev >= ACP70_PCI_REV)
234-
irq_flag = check_and_handle_acp70_sdw_wake_irq(adata);
235+
wake_irq_flag = check_and_handle_acp70_sdw_wake_irq(adata);
235236

236237
if (ext_intr_stat & BIT(PDM_DMA_STAT)) {
237238
ps_pdm_data = dev_get_drvdata(&adata->pdm_dev->dev);
@@ -245,7 +246,7 @@ static irqreturn_t acp63_irq_handler(int irq, void *dev_id)
245246
if (sdw_dma_irq_flag)
246247
return IRQ_WAKE_THREAD;
247248

248-
if (irq_flag)
249+
if (irq_flag | wake_irq_flag)
249250
return IRQ_HANDLED;
250251
else
251252
return IRQ_NONE;

0 commit comments

Comments
 (0)