diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-01-14 15:50:15 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-01-14 15:50:15 +0100 |
commit | a7343cf3899ee29b225ebbfde8499bc4ab67f670 (patch) | |
tree | d47c00512ab9b8fa548c30041af009268f5886dd | |
parent | ca669809a9f2d6375e3f0580a7382aa19f9d195e (diff) | |
download | alsa-driver-build-unstable-a7343cf3899ee29b225ebbfde8499bc4ab67f670.tar.gz |
Fix build with existing kernels
The component work for HD-audio will be included in 3.20 at first.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | alsa/pci/hda/hda_intel.h | 5 | ||||
-rw-r--r-- | alsa/pci/hda/hda_intel_compat.h | 67 |
2 files changed, 72 insertions, 0 deletions
diff --git a/alsa/pci/hda/hda_intel.h b/alsa/pci/hda/hda_intel.h new file mode 100644 index 000000000..18965ea88 --- /dev/null +++ b/alsa/pci/hda/hda_intel.h @@ -0,0 +1,5 @@ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 20, 0) +#include "../../alsa-kernel/pci/hda/hda_intel.h" +#else +#include "hda_intel_compat.h" +#endif diff --git a/alsa/pci/hda/hda_intel_compat.h b/alsa/pci/hda/hda_intel_compat.h new file mode 100644 index 000000000..70b8306fe --- /dev/null +++ b/alsa/pci/hda/hda_intel_compat.h @@ -0,0 +1,67 @@ +/* + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program; if not, write to the Free Software Foundation, Inc., 59 + * Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ +#ifndef __SOUND_HDA_INTEL_H +#define __SOUND_HDA_INTEL_H + +#include "hda_priv.h" + +struct hda_intel { + struct azx chip; + + /* for pending irqs */ + struct work_struct irq_pending_work; + + /* sync probing */ + struct completion probe_wait; + struct work_struct probe_work; + + /* card list (for power_save trigger) */ + struct list_head list; + + /* extra flags */ + unsigned int irq_pending_warned:1; + + /* VGA-switcheroo setup */ + unsigned int use_vga_switcheroo:1; + unsigned int vga_switcheroo_registered:1; + unsigned int init_failed:1; /* delayed init failed */ + + /* secondary power domain for hdmi audio under vga device */ + struct dev_pm_domain hdmi_pm_domain; +}; + +#ifdef CONFIG_SND_HDA_I915 +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_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 -ENODEV; +} +static inline int hda_i915_exit(struct hda_intel *hda) +{ + return 0; +} +#endif + +#endif |