mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-25 06:50:55 +07:00
e2dc7d7d8e
A couple of i915_audio_component ops have been added and accessed directly from patch_hdmi.c. Ideally all these should be factored out into hdac_i915.c. This patch does it, adds two new helper functions for setting N/CTS and fetching ELD bytes. One bonus is that the hackish widget vs port mapping is also moved to hdac_i915.c, so that it can be fixed / enhanced more cleanly. Reviewed-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
58 lines
1.5 KiB
C
58 lines
1.5 KiB
C
/*
|
|
* HD-Audio helpers to sync with i915 driver
|
|
*/
|
|
#ifndef __SOUND_HDA_I915_H
|
|
#define __SOUND_HDA_I915_H
|
|
|
|
#include <drm/i915_component.h>
|
|
|
|
#ifdef CONFIG_SND_HDA_I915
|
|
int snd_hdac_set_codec_wakeup(struct hdac_bus *bus, bool enable);
|
|
int snd_hdac_display_power(struct hdac_bus *bus, bool enable);
|
|
int snd_hdac_get_display_clk(struct hdac_bus *bus);
|
|
int snd_hdac_sync_audio_rate(struct hdac_bus *bus, hda_nid_t nid, int rate);
|
|
int snd_hdac_acomp_get_eld(struct hdac_bus *bus, hda_nid_t nid,
|
|
bool *audio_enabled, char *buffer, int max_bytes);
|
|
int snd_hdac_i915_init(struct hdac_bus *bus);
|
|
int snd_hdac_i915_exit(struct hdac_bus *bus);
|
|
int snd_hdac_i915_register_notifier(const struct i915_audio_component_audio_ops *);
|
|
#else
|
|
static inline int snd_hdac_set_codec_wakeup(struct hdac_bus *bus, bool enable)
|
|
{
|
|
return 0;
|
|
}
|
|
static inline int snd_hdac_display_power(struct hdac_bus *bus, bool enable)
|
|
{
|
|
return 0;
|
|
}
|
|
static inline int snd_hdac_get_display_clk(struct hdac_bus *bus)
|
|
{
|
|
return 0;
|
|
}
|
|
static inline int snd_hdac_sync_audio_rate(struct hdac_bus *bus, hda_nid_t nid,
|
|
int rate)
|
|
{
|
|
return 0;
|
|
}
|
|
static inline int snd_hdac_acomp_get_eld(struct hdac_bus *bus, hda_nid_t nid,
|
|
bool *audio_enabled, char *buffer,
|
|
int max_bytes)
|
|
{
|
|
return -ENODEV;
|
|
}
|
|
static inline int snd_hdac_i915_init(struct hdac_bus *bus)
|
|
{
|
|
return -ENODEV;
|
|
}
|
|
static inline int snd_hdac_i915_exit(struct hdac_bus *bus)
|
|
{
|
|
return 0;
|
|
}
|
|
static inline int snd_hdac_i915_register_notifier(const struct i915_audio_component_audio_ops *ops)
|
|
{
|
|
return -ENODEV;
|
|
}
|
|
#endif
|
|
|
|
#endif /* __SOUND_HDA_I915_H */
|