Skip to contentSkip to conversation

ALSA: hda: Initialize power_state field properly

PATCH New Takashi Iwai 1 participant 1 message Apr 13, 2019 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: hda: Initialize power_state field properly

The recent commit 98081ca62cba ("ALSA: hda - Record the current power state before suspend/resume calls") made the HD-audio driver to store the PM state in power_state field. This forgot, however, the initialization at power up. Although the codec drivers usually don't need to refer to this field in the normal operation, let's initialize it properly for consistency.

Fixes 98081ca62cba ("ALSA: hda - Record the current power state before suspend/resume calls")
---
 sound/pci/hda/hda_codec.c | 1 +
 1 file changed, 1 insertion(+)
sound/pci/hda/hda_codec.c +1 -0
index ec0b8595eb4d..701a69d856f5 100644
@@ -969,6 +969,7 @@ int snd_hda_codec_device_new(struct hda_bus *bus, struct snd_card *card,
 
 	/* power-up all before initialization */
 	hda_set_power_state(codec, AC_PWRST_D0);
+	codec->core.dev.power.power_state = PMSG_ON;
 
 	snd_hda_codec_proc_new(codec);
 
Signature · 1 line
2.16.4