Mengdong Lin | 98d8fc6 | 2015-05-19 22:29:30 +0800 | [diff] [blame] | 1 | /* |
| 2 | * HD-Audio helpers to sync with i915 driver |
| 3 | */ |
| 4 | #ifndef __SOUND_HDA_I915_H |
| 5 | #define __SOUND_HDA_I915_H |
| 6 | |
David Henningsson | 45c053d | 2015-08-19 10:48:57 +0200 | [diff] [blame] | 7 | #include <drm/i915_component.h> |
| 8 | |
Mengdong Lin | 98d8fc6 | 2015-05-19 22:29:30 +0800 | [diff] [blame] | 9 | #ifdef CONFIG_SND_HDA_I915 |
| 10 | int snd_hdac_set_codec_wakeup(struct hdac_bus *bus, bool enable); |
| 11 | int snd_hdac_display_power(struct hdac_bus *bus, bool enable); |
| 12 | int snd_hdac_get_display_clk(struct hdac_bus *bus); |
| 13 | int snd_hdac_i915_init(struct hdac_bus *bus); |
| 14 | int snd_hdac_i915_exit(struct hdac_bus *bus); |
David Henningsson | 45c053d | 2015-08-19 10:48:57 +0200 | [diff] [blame] | 15 | int snd_hdac_i915_register_notifier(const struct i915_audio_component_audio_ops *); |
Mengdong Lin | 98d8fc6 | 2015-05-19 22:29:30 +0800 | [diff] [blame] | 16 | #else |
Takashi Iwai | 6869de3 | 2015-09-02 12:24:55 +0200 | [diff] [blame] | 17 | static inline int snd_hdac_set_codec_wakeup(struct hdac_bus *bus, bool enable) |
Mengdong Lin | 98d8fc6 | 2015-05-19 22:29:30 +0800 | [diff] [blame] | 18 | { |
| 19 | return 0; |
| 20 | } |
| 21 | static inline int snd_hdac_display_power(struct hdac_bus *bus, bool enable) |
| 22 | { |
| 23 | return 0; |
| 24 | } |
| 25 | static inline int snd_hdac_get_display_clk(struct hdac_bus *bus) |
| 26 | { |
| 27 | return 0; |
| 28 | } |
| 29 | static inline int snd_hdac_i915_init(struct hdac_bus *bus) |
| 30 | { |
| 31 | return -ENODEV; |
| 32 | } |
| 33 | static inline int snd_hdac_i915_exit(struct hdac_bus *bus) |
| 34 | { |
| 35 | return 0; |
| 36 | } |
David Henningsson | 45c053d | 2015-08-19 10:48:57 +0200 | [diff] [blame] | 37 | static inline int snd_hdac_i915_register_notifier(const struct i915_audio_component_audio_ops *ops) |
| 38 | { |
| 39 | return -ENODEV; |
| 40 | } |
Mengdong Lin | 98d8fc6 | 2015-05-19 22:29:30 +0800 | [diff] [blame] | 41 | #endif |
| 42 | |
| 43 | #endif /* __SOUND_HDA_I915_H */ |