提交 e2301a4d 编写于 作者: T Takashi Iwai

ALSA: hda - Check subdevice mask in snd_hda_check_board_codec_sid_config()

In snd_hda_check_board_codec_sid_config(), not only comparing with the
exact value but allow the bit-mask comparison for vendor-only, etc.
Tested-by: NLinus Torvalds <torvalds@linux-foundation.org>
Tested-by: NDirk Hohndel <hohndel@infradead.org>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 a370fc62
...@@ -4046,9 +4046,9 @@ int snd_hda_check_board_codec_sid_config(struct hda_codec *codec, ...@@ -4046,9 +4046,9 @@ int snd_hda_check_board_codec_sid_config(struct hda_codec *codec,
/* Search for codec ID */ /* Search for codec ID */
for (q = tbl; q->subvendor; q++) { for (q = tbl; q->subvendor; q++) {
unsigned long vendorid = (q->subdevice) | (q->subvendor << 16); unsigned int mask = 0xffff0000 | q->subdevice_mask;
unsigned int id = (q->subdevice | (q->subvendor << 16)) & mask;
if (vendorid == codec->subsystem_id) if ((codec->subsystem_id & mask) == id)
break; break;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册