aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-11-22 07:29:19 -0500
committerTakashi Iwai <tiwai@suse.de>2010-11-22 07:29:19 -0500
commit9d57883f08d3c0c111b50bf185dfee9731a12c76 (patch)
tree5d35f1d97789730bf40dff660b0144b64eedc92a
parent01e0f1378c47947b825eac05c98697ab1be1c86f (diff)
ALSA: hda - Add a generic fixup callback for Realtek codecs
Add a generic callback function for fixup elements. This can be used to do some unusual things like overriding the AMP cache, etc. Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/hda/patch_realtek.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 564e6c136ddd..f10c613c530f 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -1681,6 +1681,8 @@ struct alc_fixup {
1681 unsigned int sku; 1681 unsigned int sku;
1682 const struct alc_pincfg *pins; 1682 const struct alc_pincfg *pins;
1683 const struct hda_verb *verbs; 1683 const struct hda_verb *verbs;
1684 void (*func)(struct hda_codec *codec, const struct alc_fixup *fix,
1685 int pre_init);
1684}; 1686};
1685 1687
1686static void alc_pick_fixup(struct hda_codec *codec, 1688static void alc_pick_fixup(struct hda_codec *codec,
@@ -1720,6 +1722,13 @@ static void alc_pick_fixup(struct hda_codec *codec,
1720#endif 1722#endif
1721 add_verb(codec->spec, fix->verbs); 1723 add_verb(codec->spec, fix->verbs);
1722 } 1724 }
1725 if (fix->func) {
1726#ifdef CONFIG_SND_DEBUG_VERBOSE
1727 snd_printdd(KERN_INFO "hda_codec: %s: Apply fix-func for %s\n",
1728 codec->chip_name, quirk->name);
1729#endif
1730 fix->func(codec, fix, pre_init);
1731 }
1723} 1732}
1724 1733
1725static int alc_read_coef_idx(struct hda_codec *codec, 1734static int alc_read_coef_idx(struct hda_codec *codec,