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

Commit e2301a4d authored by Takashi Iwai's avatar Takashi Iwai
Browse files

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: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Tested-by: default avatarDirk Hohndel <hohndel@infradead.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent a370fc62
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -4046,9 +4046,9 @@ int snd_hda_check_board_codec_sid_config(struct hda_codec *codec,

	/* Search for codec ID */
	for (q = tbl; q->subvendor; q++) {
		unsigned long vendorid = (q->subdevice) | (q->subvendor << 16);

		if (vendorid == codec->subsystem_id)
		unsigned int mask = 0xffff0000 | q->subdevice_mask;
		unsigned int id = (q->subdevice | (q->subvendor << 16)) & mask;
		if ((codec->subsystem_id & mask) == id)
			break;
	}