Re: [PATCH] ASoC: pcm: allow delayed suspending request by users

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux