aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/es1968.c11
-rw-r--r--sound/pci/fm801.c11
-rw-r--r--sound/pci/hda/patch_realtek.c1
-rw-r--r--sound/soc/codecs/cs42l52.c3
-rw-r--r--sound/soc/codecs/wm5102.c552
-rw-r--r--sound/soc/codecs/wm8978.c2
-rw-r--r--sound/soc/mxs/mxs-saif.c17
-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/usb/card.c6
12 files changed, 593 insertions, 21 deletions
diff --git a/sound/pci/es1968.c b/sound/pci/es1968.c
index 50169bcfd903..7266020c16cb 100644
--- a/sound/pci/es1968.c
+++ b/sound/pci/es1968.c
@@ -2581,9 +2581,14 @@ static u8 snd_es1968_tea575x_get_pins(struct snd_tea575x *tea)
2581 struct es1968 *chip = tea->private_data; 2581 struct es1968 *chip = tea->private_data;
2582 unsigned long io = chip->io_port + GPIO_DATA; 2582 unsigned long io = chip->io_port + GPIO_DATA;
2583 u16 val = inw(io); 2583 u16 val = inw(io);
2584 2584 u8 ret;
2585 return (val & STR_DATA) ? TEA575X_DATA : 0 | 2585
2586 (val & STR_MOST) ? TEA575X_MOST : 0; 2586 ret = 0;
2587 if (val & STR_DATA)
2588 ret |= TEA575X_DATA;
2589 if (val & STR_MOST)
2590 ret |= TEA575X_MOST;
2591 return ret;
2587} 2592}
2588 2593
2589static void snd_es1968_tea575x_set_direction(struct snd_tea575x *tea, bool output) 2594static void snd_es1968_tea575x_set_direction(struct snd_tea575x *tea, bool output)
diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c
index cc2e91d15538..c5806f89be1e 100644
--- a/sound/pci/fm801.c
+++ b/sound/pci/fm801.c
@@ -767,9 +767,14 @@ static u8 snd_fm801_tea575x_get_pins(struct snd_tea575x *tea)
767 struct fm801 *chip = tea->private_data; 767 struct fm801 *chip = tea->private_data;
768 unsigned short reg = inw(FM801_REG(chip, GPIO_CTRL)); 768 unsigned short reg = inw(FM801_REG(chip, GPIO_CTRL));
769 struct snd_fm801_tea575x_gpio gpio = *get_tea575x_gpio(chip); 769 struct snd_fm801_tea575x_gpio gpio = *get_tea575x_gpio(chip);
770 770 u8 ret;
771 return (reg & FM801_GPIO_GP(gpio.data)) ? TEA575X_DATA : 0 | 771
772 (reg & FM801_GPIO_GP(gpio.most)) ? TEA575X_MOST : 0; 772 ret = 0;
773 if (reg & FM801_GPIO_GP(gpio.data))
774 ret |= TEA575X_DATA;
775 if (reg & FM801_GPIO_GP(gpio.most))
776 ret |= TEA575X_MOST;
777 return ret;
773} 778}
774 779
775static void snd_fm801_tea575x_set_direction(struct snd_tea575x *tea, bool output) 780static void snd_fm801_tea575x_set_direction(struct snd_tea575x *tea, bool output)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index c0ce3b1f04b4..68fd49294b26 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5407,6 +5407,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
5407 SND_PCI_QUIRK(0x106b, 0x4000, "MacbookPro 5,1", ALC889_FIXUP_IMAC91_VREF), 5407 SND_PCI_QUIRK(0x106b, 0x4000, "MacbookPro 5,1", ALC889_FIXUP_IMAC91_VREF),
5408 SND_PCI_QUIRK(0x106b, 0x4100, "Macmini 3,1", ALC889_FIXUP_IMAC91_VREF), 5408 SND_PCI_QUIRK(0x106b, 0x4100, "Macmini 3,1", ALC889_FIXUP_IMAC91_VREF),
5409 SND_PCI_QUIRK(0x106b, 0x4200, "Mac Pro 5,1", ALC885_FIXUP_MACPRO_GPIO), 5409 SND_PCI_QUIRK(0x106b, 0x4200, "Mac Pro 5,1", ALC885_FIXUP_MACPRO_GPIO),
5410 SND_PCI_QUIRK(0x106b, 0x4300, "iMac 9,1", ALC889_FIXUP_IMAC91_VREF),
5410 SND_PCI_QUIRK(0x106b, 0x4600, "MacbookPro 5,2", ALC889_FIXUP_IMAC91_VREF), 5411 SND_PCI_QUIRK(0x106b, 0x4600, "MacbookPro 5,2", ALC889_FIXUP_IMAC91_VREF),
5411 SND_PCI_QUIRK(0x106b, 0x4900, "iMac 9,1 Aluminum", ALC889_FIXUP_IMAC91_VREF), 5412 SND_PCI_QUIRK(0x106b, 0x4900, "iMac 9,1 Aluminum", ALC889_FIXUP_IMAC91_VREF),
5412 SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_IMAC91_VREF), 5413 SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_IMAC91_VREF),
diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c
index 4d8db3685e96..97a81051e88d 100644
--- a/sound/soc/codecs/cs42l52.c
+++ b/sound/soc/codecs/cs42l52.c
@@ -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/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/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..b56b9a3c6169 100644
--- a/sound/soc/samsung/bells.c
+++ b/sound/soc/samsung/bells.c
@@ -247,7 +247,7 @@ static struct snd_soc_dai_link bells_dai_wm5110[] = {
247 { 247 {
248 .name = "Sub", 248 .name = "Sub",
249 .stream_name = "Sub", 249 .stream_name = "Sub",
250 .cpu_dai_name = "wm5110-aif3", 250 .cpu_dai_name = "wm5102-aif3",
251 .codec_dai_name = "wm9081-hifi", 251 .codec_dai_name = "wm9081-hifi",
252 .codec_name = "wm9081.1-006c", 252 .codec_name = "wm9081.1-006c",
253 .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF 253 .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/usb/card.c b/sound/usb/card.c
index 282f0fc9fed1..dbf7999d18b4 100644
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -559,9 +559,11 @@ static void snd_usb_audio_disconnect(struct usb_device *dev,
559 return; 559 return;
560 560
561 card = chip->card; 561 card = chip->card;
562 mutex_lock(&register_mutex);
563 down_write(&chip->shutdown_rwsem); 562 down_write(&chip->shutdown_rwsem);
564 chip->shutdown = 1; 563 chip->shutdown = 1;
564 up_write(&chip->shutdown_rwsem);
565
566 mutex_lock(&register_mutex);
565 chip->num_interfaces--; 567 chip->num_interfaces--;
566 if (chip->num_interfaces <= 0) { 568 if (chip->num_interfaces <= 0) {
567 snd_card_disconnect(card); 569 snd_card_disconnect(card);
@@ -582,11 +584,9 @@ static void snd_usb_audio_disconnect(struct usb_device *dev,
582 snd_usb_mixer_disconnect(p); 584 snd_usb_mixer_disconnect(p);
583 } 585 }
584 usb_chip[chip->index] = NULL; 586 usb_chip[chip->index] = NULL;
585 up_write(&chip->shutdown_rwsem);
586 mutex_unlock(&register_mutex); 587 mutex_unlock(&register_mutex);
587 snd_card_free_when_closed(card); 588 snd_card_free_when_closed(card);
588 } else { 589 } else {
589 up_write(&chip->shutdown_rwsem);
590 mutex_unlock(&register_mutex); 590 mutex_unlock(&register_mutex);
591 } 591 }
592} 592}