[alsa-devel] [PATCH v2] ASoC: Add pinctrl PM to components of active DAIs

Nicolin Chen b42378 at freescale.com
Tue Oct 29 04:42:20 CET 2013


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




More information about the Alsa-devel mailing list