alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Kai-Heng Feng <kai.heng.feng@canonical.com>
Cc: "moderated list:SOUND" <alsa-devel@alsa-project.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	Kai Vehmanen <kai.vehmanen@linux.intel.com>,
	Harsha Priya <harshapriya.n@intel.com>,
	open list <linux-kernel@vger.kernel.org>,
	tiwai@suse.com,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Mark Brown <broonie@kernel.org>,
	Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
	"Kenneth R . Crudup" <kenny@panix.com>
Subject: Re: [PATCH v2] ALSA: hda: Balance runtime/system PM if direct-complete is disabled
Date: Tue, 19 Jan 2021 16:48:22 +0100	[thread overview]
Message-ID: <s5him7texmh.wl-tiwai@suse.de> (raw)
In-Reply-To: <20210119152145.346558-1-kai.heng.feng@canonical.com>

On Tue, 19 Jan 2021 16:21:43 +0100,
Kai-Heng Feng wrote:
> 
> After hibernation, HDA controller can't be runtime-suspended after
> commit 215a22ed31a1 ("ALSA: hda: Refactor codjc PM to use
> direct-complete optimization"), which enables direct-complete for HDA
> codec.
> 
> The HDA codec driver didn't expect direct-complete will be disabled
> after it returns a positive value from prepare() callback. However,
> there are some places that PM core can disable direct-complete. For
> instance, system hibernation or when codec has subordinates like LEDs.
> 
> So if the codec is prepared for direct-complete but PM core still calls
> codec's suspend or freeze callback, partially revert the commit and take
> the original approach, which uses pm_runtime_force_*() helpers to
> ensure PM refcount are balanced. Meanwhile, still keep prepare() and
> complete() callbacks to enable direct-complete and request a resume for
> jack detection, respectively.
> 
> Reported-by: Kenneth R. Crudup <kenny@panix.com>
> Fixes: 215a22ed31a1 ("ALSA: hda: Refactor codec PM to use direct-complete optimization")
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> ---
> v2:
>  - Use pm_runtime_force_*() helpers to avoid suspend/resume ping pong.

Thanks, applied now.


Takashi

      reply	other threads:[~2021-01-19 15:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-19 15:21 [PATCH v2] ALSA: hda: Balance runtime/system PM if direct-complete is disabled Kai-Heng Feng
2021-01-19 15:48 ` Takashi Iwai [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5him7texmh.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=harshapriya.n@intel.com \
    --cc=kai.heng.feng@canonical.com \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=kenny@panix.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=rdunlap@infradead.org \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).