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

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

 




> 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.

Kai-Heng

> 
> 
> thanks,
> 
> Takashi




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

  Powered by Linux