aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-11-27 15:01:25 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-11-27 15:01:25 -0500
commit459d2a9f5fcf125ba736f7843189ccdfba11b1ff (patch)
tree6664f0ae653081521a3e1df0c506a2532ae6168e /sound/soc
parent1428c20f7c38e9fbf59923d1b9615ebdaf2862b7 (diff)
parent9489e9dcae718d5fde988e4a684a0f55b5f94d17 (diff)
Merge tag 'v3.7-rc7' into asoc-ux500
Linux 3.7-rc7
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/arizona.c4
-rw-r--r--sound/soc/codecs/cs4271.c11
-rw-r--r--sound/soc/codecs/cs42l52.c5
-rw-r--r--sound/soc/codecs/wm5102.c552
-rw-r--r--sound/soc/codecs/wm8978.c2
-rw-r--r--sound/soc/codecs/wm8994.c20
-rw-r--r--sound/soc/codecs/wm8994.h1
-rw-r--r--sound/soc/kirkwood/kirkwood-dma.c3
-rw-r--r--sound/soc/kirkwood/kirkwood-i2s.c74
-rw-r--r--sound/soc/mxs/mxs-saif.c17
-rw-r--r--sound/soc/omap/omap-dmic.c4
-rw-r--r--sound/soc/omap/zoom2.c5
-rw-r--r--sound/soc/samsung/Kconfig2
-rw-r--r--sound/soc/samsung/bells.c2
-rw-r--r--sound/soc/soc-core.c5
-rw-r--r--sound/soc/soc-dapm.c2
-rw-r--r--sound/soc/ux500/mop500.c17
-rw-r--r--sound/soc/ux500/ux500_msp_i2s.c8
18 files changed, 660 insertions, 74 deletions
diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c
index c03b65af3059..054967d8bac2 100644
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -268,7 +268,7 @@ EXPORT_SYMBOL_GPL(arizona_out_ev);
268static unsigned int arizona_sysclk_48k_rates[] = { 268static unsigned int arizona_sysclk_48k_rates[] = {
269 6144000, 269 6144000,
270 12288000, 270 12288000,
271 22579200, 271 24576000,
272 49152000, 272 49152000,
273 73728000, 273 73728000,
274 98304000, 274 98304000,
@@ -278,7 +278,7 @@ static unsigned int arizona_sysclk_48k_rates[] = {
278static unsigned int arizona_sysclk_44k1_rates[] = { 278static unsigned int arizona_sysclk_44k1_rates[] = {
279 5644800, 279 5644800,
280 11289600, 280 11289600,
281 24576000, 281 22579200,
282 45158400, 282 45158400,
283 67737600, 283 67737600,
284 90316800, 284 90316800,
diff --git a/sound/soc/codecs/cs4271.c b/sound/soc/codecs/cs4271.c
index f994af34f552..e3f0a7f3131e 100644
--- a/sound/soc/codecs/cs4271.c
+++ b/sound/soc/codecs/cs4271.c
@@ -485,7 +485,7 @@ static int cs4271_probe(struct snd_soc_codec *codec)
485 gpio_nreset = cs4271plat->gpio_nreset; 485 gpio_nreset = cs4271plat->gpio_nreset;
486 486
487 if (gpio_nreset >= 0) 487 if (gpio_nreset >= 0)
488 if (gpio_request(gpio_nreset, "CS4271 Reset")) 488 if (devm_gpio_request(codec->dev, gpio_nreset, "CS4271 Reset"))
489 gpio_nreset = -EINVAL; 489 gpio_nreset = -EINVAL;
490 if (gpio_nreset >= 0) { 490 if (gpio_nreset >= 0) {
491 /* Reset codec */ 491 /* Reset codec */
@@ -535,15 +535,10 @@ static int cs4271_probe(struct snd_soc_codec *codec)
535static int cs4271_remove(struct snd_soc_codec *codec) 535static int cs4271_remove(struct snd_soc_codec *codec)
536{ 536{
537 struct cs4271_private *cs4271 = snd_soc_codec_get_drvdata(codec); 537 struct cs4271_private *cs4271 = snd_soc_codec_get_drvdata(codec);
538 int gpio_nreset;
539 538
540 gpio_nreset = cs4271->gpio_nreset; 539 if (gpio_is_valid(cs4271->gpio_nreset))
541
542 if (gpio_is_valid(gpio_nreset)) {
543 /* Set codec to the reset state */ 540 /* Set codec to the reset state */
544 gpio_set_value(gpio_nreset, 0); 541 gpio_set_value(cs4271->gpio_nreset, 0);
545 gpio_free(gpio_nreset);
546 }
547 542
548 return 0; 543 return 0;
549}; 544};
diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c
index 61599298fb26..97a81051e88d 100644
--- a/sound/soc/codecs/cs42l52.c
+++ b/sound/soc/codecs/cs42l52.c
@@ -763,7 +763,7 @@ static int cs42l52_set_sysclk(struct snd_soc_dai *codec_dai,
763 if ((freq >= CS42L52_MIN_CLK) && (freq <= CS42L52_MAX_CLK)) { 763 if ((freq >= CS42L52_MIN_CLK) && (freq <= CS42L52_MAX_CLK)) {
764 cs42l52->sysclk = freq; 764 cs42l52->sysclk = freq;
765 } else { 765 } else {
766 dev_err(codec->dev, "Invalid freq paramter\n"); 766 dev_err(codec->dev, "Invalid freq parameter\n");
767 return -EINVAL; 767 return -EINVAL;
768 } 768 }
769 return 0; 769 return 0;
@@ -773,7 +773,6 @@ static int cs42l52_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
773{ 773{
774 struct snd_soc_codec *codec = codec_dai->codec; 774 struct snd_soc_codec *codec = codec_dai->codec;
775 struct cs42l52_private *cs42l52 = snd_soc_codec_get_drvdata(codec); 775 struct cs42l52_private *cs42l52 = snd_soc_codec_get_drvdata(codec);
776 int ret = 0;
777 u8 iface = 0; 776 u8 iface = 0;
778 777
779 switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { 778 switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
@@ -822,7 +821,7 @@ static int cs42l52_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
822 case SND_SOC_DAIFMT_NB_IF: 821 case SND_SOC_DAIFMT_NB_IF:
823 break; 822 break;
824 default: 823 default:
825 ret = -EINVAL; 824 return -EINVAL;
826 } 825 }
827 cs42l52->config.format = iface; 826 cs42l52->config.format = iface;
828 snd_soc_write(codec, CS42L52_IFACE_CTL1, cs42l52->config.format); 827 snd_soc_write(codec, CS42L52_IFACE_CTL1, cs42l52->config.format);
diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c
index 1722b586bdba..7394e73fa43c 100644
--- a/sound/soc/codecs/wm5102.c
+++ b/sound/soc/codecs/wm5102.c
@@ -42,6 +42,556 @@ static DECLARE_TLV_DB_SCALE(eq_tlv, -1200, 100, 0);
42static DECLARE_TLV_DB_SCALE(digital_tlv, -6400, 50, 0); 42static DECLARE_TLV_DB_SCALE(digital_tlv, -6400, 50, 0);
43static DECLARE_TLV_DB_SCALE(noise_tlv, 0, 600, 0); 43static DECLARE_TLV_DB_SCALE(noise_tlv, 0, 600, 0);
44 44
45static const struct reg_default wm5102_sysclk_reva_patch[] = {
46 { 0x3000, 0x2225 },
47 { 0x3001, 0x3a03 },
48 { 0x3002, 0x0225 },
49 { 0x3003, 0x0801 },
50 { 0x3004, 0x6249 },
51 { 0x3005, 0x0c04 },
52 { 0x3006, 0x0225 },
53 { 0x3007, 0x5901 },
54 { 0x3008, 0xe249 },
55 { 0x3009, 0x030d },
56 { 0x300a, 0x0249 },
57 { 0x300b, 0x2c01 },
58 { 0x300c, 0xe249 },
59 { 0x300d, 0x4342 },
60 { 0x300e, 0xe249 },
61 { 0x300f, 0x73c0 },
62 { 0x3010, 0x4249 },
63 { 0x3011, 0x0c00 },
64 { 0x3012, 0x0225 },
65 { 0x3013, 0x1f01 },
66 { 0x3014, 0x0225 },
67 { 0x3015, 0x1e01 },
68 { 0x3016, 0x0225 },
69 { 0x3017, 0xfa00 },
70 { 0x3018, 0x0000 },
71 { 0x3019, 0xf000 },
72 { 0x301a, 0x0000 },
73 { 0x301b, 0xf000 },
74 { 0x301c, 0x0000 },
75 { 0x301d, 0xf000 },
76 { 0x301e, 0x0000 },
77 { 0x301f, 0xf000 },
78 { 0x3020, 0x0000 },
79 { 0x3021, 0xf000 },
80 { 0x3022, 0x0000 },
81 { 0x3023, 0xf000 },
82 { 0x3024, 0x0000 },
83 { 0x3025, 0xf000 },
84 { 0x3026, 0x0000 },
85 { 0x3027, 0xf000 },
86 { 0x3028, 0x0000 },
87 { 0x3029, 0xf000 },
88 { 0x302a, 0x0000 },
89 { 0x302b, 0xf000 },
90 { 0x302c, 0x0000 },
91 { 0x302d, 0xf000 },
92 { 0x302e, 0x0000 },
93 { 0x302f, 0xf000 },
94 { 0x3030, 0x0225 },
95 { 0x3031, 0x1a01 },
96 { 0x3032, 0x0225 },
97 { 0x3033, 0x1e00 },
98 { 0x3034, 0x0225 },
99 { 0x3035, 0x1f00 },
100 { 0x3036, 0x6225 },
101 { 0x3037, 0xf800 },
102 { 0x3038, 0x0000 },
103 { 0x3039, 0xf000 },
104 { 0x303a, 0x0000 },
105 { 0x303b, 0xf000 },
106 { 0x303c, 0x0000 },
107 { 0x303d, 0xf000 },
108 { 0x303e, 0x0000 },
109 { 0x303f, 0xf000 },
110 { 0x3040, 0x2226 },
111 { 0x3041, 0x3a03 },
112 { 0x3042, 0x0226 },
113 { 0x3043, 0x0801 },
114 { 0x3044, 0x6249 },
115 { 0x3045, 0x0c06 },
116 { 0x3046, 0x0226 },
117 { 0x3047, 0x5901 },
118 { 0x3048, 0xe249 },
119 { 0x3049, 0x030d },
120 { 0x304a, 0x0249 },
121 { 0x304b, 0x2c01 },
122 { 0x304c, 0xe249 },
123 { 0x304d, 0x4342 },
124 { 0x304e, 0xe249 },
125 { 0x304f, 0x73c0 },
126 { 0x3050, 0x4249 },
127 { 0x3051, 0x0c00 },
128 { 0x3052, 0x0226 },
129 { 0x3053, 0x1f01 },
130 { 0x3054, 0x0226 },
131 { 0x3055, 0x1e01 },
132 { 0x3056, 0x0226 },
133 { 0x3057, 0xfa00 },
134 { 0x3058, 0x0000 },
135 { 0x3059, 0xf000 },
136 { 0x305a, 0x0000 },
137 { 0x305b, 0xf000 },
138 { 0x305c, 0x0000 },
139 { 0x305d, 0xf000 },
140 { 0x305e, 0x0000 },
141 { 0x305f, 0xf000 },
142 { 0x3060, 0x0000 },
143 { 0x3061, 0xf000 },
144 { 0x3062, 0x0000 },
145 { 0x3063, 0xf000 },
146 { 0x3064, 0x0000 },
147 { 0x3065, 0xf000 },
148 { 0x3066, 0x0000 },
149 { 0x3067, 0xf000 },
150 { 0x3068, 0x0000 },
151 { 0x3069, 0xf000 },
152 { 0x306a, 0x0000 },
153 { 0x306b, 0xf000 },
154 { 0x306c, 0x0000 },
155 { 0x306d, 0xf000 },
156 { 0x306e, 0x0000 },
157 { 0x306f, 0xf000 },
158 { 0x3070, 0x0226 },
159 { 0x3071, 0x1a01 },
160 { 0x3072, 0x0226 },
161 { 0x3073, 0x1e00 },
162 { 0x3074, 0x0226 },
163 { 0x3075, 0x1f00 },
164 { 0x3076, 0x6226 },
165 { 0x3077, 0xf800 },
166 { 0x3078, 0x0000 },
167 { 0x3079, 0xf000 },
168 { 0x307a, 0x0000 },
169 { 0x307b, 0xf000 },
170 { 0x307c, 0x0000 },
171 { 0x307d, 0xf000 },
172 { 0x307e, 0x0000 },
173 { 0x307f, 0xf000 },
174 { 0x3080, 0x2227 },
175 { 0x3081, 0x3a03 },
176 { 0x3082, 0x0227 },
177 { 0x3083, 0x0801 },
178 { 0x3084, 0x6255 },
179 { 0x3085, 0x0c04 },
180 { 0x3086, 0x0227 },
181 { 0x3087, 0x5901 },
182 { 0x3088, 0xe255 },
183 { 0x3089, 0x030d },
184 { 0x308a, 0x0255 },
185 { 0x308b, 0x2c01 },
186 { 0x308c, 0xe255 },
187 { 0x308d, 0x4342 },
188 { 0x308e, 0xe255 },
189 { 0x308f, 0x73c0 },
190 { 0x3090, 0x4255 },
191 { 0x3091, 0x0c00 },
192 { 0x3092, 0x0227 },
193 { 0x3093, 0x1f01 },
194 { 0x3094, 0x0227 },
195 { 0x3095, 0x1e01 },
196 { 0x3096, 0x0227 },
197 { 0x3097, 0xfa00 },
198 { 0x3098, 0x0000 },
199 { 0x3099, 0xf000 },
200 { 0x309a, 0x0000 },
201 { 0x309b, 0xf000 },
202 { 0x309c, 0x0000 },
203 { 0x309d, 0xf000 },
204 { 0x309e, 0x0000 },
205 { 0x309f, 0xf000 },
206 { 0x30a0, 0x0000 },
207 { 0x30a1, 0xf000 },
208 { 0x30a2, 0x0000 },
209 { 0x30a3, 0xf000 },
210 { 0x30a4, 0x0000 },
211 { 0x30a5, 0xf000 },
212 { 0x30a6, 0x0000 },
213 { 0x30a7, 0xf000 },
214 { 0x30a8, 0x0000 },
215 { 0x30a9, 0xf000 },
216 { 0x30aa, 0x0000 },
217 { 0x30ab, 0xf000 },
218 { 0x30ac, 0x0000 },
219 { 0x30ad, 0xf000 },
220 { 0x30ae, 0x0000 },
221 { 0x30af, 0xf000 },
222 { 0x30b0, 0x0227 },
223 { 0x30b1, 0x1a01 },
224 { 0x30b2, 0x0227 },
225 { 0x30b3, 0x1e00 },
226 { 0x30b4, 0x0227 },
227 { 0x30b5, 0x1f00 },
228 { 0x30b6, 0x6227 },
229 { 0x30b7, 0xf800 },
230 { 0x30b8, 0x0000 },
231 { 0x30b9, 0xf000 },
232 { 0x30ba, 0x0000 },
233 { 0x30bb, 0xf000 },
234 { 0x30bc, 0x0000 },
235 { 0x30bd, 0xf000 },
236 { 0x30be, 0x0000 },
237 { 0x30bf, 0xf000 },
238 { 0x30c0, 0x2228 },
239 { 0x30c1, 0x3a03 },
240 { 0x30c2, 0x0228 },
241 { 0x30c3, 0x0801 },
242 { 0x30c4, 0x6255 },
243 { 0x30c5, 0x0c06 },
244 { 0x30c6, 0x0228 },
245 { 0x30c7, 0x5901 },
246 { 0x30c8, 0xe255 },
247 { 0x30c9, 0x030d },
248 { 0x30ca, 0x0255 },
249 { 0x30cb, 0x2c01 },
250 { 0x30cc, 0xe255 },
251 { 0x30cd, 0x4342 },
252 { 0x30ce, 0xe255 },
253 { 0x30cf, 0x73c0 },
254 { 0x30d0, 0x4255 },
255 { 0x30d1, 0x0c00 },
256 { 0x30d2, 0x0228 },
257 { 0x30d3, 0x1f01 },
258 { 0x30d4, 0x0228 },
259 { 0x30d5, 0x1e01 },
260 { 0x30d6, 0x0228 },
261 { 0x30d7, 0xfa00 },
262 { 0x30d8, 0x0000 },
263 { 0x30d9, 0xf000 },
264 { 0x30da, 0x0000 },
265 { 0x30db, 0xf000 },
266 { 0x30dc, 0x0000 },
267 { 0x30dd, 0xf000 },
268 { 0x30de, 0x0000 },
269 { 0x30df, 0xf000 },
270 { 0x30e0, 0x0000 },
271 { 0x30e1, 0xf000 },
272 { 0x30e2, 0x0000 },
273 { 0x30e3, 0xf000 },
274 { 0x30e4, 0x0000 },
275 { 0x30e5, 0xf000 },
276 { 0x30e6, 0x0000 },
277 { 0x30e7, 0xf000 },
278 { 0x30e8, 0x0000 },
279 { 0x30e9, 0xf000 },
280 { 0x30ea, 0x0000 },
281 { 0x30eb, 0xf000 },
282 { 0x30ec, 0x0000 },
283 { 0x30ed, 0xf000 },
284 { 0x30ee, 0x0000 },
285 { 0x30ef, 0xf000 },
286 { 0x30f0, 0x0228 },
287 { 0x30f1, 0x1a01 },
288 { 0x30f2, 0x0228 },
289 { 0x30f3, 0x1e00 },
290 { 0x30f4, 0x0228 },
291 { 0x30f5, 0x1f00 },
292 { 0x30f6, 0x6228 },
293 { 0x30f7, 0xf800 },
294 { 0x30f8, 0x0000 },
295 { 0x30f9, 0xf000 },
296 { 0x30fa, 0x0000 },
297 { 0x30fb, 0xf000 },
298 { 0x30fc, 0x0000 },
299 { 0x30fd, 0xf000 },
300 { 0x30fe, 0x0000 },
301 { 0x30ff, 0xf000 },
302 { 0x3100, 0x222b },
303 { 0x3101, 0x3a03 },
304 { 0x3102, 0x222b },
305 { 0x3103, 0x5803 },
306 { 0x3104, 0xe26f },
307 { 0x3105, 0x030d },
308 { 0x3106, 0x626f },
309 { 0x3107, 0x2c01 },
310 { 0x3108, 0xe26f },
311 { 0x3109, 0x4342 },
312 { 0x310a, 0xe26f },
313 { 0x310b, 0x73c0 },
314 { 0x310c, 0x026f },
315 { 0x310d, 0x0c00 },
316 { 0x310e, 0x022b },
317 { 0x310f, 0x1f01 },
318 { 0x3110, 0x022b },
319 { 0x3111, 0x1e01 },
320 { 0x3112, 0x022b },
321 { 0x3113, 0xfa00 },
322 { 0x3114, 0x0000 },
323 { 0x3115, 0xf000 },
324 { 0x3116, 0x0000 },
325 { 0x3117, 0xf000 },
326 { 0x3118, 0x0000 },
327 { 0x3119, 0xf000 },
328 { 0x311a, 0x0000 },
329 { 0x311b, 0xf000 },
330 { 0x311c, 0x0000 },
331 { 0x311d, 0xf000 },
332 { 0x311e, 0x0000 },
333 { 0x311f, 0xf000 },
334 { 0x3120, 0x022b },
335 { 0x3121, 0x0a01 },
336 { 0x3122, 0x022b },
337 { 0x3123, 0x1e00 },
338 { 0x3124, 0x022b },
339 { 0x3125, 0x1f00 },
340 { 0x3126, 0x622b },
341 { 0x3127, 0xf800 },
342 { 0x3128, 0x0000 },
343 { 0x3129, 0xf000 },
344 { 0x312a, 0x0000 },
345 { 0x312b, 0xf000 },
346 { 0x312c, 0x0000 },
347 { 0x312d, 0xf000 },
348 { 0x312e, 0x0000 },
349 { 0x312f, 0xf000 },
350 { 0x3130, 0x0000 },
351 { 0x3131, 0xf000 },
352 { 0x3132, 0x0000 },
353 { 0x3133, 0xf000 },
354 { 0x3134, 0x0000 },
355 { 0x3135, 0xf000 },
356 { 0x3136, 0x0000 },
357 { 0x3137, 0xf000 },
358 { 0x3138, 0x0000 },
359 { 0x3139, 0xf000 },
360 { 0x313a, 0x0000 },
361 { 0x313b, 0xf000 },
362 { 0x313c, 0x0000 },
363 { 0x313d, 0xf000 },
364 { 0x313e, 0x0000 },
365 { 0x313f, 0xf000 },
366 { 0x3140, 0x0000 },
367 { 0x3141, 0xf000 },
368 { 0x3142, 0x0000 },
369 { 0x3143, 0xf000 },
370 { 0x3144, 0x0000 },
371 { 0x3145, 0xf000 },
372 { 0x3146, 0x0000 },
373 { 0x3147, 0xf000 },
374 { 0x3148, 0x0000 },
375 { 0x3149, 0xf000 },
376 { 0x314a, 0x0000 },
377 { 0x314b, 0xf000 },
378 { 0x314c, 0x0000 },
379 { 0x314d, 0xf000 },
380 { 0x314e, 0x0000 },
381 { 0x314f, 0xf000 },
382 { 0x3150, 0x0000 },
383 { 0x3151, 0xf000 },
384 { 0x3152, 0x0000 },
385 { 0x3153, 0xf000 },
386 { 0x3154, 0x0000 },
387 { 0x3155, 0xf000 },
388 { 0x3156, 0x0000 },
389 { 0x3157, 0xf000 },
390 { 0x3158, 0x0000 },
391 { 0x3159, 0xf000 },
392 { 0x315a, 0x0000 },
393 { 0x315b, 0xf000 },
394 { 0x315c, 0x0000 },
395 { 0x315d, 0xf000 },
396 { 0x315e, 0x0000 },
397 { 0x315f, 0xf000 },
398 { 0x3160, 0x0000 },
399 { 0x3161, 0xf000 },
400 { 0x3162, 0x0000 },
401 { 0x3163, 0xf000 },
402 { 0x3164, 0x0000 },
403 { 0x3165, 0xf000 },
404 { 0x3166, 0x0000 },
405 { 0x3167, 0xf000 },
406 { 0x3168, 0x0000 },
407 { 0x3169, 0xf000 },
408 { 0x316a, 0x0000 },
409 { 0x316b, 0xf000 },
410 { 0x316c, 0x0000 },
411 { 0x316d, 0xf000 },
412 { 0x316e, 0x0000 },
413 { 0x316f, 0xf000 },
414 { 0x3170, 0x0000 },
415 { 0x3171, 0xf000 },
416 { 0x3172, 0x0000 },
417 { 0x3173, 0xf000 },
418 { 0x3174, 0x0000 },
419 { 0x3175, 0xf000 },
420 { 0x3176, 0x0000 },
421 { 0x3177, 0xf000 },
422 { 0x3178, 0x0000 },
423 { 0x3179, 0xf000 },
424 { 0x317a, 0x0000 },
425 { 0x317b, 0xf000 },
426 { 0x317c, 0x0000 },
427 { 0x317d, 0xf000 },
428 { 0x317e, 0x0000 },
429 { 0x317f, 0xf000 },
430 { 0x3180, 0x2001 },
431 { 0x3181, 0xf101 },
432 { 0x3182, 0x0000 },
433 { 0x3183, 0xf000 },
434 { 0x3184, 0x0000 },
435 { 0x3185, 0xf000 },
436 { 0x3186, 0x0000 },
437 { 0x3187, 0xf000 },
438 { 0x3188, 0x0000 },
439 { 0x3189, 0xf000 },
440 { 0x318a, 0x0000 },
441 { 0x318b, 0xf000 },
442 { 0x318c, 0x0000 },
443 { 0x318d, 0xf000 },
444 { 0x318e, 0x0000 },
445 { 0x318f, 0xf000 },
446 { 0x3190, 0x0000 },
447 { 0x3191, 0xf000 },
448 { 0x3192, 0x0000 },
449 { 0x3193, 0xf000 },
450 { 0x3194, 0x0000 },
451 { 0x3195, 0xf000 },
452 { 0x3196, 0x0000 },
453 { 0x3197, 0xf000 },
454 { 0x3198, 0x0000 },
455 { 0x3199, 0xf000 },
456 { 0x319a, 0x0000 },
457 { 0x319b, 0xf000 },
458 { 0x319c, 0x0000 },
459 { 0x319d, 0xf000 },
460 { 0x319e, 0x0000 },
461 { 0x319f, 0xf000 },
462 { 0x31a0, 0x0000 },
463 { 0x31a1, 0xf000 },
464 { 0x31a2, 0x0000 },
465 { 0x31a3, 0xf000 },
466 { 0x31a4, 0x0000 },
467 { 0x31a5, 0xf000 },
468 { 0x31a6, 0x0000 },
469 { 0x31a7, 0xf000 },
470 { 0x31a8, 0x0000 },
471 { 0x31a9, 0xf000 },
472 { 0x31aa, 0x0000 },
473 { 0x31ab, 0xf000 },
474 { 0x31ac, 0x0000 },
475 { 0x31ad, 0xf000 },
476 { 0x31ae, 0x0000 },
477 { 0x31af, 0xf000 },
478 { 0x31b0, 0x0000 },
479 { 0x31b1, 0xf000 },
480 { 0x31b2, 0x0000 },
481 { 0x31b3, 0xf000 },
482 { 0x31b4, 0x0000 },
483 { 0x31b5, 0xf000 },
484 { 0x31b6, 0x0000 },
485 { 0x31b7, 0xf000 },
486 { 0x31b8, 0x0000 },
487 { 0x31b9, 0xf000 },
488 { 0x31ba, 0x0000 },
489 { 0x31bb, 0xf000 },
490 { 0x31bc, 0x0000 },
491 { 0x31bd, 0xf000 },
492 { 0x31be, 0x0000 },
493 { 0x31bf, 0xf000 },
494 { 0x31c0, 0x0000 },
495 { 0x31c1, 0xf000 },
496 { 0x31c2, 0x0000 },
497 { 0x31c3, 0xf000 },
498 { 0x31c4, 0x0000 },
499 { 0x31c5, 0xf000 },
500 { 0x31c6, 0x0000 },
501 { 0x31c7, 0xf000 },
502 { 0x31c8, 0x0000 },
503 { 0x31c9, 0xf000 },
504 { 0x31ca, 0x0000 },
505 { 0x31cb, 0xf000 },
506 { 0x31cc, 0x0000 },
507 { 0x31cd, 0xf000 },
508 { 0x31ce, 0x0000 },
509 { 0x31cf, 0xf000 },
510 { 0x31d0, 0x0000 },
511 { 0x31d1, 0xf000 },
512 { 0x31d2, 0x0000 },
513 { 0x31d3, 0xf000 },
514 { 0x31d4, 0x0000 },
515 { 0x31d5, 0xf000 },
516 { 0x31d6, 0x0000 },
517 { 0x31d7, 0xf000 },
518 { 0x31d8, 0x0000 },
519 { 0x31d9, 0xf000 },
520 { 0x31da, 0x0000 },
521 { 0x31db, 0xf000 },
522 { 0x31dc, 0x0000 },
523 { 0x31dd, 0xf000 },
524 { 0x31de, 0x0000 },
525 { 0x31df, 0xf000 },
526 { 0x31e0, 0x0000 },
527 { 0x31e1, 0xf000 },
528 { 0x31e2, 0x0000 },
529 { 0x31e3, 0xf000 },
530 { 0x31e4, 0x0000 },
531 { 0x31e5, 0xf000 },
532 { 0x31e6, 0x0000 },
533 { 0x31e7, 0xf000 },
534 { 0x31e8, 0x0000 },
535 { 0x31e9, 0xf000 },
536 { 0x31ea, 0x0000 },
537 { 0x31eb, 0xf000 },
538 { 0x31ec, 0x0000 },
539 { 0x31ed, 0xf000 },
540 { 0x31ee, 0x0000 },
541 { 0x31ef, 0xf000 },
542 { 0x31f0, 0x0000 },
543 { 0x31f1, 0xf000 },
544 { 0x31f2, 0x0000 },
545 { 0x31f3, 0xf000 },
546 { 0x31f4, 0x0000 },
547 { 0x31f5, 0xf000 },
548 { 0x31f6, 0x0000 },
549 { 0x31f7, 0xf000 },
550 { 0x31f8, 0x0000 },
551 { 0x31f9, 0xf000 },
552 { 0x31fa, 0x0000 },
553 { 0x31fb, 0xf000 },
554 { 0x31fc, 0x0000 },
555 { 0x31fd, 0xf000 },
556 { 0x31fe, 0x0000 },
557 { 0x31ff, 0xf000 },
558 { 0x024d, 0xff50 },
559 { 0x0252, 0xff50 },
560 { 0x0259, 0x0112 },
561 { 0x025e, 0x0112 },
562};
563
564static int wm5102_sysclk_ev(struct snd_soc_dapm_widget *w,
565 struct snd_kcontrol *kcontrol, int event)
566{
567 struct snd_soc_codec *codec = w->codec;
568 struct arizona *arizona = dev_get_drvdata(codec->dev);
569 struct regmap *regmap = codec->control_data;
570 const struct reg_default *patch = NULL;
571 int i, patch_size;
572
573 switch (arizona->rev) {
574 case 0:
575 patch = wm5102_sysclk_reva_patch;
576 patch_size = ARRAY_SIZE(wm5102_sysclk_reva_patch);
577 break;
578 }
579
580 switch (event) {
581 case SND_SOC_DAPM_POST_PMU:
582 if (patch)
583 for (i = 0; i < patch_size; i++)
584 regmap_write(regmap, patch[i].reg,
585 patch[i].def);
586 break;
587
588 default:
589 break;
590 }
591
592 return 0;
593}
594
45static const struct snd_kcontrol_new wm5102_snd_controls[] = { 595static const struct snd_kcontrol_new wm5102_snd_controls[] = {
46SOC_SINGLE("IN1 High Performance Switch", ARIZONA_IN1L_CONTROL, 596SOC_SINGLE("IN1 High Performance Switch", ARIZONA_IN1L_CONTROL,
47 ARIZONA_IN1_OSR_SHIFT, 1, 0), 597 ARIZONA_IN1_OSR_SHIFT, 1, 0),
@@ -297,7 +847,7 @@ static const struct snd_kcontrol_new wm5102_aec_loopback_mux =
297 847
298static const struct snd_soc_dapm_widget wm5102_dapm_widgets[] = { 848static const struct snd_soc_dapm_widget wm5102_dapm_widgets[] = {
299SND_SOC_DAPM_SUPPLY("SYSCLK", ARIZONA_SYSTEM_CLOCK_1, ARIZONA_SYSCLK_ENA_SHIFT, 849SND_SOC_DAPM_SUPPLY("SYSCLK", ARIZONA_SYSTEM_CLOCK_1, ARIZONA_SYSCLK_ENA_SHIFT,
300 0, NULL, 0), 850 0, wm5102_sysclk_ev, SND_SOC_DAPM_POST_PMU),
301SND_SOC_DAPM_SUPPLY("ASYNCCLK", ARIZONA_ASYNC_CLOCK_1, 851SND_SOC_DAPM_SUPPLY("ASYNCCLK", ARIZONA_ASYNC_CLOCK_1,
302 ARIZONA_ASYNC_CLK_ENA_SHIFT, 0, NULL, 0), 852 ARIZONA_ASYNC_CLK_ENA_SHIFT, 0, NULL, 0),
303SND_SOC_DAPM_SUPPLY("OPCLK", ARIZONA_OUTPUT_SYSTEM_CLOCK, 853SND_SOC_DAPM_SUPPLY("OPCLK", ARIZONA_OUTPUT_SYSTEM_CLOCK,
diff --git a/sound/soc/codecs/wm8978.c b/sound/soc/codecs/wm8978.c
index 5421fd9fbcb5..4c0a8e496131 100644
--- a/sound/soc/codecs/wm8978.c
+++ b/sound/soc/codecs/wm8978.c
@@ -782,7 +782,7 @@ static int wm8978_hw_params(struct snd_pcm_substream *substream,
782 wm8978->mclk_idx = -1; 782 wm8978->mclk_idx = -1;
783 f_sel = wm8978->f_mclk; 783 f_sel = wm8978->f_mclk;
784 } else { 784 } else {
785 if (!wm8978->f_pllout) { 785 if (!wm8978->f_opclk) {
786 /* We only enter here, if OPCLK is not used */ 786 /* We only enter here, if OPCLK is not used */
787 int ret = wm8978_configure_pll(codec); 787 int ret = wm8978_configure_pll(codec);
788 if (ret < 0) 788 if (ret < 0)
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index 2b2dadc54dac..b2b2b37131bd 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -1045,6 +1045,7 @@ static int aif1clk_ev(struct snd_soc_dapm_widget *w,
1045 struct snd_kcontrol *kcontrol, int event) 1045 struct snd_kcontrol *kcontrol, int event)
1046{ 1046{
1047 struct snd_soc_codec *codec = w->codec; 1047 struct snd_soc_codec *codec = w->codec;
1048 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
1048 struct wm8994 *control = codec->control_data; 1049 struct wm8994 *control = codec->control_data;
1049 int mask = WM8994_AIF1DAC1L_ENA | WM8994_AIF1DAC1R_ENA; 1050 int mask = WM8994_AIF1DAC1L_ENA | WM8994_AIF1DAC1R_ENA;
1050 int i; 1051 int i;
@@ -1063,6 +1064,10 @@ static int aif1clk_ev(struct snd_soc_dapm_widget *w,
1063 1064
1064 switch (event) { 1065 switch (event) {
1065 case SND_SOC_DAPM_PRE_PMU: 1066 case SND_SOC_DAPM_PRE_PMU:
1067 /* Don't enable timeslot 2 if not in use */
1068 if (wm8994->channels[0] <= 2)
1069 mask &= ~(WM8994_AIF1DAC2L_ENA | WM8994_AIF1DAC2R_ENA);
1070
1066 val = snd_soc_read(codec, WM8994_AIF1_CONTROL_1); 1071 val = snd_soc_read(codec, WM8994_AIF1_CONTROL_1);
1067 if ((val & WM8994_AIF1ADCL_SRC) && 1072 if ((val & WM8994_AIF1ADCL_SRC) &&
1068 (val & WM8994_AIF1ADCR_SRC)) 1073 (val & WM8994_AIF1ADCR_SRC))
@@ -2687,7 +2692,7 @@ static int wm8994_hw_params(struct snd_pcm_substream *substream,
2687 return -EINVAL; 2692 return -EINVAL;
2688 } 2693 }
2689 2694
2690 bclk_rate = params_rate(params) * 4; 2695 bclk_rate = params_rate(params);
2691 switch (params_format(params)) { 2696 switch (params_format(params)) {
2692 case SNDRV_PCM_FORMAT_S16_LE: 2697 case SNDRV_PCM_FORMAT_S16_LE:
2693 bclk_rate *= 16; 2698 bclk_rate *= 16;
@@ -2708,6 +2713,17 @@ static int wm8994_hw_params(struct snd_pcm_substream *substream,
2708 return -EINVAL; 2713 return -EINVAL;
2709 } 2714 }
2710 2715
2716 wm8994->channels[id] = params_channels(params);
2717 switch (params_channels(params)) {
2718 case 1:
2719 case 2:
2720 bclk_rate *= 2;
2721 break;
2722 default:
2723 bclk_rate *= 4;
2724 break;
2725 }
2726
2711 /* Try to find an appropriate sample rate; look for an exact match. */ 2727 /* Try to find an appropriate sample rate; look for an exact match. */
2712 for (i = 0; i < ARRAY_SIZE(srs); i++) 2728 for (i = 0; i < ARRAY_SIZE(srs); i++)
2713 if (srs[i].rate == params_rate(params)) 2729 if (srs[i].rate == params_rate(params))
@@ -3706,7 +3722,7 @@ static irqreturn_t wm8958_mic_irq(int irq, void *data)
3706 } while (count--); 3722 } while (count--);
3707 3723
3708 if (count == 0) 3724 if (count == 0)
3709 dev_warn(codec->dev, "No impedence range reported for jack\n"); 3725 dev_warn(codec->dev, "No impedance range reported for jack\n");
3710 3726
3711#ifndef CONFIG_SND_SOC_WM8994_MODULE 3727#ifndef CONFIG_SND_SOC_WM8994_MODULE
3712 trace_snd_soc_jack_irq(dev_name(codec->dev)); 3728 trace_snd_soc_jack_irq(dev_name(codec->dev));
diff --git a/sound/soc/codecs/wm8994.h b/sound/soc/codecs/wm8994.h
index f142ec198db3..ccbce5791e95 100644
--- a/sound/soc/codecs/wm8994.h
+++ b/sound/soc/codecs/wm8994.h
@@ -77,6 +77,7 @@ struct wm8994_priv {
77 int sysclk_rate[2]; 77 int sysclk_rate[2];
78 int mclk[2]; 78 int mclk[2];
79 int aifclk[2]; 79 int aifclk[2];
80 int channels[2];
80 struct wm8994_fll_config fll[2], fll_suspend[2]; 81 struct wm8994_fll_config fll[2], fll_suspend[2];
81 struct completion fll_locked[2]; 82 struct completion fll_locked[2];
82 bool fll_locked_irq; 83 bool fll_locked_irq;
diff --git a/sound/soc/kirkwood/kirkwood-dma.c b/sound/soc/kirkwood/kirkwood-dma.c
index b9f16598324c..2ba08148655f 100644
--- a/sound/soc/kirkwood/kirkwood-dma.c
+++ b/sound/soc/kirkwood/kirkwood-dma.c
@@ -71,7 +71,6 @@ static irqreturn_t kirkwood_dma_irq(int irq, void *dev_id)
71 printk(KERN_WARNING "%s: got err interrupt 0x%lx\n", 71 printk(KERN_WARNING "%s: got err interrupt 0x%lx\n",
72 __func__, cause); 72 __func__, cause);
73 writel(cause, priv->io + KIRKWOOD_ERR_CAUSE); 73 writel(cause, priv->io + KIRKWOOD_ERR_CAUSE);
74 return IRQ_HANDLED;
75 } 74 }
76 75
77 /* we've enabled only bytes interrupts ... */ 76 /* we've enabled only bytes interrupts ... */
@@ -178,7 +177,7 @@ static int kirkwood_dma_open(struct snd_pcm_substream *substream)
178 } 177 }
179 178
180 dram = mv_mbus_dram_info(); 179 dram = mv_mbus_dram_info();
181 addr = virt_to_phys(substream->dma_buffer.area); 180 addr = substream->dma_buffer.addr;
182 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { 181 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
183 prdata->play_stream = substream; 182 prdata->play_stream = substream;
184 kirkwood_dma_conf_mbus_windows(priv->io, 183 kirkwood_dma_conf_mbus_windows(priv->io,
diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c
index 542538d10ab7..1d5db484d2df 100644
--- a/sound/soc/kirkwood/kirkwood-i2s.c
+++ b/sound/soc/kirkwood/kirkwood-i2s.c
@@ -95,7 +95,7 @@ static inline void kirkwood_set_dco(void __iomem *io, unsigned long rate)
95 do { 95 do {
96 cpu_relax(); 96 cpu_relax();
97 value = readl(io + KIRKWOOD_DCO_SPCR_STATUS); 97 value = readl(io + KIRKWOOD_DCO_SPCR_STATUS);
98 value &= KIRKWOOD_DCO_SPCR_STATUS; 98 value &= KIRKWOOD_DCO_SPCR_STATUS_DCO_LOCK;
99 } while (value == 0); 99 } while (value == 0);
100} 100}
101 101
@@ -180,67 +180,72 @@ static int kirkwood_i2s_play_trigger(struct snd_pcm_substream *substream,
180 int cmd, struct snd_soc_dai *dai) 180 int cmd, struct snd_soc_dai *dai)
181{ 181{
182 struct kirkwood_dma_data *priv = snd_soc_dai_get_drvdata(dai); 182 struct kirkwood_dma_data *priv = snd_soc_dai_get_drvdata(dai);
183 unsigned long value; 183 uint32_t ctl, value;
184 184
185 /* 185 ctl = readl(priv->io + KIRKWOOD_PLAYCTL);
186 * specs says KIRKWOOD_PLAYCTL must be read 2 times before 186 if (ctl & KIRKWOOD_PLAYCTL_PAUSE) {
187 * changing it. So read 1 time here and 1 later. 187 unsigned timeout = 5000;
188 */ 188 /*
189 value = readl(priv->io + KIRKWOOD_PLAYCTL); 189 * The Armada510 spec says that if we enter pause mode, the
190 * busy bit must be read back as clear _twice_. Make sure
191 * we respect that otherwise we get DMA underruns.
192 */
193 do {
194 value = ctl;
195 ctl = readl(priv->io + KIRKWOOD_PLAYCTL);
196 if (!((ctl | value) & KIRKWOOD_PLAYCTL_PLAY_BUSY))
197 break;
198 udelay(1);
199 } while (timeout--);
200
201 if ((ctl | value) & KIRKWOOD_PLAYCTL_PLAY_BUSY)
202 dev_notice(dai->dev, "timed out waiting for busy to deassert: %08x\n",
203 ctl);
204 }
190 205
191 switch (cmd) { 206 switch (cmd) {
192 case SNDRV_PCM_TRIGGER_START: 207 case SNDRV_PCM_TRIGGER_START:
193 /* stop audio, enable interrupts */
194 value = readl(priv->io + KIRKWOOD_PLAYCTL);
195 value |= KIRKWOOD_PLAYCTL_PAUSE;
196 writel(value, priv->io + KIRKWOOD_PLAYCTL);
197
198 value = readl(priv->io + KIRKWOOD_INT_MASK); 208 value = readl(priv->io + KIRKWOOD_INT_MASK);
199 value |= KIRKWOOD_INT_CAUSE_PLAY_BYTES; 209 value |= KIRKWOOD_INT_CAUSE_PLAY_BYTES;
200 writel(value, priv->io + KIRKWOOD_INT_MASK); 210 writel(value, priv->io + KIRKWOOD_INT_MASK);
201 211
202 /* configure audio & enable i2s playback */ 212 /* configure audio & enable i2s playback */
203 value = readl(priv->io + KIRKWOOD_PLAYCTL); 213 ctl &= ~KIRKWOOD_PLAYCTL_BURST_MASK;
204 value &= ~KIRKWOOD_PLAYCTL_BURST_MASK; 214 ctl &= ~(KIRKWOOD_PLAYCTL_PAUSE | KIRKWOOD_PLAYCTL_I2S_MUTE
205 value &= ~(KIRKWOOD_PLAYCTL_PAUSE | KIRKWOOD_PLAYCTL_I2S_MUTE
206 | KIRKWOOD_PLAYCTL_SPDIF_EN); 215 | KIRKWOOD_PLAYCTL_SPDIF_EN);
207 216
208 if (priv->burst == 32) 217 if (priv->burst == 32)
209 value |= KIRKWOOD_PLAYCTL_BURST_32; 218 ctl |= KIRKWOOD_PLAYCTL_BURST_32;
210 else 219 else
211 value |= KIRKWOOD_PLAYCTL_BURST_128; 220 ctl |= KIRKWOOD_PLAYCTL_BURST_128;
212 value |= KIRKWOOD_PLAYCTL_I2S_EN; 221 ctl |= KIRKWOOD_PLAYCTL_I2S_EN;
213 writel(value, priv->io + KIRKWOOD_PLAYCTL); 222 writel(ctl, priv->io + KIRKWOOD_PLAYCTL);
214 break; 223 break;
215 224
216 case SNDRV_PCM_TRIGGER_STOP: 225 case SNDRV_PCM_TRIGGER_STOP:
217 /* stop audio, disable interrupts */ 226 /* stop audio, disable interrupts */
218 value = readl(priv->io + KIRKWOOD_PLAYCTL); 227 ctl |= KIRKWOOD_PLAYCTL_PAUSE | KIRKWOOD_PLAYCTL_I2S_MUTE;
219 value |= KIRKWOOD_PLAYCTL_PAUSE | KIRKWOOD_PLAYCTL_I2S_MUTE; 228 writel(ctl, priv->io + KIRKWOOD_PLAYCTL);
220 writel(value, priv->io + KIRKWOOD_PLAYCTL);
221 229
222 value = readl(priv->io + KIRKWOOD_INT_MASK); 230 value = readl(priv->io + KIRKWOOD_INT_MASK);
223 value &= ~KIRKWOOD_INT_CAUSE_PLAY_BYTES; 231 value &= ~KIRKWOOD_INT_CAUSE_PLAY_BYTES;
224 writel(value, priv->io + KIRKWOOD_INT_MASK); 232 writel(value, priv->io + KIRKWOOD_INT_MASK);
225 233
226 /* disable all playbacks */ 234 /* disable all playbacks */
227 value = readl(priv->io + KIRKWOOD_PLAYCTL); 235 ctl &= ~(KIRKWOOD_PLAYCTL_I2S_EN | KIRKWOOD_PLAYCTL_SPDIF_EN);
228 value &= ~(KIRKWOOD_PLAYCTL_I2S_EN | KIRKWOOD_PLAYCTL_SPDIF_EN); 236 writel(ctl, priv->io + KIRKWOOD_PLAYCTL);
229 writel(value, priv->io + KIRKWOOD_PLAYCTL);
230 break; 237 break;
231 238
232 case SNDRV_PCM_TRIGGER_PAUSE_PUSH: 239 case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
233 case SNDRV_PCM_TRIGGER_SUSPEND: 240 case SNDRV_PCM_TRIGGER_SUSPEND:
234 value = readl(priv->io + KIRKWOOD_PLAYCTL); 241 ctl |= KIRKWOOD_PLAYCTL_PAUSE | KIRKWOOD_PLAYCTL_I2S_MUTE;
235 value |= KIRKWOOD_PLAYCTL_PAUSE | KIRKWOOD_PLAYCTL_I2S_MUTE; 242 writel(ctl, priv->io + KIRKWOOD_PLAYCTL);
236 writel(value, priv->io + KIRKWOOD_PLAYCTL);
237 break; 243 break;
238 244
239 case SNDRV_PCM_TRIGGER_RESUME: 245 case SNDRV_PCM_TRIGGER_RESUME:
240 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: 246 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
241 value = readl(priv->io + KIRKWOOD_PLAYCTL); 247 ctl &= ~(KIRKWOOD_PLAYCTL_PAUSE | KIRKWOOD_PLAYCTL_I2S_MUTE);
242 value &= ~(KIRKWOOD_PLAYCTL_PAUSE | KIRKWOOD_PLAYCTL_I2S_MUTE); 248 writel(ctl, priv->io + KIRKWOOD_PLAYCTL);
243 writel(value, priv->io + KIRKWOOD_PLAYCTL);
244 break; 249 break;
245 250
246 default: 251 default:
@@ -260,11 +265,6 @@ static int kirkwood_i2s_rec_trigger(struct snd_pcm_substream *substream,
260 265
261 switch (cmd) { 266 switch (cmd) {
262 case SNDRV_PCM_TRIGGER_START: 267 case SNDRV_PCM_TRIGGER_START:
263 /* stop audio, enable interrupts */
264 value = readl(priv->io + KIRKWOOD_RECCTL);
265 value |= KIRKWOOD_RECCTL_PAUSE;
266 writel(value, priv->io + KIRKWOOD_RECCTL);
267
268 value = readl(priv->io + KIRKWOOD_INT_MASK); 268 value = readl(priv->io + KIRKWOOD_INT_MASK);
269 value |= KIRKWOOD_INT_CAUSE_REC_BYTES; 269 value |= KIRKWOOD_INT_CAUSE_REC_BYTES;
270 writel(value, priv->io + KIRKWOOD_INT_MASK); 270 writel(value, priv->io + KIRKWOOD_INT_MASK);
diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c
index aa037b292f3d..c294fbb523fc 100644
--- a/sound/soc/mxs/mxs-saif.c
+++ b/sound/soc/mxs/mxs-saif.c
@@ -523,16 +523,24 @@ static int mxs_saif_trigger(struct snd_pcm_substream *substream, int cmd,
523 523
524 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { 524 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
525 /* 525 /*
526 * write a data to saif data register to trigger 526 * write data to saif data register to trigger
527 * the transfer 527 * the transfer.
528 * For 24-bit format the 32-bit FIFO register stores
529 * only one channel, so we need to write twice.
530 * This is also safe for the other non 24-bit formats.
528 */ 531 */
529 __raw_writel(0, saif->base + SAIF_DATA); 532 __raw_writel(0, saif->base + SAIF_DATA);
533 __raw_writel(0, saif->base + SAIF_DATA);
530 } else { 534 } else {
531 /* 535 /*
532 * read a data from saif data register to trigger 536 * read data from saif data register to trigger
533 * the receive 537 * the receive.
538 * For 24-bit format the 32-bit FIFO register stores
539 * only one channel, so we need to read twice.
540 * This is also safe for the other non 24-bit formats.
534 */ 541 */
535 __raw_readl(saif->base + SAIF_DATA); 542 __raw_readl(saif->base + SAIF_DATA);
543 __raw_readl(saif->base + SAIF_DATA);
536 } 544 }
537 545
538 master_saif->ongoing = 1; 546 master_saif->ongoing = 1;
@@ -812,3 +820,4 @@ module_platform_driver(mxs_saif_driver);
812MODULE_AUTHOR("Freescale Semiconductor, Inc."); 820MODULE_AUTHOR("Freescale Semiconductor, Inc.");
813MODULE_DESCRIPTION("MXS ASoC SAIF driver"); 821MODULE_DESCRIPTION("MXS ASoC SAIF driver");
814MODULE_LICENSE("GPL"); 822MODULE_LICENSE("GPL");
823MODULE_ALIAS("platform:mxs-saif");
diff --git a/sound/soc/omap/omap-dmic.c b/sound/soc/omap/omap-dmic.c
index 68f2cd1a9206..5a6aeaf552a8 100644
--- a/sound/soc/omap/omap-dmic.c
+++ b/sound/soc/omap/omap-dmic.c
@@ -464,9 +464,9 @@ static __devinit int asoc_dmic_probe(struct platform_device *pdev)
464 464
465 mutex_init(&dmic->mutex); 465 mutex_init(&dmic->mutex);
466 466
467 dmic->fclk = clk_get(dmic->dev, "dmic_fck"); 467 dmic->fclk = clk_get(dmic->dev, "fck");
468 if (IS_ERR(dmic->fclk)) { 468 if (IS_ERR(dmic->fclk)) {
469 dev_err(dmic->dev, "cant get dmic_fck\n"); 469 dev_err(dmic->dev, "cant get fck\n");
470 return -ENODEV; 470 return -ENODEV;
471 } 471 }
472 472
diff --git a/sound/soc/omap/zoom2.c b/sound/soc/omap/zoom2.c
index 677b567935f8..1ff6bb9ade5c 100644
--- a/sound/soc/omap/zoom2.c
+++ b/sound/soc/omap/zoom2.c
@@ -21,15 +21,14 @@
21 21
22#include <linux/clk.h> 22#include <linux/clk.h>
23#include <linux/platform_device.h> 23#include <linux/platform_device.h>
24#include <linux/gpio.h>
24#include <sound/core.h> 25#include <sound/core.h>
25#include <sound/pcm.h> 26#include <sound/pcm.h>
26#include <sound/soc.h> 27#include <sound/soc.h>
27 28
28#include <asm/mach-types.h> 29#include <asm/mach-types.h>
29#include <mach/hardware.h>
30#include <mach/gpio.h>
31#include <mach/board-zoom.h>
32#include <linux/platform_data/asoc-ti-mcbsp.h> 30#include <linux/platform_data/asoc-ti-mcbsp.h>
31#include <linux/platform_data/gpio-omap.h>
33 32
34/* Register descriptions for twl4030 codec part */ 33/* Register descriptions for twl4030 codec part */
35#include <linux/mfd/twl4030-audio.h> 34#include <linux/mfd/twl4030-audio.h>
diff --git a/sound/soc/samsung/Kconfig b/sound/soc/samsung/Kconfig
index e7b83179aca2..3c7c3a59ed39 100644
--- a/sound/soc/samsung/Kconfig
+++ b/sound/soc/samsung/Kconfig
@@ -207,6 +207,8 @@ config SND_SOC_BELLS
207 select SND_SOC_WM5102 207 select SND_SOC_WM5102
208 select SND_SOC_WM5110 208 select SND_SOC_WM5110
209 select SND_SOC_WM9081 209 select SND_SOC_WM9081
210 select SND_SOC_WM0010
211 select SND_SOC_WM1250_EV1
210 212
211config SND_SOC_LOWLAND 213config SND_SOC_LOWLAND
212 tristate "Audio support for Wolfson Lowland" 214 tristate "Audio support for Wolfson Lowland"
diff --git a/sound/soc/samsung/bells.c b/sound/soc/samsung/bells.c
index b0d46d63d55e..a2ca1567b9e4 100644
--- a/sound/soc/samsung/bells.c
+++ b/sound/soc/samsung/bells.c
@@ -212,7 +212,7 @@ static struct snd_soc_dai_link bells_dai_wm5102[] = {
212 { 212 {
213 .name = "Sub", 213 .name = "Sub",
214 .stream_name = "Sub", 214 .stream_name = "Sub",
215 .cpu_dai_name = "wm5110-aif3", 215 .cpu_dai_name = "wm5102-aif3",
216 .codec_dai_name = "wm9081-hifi", 216 .codec_dai_name = "wm9081-hifi",
217 .codec_name = "wm9081.1-006c", 217 .codec_name = "wm9081.1-006c",
218 .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF 218 .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index d1198627fc40..10d21be383f6 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2786,8 +2786,9 @@ int snd_soc_put_volsw_sx(struct snd_kcontrol *kcontrol,
2786 val = (ucontrol->value.integer.value[0] + min) & mask; 2786 val = (ucontrol->value.integer.value[0] + min) & mask;
2787 val = val << shift; 2787 val = val << shift;
2788 2788
2789 if (snd_soc_update_bits_locked(codec, reg, val_mask, val)) 2789 err = snd_soc_update_bits_locked(codec, reg, val_mask, val);
2790 return err; 2790 if (err < 0)
2791 return err;
2791 2792
2792 if (snd_soc_volsw_is_stereo(mc)) { 2793 if (snd_soc_volsw_is_stereo(mc)) {
2793 val_mask = mask << rshift; 2794 val_mask = mask << rshift;
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index d0a4be38dc0f..6e35bcae02df 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -3745,7 +3745,7 @@ void snd_soc_dapm_shutdown(struct snd_soc_card *card)
3745{ 3745{
3746 struct snd_soc_codec *codec; 3746 struct snd_soc_codec *codec;
3747 3747
3748 list_for_each_entry(codec, &card->codec_dev_list, list) { 3748 list_for_each_entry(codec, &card->codec_dev_list, card_list) {
3749 soc_dapm_shutdown_codec(&codec->dapm); 3749 soc_dapm_shutdown_codec(&codec->dapm);
3750 if (codec->dapm.bias_level == SND_SOC_BIAS_STANDBY) 3750 if (codec->dapm.bias_level == SND_SOC_BIAS_STANDBY)
3751 snd_soc_dapm_set_bias_level(&codec->dapm, 3751 snd_soc_dapm_set_bias_level(&codec->dapm,
diff --git a/sound/soc/ux500/mop500.c b/sound/soc/ux500/mop500.c
index 6f67e6b2582d..651a52a95fd7 100644
--- a/sound/soc/ux500/mop500.c
+++ b/sound/soc/ux500/mop500.c
@@ -57,6 +57,20 @@ static struct snd_soc_card mop500_card = {
57 .num_links = ARRAY_SIZE(mop500_dai_links), 57 .num_links = ARRAY_SIZE(mop500_dai_links),
58}; 58};
59 59
60static void mop500_of_node_put(void)
61{
62 int i;
63
64 for (i = 0; i < 2; i++) {
65 if (mop500_dai_links[i].cpu_of_node)
66 of_node_put((struct device_node *)
67 mop500_dai_links[i].cpu_of_node);
68 if (mop500_dai_links[i].codec_of_node)
69 of_node_put((struct device_node *)
70 mop500_dai_links[i].codec_of_node);
71 }
72}
73
60static int __devinit mop500_of_probe(struct platform_device *pdev, 74static int __devinit mop500_of_probe(struct platform_device *pdev,
61 struct device_node *np) 75 struct device_node *np)
62{ 76{
@@ -69,6 +83,7 @@ static int __devinit mop500_of_probe(struct platform_device *pdev,
69 83
70 if (!(msp_np[0] && msp_np[1] && codec_np)) { 84 if (!(msp_np[0] && msp_np[1] && codec_np)) {
71 dev_err(&pdev->dev, "Phandle missing or invalid\n"); 85 dev_err(&pdev->dev, "Phandle missing or invalid\n");
86 mop500_of_node_put();
72 return -EINVAL; 87 return -EINVAL;
73 } 88 }
74 89
@@ -83,6 +98,7 @@ static int __devinit mop500_of_probe(struct platform_device *pdev,
83 98
84 return 0; 99 return 0;
85} 100}
101
86static int __devinit mop500_probe(struct platform_device *pdev) 102static int __devinit mop500_probe(struct platform_device *pdev)
87{ 103{
88 struct device_node *np = pdev->dev.of_node; 104 struct device_node *np = pdev->dev.of_node;
@@ -128,6 +144,7 @@ static int __devexit mop500_remove(struct platform_device *pdev)
128 144
129 snd_soc_unregister_card(mop500_card); 145 snd_soc_unregister_card(mop500_card);
130 mop500_ab8500_remove(mop500_card); 146 mop500_ab8500_remove(mop500_card);
147 mop500_of_node_put();
131 148
132 return 0; 149 return 0;
133} 150}
diff --git a/sound/soc/ux500/ux500_msp_i2s.c b/sound/soc/ux500/ux500_msp_i2s.c
index b7c996e77570..a26c6bf0a29b 100644
--- a/sound/soc/ux500/ux500_msp_i2s.c
+++ b/sound/soc/ux500/ux500_msp_i2s.c
@@ -18,6 +18,7 @@
18#include <linux/pinctrl/consumer.h> 18#include <linux/pinctrl/consumer.h>
19#include <linux/delay.h> 19#include <linux/delay.h>
20#include <linux/slab.h> 20#include <linux/slab.h>
21#include <linux/io.h>
21#include <linux/of.h> 22#include <linux/of.h>
22 23
23#include <mach/hardware.h> 24#include <mach/hardware.h>
@@ -697,14 +698,11 @@ int ux500_msp_i2s_init_msp(struct platform_device *pdev,
697 platform_data = devm_kzalloc(&pdev->dev, 698 platform_data = devm_kzalloc(&pdev->dev,
698 sizeof(struct msp_i2s_platform_data), GFP_KERNEL); 699 sizeof(struct msp_i2s_platform_data), GFP_KERNEL);
699 if (!platform_data) 700 if (!platform_data)
700 ret = -ENOMEM; 701 return -ENOMEM;
701 } 702 }
702 } else 703 } else
703 if (!platform_data) 704 if (!platform_data)
704 ret = -EINVAL; 705 return -EINVAL;
705
706 if (ret)
707 goto err_res;
708 706
709 dev_dbg(&pdev->dev, "%s: Enter (name: %s, id: %d).\n", __func__, 707 dev_dbg(&pdev->dev, "%s: Enter (name: %s, id: %d).\n", __func__,
710 pdev->name, platform_data->id); 708 pdev->name, platform_data->id);