linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v2] ASoC: SOF: Intel: hda: unsolicited RIRB response
@ 2020-06-12 10:29 Kai Vehmanen
  2020-06-12 10:57 ` Lu, Brent
  0 siblings, 1 reply; 3+ messages in thread
From: Kai Vehmanen @ 2020-06-12 10:29 UTC (permalink / raw)
  To: Brent Lu
  Cc: alsa-devel, Pierre-Louis Bossart, Liam Girdwood,
	Ranjani Sridharan, Kai Vehmanen, Daniel Baluta, Mark Brown,
	Jaroslav Kysela, Takashi Iwai, Cezary Rojewski, Zhu Yingjiang,
	Keyon Jie, Bard Liao, sound-open-firmware, linux-kernel

Hi Brent,

On Fri, 12 Jun 2020, Brent Lu wrote:

> Port commit 6d011d5057ff ("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.

better to align the logic, so I'm ok to take this patch to SOF. 
Can you fix the summary though:

- ASoC: SOF: Intel: hda: unsolicited RIRB response
+ ASoC: SOF: Intel: hda: Clear RIRB status before reading WP

Br, Kai

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH v2] ASoC: SOF: Intel: hda: unsolicited RIRB response
  2020-06-12 10:29 [PATCH v2] ASoC: SOF: Intel: hda: unsolicited RIRB response Kai Vehmanen
@ 2020-06-12 10:57 ` Lu, Brent
  0 siblings, 0 replies; 3+ messages in thread
From: Lu, Brent @ 2020-06-12 10:57 UTC (permalink / raw)
  To: Kai Vehmanen
  Cc: alsa-devel, Pierre-Louis Bossart, Liam Girdwood,
	Ranjani Sridharan, Daniel Baluta, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, Rojewski, Cezary, Zhu Yingjiang, Keyon Jie,
	Bard Liao, sound-open-firmware, linux-kernel

> 
> better to align the logic, so I'm ok to take this patch to SOF.
> Can you fix the summary though:
> 
> - ASoC: SOF: Intel: hda: unsolicited RIRB response
> + ASoC: SOF: Intel: hda: Clear RIRB status before reading WP
> 
> Br, Kai

A v3 patch is uploaded. Thanks for review.


Regards,
Brent


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v2] ASoC: SOF: Intel: hda: unsolicited RIRB response
@ 2020-06-12  6:01 Brent Lu
  0 siblings, 0 replies; 3+ messages in thread
From: Brent Lu @ 2020-06-12  6:01 UTC (permalink / raw)
  To: alsa-devel
  Cc: Pierre-Louis Bossart, Liam Girdwood, Ranjani Sridharan,
	Kai Vehmanen, Daniel Baluta, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, Cezary Rojewski, Zhu Yingjiang, Keyon Jie,
	Brent Lu, Bard Liao, sound-open-firmware, linux-kernel

Port commit 6d011d5057ff ("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 <brent.lu@intel.com>
---
 sound/soc/sof/intel/hda-stream.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/sound/soc/sof/intel/hda-stream.c b/sound/soc/sof/intel/hda-stream.c
index 7f65dcc..1bda14c 100644
--- a/sound/soc/sof/intel/hda-stream.c
+++ b/sound/soc/sof/intel/hda-stream.c
@@ -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
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-06-12 10:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-12 10:29 [PATCH v2] ASoC: SOF: Intel: hda: unsolicited RIRB response Kai Vehmanen
2020-06-12 10:57 ` Lu, Brent
  -- strict thread matches above, loose matches on Subject: below --
2020-06-12  6:01 Brent Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).