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

2020-10-23 Thread Takashi Iwai
On Fri, 23 Oct 2020 14:44:18 +0200, Kai-Heng Feng wrote: > > > > > On Oct 23, 2020, at 19:32, Takashi Iwai 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_

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

2020-10-23 Thread Kai-Heng Feng
> On Oct 23, 2020, at 19:32, Takashi Iwai 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

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

2020-10-23 Thread Takashi Iwai
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 up

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

2020-10-23 Thread Kai-Heng Feng
Upon system resume, hda_codec_pm_resume() uses hda_codec_force_resume() to resume the codec. However, pm_runtime_force_resume() won't really resume the codec because of pm_runtime_need_not_resume() check. Hence, hda_codec_force_resume() schedules a jackpoll work, which is to really power up the co