[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>
This commit is contained in:
committed by
Jaroslav Kysela
parent
1cfd52bc1a
commit
ca7cfae9eb
@@ -429,6 +429,10 @@ find_codec_preset(struct hda_codec *codec)
|
|||||||
for (tbl = hda_preset_tables; *tbl; tbl++) {
|
for (tbl = hda_preset_tables; *tbl; tbl++) {
|
||||||
for (preset = *tbl; preset->id; preset++) {
|
for (preset = *tbl; preset->id; preset++) {
|
||||||
u32 mask = preset->mask;
|
u32 mask = preset->mask;
|
||||||
|
if (preset->afg && preset->afg != codec->afg)
|
||||||
|
continue;
|
||||||
|
if (preset->mfg && preset->mfg != codec->mfg)
|
||||||
|
continue;
|
||||||
if (!mask)
|
if (!mask)
|
||||||
mask = ~0;
|
mask = ~0;
|
||||||
if (preset->id == (codec->vendor_id & mask) &&
|
if (preset->id == (codec->vendor_id & mask) &&
|
||||||
|
@@ -523,6 +523,7 @@ struct hda_codec_preset {
|
|||||||
unsigned int subs;
|
unsigned int subs;
|
||||||
unsigned int subs_mask;
|
unsigned int subs_mask;
|
||||||
unsigned int rev;
|
unsigned int rev;
|
||||||
|
hda_nid_t afg, mfg;
|
||||||
const char *name;
|
const char *name;
|
||||||
int (*patch)(struct hda_codec *codec);
|
int (*patch)(struct hda_codec *codec);
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user