diff options
author | Mengdong Lin <mengdong.lin@intel.com> | 2015-05-19 22:29:30 +0800 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-05-20 06:16:36 +0200 |
commit | 98d8fc6c5d3652e91c61d78941e0fa6f94771d67 (patch) | |
tree | 31f5d9ce478f828686fb848b66bebc664c51898f /sound/pci/hda/hda_intel.h | |
parent | 4214c5349c20005b7a83916801394eb7270896b2 (diff) |
ALSA: hda - Move hda_i915.c from sound/pci/hda to sound/hda
The file is moved to hda core and renamed to hdac_i915.c, so can be used
by both legacy HDA driver and new Skylake audio driver.
- Add snd_hdac_ prefix to the public APIs.
- The i915 audio component is moved to core bus and dynamically allocated.
- A static pointer hdac_acomp is used to help bind/unbind callbacks to get
this component, because the sound card's private_data is used by the azx
chip pointer, which is a legacy structure. It could be removed if private
_data changes to some core structure which can be extended to find the
bus.
- snd_hdac_get_display_clk() is added to get the display core clock for
HSW/BDW.
- haswell_set_bclk() is moved to hda_intel.c because it needs to write the
controller registers EM4/EM5, and only legacy HD-A needs it for HSW/BDW.
- Move definition of HSW/BDW-specific registers EM4/EM5 to hda_register.h
and rename them to HSW_EM4/HSW_EM5, because other HD-A controllers have
different layout for the extended mode registers.
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_intel.h')
-rw-r--r-- | sound/pci/hda/hda_intel.h | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/sound/pci/hda/hda_intel.h b/sound/pci/hda/hda_intel.h index 7fd3254a2f3f..354f0bbed833 100644 --- a/sound/pci/hda/hda_intel.h +++ b/sound/pci/hda/hda_intel.h @@ -16,7 +16,6 @@ #ifndef __SOUND_HDA_INTEL_H #define __SOUND_HDA_INTEL_H -#include <drm/i915_component.h> #include "hda_controller.h" struct hda_intel { @@ -44,36 +43,7 @@ struct hda_intel { /* secondary power domain for hdmi audio under vga device */ struct dev_pm_domain hdmi_pm_domain; - /* i915 component interface */ bool need_i915_power:1; /* the hda controller needs i915 power */ - struct i915_audio_component audio_component; - int i915_power_refcount; }; -#ifdef CONFIG_SND_HDA_I915 -int hda_set_codec_wakeup(struct hda_intel *hda, bool enable); -int hda_display_power(struct hda_intel *hda, bool enable); -void haswell_set_bclk(struct hda_intel *hda); -int hda_i915_init(struct hda_intel *hda); -int hda_i915_exit(struct hda_intel *hda); -#else -static inline int hda_set_codec_wakeup(struct hda_intel *hda, bool enable) -{ - return 0; -} -static inline int hda_display_power(struct hda_intel *hda, bool enable) -{ - return 0; -} -static inline void haswell_set_bclk(struct hda_intel *hda) { return; } -static inline int hda_i915_init(struct hda_intel *hda) -{ - return 0; -} -static inline int hda_i915_exit(struct hda_intel *hda) -{ - return 0; -} -#endif - #endif |