]> git.ipfire.org Git - thirdparty/linux.git/blobdiff - sound/pci/hda/hda_local.h
ALSA: hda - Move fixup code into struct hda_codec
[thirdparty/linux.git] / sound / pci / hda / hda_local.h
index ff56da82b7a0b7fb0455d8ba0974f41829ebaa4d..de12dcc5accc051ea8ce7c6f32aab49326b2320c 100644 (file)
@@ -385,6 +385,59 @@ int snd_hda_check_board_codec_sid_config(struct hda_codec *codec,
 int snd_hda_add_new_ctls(struct hda_codec *codec,
                         const struct snd_kcontrol_new *knew);
 
+/*
+ * Fix-up pin default configurations and add default verbs
+ */
+
+struct hda_pintbl {
+       hda_nid_t nid;
+       u32 val;
+};
+
+struct hda_model_fixup {
+       const int id;
+       const char *name;
+};
+
+struct hda_fixup {
+       int type;
+       bool chained;
+       int chain_id;
+       union {
+               const struct hda_pintbl *pins;
+               const struct hda_verb *verbs;
+               void (*func)(struct hda_codec *codec,
+                            const struct hda_fixup *fix,
+                            int action);
+       } v;
+};
+
+/* fixup types */
+enum {
+       HDA_FIXUP_INVALID,
+       HDA_FIXUP_PINS,
+       HDA_FIXUP_VERBS,
+       HDA_FIXUP_FUNC,
+};
+
+/* fixup action definitions */
+enum {
+       HDA_FIXUP_ACT_PRE_PROBE,
+       HDA_FIXUP_ACT_PROBE,
+       HDA_FIXUP_ACT_INIT,
+       HDA_FIXUP_ACT_BUILD,
+};
+
+int snd_hda_add_verbs(struct hda_codec *codec, const struct hda_verb *list);
+void snd_hda_apply_verbs(struct hda_codec *codec);
+void snd_hda_apply_pincfgs(struct hda_codec *codec,
+                          const struct hda_pintbl *cfg);
+void snd_hda_apply_fixup(struct hda_codec *codec, int action);
+void snd_hda_pick_fixup(struct hda_codec *codec,
+                       const struct hda_model_fixup *models,
+                       const struct snd_pci_quirk *quirk,
+                       const struct hda_fixup *fixlist);
+
 /*
  * unsolicited event handler
  */