Wang Xingchao | 99a2008 | 2013-05-30 22:07:10 +0800 | [diff] [blame] | 1 | /* |
| 2 | * This program is free software; you can redistribute it and/or modify it |
| 3 | * under the terms of the GNU General Public License as published by the Free |
| 4 | * Software Foundation; either version 2 of the License, or (at your option) |
| 5 | * any later version. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, but WITHOUT |
| 8 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 9 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
| 10 | * more details. |
| 11 | * |
| 12 | * You should have received a copy of the GNU General Public License along with |
| 13 | * this program; if not, write to the Free Software Foundation, Inc., 59 |
| 14 | * Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 15 | */ |
Imre Deak | 347de1f | 2015-01-08 17:54:15 +0200 | [diff] [blame] | 16 | #ifndef __SOUND_HDA_INTEL_H |
| 17 | #define __SOUND_HDA_INTEL_H |
| 18 | |
Imre Deak | d7055bd | 2015-01-08 17:54:17 +0200 | [diff] [blame] | 19 | #include <drm/i915_component.h> |
Imre Deak | 347de1f | 2015-01-08 17:54:15 +0200 | [diff] [blame] | 20 | #include "hda_priv.h" |
| 21 | |
| 22 | struct hda_intel { |
| 23 | struct azx chip; |
| 24 | |
| 25 | /* for pending irqs */ |
| 26 | struct work_struct irq_pending_work; |
| 27 | |
| 28 | /* sync probing */ |
| 29 | struct completion probe_wait; |
| 30 | struct work_struct probe_work; |
| 31 | |
| 32 | /* card list (for power_save trigger) */ |
| 33 | struct list_head list; |
| 34 | |
| 35 | /* extra flags */ |
| 36 | unsigned int irq_pending_warned:1; |
| 37 | |
| 38 | /* VGA-switcheroo setup */ |
| 39 | unsigned int use_vga_switcheroo:1; |
| 40 | unsigned int vga_switcheroo_registered:1; |
| 41 | unsigned int init_failed:1; /* delayed init failed */ |
| 42 | |
| 43 | /* secondary power domain for hdmi audio under vga device */ |
| 44 | struct dev_pm_domain hdmi_pm_domain; |
Imre Deak | d7055bd | 2015-01-08 17:54:17 +0200 | [diff] [blame] | 45 | |
| 46 | /* i915 component interface */ |
| 47 | struct i915_audio_component audio_component; |
Imre Deak | 347de1f | 2015-01-08 17:54:15 +0200 | [diff] [blame] | 48 | }; |
Wang Xingchao | 99a2008 | 2013-05-30 22:07:10 +0800 | [diff] [blame] | 49 | |
| 50 | #ifdef CONFIG_SND_HDA_I915 |
Imre Deak | 926981a | 2015-01-08 17:54:16 +0200 | [diff] [blame] | 51 | int hda_display_power(struct hda_intel *hda, bool enable); |
| 52 | void haswell_set_bclk(struct hda_intel *hda); |
| 53 | int hda_i915_init(struct hda_intel *hda); |
| 54 | int hda_i915_exit(struct hda_intel *hda); |
Wang Xingchao | 99a2008 | 2013-05-30 22:07:10 +0800 | [diff] [blame] | 55 | #else |
Imre Deak | 926981a | 2015-01-08 17:54:16 +0200 | [diff] [blame] | 56 | static inline int hda_display_power(struct hda_intel *hda, bool enable) |
| 57 | { |
| 58 | return 0; |
| 59 | } |
| 60 | static inline void haswell_set_bclk(struct hda_intel *hda) { return; } |
| 61 | static inline int hda_i915_init(struct hda_intel *hda) |
Wang Xingchao | 99a2008 | 2013-05-30 22:07:10 +0800 | [diff] [blame] | 62 | { |
| 63 | return -ENODEV; |
| 64 | } |
Imre Deak | 926981a | 2015-01-08 17:54:16 +0200 | [diff] [blame] | 65 | static inline int hda_i915_exit(struct hda_intel *hda) |
Wang Xingchao | 99a2008 | 2013-05-30 22:07:10 +0800 | [diff] [blame] | 66 | { |
| 67 | return 0; |
| 68 | } |
| 69 | #endif |
| 70 | |
| 71 | #endif |