aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMarc Boucher <marc@linuxant.com>2008-01-22 09:32:25 -0500
committerJaroslav Kysela <perex@perex.cz>2008-01-31 11:30:10 -0500
commitca7cfae9eb91c012ac448dc6816ded6285f6f39a (patch)
tree8842e362220e07738d574044c00f8de74eb312bc /sound
parent1cfd52bc1ad516dbdc23839d40013dea4c19c70a (diff)
[ALSA] hda-codec - Add afg and mfg preset mask
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>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/hda_codec.c4
-rw-r--r--sound/pci/hda/hda_codec.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 6b93f4511166..d4fd94805e7f 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -429,6 +429,10 @@ find_codec_preset(struct hda_codec *codec)
429 for (tbl = hda_preset_tables; *tbl; tbl++) { 429 for (tbl = hda_preset_tables; *tbl; tbl++) {
430 for (preset = *tbl; preset->id; preset++) { 430 for (preset = *tbl; preset->id; preset++) {
431 u32 mask = preset->mask; 431 u32 mask = preset->mask;
432 if (preset->afg && preset->afg != codec->afg)
433 continue;
434 if (preset->mfg && preset->mfg != codec->mfg)
435 continue;
432 if (!mask) 436 if (!mask)
433 mask = ~0; 437 mask = ~0;
434 if (preset->id == (codec->vendor_id & mask) && 438 if (preset->id == (codec->vendor_id & mask) &&
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index eb4a2ae792e9..f14871151be9 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -523,6 +523,7 @@ struct hda_codec_preset {
523 unsigned int subs; 523 unsigned int subs;
524 unsigned int subs_mask; 524 unsigned int subs_mask;
525 unsigned int rev; 525 unsigned int rev;
526 hda_nid_t afg, mfg;
526 const char *name; 527 const char *name;
527 int (*patch)(struct hda_codec *codec); 528 int (*patch)(struct hda_codec *codec);
528}; 529};