From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: liuhaoran <liuhaoran14@163.com>,
perex@perex.cz, "Péter Ujfalusi" <peter.ujfalusi@linux.intel.com>
Cc: tiwai@suse.com, alsa-devel@alsa-project.org,
sound-open-firmware@alsa-project.org
Subject: Re: [PATCH] ASoC: SOF: Intel: Add error handling in hda_dsp_trace_release
Date: Tue, 3 Oct 2023 11:13:17 -0400 [thread overview]
Message-ID: <5177f0f6-f32b-fa3b-647f-51365ff5b0e8@linux.intel.com> (raw)
In-Reply-To: <20230923091216.26325-1-liuhaoran14@163.com>
On 9/23/23 05:12, liuhaoran wrote:
> This patch adds error-handling for the hda_dsp_stream_put() inside
> the hda_dsp_trace_release function in the hda-trace.c file.
>
> Signed-off-by: liuhaoran <liuhaoran14@163.com>
> ---
> sound/soc/sof/intel/hda-trace.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/sound/soc/sof/intel/hda-trace.c b/sound/soc/sof/intel/hda-trace.c
> index cbb9bd7770e6..5dcd43b9cbe4 100644
> --- a/sound/soc/sof/intel/hda-trace.c
> +++ b/sound/soc/sof/intel/hda-trace.c
> @@ -73,13 +73,22 @@ int hda_dsp_trace_release(struct snd_sof_dev *sdev)
> {
> struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata;
> struct hdac_stream *hstream;
> + int ret;
>
> if (hda->dtrace_stream) {
> hstream = &hda->dtrace_stream->hstream;
> - hda_dsp_stream_put(sdev,
> + ret = hda_dsp_stream_put(sdev,
> SNDRV_PCM_STREAM_CAPTURE,
> hstream->stream_tag);
> +
> hda->dtrace_stream = NULL;
> +
> + if (ret < 0) {
> + dev_dbg(sdev->dev,
> + "stream put failed: %d\n", ret);
> + return ret;
> + }
> +
I don't know if returning an error helps here, this might get in the way
of the suspend.
Peter, what do you think?
> return 0;
> }
>
prev parent reply other threads:[~2023-10-03 15:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-23 9:12 [PATCH] ASoC: SOF: Intel: Add error handling in hda_dsp_trace_release liuhaoran
2023-10-03 15:13 ` Pierre-Louis Bossart [this message]
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=5177f0f6-f32b-fa3b-647f-51365ff5b0e8@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=liuhaoran14@163.com \
--cc=perex@perex.cz \
--cc=peter.ujfalusi@linux.intel.com \
--cc=sound-open-firmware@alsa-project.org \
--cc=tiwai@suse.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 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).