hda_i915.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * HD-Audio helpers to sync with i915 driver
  3. */
  4. #ifndef __SOUND_HDA_I915_H
  5. #define __SOUND_HDA_I915_H
  6. #include <drm/i915_component.h>
  7. #ifdef CONFIG_SND_HDA_I915
  8. int snd_hdac_set_codec_wakeup(struct hdac_bus *bus, bool enable);
  9. int snd_hdac_display_power(struct hdac_bus *bus, bool enable);
  10. void snd_hdac_i915_set_bclk(struct hdac_bus *bus);
  11. int snd_hdac_sync_audio_rate(struct hdac_device *codec, hda_nid_t nid, int rate);
  12. int snd_hdac_acomp_get_eld(struct hdac_device *codec, hda_nid_t nid,
  13. bool *audio_enabled, char *buffer, int max_bytes);
  14. int snd_hdac_i915_init(struct hdac_bus *bus);
  15. int snd_hdac_i915_exit(struct hdac_bus *bus);
  16. int snd_hdac_i915_register_notifier(const struct i915_audio_component_audio_ops *);
  17. #else
  18. static inline int snd_hdac_set_codec_wakeup(struct hdac_bus *bus, bool enable)
  19. {
  20. return 0;
  21. }
  22. static inline int snd_hdac_display_power(struct hdac_bus *bus, bool enable)
  23. {
  24. return 0;
  25. }
  26. static inline void snd_hdac_i915_set_bclk(struct hdac_bus *bus)
  27. {
  28. }
  29. static inline int snd_hdac_sync_audio_rate(struct hdac_device *codec,
  30. hda_nid_t nid, int rate)
  31. {
  32. return 0;
  33. }
  34. static inline int snd_hdac_acomp_get_eld(struct hdac_device *codec, hda_nid_t nid,
  35. bool *audio_enabled, char *buffer,
  36. int max_bytes)
  37. {
  38. return -ENODEV;
  39. }
  40. static inline int snd_hdac_i915_init(struct hdac_bus *bus)
  41. {
  42. return -ENODEV;
  43. }
  44. static inline int snd_hdac_i915_exit(struct hdac_bus *bus)
  45. {
  46. return 0;
  47. }
  48. static inline int snd_hdac_i915_register_notifier(const struct i915_audio_component_audio_ops *ops)
  49. {
  50. return -ENODEV;
  51. }
  52. #endif
  53. #endif /* __SOUND_HDA_I915_H */