Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
98d8fc6c ML |
2 | /* |
3 | * HD-Audio helpers to sync with i915 driver | |
4 | */ | |
5 | #ifndef __SOUND_HDA_I915_H | |
6 | #define __SOUND_HDA_I915_H | |
7 | ||
45c053df DH |
8 | #include <drm/i915_component.h> |
9 | ||
98d8fc6c ML |
10 | #ifdef CONFIG_SND_HDA_I915 |
11 | int snd_hdac_set_codec_wakeup(struct hdac_bus *bus, bool enable); | |
12 | int snd_hdac_display_power(struct hdac_bus *bus, bool enable); | |
bb03ed21 | 13 | void snd_hdac_i915_set_bclk(struct hdac_bus *bus); |
f9318941 PD |
14 | int snd_hdac_sync_audio_rate(struct hdac_device *codec, hda_nid_t nid, |
15 | int dev_id, int rate); | |
16 | int snd_hdac_acomp_get_eld(struct hdac_device *codec, hda_nid_t nid, int dev_id, | |
e2dc7d7d | 17 | bool *audio_enabled, char *buffer, int max_bytes); |
98d8fc6c ML |
18 | int snd_hdac_i915_init(struct hdac_bus *bus); |
19 | int snd_hdac_i915_exit(struct hdac_bus *bus); | |
45c053df | 20 | int snd_hdac_i915_register_notifier(const struct i915_audio_component_audio_ops *); |
98d8fc6c | 21 | #else |
6869de38 | 22 | static inline int snd_hdac_set_codec_wakeup(struct hdac_bus *bus, bool enable) |
98d8fc6c ML |
23 | { |
24 | return 0; | |
25 | } | |
26 | static inline int snd_hdac_display_power(struct hdac_bus *bus, bool enable) | |
27 | { | |
28 | return 0; | |
29 | } | |
bb03ed21 | 30 | static inline void snd_hdac_i915_set_bclk(struct hdac_bus *bus) |
98d8fc6c | 31 | { |
98d8fc6c | 32 | } |
d745f5e7 | 33 | static inline int snd_hdac_sync_audio_rate(struct hdac_device *codec, |
f9318941 | 34 | hda_nid_t nid, int dev_id, int rate) |
e2dc7d7d TI |
35 | { |
36 | return 0; | |
37 | } | |
d745f5e7 | 38 | static inline int snd_hdac_acomp_get_eld(struct hdac_device *codec, hda_nid_t nid, |
f9318941 PD |
39 | int dev_id, bool *audio_enabled, |
40 | char *buffer, int max_bytes) | |
e2dc7d7d TI |
41 | { |
42 | return -ENODEV; | |
43 | } | |
98d8fc6c ML |
44 | static inline int snd_hdac_i915_init(struct hdac_bus *bus) |
45 | { | |
46 | return -ENODEV; | |
47 | } | |
48 | static inline int snd_hdac_i915_exit(struct hdac_bus *bus) | |
49 | { | |
50 | return 0; | |
51 | } | |
45c053df DH |
52 | static inline int snd_hdac_i915_register_notifier(const struct i915_audio_component_audio_ops *ops) |
53 | { | |
54 | return -ENODEV; | |
55 | } | |
98d8fc6c ML |
56 | #endif |
57 | ||
58 | #endif /* __SOUND_HDA_I915_H */ |