ALSA: hda - Fix suspend/resume calls
PATCH 1/1 ALSA: hda - Fix suspend/resume calls
Besides the compilation issue the resume function was calling the force_suspend.
--- sound/pci/hda/hda_codec.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
sound/pci/hda/hda_codec.c +9 -1
@@ -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)
Signature · 1 line
2.20.1
Quoted 8 lines · 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 <[email protected]>Cc Jaroslav Kysela <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>
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
Quoted 6 lines · Takashi Iwai
Quoted 4 lines · Rodrigo Vivi
Besides the compilation issue the resume function was calling the
force_suspend.
Quoted 8 lines
Quoted 4 lines
Fixes d81f8c6b6ced ("ALSA: hda - Record the current power state before suspend/resume calls")Cc Takashi Iwai <[email protected]>Cc Jaroslav Kysela <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>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.
Quoted 3 lines
Takashi