Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c629fed0 authored by Takashi Iwai's avatar Takashi Iwai Committed by Greg Kroah-Hartman
Browse files

ALSA: hda/realtek - Apply ALC294 hp init also for S4 resume



[ Upstream commit f6ef4e0e284251ff795c541db1129c84515ed044 ]

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: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent b73132b7
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -3458,7 +3458,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;
	}