Skip to content

Commit

Permalink
ALSA: hda: Initialize power_state field properly
Browse files Browse the repository at this point in the history
The recent commit 98081ca ("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: 98081ca ("ALSA: hda - Record the current power state before suspend/resume calls")
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Apr 13, 2019
1 parent 9b0dcd0 commit 183ab39
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 183ab39

Please sign in to comment.