diff options
author | Subhransu S. Prusty <subhransu.s.prusty@intel.com> | 2016-04-01 04:06:27 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-04-02 12:28:47 -0400 |
commit | af037412629d8549e04039a57cf99a59b6e7a01b (patch) | |
tree | a1adbb2cfa4fc8477b51af32e1d2798d4f071c30 | |
parent | 4f329d9fbab630af44db2f787eb79ca52e6ba22e (diff) |
ASoC: Intel: Skylake: Fix to turn OFF codec power when entering S3
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/intel/skylake/skl.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c index 07d9bc1cf3cb..3982f5536f2d 100644 --- a/sound/soc/intel/skylake/skl.c +++ b/sound/soc/intel/skylake/skl.c | |||
@@ -222,6 +222,7 @@ static int skl_suspend(struct device *dev) | |||
222 | struct hdac_ext_bus *ebus = pci_get_drvdata(pci); | 222 | struct hdac_ext_bus *ebus = pci_get_drvdata(pci); |
223 | struct skl *skl = ebus_to_skl(ebus); | 223 | struct skl *skl = ebus_to_skl(ebus); |
224 | struct hdac_bus *bus = ebus_to_hbus(ebus); | 224 | struct hdac_bus *bus = ebus_to_hbus(ebus); |
225 | int ret = 0; | ||
225 | 226 | ||
226 | /* | 227 | /* |
227 | * Do not suspend if streams which are marked ignore suspend are | 228 | * Do not suspend if streams which are marked ignore suspend are |
@@ -232,10 +233,20 @@ static int skl_suspend(struct device *dev) | |||
232 | enable_irq_wake(bus->irq); | 233 | enable_irq_wake(bus->irq); |
233 | pci_save_state(pci); | 234 | pci_save_state(pci); |
234 | pci_disable_device(pci); | 235 | pci_disable_device(pci); |
235 | return 0; | ||
236 | } else { | 236 | } else { |
237 | return _skl_suspend(ebus); | 237 | ret = _skl_suspend(ebus); |
238 | if (ret < 0) | ||
239 | return ret; | ||
238 | } | 240 | } |
241 | |||
242 | if (IS_ENABLED(CONFIG_SND_SOC_HDAC_HDMI)) { | ||
243 | ret = snd_hdac_display_power(bus, false); | ||
244 | if (ret < 0) | ||
245 | dev_err(bus->dev, | ||
246 | "Cannot turn OFF display power on i915\n"); | ||
247 | } | ||
248 | |||
249 | return ret; | ||
239 | } | 250 | } |
240 | 251 | ||
241 | static int skl_resume(struct device *dev) | 252 | static int skl_resume(struct device *dev) |