All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de,
	"Pierre-Louis Bossart" <pierre-louis.bossart@linux.intel.com>,
	"Ranjani Sridharan" <ranjani.sridharan@linux.intel.com>,
	broonie@kernel.org, "Curtis Malainey" <cujomalainey@chromium.org>,
	"Péter Ujfalusi" <peter.ujfalusi@linux.intel.com>
Subject: [PATCH 3/3] ASoC: SOF: Add FW state to debugfs
Date: Thu, 15 Dec 2022 10:53:47 -0800	[thread overview]
Message-ID: <20221215185347.1457541-4-ranjani.sridharan@linux.intel.com> (raw)
In-Reply-To: <20221215185347.1457541-1-ranjani.sridharan@linux.intel.com>

From: Curtis Malainey <cujomalainey@chromium.org>

Allow system health detection mechanisms to check the FW state, this
will allow them to check if the FW is in its "crashed" state going
forward to help automatically diagnose driver state.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
---
 sound/soc/sof/debug.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sound/soc/sof/debug.c b/sound/soc/sof/debug.c
index d9a3ce7b69e1..ade0507328af 100644
--- a/sound/soc/sof/debug.c
+++ b/sound/soc/sof/debug.c
@@ -353,7 +353,9 @@ int snd_sof_dbg_init(struct snd_sof_dev *sdev)
 			return err;
 	}
 
-	return 0;
+	return snd_sof_debugfs_buf_item(sdev, &sdev->fw_state,
+					sizeof(sdev->fw_state),
+					"fw_state", 0444);
 }
 EXPORT_SYMBOL_GPL(snd_sof_dbg_init);
 
-- 
2.25.1


  parent reply	other threads:[~2022-12-15 18:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-15 18:53 [PATCH 0/3] ASoC: SOF: Fixes for suspend after firmware crash Ranjani Sridharan
2022-12-15 18:53 ` [PATCH 1/3] ASoC: SOF: pm: Set target state earlier Ranjani Sridharan
2022-12-15 18:53 ` [PATCH 2/3] ASoC: SOF: pm: Always tear down pipelines before DSP suspend Ranjani Sridharan
2022-12-16  9:06   ` Amadeusz Sławiński
2022-12-16 12:50     ` Péter Ujfalusi
2022-12-15 18:53 ` Ranjani Sridharan [this message]
2022-12-27  0:14 ` [PATCH 0/3] ASoC: SOF: Fixes for suspend after firmware crash Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221215185347.1457541-4-ranjani.sridharan@linux.intel.com \
    --to=ranjani.sridharan@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=cujomalainey@chromium.org \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.