1 // SPDX-License-Identifier: GPL-2.0
2 // HD-Audio helpers to sync with DRM driver
4 #ifndef __SOUND_HDA_COMPONENT_H
5 #define __SOUND_HDA_COMPONENT_H
7 #include <drm/drm_audio_component.h>
9 #ifdef CONFIG_SND_HDA_COMPONENT
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_sync_audio_rate(struct hdac_device *codec, hda_nid_t nid,
13 int dev_id, int rate);
14 int snd_hdac_acomp_get_eld(struct hdac_device *codec, hda_nid_t nid, int dev_id,
15 bool *audio_enabled, char *buffer, int max_bytes);
16 int snd_hdac_acomp_init(struct hdac_bus *bus,
17 const struct drm_audio_component_audio_ops *aops,
18 int (*match_master)(struct device *, void *),
20 int snd_hdac_acomp_exit(struct hdac_bus *bus);
21 int snd_hdac_acomp_register_notifier(struct hdac_bus *bus,
22 const struct drm_audio_component_audio_ops *ops);
24 static inline int snd_hdac_set_codec_wakeup(struct hdac_bus *bus, bool enable)
28 static inline int snd_hdac_display_power(struct hdac_bus *bus, bool enable)
32 static inline int snd_hdac_sync_audio_rate(struct hdac_device *codec,
33 hda_nid_t nid, int dev_id, int rate)
37 static inline int snd_hdac_acomp_get_eld(struct hdac_device *codec, hda_nid_t nid,
38 int dev_id, bool *audio_enabled,
39 char *buffer, int max_bytes)
43 static inline int snd_hdac_acomp_init(struct hdac_bus *bus,
44 const struct drm_audio_component_audio_ops *aops,
45 int (*match_master)(struct device *, void *),
50 static inline int snd_hdac_acomp_exit(struct hdac_bus *bus)
54 static inline int snd_hdac_acomp_register_notifier(struct hdac_bus *bus,
55 const struct drm_audio_component_audio_ops *ops)
61 #endif /* __SOUND_HDA_COMPONENT_H */