summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_codec.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-04-29 12:28:52 +0200
committerTakashi Iwai <tiwai@suse.de>2015-04-29 12:28:52 +0200
commit85abf3ec5fa663c9638ef2d10d9623880a26458e (patch)
treece1cc6166cd34b4a49299ccf4aefaac657a34fcf /sound/pci/hda/hda_codec.c
parent49c4a4c5244d2c1a25ec1e01dbb4fba3813d237d (diff)
parent2bd1f73f4242ee19d8c610bcffe6e7a813451ce0 (diff)
Merge branch 'topic/hda' into for-next
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r--sound/pci/hda/hda_codec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index d65173a62ae9..54380ed03697 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -858,6 +858,7 @@ void snd_hda_codec_register(struct hda_codec *codec)
return;
if (device_is_registered(hda_codec_dev(codec))) {
snd_hda_register_beep_device(codec);
+ snd_hdac_link_power(&codec->core, true);
pm_runtime_enable(hda_codec_dev(codec));
/* it was powered up in snd_hda_codec_new(), now all done */
snd_hda_power_down(codec);
@@ -884,6 +885,7 @@ static int snd_hda_codec_dev_free(struct snd_device *device)
struct hda_codec *codec = device->device_data;
codec->in_freeing = 1;
+ snd_hdac_link_power(&codec->core, false);
snd_hdac_device_unregister(&codec->core);
put_device(hda_codec_dev(codec));
return 0;
@@ -3106,6 +3108,7 @@ static int hda_codec_runtime_suspend(struct device *dev)
if (codec_has_clkstop(codec) && codec_has_epss(codec) &&
(state & AC_PWRST_CLK_STOP_OK))
snd_hdac_codec_link_down(&codec->core);
+ snd_hdac_link_power(&codec->core, false);
return 0;
}
@@ -3113,6 +3116,7 @@ static int hda_codec_runtime_resume(struct device *dev)
{
struct hda_codec *codec = dev_to_hda_codec(dev);
+ snd_hdac_link_power(&codec->core, true);
snd_hdac_codec_link_up(&codec->core);
hda_call_codec_resume(codec);
pm_runtime_mark_last_busy(dev);