Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ca7cfae9 authored by Marc Boucher's avatar Marc Boucher Committed by Jaroslav Kysela
Browse files

[ALSA] hda-codec - Add afg and mfg preset mask



Added afg and mfg preset masks for more finer codec-preset selection.

Signed-off-by: default avatarMarc Boucher <marc@linuxant.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@perex.cz>
parent 1cfd52bc
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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) &&
+1 −0
Original line number Diff line number Diff line
@@ -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);
};