[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <9D7D9C4C-3245-41A3-B0C4-D74FBB5FE91A@canonical.com>
Date: Fri, 23 Oct 2020 20:44:18 +0800
From: Kai-Heng Feng <kai.heng.feng@...onical.com>
To: Takashi Iwai <tiwai@...e.de>
Cc: tiwai@...e.com, Jaroslav Kysela <perex@...ex.cz>,
Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
Ranjani Sridharan <ranjani.sridharan@...ux.intel.com>,
Kai Vehmanen <kai.vehmanen@...ux.intel.com>,
Mark Brown <broonie@...nel.org>,
Harsha Priya <harshapriya.n@...el.com>,
Randy Dunlap <rdunlap@...radead.org>,
"Gustavo A. R. Silva" <gustavo@...eddedor.com>,
"moderated list:SOUND" <alsa-devel@...a-project.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/4] ALSA: hda: Refactor codec PM to use direct-complete
optimization
> On Oct 23, 2020, at 19:32, Takashi Iwai <tiwai@...e.de> 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.
Kai-Heng
>
>
> thanks,
>
> Takashi
Powered by blists - more mailing lists