* [PATCH] ALSA: hda - Fix suspend/resume calls
@ 2019-01-29 21:25 Rodrigo Vivi
2019-01-29 21:29 ` Takashi Iwai
0 siblings, 1 reply; 3+ messages in thread
From: Rodrigo Vivi @ 2019-01-29 21:25 UTC (permalink / raw)
To: alsa-devel; +Cc: Takashi Iwai, Rodrigo Vivi
Besides the compilation issue the resume function was calling
the force_suspend.
Fixes: d81f8c6b6ced ("ALSA: hda - Record the current power state before suspend/resume calls")
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
sound/pci/hda/hda_codec.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 43bcc6f1ea8c..0b86aa2b649c 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -2894,6 +2894,8 @@ static unsigned int hda_call_codec_suspend(struct hda_codec *codec)
*/
static void hda_call_codec_resume(struct hda_codec *codec)
{
+ struct device *dev = hda_codec_dev(codec);
+
snd_hdac_enter_pm(&codec->core);
if (codec->core.regmap)
regcache_mark_dirty(codec->core.regmap);
@@ -2955,10 +2957,16 @@ static int hda_codec_pm_suspend(struct device *dev)
return pm_runtime_force_suspend(dev);
}
+static int hda_codec_pm_freeze(struct device *dev)
+{
+ dev->power.power_state = PMSG_FREEZE;
+ return pm_runtime_force_suspend(dev);
+}
+
static int hda_codec_pm_resume(struct device *dev)
{
dev->power.power_state = PMSG_RESUME;
- return pm_runtime_force_suspend(dev);
+ return pm_runtime_force_resume(dev);
}
static int hda_codec_pm_thaw(struct device *dev)
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ALSA: hda - Fix suspend/resume calls
2019-01-29 21:25 [PATCH] ALSA: hda - Fix suspend/resume calls Rodrigo Vivi
@ 2019-01-29 21:29 ` Takashi Iwai
2019-01-29 22:42 ` Rodrigo Vivi
0 siblings, 1 reply; 3+ messages in thread
From: Takashi Iwai @ 2019-01-29 21:29 UTC (permalink / raw)
To: Rodrigo Vivi; +Cc: alsa-devel
On Tue, 29 Jan 2019 22:25:10 +0100,
Rodrigo Vivi wrote:
>
> Besides the compilation issue the resume function was calling
> the force_suspend.
>
> Fixes: d81f8c6b6ced ("ALSA: hda - Record the current power state before suspend/resume calls")
> Cc: Takashi Iwai <tiwai@suse.de>
> Cc: Jaroslav Kysela <perex@perex.cz>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Erm, sorry for the mess, I merged & pushed out the obviously wrong
branch, and it's been already corrected later on. You must have
fetched the tree in a bad timing before I noticed and corrected.
Takashi
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ALSA: hda - Fix suspend/resume calls
2019-01-29 21:29 ` Takashi Iwai
@ 2019-01-29 22:42 ` Rodrigo Vivi
0 siblings, 0 replies; 3+ messages in thread
From: Rodrigo Vivi @ 2019-01-29 22:42 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
On Tue, Jan 29, 2019 at 10:29:26PM +0100, Takashi Iwai wrote:
> On Tue, 29 Jan 2019 22:25:10 +0100,
> Rodrigo Vivi wrote:
> >
> > Besides the compilation issue the resume function was calling
> > the force_suspend.
> >
> > Fixes: d81f8c6b6ced ("ALSA: hda - Record the current power state before suspend/resume calls")
> > Cc: Takashi Iwai <tiwai@suse.de>
> > Cc: Jaroslav Kysela <perex@perex.cz>
> > Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
>
> Erm, sorry for the mess, I merged & pushed out the obviously wrong
> branch, and it's been already corrected later on. You must have
> fetched the tree in a bad timing before I noticed and corrected.
no problem ;)
I noticed your right version when I tried to push this patch to
topic/core-for-CI and it conflicted with your right one ;)
Anyways, thanks for the quick fix.
Thanks,
Rodrigo.
>
>
> Takashi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-01-29 22:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-29 21:25 [PATCH] ALSA: hda - Fix suspend/resume calls Rodrigo Vivi
2019-01-29 21:29 ` Takashi Iwai
2019-01-29 22:42 ` Rodrigo Vivi
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).