All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>
To: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
	alsa-devel@alsa-project.org
Cc: tiwai@suse.de, "Péter Ujfalusi" <peter.ujfalusi@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: Re: [PATCH 2/3] ASoC: SOF: pm: Always tear down pipelines before DSP suspend
Date: Fri, 16 Dec 2022 10:06:56 +0100	[thread overview]
Message-ID: <f062be0f-0022-b77f-b13a-3e722baaa446@linux.intel.com> (raw)
In-Reply-To: <20221215185347.1457541-3-ranjani.sridharan@linux.intel.com>

On 12/15/2022 7:53 PM, Ranjani Sridharan wrote:
> 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;
>   

Can tplg_ops even be null? Rest of SOF code seems to skip this check and 
only check for callback presence.

Also won't tearing down pipelines few lines later become unnecessary then?
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/tree/sound/soc/sof/pm.c?id=a12a383e59ce486abd719b6bda33c353a3b385e7#n220


  reply	other threads:[~2022-12-16  9:08 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 [this message]
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=f062be0f-0022-b77f-b13a-3e722baaa446@linux.intel.com \
    --to=amadeuszx.slawinski@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=ranjani.sridharan@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.