aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/soc-dapm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sound/soc-dapm.h')
-rw-r--r--include/sound/soc-dapm.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index c5c95e1da65b..c0922a034223 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -95,6 +95,21 @@
95 .shift = wshift, .invert = winvert, .kcontrols = wcontrols, \ 95 .shift = wshift, .invert = winvert, .kcontrols = wcontrols, \
96 .num_kcontrols = 1} 96 .num_kcontrols = 1}
97 97
98/* Simplified versions of above macros, assuming wncontrols = ARRAY_SIZE(wcontrols) */
99#define SOC_PGA_ARRAY(wname, wreg, wshift, winvert,\
100 wcontrols) \
101{ .id = snd_soc_dapm_pga, .name = wname, .reg = wreg, .shift = wshift, \
102 .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = ARRAY_SIZE(wcontrols)}
103#define SOC_MIXER_ARRAY(wname, wreg, wshift, winvert, \
104 wcontrols)\
105{ .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \
106 .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = ARRAY_SIZE(wcontrols)}
107#define SOC_MIXER_NAMED_CTL_ARRAY(wname, wreg, wshift, winvert, \
108 wcontrols)\
109{ .id = snd_soc_dapm_mixer_named_ctl, .name = wname, .reg = wreg, \
110 .shift = wshift, .invert = winvert, .kcontrols = wcontrols, \
111 .num_kcontrols = ARRAY_SIZE(wcontrols)}
112
98/* path domain with event - event handler must return 0 for success */ 113/* path domain with event - event handler must return 0 for success */
99#define SND_SOC_DAPM_PGA_E(wname, wreg, wshift, winvert, wcontrols, \ 114#define SND_SOC_DAPM_PGA_E(wname, wreg, wshift, winvert, wcontrols, \
100 wncontrols, wevent, wflags) \ 115 wncontrols, wevent, wflags) \
@@ -126,6 +141,23 @@
126 .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1, \ 141 .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1, \
127 .event = wevent, .event_flags = wflags} 142 .event = wevent, .event_flags = wflags}
128 143
144/* Simplified versions of above macros, assuming wncontrols = ARRAY_SIZE(wcontrols) */
145#define SOC_PGA_E_ARRAY(wname, wreg, wshift, winvert, wcontrols, \
146 wevent, wflags) \
147{ .id = snd_soc_dapm_pga, .name = wname, .reg = wreg, .shift = wshift, \
148 .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = ARRAY_SIZE(wcontrols), \
149 .event = wevent, .event_flags = wflags}
150#define SOC_MIXER_E_ARRAY(wname, wreg, wshift, winvert, wcontrols, \
151 wevent, wflags) \
152{ .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \
153 .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = ARRAY_SIZE(wcontrols), \
154 .event = wevent, .event_flags = wflags}
155#define SOC_MIXER_NAMED_CTL_E_ARRAY(wname, wreg, wshift, winvert, \
156 wcontrols, wevent, wflags) \
157{ .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \
158 .invert = winvert, .kcontrols = wcontrols, \
159 .num_kcontrols = ARRAY_SIZE(wcontrols), .event = wevent, .event_flags = wflags}
160
129/* events that are pre and post DAPM */ 161/* events that are pre and post DAPM */
130#define SND_SOC_DAPM_PRE(wname, wevent) \ 162#define SND_SOC_DAPM_PRE(wname, wevent) \
131{ .id = snd_soc_dapm_pre, .name = wname, .kcontrols = NULL, \ 163{ .id = snd_soc_dapm_pre, .name = wname, .kcontrols = NULL, \