diff options
author | Stephen Warren <swarren@nvidia.com> | 2011-04-28 19:37:58 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-05-03 14:28:47 -0400 |
commit | 82cfecdc03499be63262d60daf859b4cc1ea3fba (patch) | |
tree | 4af6e094485ecc5b9acd5525008446b6ff0cf680 | |
parent | 65f7e32520fcc31c32d72e61198a4eb457656860 (diff) |
ASoC: s/w->kcontrols/w->kcontrol_news/g
A future change will modify struct snd_soc_dapm_widget to store the
actual kcontrol pointers for each kcontrol_new in a field named
kcontrols. Rename the existing kcontrols field to enable this.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r-- | include/sound/soc-dapm.h | 68 | ||||
-rw-r--r-- | sound/soc/codecs/88pm860x-codec.c | 2 | ||||
-rw-r--r-- | sound/soc/soc-dapm.c | 28 |
3 files changed, 50 insertions, 48 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index f8a7c9a6f12a..76714be19e9d 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
@@ -39,30 +39,30 @@ | |||
39 | 39 | ||
40 | /* codec domain */ | 40 | /* codec domain */ |
41 | #define SND_SOC_DAPM_VMID(wname) \ | 41 | #define SND_SOC_DAPM_VMID(wname) \ |
42 | { .id = snd_soc_dapm_vmid, .name = wname, .kcontrols = NULL, \ | 42 | { .id = snd_soc_dapm_vmid, .name = wname, .kcontrol_news = NULL, \ |
43 | .num_kcontrols = 0} | 43 | .num_kcontrols = 0} |
44 | 44 | ||
45 | /* platform domain */ | 45 | /* platform domain */ |
46 | #define SND_SOC_DAPM_INPUT(wname) \ | 46 | #define SND_SOC_DAPM_INPUT(wname) \ |
47 | { .id = snd_soc_dapm_input, .name = wname, .kcontrols = NULL, \ | 47 | { .id = snd_soc_dapm_input, .name = wname, .kcontrol_news = NULL, \ |
48 | .num_kcontrols = 0, .reg = SND_SOC_NOPM } | 48 | .num_kcontrols = 0, .reg = SND_SOC_NOPM } |
49 | #define SND_SOC_DAPM_OUTPUT(wname) \ | 49 | #define SND_SOC_DAPM_OUTPUT(wname) \ |
50 | { .id = snd_soc_dapm_output, .name = wname, .kcontrols = NULL, \ | 50 | { .id = snd_soc_dapm_output, .name = wname, .kcontrol_news = NULL, \ |
51 | .num_kcontrols = 0, .reg = SND_SOC_NOPM } | 51 | .num_kcontrols = 0, .reg = SND_SOC_NOPM } |
52 | #define SND_SOC_DAPM_MIC(wname, wevent) \ | 52 | #define SND_SOC_DAPM_MIC(wname, wevent) \ |
53 | { .id = snd_soc_dapm_mic, .name = wname, .kcontrols = NULL, \ | 53 | { .id = snd_soc_dapm_mic, .name = wname, .kcontrol_news = NULL, \ |
54 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ | 54 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ |
55 | .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD} | 55 | .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD} |
56 | #define SND_SOC_DAPM_HP(wname, wevent) \ | 56 | #define SND_SOC_DAPM_HP(wname, wevent) \ |
57 | { .id = snd_soc_dapm_hp, .name = wname, .kcontrols = NULL, \ | 57 | { .id = snd_soc_dapm_hp, .name = wname, .kcontrol_news = NULL, \ |
58 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ | 58 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ |
59 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} | 59 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} |
60 | #define SND_SOC_DAPM_SPK(wname, wevent) \ | 60 | #define SND_SOC_DAPM_SPK(wname, wevent) \ |
61 | { .id = snd_soc_dapm_spk, .name = wname, .kcontrols = NULL, \ | 61 | { .id = snd_soc_dapm_spk, .name = wname, .kcontrol_news = NULL, \ |
62 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ | 62 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ |
63 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} | 63 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} |
64 | #define SND_SOC_DAPM_LINE(wname, wevent) \ | 64 | #define SND_SOC_DAPM_LINE(wname, wevent) \ |
65 | { .id = snd_soc_dapm_line, .name = wname, .kcontrols = NULL, \ | 65 | { .id = snd_soc_dapm_line, .name = wname, .kcontrol_news = NULL, \ |
66 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ | 66 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ |
67 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} | 67 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} |
68 | 68 | ||
@@ -70,91 +70,91 @@ | |||
70 | #define SND_SOC_DAPM_PGA(wname, wreg, wshift, winvert,\ | 70 | #define SND_SOC_DAPM_PGA(wname, wreg, wshift, winvert,\ |
71 | wcontrols, wncontrols) \ | 71 | wcontrols, wncontrols) \ |
72 | { .id = snd_soc_dapm_pga, .name = wname, .reg = wreg, .shift = wshift, \ | 72 | { .id = snd_soc_dapm_pga, .name = wname, .reg = wreg, .shift = wshift, \ |
73 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols} | 73 | .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = wncontrols} |
74 | #define SND_SOC_DAPM_OUT_DRV(wname, wreg, wshift, winvert,\ | 74 | #define SND_SOC_DAPM_OUT_DRV(wname, wreg, wshift, winvert,\ |
75 | wcontrols, wncontrols) \ | 75 | wcontrols, wncontrols) \ |
76 | { .id = snd_soc_dapm_out_drv, .name = wname, .reg = wreg, .shift = wshift, \ | 76 | { .id = snd_soc_dapm_out_drv, .name = wname, .reg = wreg, .shift = wshift, \ |
77 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols} | 77 | .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = wncontrols} |
78 | #define SND_SOC_DAPM_MIXER(wname, wreg, wshift, winvert, \ | 78 | #define SND_SOC_DAPM_MIXER(wname, wreg, wshift, winvert, \ |
79 | wcontrols, wncontrols)\ | 79 | wcontrols, wncontrols)\ |
80 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ | 80 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ |
81 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols} | 81 | .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = wncontrols} |
82 | #define SND_SOC_DAPM_MIXER_NAMED_CTL(wname, wreg, wshift, winvert, \ | 82 | #define SND_SOC_DAPM_MIXER_NAMED_CTL(wname, wreg, wshift, winvert, \ |
83 | wcontrols, wncontrols)\ | 83 | wcontrols, wncontrols)\ |
84 | { .id = snd_soc_dapm_mixer_named_ctl, .name = wname, .reg = wreg, \ | 84 | { .id = snd_soc_dapm_mixer_named_ctl, .name = wname, .reg = wreg, \ |
85 | .shift = wshift, .invert = winvert, .kcontrols = wcontrols, \ | 85 | .shift = wshift, .invert = winvert, .kcontrol_news = wcontrols, \ |
86 | .num_kcontrols = wncontrols} | 86 | .num_kcontrols = wncontrols} |
87 | #define SND_SOC_DAPM_MICBIAS(wname, wreg, wshift, winvert) \ | 87 | #define SND_SOC_DAPM_MICBIAS(wname, wreg, wshift, winvert) \ |
88 | { .id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, .shift = wshift, \ | 88 | { .id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, .shift = wshift, \ |
89 | .invert = winvert, .kcontrols = NULL, .num_kcontrols = 0} | 89 | .invert = winvert, .kcontrol_news = NULL, .num_kcontrols = 0} |
90 | #define SND_SOC_DAPM_SWITCH(wname, wreg, wshift, winvert, wcontrols) \ | 90 | #define SND_SOC_DAPM_SWITCH(wname, wreg, wshift, winvert, wcontrols) \ |
91 | { .id = snd_soc_dapm_switch, .name = wname, .reg = wreg, .shift = wshift, \ | 91 | { .id = snd_soc_dapm_switch, .name = wname, .reg = wreg, .shift = wshift, \ |
92 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1} | 92 | .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = 1} |
93 | #define SND_SOC_DAPM_MUX(wname, wreg, wshift, winvert, wcontrols) \ | 93 | #define SND_SOC_DAPM_MUX(wname, wreg, wshift, winvert, wcontrols) \ |
94 | { .id = snd_soc_dapm_mux, .name = wname, .reg = wreg, .shift = wshift, \ | 94 | { .id = snd_soc_dapm_mux, .name = wname, .reg = wreg, .shift = wshift, \ |
95 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1} | 95 | .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = 1} |
96 | #define SND_SOC_DAPM_VIRT_MUX(wname, wreg, wshift, winvert, wcontrols) \ | 96 | #define SND_SOC_DAPM_VIRT_MUX(wname, wreg, wshift, winvert, wcontrols) \ |
97 | { .id = snd_soc_dapm_virt_mux, .name = wname, .reg = wreg, .shift = wshift, \ | 97 | { .id = snd_soc_dapm_virt_mux, .name = wname, .reg = wreg, .shift = wshift, \ |
98 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1} | 98 | .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = 1} |
99 | #define SND_SOC_DAPM_VALUE_MUX(wname, wreg, wshift, winvert, wcontrols) \ | 99 | #define SND_SOC_DAPM_VALUE_MUX(wname, wreg, wshift, winvert, wcontrols) \ |
100 | { .id = snd_soc_dapm_value_mux, .name = wname, .reg = wreg, \ | 100 | { .id = snd_soc_dapm_value_mux, .name = wname, .reg = wreg, \ |
101 | .shift = wshift, .invert = winvert, .kcontrols = wcontrols, \ | 101 | .shift = wshift, .invert = winvert, .kcontrol_news = wcontrols, \ |
102 | .num_kcontrols = 1} | 102 | .num_kcontrols = 1} |
103 | 103 | ||
104 | /* Simplified versions of above macros, assuming wncontrols = ARRAY_SIZE(wcontrols) */ | 104 | /* Simplified versions of above macros, assuming wncontrols = ARRAY_SIZE(wcontrols) */ |
105 | #define SOC_PGA_ARRAY(wname, wreg, wshift, winvert,\ | 105 | #define SOC_PGA_ARRAY(wname, wreg, wshift, winvert,\ |
106 | wcontrols) \ | 106 | wcontrols) \ |
107 | { .id = snd_soc_dapm_pga, .name = wname, .reg = wreg, .shift = wshift, \ | 107 | { .id = snd_soc_dapm_pga, .name = wname, .reg = wreg, .shift = wshift, \ |
108 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = ARRAY_SIZE(wcontrols)} | 108 | .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = ARRAY_SIZE(wcontrols)} |
109 | #define SOC_MIXER_ARRAY(wname, wreg, wshift, winvert, \ | 109 | #define SOC_MIXER_ARRAY(wname, wreg, wshift, winvert, \ |
110 | wcontrols)\ | 110 | wcontrols)\ |
111 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ | 111 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ |
112 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = ARRAY_SIZE(wcontrols)} | 112 | .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = ARRAY_SIZE(wcontrols)} |
113 | #define SOC_MIXER_NAMED_CTL_ARRAY(wname, wreg, wshift, winvert, \ | 113 | #define SOC_MIXER_NAMED_CTL_ARRAY(wname, wreg, wshift, winvert, \ |
114 | wcontrols)\ | 114 | wcontrols)\ |
115 | { .id = snd_soc_dapm_mixer_named_ctl, .name = wname, .reg = wreg, \ | 115 | { .id = snd_soc_dapm_mixer_named_ctl, .name = wname, .reg = wreg, \ |
116 | .shift = wshift, .invert = winvert, .kcontrols = wcontrols, \ | 116 | .shift = wshift, .invert = winvert, .kcontrol_news = wcontrols, \ |
117 | .num_kcontrols = ARRAY_SIZE(wcontrols)} | 117 | .num_kcontrols = ARRAY_SIZE(wcontrols)} |
118 | 118 | ||
119 | /* path domain with event - event handler must return 0 for success */ | 119 | /* path domain with event - event handler must return 0 for success */ |
120 | #define SND_SOC_DAPM_PGA_E(wname, wreg, wshift, winvert, wcontrols, \ | 120 | #define SND_SOC_DAPM_PGA_E(wname, wreg, wshift, winvert, wcontrols, \ |
121 | wncontrols, wevent, wflags) \ | 121 | wncontrols, wevent, wflags) \ |
122 | { .id = snd_soc_dapm_pga, .name = wname, .reg = wreg, .shift = wshift, \ | 122 | { .id = snd_soc_dapm_pga, .name = wname, .reg = wreg, .shift = wshift, \ |
123 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols, \ | 123 | .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = wncontrols, \ |
124 | .event = wevent, .event_flags = wflags} | 124 | .event = wevent, .event_flags = wflags} |
125 | #define SND_SOC_DAPM_OUT_DRV_E(wname, wreg, wshift, winvert, wcontrols, \ | 125 | #define SND_SOC_DAPM_OUT_DRV_E(wname, wreg, wshift, winvert, wcontrols, \ |
126 | wncontrols, wevent, wflags) \ | 126 | wncontrols, wevent, wflags) \ |
127 | { .id = snd_soc_dapm_out_drv, .name = wname, .reg = wreg, .shift = wshift, \ | 127 | { .id = snd_soc_dapm_out_drv, .name = wname, .reg = wreg, .shift = wshift, \ |
128 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols, \ | 128 | .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = wncontrols, \ |
129 | .event = wevent, .event_flags = wflags} | 129 | .event = wevent, .event_flags = wflags} |
130 | #define SND_SOC_DAPM_MIXER_E(wname, wreg, wshift, winvert, wcontrols, \ | 130 | #define SND_SOC_DAPM_MIXER_E(wname, wreg, wshift, winvert, wcontrols, \ |
131 | wncontrols, wevent, wflags) \ | 131 | wncontrols, wevent, wflags) \ |
132 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ | 132 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ |
133 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols, \ | 133 | .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = wncontrols, \ |
134 | .event = wevent, .event_flags = wflags} | 134 | .event = wevent, .event_flags = wflags} |
135 | #define SND_SOC_DAPM_MIXER_NAMED_CTL_E(wname, wreg, wshift, winvert, \ | 135 | #define SND_SOC_DAPM_MIXER_NAMED_CTL_E(wname, wreg, wshift, winvert, \ |
136 | wcontrols, wncontrols, wevent, wflags) \ | 136 | wcontrols, wncontrols, wevent, wflags) \ |
137 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ | 137 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ |
138 | .invert = winvert, .kcontrols = wcontrols, \ | 138 | .invert = winvert, .kcontrol_news = wcontrols, \ |
139 | .num_kcontrols = wncontrols, .event = wevent, .event_flags = wflags} | 139 | .num_kcontrols = wncontrols, .event = wevent, .event_flags = wflags} |
140 | #define SND_SOC_DAPM_MICBIAS_E(wname, wreg, wshift, winvert, wevent, wflags) \ | 140 | #define SND_SOC_DAPM_MICBIAS_E(wname, wreg, wshift, winvert, wevent, wflags) \ |
141 | { .id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, .shift = wshift, \ | 141 | { .id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, .shift = wshift, \ |
142 | .invert = winvert, .kcontrols = NULL, .num_kcontrols = 0, \ | 142 | .invert = winvert, .kcontrol_news = NULL, .num_kcontrols = 0, \ |
143 | .event = wevent, .event_flags = wflags} | 143 | .event = wevent, .event_flags = wflags} |
144 | #define SND_SOC_DAPM_SWITCH_E(wname, wreg, wshift, winvert, wcontrols, \ | 144 | #define SND_SOC_DAPM_SWITCH_E(wname, wreg, wshift, winvert, wcontrols, \ |
145 | wevent, wflags) \ | 145 | wevent, wflags) \ |
146 | { .id = snd_soc_dapm_switch, .name = wname, .reg = wreg, .shift = wshift, \ | 146 | { .id = snd_soc_dapm_switch, .name = wname, .reg = wreg, .shift = wshift, \ |
147 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1, \ | 147 | .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = 1, \ |
148 | .event = wevent, .event_flags = wflags} | 148 | .event = wevent, .event_flags = wflags} |
149 | #define SND_SOC_DAPM_MUX_E(wname, wreg, wshift, winvert, wcontrols, \ | 149 | #define SND_SOC_DAPM_MUX_E(wname, wreg, wshift, winvert, wcontrols, \ |
150 | wevent, wflags) \ | 150 | wevent, wflags) \ |
151 | { .id = snd_soc_dapm_mux, .name = wname, .reg = wreg, .shift = wshift, \ | 151 | { .id = snd_soc_dapm_mux, .name = wname, .reg = wreg, .shift = wshift, \ |
152 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1, \ | 152 | .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = 1, \ |
153 | .event = wevent, .event_flags = wflags} | 153 | .event = wevent, .event_flags = wflags} |
154 | #define SND_SOC_DAPM_VIRT_MUX_E(wname, wreg, wshift, winvert, wcontrols, \ | 154 | #define SND_SOC_DAPM_VIRT_MUX_E(wname, wreg, wshift, winvert, wcontrols, \ |
155 | wevent, wflags) \ | 155 | wevent, wflags) \ |
156 | { .id = snd_soc_dapm_virt_mux, .name = wname, .reg = wreg, .shift = wshift, \ | 156 | { .id = snd_soc_dapm_virt_mux, .name = wname, .reg = wreg, .shift = wshift, \ |
157 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1, \ | 157 | .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = 1, \ |
158 | .event = wevent, .event_flags = wflags} | 158 | .event = wevent, .event_flags = wflags} |
159 | 159 | ||
160 | /* additional sequencing control within an event type */ | 160 | /* additional sequencing control within an event type */ |
@@ -173,26 +173,26 @@ | |||
173 | #define SOC_PGA_E_ARRAY(wname, wreg, wshift, winvert, wcontrols, \ | 173 | #define SOC_PGA_E_ARRAY(wname, wreg, wshift, winvert, wcontrols, \ |
174 | wevent, wflags) \ | 174 | wevent, wflags) \ |
175 | { .id = snd_soc_dapm_pga, .name = wname, .reg = wreg, .shift = wshift, \ | 175 | { .id = snd_soc_dapm_pga, .name = wname, .reg = wreg, .shift = wshift, \ |
176 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = ARRAY_SIZE(wcontrols), \ | 176 | .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = ARRAY_SIZE(wcontrols), \ |
177 | .event = wevent, .event_flags = wflags} | 177 | .event = wevent, .event_flags = wflags} |
178 | #define SOC_MIXER_E_ARRAY(wname, wreg, wshift, winvert, wcontrols, \ | 178 | #define SOC_MIXER_E_ARRAY(wname, wreg, wshift, winvert, wcontrols, \ |
179 | wevent, wflags) \ | 179 | wevent, wflags) \ |
180 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ | 180 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ |
181 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = ARRAY_SIZE(wcontrols), \ | 181 | .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = ARRAY_SIZE(wcontrols), \ |
182 | .event = wevent, .event_flags = wflags} | 182 | .event = wevent, .event_flags = wflags} |
183 | #define SOC_MIXER_NAMED_CTL_E_ARRAY(wname, wreg, wshift, winvert, \ | 183 | #define SOC_MIXER_NAMED_CTL_E_ARRAY(wname, wreg, wshift, winvert, \ |
184 | wcontrols, wevent, wflags) \ | 184 | wcontrols, wevent, wflags) \ |
185 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ | 185 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ |
186 | .invert = winvert, .kcontrols = wcontrols, \ | 186 | .invert = winvert, .kcontrol_news = wcontrols, \ |
187 | .num_kcontrols = ARRAY_SIZE(wcontrols), .event = wevent, .event_flags = wflags} | 187 | .num_kcontrols = ARRAY_SIZE(wcontrols), .event = wevent, .event_flags = wflags} |
188 | 188 | ||
189 | /* events that are pre and post DAPM */ | 189 | /* events that are pre and post DAPM */ |
190 | #define SND_SOC_DAPM_PRE(wname, wevent) \ | 190 | #define SND_SOC_DAPM_PRE(wname, wevent) \ |
191 | { .id = snd_soc_dapm_pre, .name = wname, .kcontrols = NULL, \ | 191 | { .id = snd_soc_dapm_pre, .name = wname, .kcontrol_news = NULL, \ |
192 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ | 192 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ |
193 | .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD} | 193 | .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD} |
194 | #define SND_SOC_DAPM_POST(wname, wevent) \ | 194 | #define SND_SOC_DAPM_POST(wname, wevent) \ |
195 | { .id = snd_soc_dapm_post, .name = wname, .kcontrols = NULL, \ | 195 | { .id = snd_soc_dapm_post, .name = wname, .kcontrol_news = NULL, \ |
196 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ | 196 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ |
197 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD} | 197 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD} |
198 | 198 | ||
@@ -232,7 +232,7 @@ | |||
232 | 232 | ||
233 | /* generic widgets */ | 233 | /* generic widgets */ |
234 | #define SND_SOC_DAPM_REG(wid, wname, wreg, wshift, wmask, won_val, woff_val) \ | 234 | #define SND_SOC_DAPM_REG(wid, wname, wreg, wshift, wmask, won_val, woff_val) \ |
235 | { .id = wid, .name = wname, .kcontrols = NULL, .num_kcontrols = 0, \ | 235 | { .id = wid, .name = wname, .kcontrol_news = NULL, .num_kcontrols = 0, \ |
236 | .reg = -((wreg) + 1), .shift = wshift, .mask = wmask, \ | 236 | .reg = -((wreg) + 1), .shift = wshift, .mask = wmask, \ |
237 | .on_val = won_val, .off_val = woff_val, .event = dapm_reg_event, \ | 237 | .on_val = won_val, .off_val = woff_val, .event = dapm_reg_event, \ |
238 | .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD} | 238 | .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD} |
@@ -473,7 +473,7 @@ struct snd_soc_dapm_widget { | |||
473 | 473 | ||
474 | /* kcontrols that relate to this widget */ | 474 | /* kcontrols that relate to this widget */ |
475 | int num_kcontrols; | 475 | int num_kcontrols; |
476 | const struct snd_kcontrol_new *kcontrols; | 476 | const struct snd_kcontrol_new *kcontrol_news; |
477 | 477 | ||
478 | /* widget input and outputs */ | 478 | /* widget input and outputs */ |
479 | struct list_head sources; | 479 | struct list_head sources; |
diff --git a/sound/soc/codecs/88pm860x-codec.c b/sound/soc/codecs/88pm860x-codec.c index 06b6981b8d6d..19241576b6b5 100644 --- a/sound/soc/codecs/88pm860x-codec.c +++ b/sound/soc/codecs/88pm860x-codec.c | |||
@@ -120,7 +120,7 @@ | |||
120 | */ | 120 | */ |
121 | #define PM860X_DAPM_OUTPUT(wname, wevent) \ | 121 | #define PM860X_DAPM_OUTPUT(wname, wevent) \ |
122 | { .id = snd_soc_dapm_pga, .name = wname, .reg = SND_SOC_NOPM, \ | 122 | { .id = snd_soc_dapm_pga, .name = wname, .reg = SND_SOC_NOPM, \ |
123 | .shift = 0, .invert = 0, .kcontrols = NULL, \ | 123 | .shift = 0, .invert = 0, .kcontrol_news = NULL, \ |
124 | .num_kcontrols = 0, .event = wevent, \ | 124 | .num_kcontrols = 0, .event = wevent, \ |
125 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD, } | 125 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD, } |
126 | 126 | ||
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 169e1767ebd0..35cc1ed00a44 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -187,7 +187,7 @@ static void dapm_set_path_status(struct snd_soc_dapm_widget *w, | |||
187 | case snd_soc_dapm_mixer_named_ctl: { | 187 | case snd_soc_dapm_mixer_named_ctl: { |
188 | int val; | 188 | int val; |
189 | struct soc_mixer_control *mc = (struct soc_mixer_control *) | 189 | struct soc_mixer_control *mc = (struct soc_mixer_control *) |
190 | w->kcontrols[i].private_value; | 190 | w->kcontrol_news[i].private_value; |
191 | unsigned int reg = mc->reg; | 191 | unsigned int reg = mc->reg; |
192 | unsigned int shift = mc->shift; | 192 | unsigned int shift = mc->shift; |
193 | int max = mc->max; | 193 | int max = mc->max; |
@@ -204,7 +204,8 @@ static void dapm_set_path_status(struct snd_soc_dapm_widget *w, | |||
204 | } | 204 | } |
205 | break; | 205 | break; |
206 | case snd_soc_dapm_mux: { | 206 | case snd_soc_dapm_mux: { |
207 | struct soc_enum *e = (struct soc_enum *)w->kcontrols[i].private_value; | 207 | struct soc_enum *e = (struct soc_enum *) |
208 | w->kcontrol_news[i].private_value; | ||
208 | int val, item, bitmask; | 209 | int val, item, bitmask; |
209 | 210 | ||
210 | for (bitmask = 1; bitmask < e->max; bitmask <<= 1) | 211 | for (bitmask = 1; bitmask < e->max; bitmask <<= 1) |
@@ -220,7 +221,8 @@ static void dapm_set_path_status(struct snd_soc_dapm_widget *w, | |||
220 | } | 221 | } |
221 | break; | 222 | break; |
222 | case snd_soc_dapm_virt_mux: { | 223 | case snd_soc_dapm_virt_mux: { |
223 | struct soc_enum *e = (struct soc_enum *)w->kcontrols[i].private_value; | 224 | struct soc_enum *e = (struct soc_enum *) |
225 | w->kcontrol_news[i].private_value; | ||
224 | 226 | ||
225 | p->connect = 0; | 227 | p->connect = 0; |
226 | /* since a virtual mux has no backing registers to | 228 | /* since a virtual mux has no backing registers to |
@@ -235,7 +237,7 @@ static void dapm_set_path_status(struct snd_soc_dapm_widget *w, | |||
235 | break; | 237 | break; |
236 | case snd_soc_dapm_value_mux: { | 238 | case snd_soc_dapm_value_mux: { |
237 | struct soc_enum *e = (struct soc_enum *) | 239 | struct soc_enum *e = (struct soc_enum *) |
238 | w->kcontrols[i].private_value; | 240 | w->kcontrol_news[i].private_value; |
239 | int val, item; | 241 | int val, item; |
240 | 242 | ||
241 | val = snd_soc_read(w->codec, e->reg); | 243 | val = snd_soc_read(w->codec, e->reg); |
@@ -310,11 +312,11 @@ static int dapm_connect_mixer(struct snd_soc_dapm_context *dapm, | |||
310 | 312 | ||
311 | /* search for mixer kcontrol */ | 313 | /* search for mixer kcontrol */ |
312 | for (i = 0; i < dest->num_kcontrols; i++) { | 314 | for (i = 0; i < dest->num_kcontrols; i++) { |
313 | if (!strcmp(control_name, dest->kcontrols[i].name)) { | 315 | if (!strcmp(control_name, dest->kcontrol_news[i].name)) { |
314 | list_add(&path->list, &dapm->card->paths); | 316 | list_add(&path->list, &dapm->card->paths); |
315 | list_add(&path->list_sink, &dest->sources); | 317 | list_add(&path->list_sink, &dest->sources); |
316 | list_add(&path->list_source, &src->sinks); | 318 | list_add(&path->list_source, &src->sinks); |
317 | path->name = dest->kcontrols[i].name; | 319 | path->name = dest->kcontrol_news[i].name; |
318 | dapm_set_path_status(dest, path, i); | 320 | dapm_set_path_status(dest, path, i); |
319 | return 0; | 321 | return 0; |
320 | } | 322 | } |
@@ -349,7 +351,7 @@ static int dapm_new_mixer(struct snd_soc_dapm_context *dapm, | |||
349 | list_for_each_entry(path, &w->sources, list_sink) { | 351 | list_for_each_entry(path, &w->sources, list_sink) { |
350 | 352 | ||
351 | /* mixer/mux paths name must match control name */ | 353 | /* mixer/mux paths name must match control name */ |
352 | if (path->name != (char*)w->kcontrols[i].name) | 354 | if (path->name != (char *)w->kcontrol_news[i].name) |
353 | continue; | 355 | continue; |
354 | 356 | ||
355 | /* add dapm control with long name. | 357 | /* add dapm control with long name. |
@@ -358,7 +360,7 @@ static int dapm_new_mixer(struct snd_soc_dapm_context *dapm, | |||
358 | * for dapm_mixer_named_ctl this is simply the | 360 | * for dapm_mixer_named_ctl this is simply the |
359 | * kcontrol name. | 361 | * kcontrol name. |
360 | */ | 362 | */ |
361 | name_len = strlen(w->kcontrols[i].name) + 1; | 363 | name_len = strlen(w->kcontrol_news[i].name) + 1; |
362 | if (w->id != snd_soc_dapm_mixer_named_ctl) | 364 | if (w->id != snd_soc_dapm_mixer_named_ctl) |
363 | name_len += 1 + strlen(w->name); | 365 | name_len += 1 + strlen(w->name); |
364 | 366 | ||
@@ -377,17 +379,17 @@ static int dapm_new_mixer(struct snd_soc_dapm_context *dapm, | |||
377 | */ | 379 | */ |
378 | snprintf(path->long_name, name_len, "%s %s", | 380 | snprintf(path->long_name, name_len, "%s %s", |
379 | w->name + prefix_len, | 381 | w->name + prefix_len, |
380 | w->kcontrols[i].name); | 382 | w->kcontrol_news[i].name); |
381 | break; | 383 | break; |
382 | case snd_soc_dapm_mixer_named_ctl: | 384 | case snd_soc_dapm_mixer_named_ctl: |
383 | snprintf(path->long_name, name_len, "%s", | 385 | snprintf(path->long_name, name_len, "%s", |
384 | w->kcontrols[i].name); | 386 | w->kcontrol_news[i].name); |
385 | break; | 387 | break; |
386 | } | 388 | } |
387 | 389 | ||
388 | path->long_name[name_len - 1] = '\0'; | 390 | path->long_name[name_len - 1] = '\0'; |
389 | 391 | ||
390 | path->kcontrol = snd_soc_cnew(&w->kcontrols[i], w, | 392 | path->kcontrol = snd_soc_cnew(&w->kcontrol_news[i], w, |
391 | path->long_name, prefix); | 393 | path->long_name, prefix); |
392 | ret = snd_ctl_add(card, path->kcontrol); | 394 | ret = snd_ctl_add(card, path->kcontrol); |
393 | if (ret < 0) { | 395 | if (ret < 0) { |
@@ -433,7 +435,7 @@ static int dapm_new_mux(struct snd_soc_dapm_context *dapm, | |||
433 | * process but we're also using the same prefix for widgets so | 435 | * process but we're also using the same prefix for widgets so |
434 | * cut the prefix off the front of the widget name. | 436 | * cut the prefix off the front of the widget name. |
435 | */ | 437 | */ |
436 | kcontrol = snd_soc_cnew(&w->kcontrols[0], w, w->name + prefix_len, | 438 | kcontrol = snd_soc_cnew(&w->kcontrol_news[0], w, w->name + prefix_len, |
437 | prefix); | 439 | prefix); |
438 | ret = snd_ctl_add(card, kcontrol); | 440 | ret = snd_ctl_add(card, kcontrol); |
439 | 441 | ||
@@ -1648,7 +1650,7 @@ static int snd_soc_dapm_add_route(struct snd_soc_dapm_context *dapm, | |||
1648 | case snd_soc_dapm_virt_mux: | 1650 | case snd_soc_dapm_virt_mux: |
1649 | case snd_soc_dapm_value_mux: | 1651 | case snd_soc_dapm_value_mux: |
1650 | ret = dapm_connect_mux(dapm, wsource, wsink, path, control, | 1652 | ret = dapm_connect_mux(dapm, wsource, wsink, path, control, |
1651 | &wsink->kcontrols[0]); | 1653 | &wsink->kcontrol_news[0]); |
1652 | if (ret != 0) | 1654 | if (ret != 0) |
1653 | goto err; | 1655 | goto err; |
1654 | break; | 1656 | break; |