diff options
Diffstat (limited to 'include/sound/core.h')
-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 * |