From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
robh+dt@kernel.org, vkoul@kernel.org,
yung-chuan.liao@linux.intel.com
Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org, quic_srivasam@quicinc.com
Subject: Re: [PATCH v3 1/3] soundwire: qcom: add runtime pm support
Date: Wed, 20 Apr 2022 12:39:26 -0500 [thread overview]
Message-ID: <10eb3973-03c4-74cd-d28a-014fc280cdf8@linux.intel.com> (raw)
In-Reply-To: <20220228172528.3489-2-srinivas.kandagatla@linaro.org>
> @@ -1017,6 +1032,15 @@ static int qcom_swrm_startup(struct snd_pcm_substream *substream,
> struct snd_soc_dai *codec_dai;
> int ret, i;
>
> + ret = pm_runtime_get_sync(ctrl->dev);
> + if (ret < 0 && ret != -EACCES) {
> + dev_err_ratelimited(ctrl->dev,
> + "pm_runtime_get_sync failed in %s, ret %d\n",
> + __func__, ret);
> + pm_runtime_put_noidle(ctrl->dev);
> + return ret;
here there's an error handling, but ...
> + }
> +
> sruntime = sdw_alloc_stream(dai->name);
> if (!sruntime)
> return -ENOMEM;
> @@ -1044,6 +1068,9 @@ static void qcom_swrm_shutdown(struct snd_pcm_substream *substream,
>
> sdw_release_stream(ctrl->sruntime[dai->id]);
> ctrl->sruntime[dai->id] = NULL;
> + pm_runtime_mark_last_busy(ctrl->dev);
> + pm_runtime_put_autosuspend(ctrl->dev);
> +
> }
>
> static const struct snd_soc_dai_ops qcom_swrm_pdm_dai_ops = {
> @@ -1197,12 +1224,23 @@ static int qcom_swrm_get_port_config(struct qcom_swrm_ctrl *ctrl)
> static int swrm_reg_show(struct seq_file *s_file, void *data)
> {
> struct qcom_swrm_ctrl *swrm = s_file->private;
> - int reg, reg_val;
> + int reg, reg_val, ret;
> +
> + ret = pm_runtime_get_sync(swrm->dev);
> + if (ret < 0 && ret != -EACCES) {
> + dev_err_ratelimited(swrm->dev,
> + "pm_runtime_get_sync failed in %s, ret %d\n",
> + __func__, ret);
> + pm_runtime_put_noidle(swrm->dev);
... here it's missing?
I have a fix ready but thought I would check first if this was intentional
https://github.com/thesofproject/linux/pull/3602/commits/6353eec8dc971c5f0fda0166ae1777f71784ea32
> + }
>
> for (reg = 0; reg <= SWR_MSTR_MAX_REG_ADDR; reg += 4) {
> swrm->reg_read(swrm, reg, ®_val);
> seq_printf(s_file, "0x%.3x: 0x%.2x\n", reg, reg_val);
> }
> + pm_runtime_mark_last_busy(swrm->dev);
> + pm_runtime_put_autosuspend(swrm->dev);
> +
>
> return 0;
next prev parent reply other threads:[~2022-04-20 17:41 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-28 17:25 [PATCH v3 0/3] soundwire: qcom: add pm runtime support Srinivas Kandagatla
2022-02-28 17:25 ` [PATCH v3 1/3] soundwire: qcom: add runtime pm support Srinivas Kandagatla
2022-03-01 13:52 ` Pierre-Louis Bossart
2022-03-03 10:52 ` Geert Uytterhoeven
2022-04-20 17:39 ` Pierre-Louis Bossart [this message]
2022-04-20 17:46 ` Srinivas Kandagatla
2022-04-20 17:53 ` Pierre-Louis Bossart
2022-02-28 17:25 ` [PATCH v3 2/3] dt-bindings: soundwire: qcom: document optional wake irq Srinivas Kandagatla
2022-02-28 17:25 ` [PATCH v3 3/3] soundwire: qcom: add in-band wake up interrupt support Srinivas Kandagatla
2022-02-28 18:01 ` Pierre-Louis Bossart
2022-03-01 11:13 ` Srinivas Kandagatla
2022-03-01 13:51 ` Pierre-Louis Bossart
2022-03-01 13:52 ` Pierre-Louis Bossart
2022-04-20 17:40 ` Pierre-Louis Bossart
2022-03-02 15:42 ` [PATCH v3 0/3] soundwire: qcom: add pm runtime support Vinod Koul
2022-04-04 21:42 ` Amit Pundir
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=10eb3973-03c4-74cd-d28a-014fc280cdf8@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_srivasam@quicinc.com \
--cc=robh+dt@kernel.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=vkoul@kernel.org \
--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 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).