Merge tag 'irq-fixes-4.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/maz...
[linux-2.6-block.git] / include / sound / hda_i915.h
CommitLineData
98d8fc6c
ML
1/*
2 * HD-Audio helpers to sync with i915 driver
3 */
4#ifndef __SOUND_HDA_I915_H
5#define __SOUND_HDA_I915_H
6
45c053df
DH
7#include <drm/i915_component.h>
8
98d8fc6c
ML
9#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);
bb03ed21 12void snd_hdac_i915_set_bclk(struct hdac_bus *bus);
f9318941
PD
13int snd_hdac_sync_audio_rate(struct hdac_device *codec, hda_nid_t nid,
14 int dev_id, int rate);
15int snd_hdac_acomp_get_eld(struct hdac_device *codec, hda_nid_t nid, int dev_id,
e2dc7d7d 16 bool *audio_enabled, char *buffer, int max_bytes);
98d8fc6c
ML
17int snd_hdac_i915_init(struct hdac_bus *bus);
18int snd_hdac_i915_exit(struct hdac_bus *bus);
45c053df 19int snd_hdac_i915_register_notifier(const struct i915_audio_component_audio_ops *);
98d8fc6c 20#else
6869de38 21static inline int snd_hdac_set_codec_wakeup(struct hdac_bus *bus, bool enable)
98d8fc6c
ML
22{
23 return 0;
24}
25static inline int snd_hdac_display_power(struct hdac_bus *bus, bool enable)
26{
27 return 0;
28}
bb03ed21 29static inline void snd_hdac_i915_set_bclk(struct hdac_bus *bus)
98d8fc6c 30{
98d8fc6c 31}
d745f5e7 32static inline int snd_hdac_sync_audio_rate(struct hdac_device *codec,
f9318941 33 hda_nid_t nid, int dev_id, int rate)
e2dc7d7d
TI
34{
35 return 0;
36}
d745f5e7 37static inline int snd_hdac_acomp_get_eld(struct hdac_device *codec, hda_nid_t nid,
f9318941
PD
38 int dev_id, bool *audio_enabled,
39 char *buffer, int max_bytes)
e2dc7d7d
TI
40{
41 return -ENODEV;
42}
98d8fc6c
ML
43static inline int snd_hdac_i915_init(struct hdac_bus *bus)
44{
45 return -ENODEV;
46}
47static inline int snd_hdac_i915_exit(struct hdac_bus *bus)
48{
49 return 0;
50}
45c053df
DH
51static inline int snd_hdac_i915_register_notifier(const struct i915_audio_component_audio_ops *ops)
52{
53 return -ENODEV;
54}
98d8fc6c
ML
55#endif
56
57#endif /* __SOUND_HDA_I915_H */