diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-01-30 11:27:45 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-02-09 11:19:11 -0500 |
commit | 8bd4bb7a35e8ebb015a531218614c48e10a3c4ee (patch) | |
tree | f784818fdca481fd681f90c69ab006dda3a0871e /include/sound | |
parent | 18e352e4a73465349711a9324767e1b2453383e2 (diff) |
ALSA: Add subdevice_mask field to quirk entries
Introduced a new field, subdevice_mask, which specifies the bitmask
to match with the given subdevice ID.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/core.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/include/sound/core.h b/include/sound/core.h index f632484bc743..f67952a61a2d 100644 --- a/include/sound/core.h +++ b/include/sound/core.h | |||
@@ -446,21 +446,33 @@ static inline int __snd_bug_on(int cond) | |||
446 | struct snd_pci_quirk { | 446 | struct snd_pci_quirk { |
447 | unsigned short subvendor; /* PCI subvendor ID */ | 447 | unsigned short subvendor; /* PCI subvendor ID */ |
448 | unsigned short subdevice; /* PCI subdevice ID */ | 448 | unsigned short subdevice; /* PCI subdevice ID */ |
449 | unsigned short subdevice_mask; /* bitmask to match */ | ||
449 | int value; /* value */ | 450 | int value; /* value */ |
450 | #ifdef CONFIG_SND_DEBUG_VERBOSE | 451 | #ifdef CONFIG_SND_DEBUG_VERBOSE |
451 | const char *name; /* name of the device (optional) */ | 452 | const char *name; /* name of the device (optional) */ |
452 | #endif | 453 | #endif |
453 | }; | 454 | }; |
454 | 455 | ||
455 | #define _SND_PCI_QUIRK_ID(vend,dev) \ | 456 | #define _SND_PCI_QUIRK_ID_MASK(vend, mask, dev) \ |
456 | .subvendor = (vend), .subdevice = (dev) | 457 | .subvendor = (vend), .subdevice = (dev), .subdevice_mask = (mask) |
458 | #define _SND_PCI_QUIRK_ID(vend, dev) \ | ||
459 | _SND_PCI_QUIRK_ID_MASK(vend, 0xffff, dev) | ||
457 | #define SND_PCI_QUIRK_ID(vend,dev) {_SND_PCI_QUIRK_ID(vend, dev)} | 460 | #define SND_PCI_QUIRK_ID(vend,dev) {_SND_PCI_QUIRK_ID(vend, dev)} |
458 | #ifdef CONFIG_SND_DEBUG_VERBOSE | 461 | #ifdef CONFIG_SND_DEBUG_VERBOSE |
459 | #define SND_PCI_QUIRK(vend,dev,xname,val) \ | 462 | #define SND_PCI_QUIRK(vend,dev,xname,val) \ |
460 | {_SND_PCI_QUIRK_ID(vend, dev), .value = (val), .name = (xname)} | 463 | {_SND_PCI_QUIRK_ID(vend, dev), .value = (val), .name = (xname)} |
464 | #define SND_PCI_QUIRK_VENDOR(vend, xname, val) \ | ||
465 | {_SND_PCI_QUIRK_ID_MASK(vend, 0, 0), .value = (val), .name = (xname)} | ||
466 | #define SND_PCI_QUIRK_MASK(vend, mask, dev, xname, val) \ | ||
467 | {_SND_PCI_QUIRK_ID_MASK(vend, mask, dev), \ | ||
468 | .value = (val), .name = (xname)} | ||
461 | #else | 469 | #else |
462 | #define SND_PCI_QUIRK(vend,dev,xname,val) \ | 470 | #define SND_PCI_QUIRK(vend,dev,xname,val) \ |
463 | {_SND_PCI_QUIRK_ID(vend, dev), .value = (val)} | 471 | {_SND_PCI_QUIRK_ID(vend, dev), .value = (val)} |
472 | #define SND_PCI_QUIRK_MASK(vend, mask, dev, xname, val) \ | ||
473 | {_SND_PCI_QUIRK_ID_MASK(vend, mask, dev), .value = (val)} | ||
474 | #define SND_PCI_QUIRK_VENDOR(vend, xname, val) \ | ||
475 | {_SND_PCI_QUIRK_ID_MASK(vend, 0, 0), .value = (val)} | ||
464 | #endif | 476 | #endif |
465 | 477 | ||
466 | const struct snd_pci_quirk * | 478 | const struct snd_pci_quirk * |