Re: [PATCH 1/4] ALSA: hda: Refactor codec PM to use direct-complete optimization

From: Takashi Iwai
Date: Fri Oct 23 2020 - 09:05:02 EST


On Fri, 23 Oct 2020 14:44:18 +0200,
Kai-Heng Feng wrote:
>
>
>
> > On Oct 23, 2020, at 19:32, Takashi Iwai <tiwai@xxxxxxx> wrote:
> >
> > On Fri, 23 Oct 2020 12:23:35 +0200,
> > Kai-Heng Feng wrote:
> >>
> >> +static void hda_codec_pm_complete(struct device *dev)
> >> {
> >> struct hda_codec *codec = dev_to_hda_codec(dev);
> >> - int ret;
> >>
> >> - ret = pm_runtime_force_resume(dev);
> >> - /* schedule jackpoll work for jack detection update */
> >> - if (codec->jackpoll_interval ||
> >> - (pm_runtime_suspended(dev) && hda_codec_need_resume(codec)))
> >> - schedule_delayed_work(&codec->jackpoll_work,
> >> - codec->jackpoll_interval);
> >> - return ret;
> >> + if (pm_runtime_suspended(dev) &&
> >> + (hda_codec_need_resume(codec) || codec->forced_resume))
> >> + pm_request_resume(dev);
> >
> > You shouldn't drop the check of codec->jackpoll_interval. If this
> > field is set, the codec driver has to resume no matter what it was, so
> > that the polling can start up again.
>
> Ok, will address in v2.

Thanks. And, could you submit v2 series with a cover letter?


Takashi