All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Sridharan, Ranjani" <ranjani.sridharan@intel.com>
To: Linux-ALSA <alsa-devel@alsa-project.org>, Takashi Iwai <tiwai@suse.de>
Cc: "Vehmanen, Kai" <kai.vehmanen@intel.com>,
	"Uimonen, Jaska" <jaska.uimonen@intel.com>,
	Pierre-louis Bossart <pierre-louis.bossart@intel.com>
Subject: [alsa-devel] Question about runtime PM for HDA codecs
Date: Wed, 15 Jan 2020 10:15:40 -0800	[thread overview]
Message-ID: <CAFQqKeV3fG8=DaV4_rGDL3QH7gG9zEHwS9T41aOag+-cNN9wnQ@mail.gmail.com> (raw)

Hi Takashi,

Can I please bother you with a question about how to handle the situation
with runtime PM for HDA codec on one of the Intel CML-based platforms with
an ALC285 codec.
Basically, the problem we're facing is that when using the SOF driver,
jack detection doesn't seem to work as intended because the codec gets
suspended right after the headset is plugged in.
After a bit of experimenting, what we found was that calling
snd_hda_set_power_save() with a delay of 0 or something > 0, both help with
fixing the problem.

But, I have a basic question about this. What is the expectation for
enabling the codec runtime PM?
I see that the legacy driver calls snd_hda_set_power_save() based on the
CONFIG_SND_HDA_POWER_SAVE_DEFAULT value. In the case of SOF, we do not
explicitly set this value so it is 0 by default. Also, when the codec is
registered, the runtime PM for the codec is enabled by default without
checking if the power_save delay is set to 0 or not. And later when the
snd_hda_set_power_save() is called from the legacy HDA driver probe, it
sets the use of auto suspend and the delay to be used based on the config.

Would it be correct to remove the pm_runtime_enable() call
in snd_hda_codec_register() and let the codec runtime PM enabling be set
with the call to snd_hda_set_power_save() for both the legacy HDA driver
and the SOF driver?

Thanks,
Ranjani
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

             reply	other threads:[~2020-01-15 18:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-15 18:15 Sridharan, Ranjani [this message]
2020-01-15 19:39 ` [alsa-devel] Question about runtime PM for HDA codecs Takashi Iwai
2020-01-15 20:28   ` Sridharan, Ranjani
2020-01-16  7:03     ` Takashi Iwai
2020-01-16  7:42       ` Jaska Uimonen
2020-01-16  9:20         ` Takashi Iwai

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='CAFQqKeV3fG8=DaV4_rGDL3QH7gG9zEHwS9T41aOag+-cNN9wnQ@mail.gmail.com' \
    --to=ranjani.sridharan@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=jaska.uimonen@intel.com \
    --cc=kai.vehmanen@intel.com \
    --cc=pierre-louis.bossart@intel.com \
    --cc=tiwai@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.