diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-11-22 13:58:56 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-11-23 01:31:36 -0500 |
commit | e2301a4de22c438f5a962c7cefc3e9cba736991c (patch) | |
tree | d2bb78107ecf2b8f4bc90516763f2131c982fd8a /sound | |
parent | a370fc62b9ad3f73abe2a721de6c03cdcce95b54 (diff) |
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: Linus Torvalds <torvalds@linux-foundation.org>
Tested-by: Dirk Hohndel <hohndel@infradead.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index e44b107fdc75..4562e9de6a1a 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -4046,9 +4046,9 @@ int snd_hda_check_board_codec_sid_config(struct hda_codec *codec, | |||
4046 | 4046 | ||
4047 | /* Search for codec ID */ | 4047 | /* Search for codec ID */ |
4048 | for (q = tbl; q->subvendor; q++) { | 4048 | for (q = tbl; q->subvendor; q++) { |
4049 | unsigned long vendorid = (q->subdevice) | (q->subvendor << 16); | 4049 | unsigned int mask = 0xffff0000 | q->subdevice_mask; |
4050 | 4050 | unsigned int id = (q->subdevice | (q->subvendor << 16)) & mask; | |
4051 | if (vendorid == codec->subsystem_id) | 4051 | if ((codec->subsystem_id & mask) == id) |
4052 | break; | 4052 | break; |
4053 | } | 4053 | } |
4054 | 4054 | ||