]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - sound/hda/hdac_i915.c
Merge branch 'for-rafael' of https://git.kernel.org/pub/scm/linux/kernel/git/mzx...
[karo-tx-linux.git] / sound / hda / hdac_i915.c
index 442500e06b7c7b66be05ec254a68e58d009089fe..55c3df4458f7936b56ceda126ce8f3a0f0b51abe 100644 (file)
@@ -56,8 +56,11 @@ int snd_hdac_display_power(struct hdac_bus *bus, bool enable)
                enable ? "enable" : "disable");
 
        if (enable) {
-               if (!bus->i915_power_refcount++)
+               if (!bus->i915_power_refcount++) {
                        acomp->ops->get_power(acomp->dev);
+                       snd_hdac_set_codec_wakeup(bus, true);
+                       snd_hdac_set_codec_wakeup(bus, false);
+               }
        } else {
                WARN_ON(!bus->i915_power_refcount);
                if (!--bus->i915_power_refcount)
@@ -131,6 +134,16 @@ static int hdac_component_master_match(struct device *dev, void *data)
        return !strcmp(dev->driver->name, "i915");
 }
 
+int snd_hdac_i915_register_notifier(const struct i915_audio_component_audio_ops *aops)
+{
+       if (WARN_ON(!hdac_acomp))
+               return -ENODEV;
+
+       hdac_acomp->audio_ops = aops;
+       return 0;
+}
+EXPORT_SYMBOL_GPL(snd_hdac_i915_register_notifier);
+
 int snd_hdac_i915_init(struct hdac_bus *bus)
 {
        struct component_match *match = NULL;