alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org, Lars-Peter Clausen <lars@metafoo.de>,
	patches.audio@intel.com, liam.r.girdwood@linux.intel.com,
	broonie@kernel.org, Sanyog Kale <sanyog.r.kale@intel.com>
Subject: Re: [PATCH] ASoC: pcm: allow delayed suspending request by	users
Date: Thu, 7 Jan 2016 13:55:16 +0530	[thread overview]
Message-ID: <20160107082516.GJ11778@localhost> (raw)
In-Reply-To: <s5hegdusvme.wl-tiwai@suse.de>

On Wed, Jan 06, 2016 at 02:08:57PM +0100, Takashi Iwai wrote:
> On Tue, 05 Jan 2016 12:44:49 +0100,
> Vinod Koul wrote:
> > -	pm_runtime_put(platform->dev);
> > -	for (i = 0; i < rtd->num_codecs; i++)
> > -		pm_runtime_put(rtd->codec_dais[i]->dev);
> > -	pm_runtime_put(cpu_dai->dev);
> > +	pm_runtime_mark_last_busy(platform->dev);
> > +	pm_runtime_put_autosuspend(platform->dev);
> > +
> > +	for (i = 0; i < rtd->num_codecs; i++) {
> > +		pm_runtime_mark_last_busy(rtd->codec_dais[i]->dev);
> > +		pm_runtime_put_autosuspend(rtd->codec_dais[i]->dev);
> > +	}
> > +
> > +	pm_runtime_mark_last_busy(cpu_dai->dev);
> > +	pm_runtime_put_autosuspend(cpu_dai->dev);
> > +
> >  	for (i = 0; i < rtd->num_codecs; i++) {
> >  		if (!rtd->codec_dais[i]->active)
> >  			pinctrl_pm_select_sleep_state(rtd->codec_dais[i]->dev);
> 
> Lots of duplicated codes there...  Worth to have a common helper?

I certainly think so :) will do this after merge window

-- 
~Vinod

      reply	other threads:[~2016-01-07  8:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-05 11:44 [PATCH] ASoC: pcm: allow delayed suspending request by users Vinod Koul
2016-01-05 17:49 ` Applied "ASoC: pcm: allow delayed suspending request by users" to the asoc tree Mark Brown
2016-01-06 13:08 ` [PATCH] ASoC: pcm: allow delayed suspending request by users Takashi Iwai
2016-01-07  8:25   ` Vinod Koul [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=20160107082516.GJ11778@localhost \
    --to=vinod.koul@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lars@metafoo.de \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=patches.audio@intel.com \
    --cc=sanyog.r.kale@intel.com \
    --cc=tiwai@suse.de \
    /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).