diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-02-09 11:20:13 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-02-09 11:20:13 -0500 |
commit | d9f8e9c34150ebec2be07bb95b6a23d99ba1f6de (patch) | |
tree | 1e8c402df9b1154f4ca37eb5242f960ef7aab747 /include/sound | |
parent | 2ebfb8eeb8f244f9d25937d31a947895cf819e26 (diff) | |
parent | 8bd4bb7a35e8ebb015a531218614c48e10a3c4ee (diff) |
Merge branch 'topic/quirk-cleanup' into topic/misc
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/core.h | 16 | ||||
-rw-r--r-- | include/sound/soc-dapm.h | 2 |
2 files changed, 15 insertions, 3 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 * |
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index 93a4edb148b5..dfa804958820 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
@@ -108,7 +108,7 @@ | |||
108 | #define SND_SOC_DAPM_SWITCH_E(wname, wreg, wshift, winvert, wcontrols, \ | 108 | #define SND_SOC_DAPM_SWITCH_E(wname, wreg, wshift, winvert, wcontrols, \ |
109 | wevent, wflags) \ | 109 | wevent, wflags) \ |
110 | { .id = snd_soc_dapm_switch, .name = wname, .reg = wreg, .shift = wshift, \ | 110 | { .id = snd_soc_dapm_switch, .name = wname, .reg = wreg, .shift = wshift, \ |
111 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1 \ | 111 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1, \ |
112 | .event = wevent, .event_flags = wflags} | 112 | .event = wevent, .event_flags = wflags} |
113 | #define SND_SOC_DAPM_MUX_E(wname, wreg, wshift, winvert, wcontrols, \ | 113 | #define SND_SOC_DAPM_MUX_E(wname, wreg, wshift, winvert, wcontrols, \ |
114 | wevent, wflags) \ | 114 | wevent, wflags) \ |