Skip to content

Commit

Permalink
ASoC: SOF: Intel: hda: Clear RIRB status before reading WP
Browse files Browse the repository at this point in the history
Port commit 6d011d5 ("ALSA: hda: Clear RIRB status before reading
WP") from legacy HDA driver to fix the get response timeout issue.
Current SOF driver does not suffer from this issue because sync write
is enabled in hda_init. The issue will come back if the sync write is
disabled for some reason.

Signed-off-by: Brent Lu <[email protected]>
Reviewed-by: Takashi Iwai <[email protected]>
Reviewed-by: Kai Vehmanen <[email protected]>
Reviewed-by: Pierre-Louis Bossart <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
brentlu authored and broonie committed Jun 15, 2020
1 parent e74a1e7 commit 40e2c46
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions sound/soc/sof/intel/hda-stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -653,11 +653,16 @@ irqreturn_t hda_dsp_stream_threaded_handler(int irq, void *context)
if (status & AZX_INT_CTRL_EN) {
rirb_status = snd_hdac_chip_readb(bus, RIRBSTS);
if (rirb_status & RIRB_INT_MASK) {
/*
* Clearing the interrupt status here ensures
* that no interrupt gets masked after the RIRB
* wp is read in snd_hdac_bus_update_rirb.
*/
snd_hdac_chip_writeb(bus, RIRBSTS,
RIRB_INT_MASK);
active = true;
if (rirb_status & RIRB_INT_RESPONSE)
snd_hdac_bus_update_rirb(bus);
snd_hdac_chip_writeb(bus, RIRBSTS,
RIRB_INT_MASK);
}
}
#endif
Expand Down

0 comments on commit 40e2c46

Please sign in to comment.