]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ASoC: Intel: Skylake: Fix to turn OFF codec power when entering S3
authorSubhransu S. Prusty <subhransu.s.prusty@intel.com>
Fri, 1 Apr 2016 08:06:27 +0000 (13:36 +0530)
committerMark Brown <broonie@kernel.org>
Sat, 2 Apr 2016 16:28:47 +0000 (09:28 -0700)
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>
sound/soc/intel/skylake/skl.c

index 07d9bc1cf3cbcf3e0f129ca2540dd3265ae4da9f..3982f5536f2d82b55837c4358e0b2754ac95e2c4 100644 (file)
@@ -222,6 +222,7 @@ static int skl_suspend(struct device *dev)
        struct hdac_ext_bus *ebus = pci_get_drvdata(pci);
        struct skl *skl  = ebus_to_skl(ebus);
        struct hdac_bus *bus = ebus_to_hbus(ebus);
+       int ret = 0;
 
        /*
         * Do not suspend if streams which are marked ignore suspend are
@@ -232,10 +233,20 @@ static int skl_suspend(struct device *dev)
                enable_irq_wake(bus->irq);
                pci_save_state(pci);
                pci_disable_device(pci);
-               return 0;
        } else {
-               return _skl_suspend(ebus);
+               ret = _skl_suspend(ebus);
+               if (ret < 0)
+                       return ret;
        }
+
+       if (IS_ENABLED(CONFIG_SND_SOC_HDAC_HDMI)) {
+               ret = snd_hdac_display_power(bus, false);
+               if (ret < 0)
+                       dev_err(bus->dev,
+                               "Cannot turn OFF display power on i915\n");
+       }
+
+       return ret;
 }
 
 static int skl_resume(struct device *dev)