[ALSA] hda-codec - Allow sub_device=0 in board config check
authorTakashi Iwai <tiwai@suse.de>
Fri, 10 Jun 2005 17:54:23 +0000 (19:54 +0200)
committerJaroslav Kysela <perex@suse.cz>
Wed, 22 Jun 2005 10:28:47 +0000 (12:28 +0200)
HDA Codec driver
Allow sub_device=0 in board config check.  This means that every device
with the given sub vendor ID will match.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_codec.c

index 8805928167f5ee10c525f82b492b9e73e9279a1f..f62d1d5eb7fa425f5cd8a0487af2c43856aebfea 100644 (file)
@@ -1540,7 +1540,8 @@ int snd_hda_check_board_config(struct hda_codec *codec, struct hda_board_config
                pci_read_config_word(codec->bus->pci, PCI_SUBSYSTEM_ID, &subsystem_device);
                for (c = tbl; c->modelname || c->pci_subvendor; c++) {
                        if (c->pci_subvendor == subsystem_vendor &&
-                           c->pci_subdevice == subsystem_device)
+                           (! c->pci_subdevice /* all match */||
+                            (c->pci_subdevice == subsystem_device)))
                                return c->config;
                }
        }