hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/include/sound/hda_component.h
....@@ -5,17 +5,22 @@
55 #define __SOUND_HDA_COMPONENT_H
66
77 #include <drm/drm_audio_component.h>
8
+#include <sound/hdaudio.h>
9
+
10
+/* virtual idx for controller */
11
+#define HDA_CODEC_IDX_CONTROLLER HDA_MAX_CODECS
812
913 #ifdef CONFIG_SND_HDA_COMPONENT
1014 int snd_hdac_set_codec_wakeup(struct hdac_bus *bus, bool enable);
11
-int snd_hdac_display_power(struct hdac_bus *bus, bool enable);
15
+void snd_hdac_display_power(struct hdac_bus *bus, unsigned int idx,
16
+ bool enable);
1217 int snd_hdac_sync_audio_rate(struct hdac_device *codec, hda_nid_t nid,
1318 int dev_id, int rate);
1419 int snd_hdac_acomp_get_eld(struct hdac_device *codec, hda_nid_t nid, int dev_id,
1520 bool *audio_enabled, char *buffer, int max_bytes);
1621 int snd_hdac_acomp_init(struct hdac_bus *bus,
1722 const struct drm_audio_component_audio_ops *aops,
18
- int (*match_master)(struct device *, void *),
23
+ int (*match_master)(struct device *, int, void *),
1924 size_t extra_size);
2025 int snd_hdac_acomp_exit(struct hdac_bus *bus);
2126 int snd_hdac_acomp_register_notifier(struct hdac_bus *bus,
....@@ -25,9 +30,9 @@
2530 {
2631 return 0;
2732 }
28
-static inline int snd_hdac_display_power(struct hdac_bus *bus, bool enable)
33
+static inline void snd_hdac_display_power(struct hdac_bus *bus,
34
+ unsigned int idx, bool enable)
2935 {
30
- return 0;
3136 }
3237 static inline int snd_hdac_sync_audio_rate(struct hdac_device *codec,
3338 hda_nid_t nid, int dev_id, int rate)
....@@ -42,7 +47,8 @@
4247 }
4348 static inline int snd_hdac_acomp_init(struct hdac_bus *bus,
4449 const struct drm_audio_component_audio_ops *aops,
45
- int (*match_master)(struct device *, void *),
50
+ int (*match_master)(struct device *,
51
+ int, void *),
4652 size_t extra_size)
4753 {
4854 return -ENODEV;