]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[ALSA] hda-codec - Add afg and mfg preset mask
authorMarc Boucher <marc@linuxant.com>
Tue, 22 Jan 2008 14:32:25 +0000 (15:32 +0100)
committerJaroslav Kysela <perex@perex.cz>
Thu, 31 Jan 2008 16:30:10 +0000 (17:30 +0100)
Added afg and mfg preset masks for more finer codec-preset selection.

Signed-off-by: Marc Boucher <marc@linuxant.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
sound/pci/hda/hda_codec.c
sound/pci/hda/hda_codec.h

index 6b93f45111667a794d8e3909062c82bc0bd4fa82..d4fd94805e7f927bbbb6539948236bfec261e322 100644 (file)
@@ -429,6 +429,10 @@ find_codec_preset(struct hda_codec *codec)
        for (tbl = hda_preset_tables; *tbl; tbl++) {
                for (preset = *tbl; preset->id; preset++) {
                        u32 mask = preset->mask;
+                       if (preset->afg && preset->afg != codec->afg)
+                               continue;
+                       if (preset->mfg && preset->mfg != codec->mfg)
+                               continue;
                        if (!mask)
                                mask = ~0;
                        if (preset->id == (codec->vendor_id & mask) &&
index eb4a2ae792e9dc86dd6f249365748f7c23e364ea..f14871151be983a307330ec9c61009895a22f944 100644 (file)
@@ -523,6 +523,7 @@ struct hda_codec_preset {
        unsigned int subs;
        unsigned int subs_mask;
        unsigned int rev;
+       hda_nid_t afg, mfg;
        const char *name;
        int (*patch)(struct hda_codec *codec);
 };