summaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-01-29 08:14:51 -0500
committerTakashi Iwai <tiwai@suse.de>2019-01-29 12:26:03 -0500
commitf6ef4e0e284251ff795c541db1129c84515ed044 (patch)
treebb1977bb9b291f6b438c0bc0c54ddc0c1e13f5c2 /sound/pci
parent98081ca62cbac31fb0f7efaf90b2e7384ce22257 (diff)
ALSA: hda/realtek - Apply ALC294 hp init also for S4 resume
The init sequence for ALC294 headphone stuff is needed not only for the boot up time but also for the resume from hibernation, where the device is switched from the boot kernel without sound driver to the suspended image. Since we record the PM event in the device power_state field, we can now recognize the call pattern and apply the sequence conditionally. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/patch_realtek.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 4139aced63f8..e9dc9408d9bc 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3408,7 +3408,9 @@ static void alc294_init(struct hda_codec *codec)
3408{ 3408{
3409 struct alc_spec *spec = codec->spec; 3409 struct alc_spec *spec = codec->spec;
3410 3410
3411 if (!spec->done_hp_init) { 3411 /* required only at boot or S4 resume time */
3412 if (!spec->done_hp_init ||
3413 codec->core.dev.power.power_state.event == PM_EVENT_RESTORE) {
3412 alc294_hp_init(codec); 3414 alc294_hp_init(codec);
3413 spec->done_hp_init = true; 3415 spec->done_hp_init = true;
3414 } 3416 }