aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/core.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-03-23 19:35:44 -0400
committerTakashi Iwai <tiwai@suse.de>2009-03-23 19:35:44 -0400
commitbafdb7278cb6a215a8a451024fa1604d790cb7b4 (patch)
tree457657576236f8ec43549e64e4b8a81783f71e19 /include/sound/core.h
parent5b56eec77498f15317f3ff5ac9101372f400c859 (diff)
parent8bd4bb7a35e8ebb015a531218614c48e10a3c4ee (diff)
Merge branch 'topic/quirk-cleanup' into for-linus
Diffstat (limited to 'include/sound/core.h')
-rw-r--r--include/sound/core.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/include/sound/core.h b/include/sound/core.h
index 25420c3b551..59491f22da9 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -458,21 +458,33 @@ static inline int __snd_bug_on(int cond)
458struct snd_pci_quirk { 458struct snd_pci_quirk {
459 unsigned short subvendor; /* PCI subvendor ID */ 459 unsigned short subvendor; /* PCI subvendor ID */
460 unsigned short subdevice; /* PCI subdevice ID */ 460 unsigned short subdevice; /* PCI subdevice ID */
461 unsigned short subdevice_mask; /* bitmask to match */
461 int value; /* value */ 462 int value; /* value */
462#ifdef CONFIG_SND_DEBUG_VERBOSE 463#ifdef CONFIG_SND_DEBUG_VERBOSE
463 const char *name; /* name of the device (optional) */ 464 const char *name; /* name of the device (optional) */
464#endif 465#endif
465}; 466};
466 467
467#define _SND_PCI_QUIRK_ID(vend,dev) \ 468#define _SND_PCI_QUIRK_ID_MASK(vend, mask, dev) \
468 .subvendor = (vend), .subdevice = (dev) 469 .subvendor = (vend), .subdevice = (dev), .subdevice_mask = (mask)
470#define _SND_PCI_QUIRK_ID(vend, dev) \
471 _SND_PCI_QUIRK_ID_MASK(vend, 0xffff, dev)
469#define SND_PCI_QUIRK_ID(vend,dev) {_SND_PCI_QUIRK_ID(vend, dev)} 472#define SND_PCI_QUIRK_ID(vend,dev) {_SND_PCI_QUIRK_ID(vend, dev)}
470#ifdef CONFIG_SND_DEBUG_VERBOSE 473#ifdef CONFIG_SND_DEBUG_VERBOSE
471#define SND_PCI_QUIRK(vend,dev,xname,val) \ 474#define SND_PCI_QUIRK(vend,dev,xname,val) \
472 {_SND_PCI_QUIRK_ID(vend, dev), .value = (val), .name = (xname)} 475 {_SND_PCI_QUIRK_ID(vend, dev), .value = (val), .name = (xname)}
476#define SND_PCI_QUIRK_VENDOR(vend, xname, val) \
477 {_SND_PCI_QUIRK_ID_MASK(vend, 0, 0), .value = (val), .name = (xname)}
478#define SND_PCI_QUIRK_MASK(vend, mask, dev, xname, val) \
479 {_SND_PCI_QUIRK_ID_MASK(vend, mask, dev), \
480 .value = (val), .name = (xname)}
473#else 481#else
474#define SND_PCI_QUIRK(vend,dev,xname,val) \ 482#define SND_PCI_QUIRK(vend,dev,xname,val) \
475 {_SND_PCI_QUIRK_ID(vend, dev), .value = (val)} 483 {_SND_PCI_QUIRK_ID(vend, dev), .value = (val)}
484#define SND_PCI_QUIRK_MASK(vend, mask, dev, xname, val) \
485 {_SND_PCI_QUIRK_ID_MASK(vend, mask, dev), .value = (val)}
486#define SND_PCI_QUIRK_VENDOR(vend, xname, val) \
487 {_SND_PCI_QUIRK_ID_MASK(vend, 0, 0), .value = (val)}
476#endif 488#endif
477 489
478const struct snd_pci_quirk * 490const struct snd_pci_quirk *