aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/core.h16
-rw-r--r--include/sound/soc-dapm.h2
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)
446struct snd_pci_quirk { 446struct 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
466const struct snd_pci_quirk * 478const 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) \