aboutsummaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_codec.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-12-03 14:43:14 +0100
committerTakashi Iwai <tiwai@suse.de>2008-12-03 14:43:14 +0100
commit0640f84fac8a8aa8e7911c950cd9a4b0199711f6 (patch)
tree0f7a0f0deb5152461854c91158ba834a1edec5b1 /sound/pci/hda/hda_codec.h
parent8c2f767bf3c4a7932898e657c6b12a2234cd2eca (diff)
parentff7a3267368634e368ebaac68d5e3abf129edd1d (diff)
Merge branch 'topic/hda-modularize' into topic/hda
Diffstat (limited to 'sound/pci/hda/hda_codec.h')
-rw-r--r--sound/pci/hda/hda_codec.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index bbbc83b387d..5587d416229 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -640,6 +640,16 @@ struct hda_codec_preset {
int (*patch)(struct hda_codec *codec);
};
+struct hda_codec_preset_list {
+ const struct hda_codec_preset *preset;
+ struct module *owner;
+ struct list_head list;
+};
+
+/* initial hook */
+int snd_hda_add_codec_preset(struct hda_codec_preset_list *preset);
+int snd_hda_delete_codec_preset(struct hda_codec_preset_list *preset);
+
/* ops set by the preset patch */
struct hda_codec_ops {
int (*build_controls)(struct hda_codec *codec);
@@ -733,6 +743,7 @@ struct hda_codec {
/* detected preset */
const struct hda_codec_preset *preset;
+ struct module *owner;
const char *name; /* codec name */
const char *modelname; /* model name for preset */
@@ -896,4 +907,19 @@ static inline void snd_hda_power_down(struct hda_codec *codec) {}
#define snd_hda_codec_needs_resume(codec) 1
#endif
+/*
+ * Codec modularization
+ */
+
+/* Export symbols only for communication with codec drivers;
+ * When built in kernel, all HD-audio drivers are supposed to be statically
+ * linked to the kernel. Thus, the symbols don't have to (or shouldn't) be
+ * exported unless it's built as a module.
+ */
+#ifdef MODULE
+#define EXPORT_SYMBOL_HDA(sym) EXPORT_SYMBOL_GPL(sym)
+#else
+#define EXPORT_SYMBOL_HDA(sym)
+#endif
+
#endif /* __SOUND_HDA_CODEC_H */