ALSA: hda: add component support

Register a component master to be used to interface with the i915
driver. This is meant to replace the current interface which is based on
module symbol lookups.

Note that currently we keep the existing behavior and pin the i915
module while the hda driver is loaded. Using the component interface
allows us to remove this dependency once support for dynamically
enabling / disabling the HDMI functionality is added to the driver.

v2:
- change roles between the hda and i915 components (Daniel)
v3:
- rename display_component to audio_component (Daniel)
v4:
- move removal of i915_powerwell.h from this patch to the next (Takashi)
- request_module fails if module support isn't enabled, so ignore
  any error it returns and depend on the following NULL check of the
  component ops (Takashi)
- change over to using dev_* instead of pr_* (Takashi)

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
diff --git a/sound/pci/hda/hda_intel.h b/sound/pci/hda/hda_intel.h
index 70b8306f..3486118 100644
--- a/sound/pci/hda/hda_intel.h
+++ b/sound/pci/hda/hda_intel.h
@@ -16,6 +16,7 @@
 #ifndef __SOUND_HDA_INTEL_H
 #define __SOUND_HDA_INTEL_H
 
+#include <drm/i915_component.h>
 #include "hda_priv.h"
 
 struct hda_intel {
@@ -41,6 +42,9 @@
 
 	/* secondary power domain for hdmi audio under vga device */
 	struct dev_pm_domain hdmi_pm_domain;
+
+	/* i915 component interface */
+	struct i915_audio_component audio_component;
 };
 
 #ifdef CONFIG_SND_HDA_I915