diff options
author | Takashi Iwai <tiwai@suse.de> | 2019-01-29 14:14:51 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-01-29 18:26:03 +0100 |
commit | f6ef4e0e284251ff795c541db1129c84515ed044 (patch) | |
tree | bb1977bb9b291f6b438c0bc0c54ddc0c1e13f5c2 /sound/pci/hda/patch_realtek.c | |
parent | 98081ca62cbac31fb0f7efaf90b2e7384ce22257 (diff) | |
download | lwn-f6ef4e0e284251ff795c541db1129c84515ed044.tar.gz lwn-f6ef4e0e284251ff795c541db1129c84515ed044.zip |
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/hda/patch_realtek.c')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 4 |
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) { struct alc_spec *spec = codec->spec; - if (!spec->done_hp_init) { + /* required only at boot or S4 resume time */ + if (!spec->done_hp_init || + codec->core.dev.power.power_state.event == PM_EVENT_RESTORE) { alc294_hp_init(codec); spec->done_hp_init = true; } |