From: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, "Péter Ujfalusi" <peter.ujfalusi@linux.intel.com>,
"Ranjani Sridharan" <ranjani.sridharan@linux.intel.com>,
"Pierre-Louis Bossart" <pierre-louis.bossart@linux.intel.com>,
broonie@kernel.org, "Curtis Malainey" <cujomalainey@chromium.org>,
"Bard Liao" <yung-chuan.liao@linux.intel.com>
Subject: [PATCH 2/3] ASoC: SOF: pm: Always tear down pipelines before DSP suspend
Date: Thu, 15 Dec 2022 10:53:46 -0800 [thread overview]
Message-ID: <20221215185347.1457541-3-ranjani.sridharan@linux.intel.com> (raw)
In-Reply-To: <20221215185347.1457541-1-ranjani.sridharan@linux.intel.com>
When the DSP is suspended while the firmware is in the crashed state, we
skip tearing down the pipelines. This means that the widget reference
counts will not get to reset to 0 before suspend. This will lead to
errors with resuming audio after system resume. To fix this, invoke the
tear_down_all_pipelines op before skipping to DSP suspend.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Curtis Malainey <cujomalainey@chromium.org>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
---
sound/soc/sof/pm.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sound/soc/sof/pm.c b/sound/soc/sof/pm.c
index 5f88c4a01fa3..f153881db189 100644
--- a/sound/soc/sof/pm.c
+++ b/sound/soc/sof/pm.c
@@ -192,6 +192,9 @@ static int sof_suspend(struct device *dev, bool runtime_suspend)
if (runtime_suspend && !sof_ops(sdev)->runtime_suspend)
return 0;
+ if (tplg_ops && tplg_ops->tear_down_all_pipelines)
+ tplg_ops->tear_down_all_pipelines(sdev, false);
+
if (sdev->fw_state != SOF_FW_BOOT_COMPLETE)
goto suspend;
--
2.25.1
next prev parent reply other threads:[~2022-12-15 18:55 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 ` Ranjani Sridharan [this message]
2022-12-16 9:06 ` [PATCH 2/3] ASoC: SOF: pm: Always tear down pipelines before DSP suspend Amadeusz Sławiński
2022-12-16 12:50 ` Péter Ujfalusi
2022-12-15 18:53 ` [PATCH 3/3] ASoC: SOF: Add FW state to debugfs Ranjani Sridharan
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-3-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 \
--cc=yung-chuan.liao@linux.intel.com \
/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.