alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: SOF: Fix "no reply expected" error during firmware-boot
@ 2020-04-02 18:49 Hans de Goede
  2020-04-02 18:49 ` [PATCH 2/2] ASoC: SOF: Turn "firmware boot complete" message into a dbg message Hans de Goede
  2020-04-02 19:15 ` [PATCH 1/2] ASoC: SOF: Fix "no reply expected" error during firmware-boot Pierre-Louis Bossart
  0 siblings, 2 replies; 12+ messages in thread
From: Hans de Goede @ 2020-04-02 18:49 UTC (permalink / raw)
  To: Pierre-Louis Bossart, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai
  Cc: Hans de Goede, alsa-devel

At least on Canon Lake each time the SOF firmware is booted,
the following error is logged in dmesg:

[   36.711803] sof-audio-pci 0000:00:1f.3: error: no reply expected, received 0x0

Since the DSP is powered down when not in used this happens everytime
e.g. a notification plays, polluting dmesg with these false-positive
errors.

Add a check to snd_sof_ipc_reply() which makes it return success when
receiving an unexpected msg_id 0 during fw-boot, fixing these
false-positive errors being logged.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 sound/soc/sof/ipc.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sound/soc/sof/ipc.c b/sound/soc/sof/ipc.c
index 78aa1da7c7a9..7303b3d42f12 100644
--- a/sound/soc/sof/ipc.c
+++ b/sound/soc/sof/ipc.c
@@ -312,6 +312,11 @@ int snd_sof_ipc_reply(struct snd_sof_dev *sdev, u32 msg_id)
 {
 	struct snd_sof_ipc_msg *msg = &sdev->ipc->msg;
 
+	/* Ignore msg_id 0 being send during fw-boot */
+	if (msg->ipc_complete && sdev->fw_state == SOF_FW_BOOT_IN_PROGRESS &&
+	    msg_id == 0)
+		return 0;
+
 	if (msg->ipc_complete) {
 		dev_err(sdev->dev, "error: no reply expected, received 0x%x",
 			msg_id);
-- 
2.26.0


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

end of thread, other threads:[~2020-04-21 15:07 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-02 18:49 [PATCH 1/2] ASoC: SOF: Fix "no reply expected" error during firmware-boot Hans de Goede
2020-04-02 18:49 ` [PATCH 2/2] ASoC: SOF: Turn "firmware boot complete" message into a dbg message Hans de Goede
2020-04-02 19:18   ` Pierre-Louis Bossart
2020-04-03 13:40   ` Applied "ASoC: SOF: Turn "firmware boot complete" message into a dbg message" to the asoc tree Mark Brown
2020-04-02 19:15 ` [PATCH 1/2] ASoC: SOF: Fix "no reply expected" error during firmware-boot Pierre-Louis Bossart
2020-04-03  8:01   ` Hans de Goede
2020-04-03 13:17     ` Pierre-Louis Bossart
2020-04-20 12:48       ` Mark Brown
2020-04-20 15:17         ` Pierre-Louis Bossart
2020-04-20 20:28           ` Kai Vehmanen
2020-04-21 13:22             ` Hans de Goede
2020-04-21 13:36               ` Pierre-Louis Bossart

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).