blob: 930b41e5acf4cb9a9008cfc7394dad61d87895a9 [file] [log] [blame]
Mengdong Lin98d8fc62015-05-19 22:29:30 +08001/*
2 * HD-Audio helpers to sync with i915 driver
3 */
4#ifndef __SOUND_HDA_I915_H
5#define __SOUND_HDA_I915_H
6
David Henningsson45c053d2015-08-19 10:48:57 +02007#include <drm/i915_component.h>
8
Mengdong Lin98d8fc62015-05-19 22:29:30 +08009#ifdef CONFIG_SND_HDA_I915
10int snd_hdac_set_codec_wakeup(struct hdac_bus *bus, bool enable);
11int snd_hdac_display_power(struct hdac_bus *bus, bool enable);
12int snd_hdac_get_display_clk(struct hdac_bus *bus);
13int snd_hdac_i915_init(struct hdac_bus *bus);
14int snd_hdac_i915_exit(struct hdac_bus *bus);
David Henningsson45c053d2015-08-19 10:48:57 +020015int snd_hdac_i915_register_notifier(const struct i915_audio_component_audio_ops *);
Mengdong Lin98d8fc62015-05-19 22:29:30 +080016#else
Takashi Iwai6869de32015-09-02 12:24:55 +020017static inline int snd_hdac_set_codec_wakeup(struct hdac_bus *bus, bool enable)
Mengdong Lin98d8fc62015-05-19 22:29:30 +080018{
19 return 0;
20}
21static inline int snd_hdac_display_power(struct hdac_bus *bus, bool enable)
22{
23 return 0;
24}
25static inline int snd_hdac_get_display_clk(struct hdac_bus *bus)
26{
27 return 0;
28}
29static inline int snd_hdac_i915_init(struct hdac_bus *bus)
30{
31 return -ENODEV;
32}
33static inline int snd_hdac_i915_exit(struct hdac_bus *bus)
34{
35 return 0;
36}
David Henningsson45c053d2015-08-19 10:48:57 +020037static inline int snd_hdac_i915_register_notifier(const struct i915_audio_component_audio_ops *ops)
38{
39 return -ENODEV;
40}
Mengdong Lin98d8fc62015-05-19 22:29:30 +080041#endif
42
43#endif /* __SOUND_HDA_I915_H */