alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Nicolin Chen <b42378@freescale.com>
To: Kyungmin Park <kmpark@infradead.org>
Cc: alsa-devel@alsa-project.org, broonie@kernel.org
Subject: Re: [PATCH v2] ASoC: Add pinctrl PM to components of active DAIs
Date: Tue, 29 Oct 2013 11:42:20 +0800	[thread overview]
Message-ID: <20131029034220.GB8812@MrMyself> (raw)
In-Reply-To: <20131029032512.GA8812@MrMyself>

On Tue, Oct 29, 2013 at 11:25:12AM +0800, Nicolin Chen wrote:
> Hi Kyungmin,
> 
> On Tue, Oct 29, 2013 at 12:35:06PM +0900, Kyungmin Park wrote:
> > > +       /* deactivate pins to sleep state */
> > > +       for (i = 0; i < card->num_rtd; i++) {
> > > +               struct snd_soc_pcm_runtime *rtd = &card->rtd[i];
> > > +               struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
> > > +               pinctrl_pm_select_sleep_state(cpu_dai->dev);
> > 
> > I wonder doesn't check it's active or not? if codec is used during
> > suspend. it doesn't set sleep state?
> 
> I thought codec wouldn't do anything meaningful to cpu dai since the
> whole system is going to suspend. But it should be better to add the
> condition here as well. I'll send a v3.

Wait...For those inactive streams, they're already in sleep state so it
doesn't matter to call pinctrl_pm_select_sleep_state() or not; While for
those active streams, if we undo this pinctrl_pm_select_sleep_state(),
their pins're remaining active during suspend without any power-saving.

So I think maybe I was right at the first place that it's okay not to set
a condition here? Since the card is going to suspend, why do we need to
care codec's behavior? Please correct me if I'm wrong.

Thank you,
Nicolin Chen

  reply	other threads:[~2013-10-29  4:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-29  3:12 [PATCH v2] ASoC: Add pinctrl PM to components of active DAIs Nicolin Chen
2013-10-29  3:35 ` Kyungmin Park
2013-10-29  3:25   ` Nicolin Chen
2013-10-29  3:42     ` Nicolin Chen [this message]
2013-10-29 16:19       ` Mark Brown
2013-10-30  1:47         ` Nicolin Chen
2013-10-30 16:19           ` 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=20131029034220.GB8812@MrMyself \
    --to=b42378@freescale.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=kmpark@infradead.org \
    /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).