aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/ac97.c6
-rw-r--r--sound/soc/codecs/ak4642.c2
-rw-r--r--sound/soc/codecs/stac9766.c18
-rw-r--r--sound/soc/codecs/twl4030.c10
-rw-r--r--sound/soc/codecs/wm8350.c25
-rw-r--r--sound/soc/codecs/wm8510.c14
-rw-r--r--sound/soc/codecs/wm8900.c2
-rw-r--r--sound/soc/codecs/wm8940.c14
-rw-r--r--sound/soc/codecs/wm8974.c16
-rw-r--r--sound/soc/codecs/wm9712.c3
-rw-r--r--sound/soc/imx/mx27vis_wm8974.c3
-rw-r--r--sound/soc/omap/sdp3430.c6
-rw-r--r--sound/soc/s3c24xx/s3c24xx_simtec.c2
-rw-r--r--sound/soc/s3c24xx/s3c24xx_simtec.h2
-rw-r--r--sound/soc/sh/fsi-ak4642.c30
-rw-r--r--sound/soc/sh/fsi.c2
-rw-r--r--sound/soc/soc-core.c2
17 files changed, 61 insertions, 96 deletions
diff --git a/sound/soc/codecs/ac97.c b/sound/soc/codecs/ac97.c
index 69bd0acc81c8..a1bbe16b7f96 100644
--- a/sound/soc/codecs/ac97.c
+++ b/sound/soc/codecs/ac97.c
@@ -102,6 +102,12 @@ static int ac97_soc_probe(struct platform_device *pdev)
102 INIT_LIST_HEAD(&codec->dapm_widgets); 102 INIT_LIST_HEAD(&codec->dapm_widgets);
103 INIT_LIST_HEAD(&codec->dapm_paths); 103 INIT_LIST_HEAD(&codec->dapm_paths);
104 104
105 ret = snd_soc_new_ac97_codec(codec, &soc_ac97_ops, 0);
106 if (ret < 0) {
107 printk(KERN_ERR "ASoC: failed to init gen ac97 glue\n");
108 goto err;
109 }
110
105 /* register pcms */ 111 /* register pcms */
106 ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1); 112 ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1);
107 if (ret < 0) 113 if (ret < 0)
diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c
index b69861d52161..3ef16bbc8c83 100644
--- a/sound/soc/codecs/ak4642.c
+++ b/sound/soc/codecs/ak4642.c
@@ -470,7 +470,7 @@ EXPORT_SYMBOL_GPL(soc_codec_dev_ak4642);
470 470
471static int __init ak4642_modinit(void) 471static int __init ak4642_modinit(void)
472{ 472{
473 int ret; 473 int ret = 0;
474#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) 474#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
475 ret = i2c_add_driver(&ak4642_i2c_driver); 475 ret = i2c_add_driver(&ak4642_i2c_driver);
476#endif 476#endif
diff --git a/sound/soc/codecs/stac9766.c b/sound/soc/codecs/stac9766.c
index bbc72c2ddfca..81b8c9dfe7fc 100644
--- a/sound/soc/codecs/stac9766.c
+++ b/sound/soc/codecs/stac9766.c
@@ -191,6 +191,7 @@ static int ac97_analog_prepare(struct snd_pcm_substream *substream,
191 vra = stac9766_ac97_read(codec, AC97_EXTENDED_STATUS); 191 vra = stac9766_ac97_read(codec, AC97_EXTENDED_STATUS);
192 192
193 vra |= 0x1; /* enable variable rate audio */ 193 vra |= 0x1; /* enable variable rate audio */
194 vra &= ~0x4; /* disable SPDIF output */
194 195
195 stac9766_ac97_write(codec, AC97_EXTENDED_STATUS, vra); 196 stac9766_ac97_write(codec, AC97_EXTENDED_STATUS, vra);
196 197
@@ -221,22 +222,6 @@ static int ac97_digital_prepare(struct snd_pcm_substream *substream,
221 return stac9766_ac97_write(codec, reg, runtime->rate); 222 return stac9766_ac97_write(codec, reg, runtime->rate);
222} 223}
223 224
224static int ac97_digital_trigger(struct snd_pcm_substream *substream,
225 int cmd, struct snd_soc_dai *dai)
226{
227 struct snd_soc_codec *codec = dai->codec;
228 unsigned short vra;
229
230 switch (cmd) {
231 case SNDRV_PCM_TRIGGER_STOP:
232 vra = stac9766_ac97_read(codec, AC97_EXTENDED_STATUS);
233 vra &= !0x04;
234 stac9766_ac97_write(codec, AC97_EXTENDED_STATUS, vra);
235 break;
236 }
237 return 0;
238}
239
240static int stac9766_set_bias_level(struct snd_soc_codec *codec, 225static int stac9766_set_bias_level(struct snd_soc_codec *codec,
241 enum snd_soc_bias_level level) 226 enum snd_soc_bias_level level)
242{ 227{
@@ -315,7 +300,6 @@ static struct snd_soc_dai_ops stac9766_dai_ops_analog = {
315 300
316static struct snd_soc_dai_ops stac9766_dai_ops_digital = { 301static struct snd_soc_dai_ops stac9766_dai_ops_digital = {
317 .prepare = ac97_digital_prepare, 302 .prepare = ac97_digital_prepare,
318 .trigger = ac97_digital_trigger,
319}; 303};
320 304
321struct snd_soc_dai stac9766_dai[] = { 305struct snd_soc_dai stac9766_dai[] = {
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
index 5f1681f6ca76..2a27f7b56726 100644
--- a/sound/soc/codecs/twl4030.c
+++ b/sound/soc/codecs/twl4030.c
@@ -26,7 +26,7 @@
26#include <linux/pm.h> 26#include <linux/pm.h>
27#include <linux/i2c.h> 27#include <linux/i2c.h>
28#include <linux/platform_device.h> 28#include <linux/platform_device.h>
29#include <linux/i2c/twl4030.h> 29#include <linux/i2c/twl.h>
30#include <sound/core.h> 30#include <sound/core.h>
31#include <sound/pcm.h> 31#include <sound/pcm.h>
32#include <sound/pcm_params.h> 32#include <sound/pcm_params.h>
@@ -175,7 +175,7 @@ static int twl4030_write(struct snd_soc_codec *codec,
175{ 175{
176 twl4030_write_reg_cache(codec, reg, value); 176 twl4030_write_reg_cache(codec, reg, value);
177 if (likely(reg < TWL4030_REG_SW_SHADOW)) 177 if (likely(reg < TWL4030_REG_SW_SHADOW))
178 return twl4030_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE, value, 178 return twl_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE, value,
179 reg); 179 reg);
180 else 180 else
181 return 0; 181 return 0;
@@ -261,7 +261,7 @@ static void twl4030_power_up(struct snd_soc_codec *codec)
261 do { 261 do {
262 /* this takes a little while, so don't slam i2c */ 262 /* this takes a little while, so don't slam i2c */
263 udelay(2000); 263 udelay(2000);
264 twl4030_i2c_read_u8(TWL4030_MODULE_AUDIO_VOICE, &byte, 264 twl_i2c_read_u8(TWL4030_MODULE_AUDIO_VOICE, &byte,
265 TWL4030_REG_ANAMICL); 265 TWL4030_REG_ANAMICL);
266 } while ((i++ < 100) && 266 } while ((i++ < 100) &&
267 ((byte & TWL4030_CNCL_OFFSET_START) == 267 ((byte & TWL4030_CNCL_OFFSET_START) ==
@@ -542,7 +542,7 @@ static int pin_name##pga_event(struct snd_soc_dapm_widget *w, \
542 break; \ 542 break; \
543 case SND_SOC_DAPM_POST_PMD: \ 543 case SND_SOC_DAPM_POST_PMD: \
544 reg_val = twl4030_read_reg_cache(w->codec, reg); \ 544 reg_val = twl4030_read_reg_cache(w->codec, reg); \
545 twl4030_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE, \ 545 twl_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE, \
546 reg_val & (~mask), \ 546 reg_val & (~mask), \
547 reg); \ 547 reg); \
548 break; \ 548 break; \
@@ -679,7 +679,7 @@ static void headset_ramp(struct snd_soc_codec *codec, int ramp)
679 mdelay((ramp_base[(hs_pop & TWL4030_RAMP_DELAY) >> 2] / 679 mdelay((ramp_base[(hs_pop & TWL4030_RAMP_DELAY) >> 2] /
680 twl4030->sysclk) + 1); 680 twl4030->sysclk) + 1);
681 /* Bypass the reg_cache to mute the headset */ 681 /* Bypass the reg_cache to mute the headset */
682 twl4030_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE, 682 twl_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE,
683 hs_gain & (~0x0f), 683 hs_gain & (~0x0f),
684 TWL4030_REG_HS_GAIN_SET); 684 TWL4030_REG_HS_GAIN_SET);
685 685
diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c
index f82125d9e85a..ebbf11b653a4 100644
--- a/sound/soc/codecs/wm8350.c
+++ b/sound/soc/codecs/wm8350.c
@@ -1340,9 +1340,10 @@ static int wm8350_resume(struct platform_device *pdev)
1340 return 0; 1340 return 0;
1341} 1341}
1342 1342
1343static void wm8350_hp_jack_handler(struct wm8350 *wm8350, int irq, void *data) 1343static irqreturn_t wm8350_hp_jack_handler(int irq, void *data)
1344{ 1344{
1345 struct wm8350_data *priv = data; 1345 struct wm8350_data *priv = data;
1346 struct wm8350 *wm8350 = priv->codec.control_data;
1346 u16 reg; 1347 u16 reg;
1347 int report; 1348 int report;
1348 int mask; 1349 int mask;
@@ -1365,7 +1366,7 @@ static void wm8350_hp_jack_handler(struct wm8350 *wm8350, int irq, void *data)
1365 1366
1366 if (!jack->jack) { 1367 if (!jack->jack) {
1367 dev_warn(wm8350->dev, "Jack interrupt called with no jack\n"); 1368 dev_warn(wm8350->dev, "Jack interrupt called with no jack\n");
1368 return; 1369 return IRQ_NONE;
1369 } 1370 }
1370 1371
1371 /* Debounce */ 1372 /* Debounce */
@@ -1378,6 +1379,8 @@ static void wm8350_hp_jack_handler(struct wm8350 *wm8350, int irq, void *data)
1378 report = 0; 1379 report = 0;
1379 1380
1380 snd_soc_jack_report(jack->jack, report, jack->report); 1381 snd_soc_jack_report(jack->jack, report, jack->report);
1382
1383 return IRQ_HANDLED;
1381} 1384}
1382 1385
1383/** 1386/**
@@ -1421,9 +1424,7 @@ int wm8350_hp_jack_detect(struct snd_soc_codec *codec, enum wm8350_jack which,
1421 wm8350_set_bits(wm8350, WM8350_JACK_DETECT, ena); 1424 wm8350_set_bits(wm8350, WM8350_JACK_DETECT, ena);
1422 1425
1423 /* Sync status */ 1426 /* Sync status */
1424 wm8350_hp_jack_handler(wm8350, irq, priv); 1427 wm8350_hp_jack_handler(irq, priv);
1425
1426 wm8350_unmask_irq(wm8350, irq);
1427 1428
1428 return 0; 1429 return 0;
1429} 1430}
@@ -1482,12 +1483,16 @@ static int wm8350_probe(struct platform_device *pdev)
1482 wm8350_set_bits(wm8350, WM8350_ROUT2_VOLUME, 1483 wm8350_set_bits(wm8350, WM8350_ROUT2_VOLUME,
1483 WM8350_OUT2_VU | WM8350_OUT2R_MUTE); 1484 WM8350_OUT2_VU | WM8350_OUT2R_MUTE);
1484 1485
1485 wm8350_mask_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_L); 1486 /* Make sure jack detect is disabled to start off with */
1486 wm8350_mask_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_R); 1487 wm8350_clear_bits(wm8350, WM8350_JACK_DETECT,
1488 WM8350_JDL_ENA | WM8350_JDR_ENA);
1489
1487 wm8350_register_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_L, 1490 wm8350_register_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_L,
1488 wm8350_hp_jack_handler, priv); 1491 wm8350_hp_jack_handler, 0, "Left jack detect",
1492 priv);
1489 wm8350_register_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_R, 1493 wm8350_register_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_R,
1490 wm8350_hp_jack_handler, priv); 1494 wm8350_hp_jack_handler, 0, "Right jack detect",
1495 priv);
1491 1496
1492 ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1); 1497 ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1);
1493 if (ret < 0) { 1498 if (ret < 0) {
@@ -1516,8 +1521,6 @@ static int wm8350_remove(struct platform_device *pdev)
1516 WM8350_JDL_ENA | WM8350_JDR_ENA); 1521 WM8350_JDL_ENA | WM8350_JDR_ENA);
1517 wm8350_clear_bits(wm8350, WM8350_POWER_MGMT_4, WM8350_TOCLK_ENA); 1522 wm8350_clear_bits(wm8350, WM8350_POWER_MGMT_4, WM8350_TOCLK_ENA);
1518 1523
1519 wm8350_mask_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_L);
1520 wm8350_mask_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_R);
1521 wm8350_free_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_L); 1524 wm8350_free_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_L);
1522 wm8350_free_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_R); 1525 wm8350_free_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_R);
1523 1526
diff --git a/sound/soc/codecs/wm8510.c b/sound/soc/codecs/wm8510.c
index 265e68c75df8..af8cb6995a1f 100644
--- a/sound/soc/codecs/wm8510.c
+++ b/sound/soc/codecs/wm8510.c
@@ -424,23 +424,23 @@ static int wm8510_pcm_hw_params(struct snd_pcm_substream *substream,
424 424
425 /* filter coefficient */ 425 /* filter coefficient */
426 switch (params_rate(params)) { 426 switch (params_rate(params)) {
427 case SNDRV_PCM_RATE_8000: 427 case 8000:
428 adn |= 0x5 << 1; 428 adn |= 0x5 << 1;
429 break; 429 break;
430 case SNDRV_PCM_RATE_11025: 430 case 11025:
431 adn |= 0x4 << 1; 431 adn |= 0x4 << 1;
432 break; 432 break;
433 case SNDRV_PCM_RATE_16000: 433 case 16000:
434 adn |= 0x3 << 1; 434 adn |= 0x3 << 1;
435 break; 435 break;
436 case SNDRV_PCM_RATE_22050: 436 case 22050:
437 adn |= 0x2 << 1; 437 adn |= 0x2 << 1;
438 break; 438 break;
439 case SNDRV_PCM_RATE_32000: 439 case 32000:
440 adn |= 0x1 << 1; 440 adn |= 0x1 << 1;
441 break; 441 break;
442 case SNDRV_PCM_RATE_44100: 442 case 44100:
443 case SNDRV_PCM_RATE_48000: 443 case 48000:
444 break; 444 break;
445 } 445 }
446 446
diff --git a/sound/soc/codecs/wm8900.c b/sound/soc/codecs/wm8900.c
index c9438dd62df3..dbc368c08263 100644
--- a/sound/soc/codecs/wm8900.c
+++ b/sound/soc/codecs/wm8900.c
@@ -199,7 +199,7 @@ static void wm8900_reset(struct snd_soc_codec *codec)
199 snd_soc_write(codec, WM8900_REG_RESET, 0); 199 snd_soc_write(codec, WM8900_REG_RESET, 0);
200 200
201 memcpy(codec->reg_cache, wm8900_reg_defaults, 201 memcpy(codec->reg_cache, wm8900_reg_defaults,
202 sizeof(codec->reg_cache)); 202 sizeof(wm8900_reg_defaults));
203} 203}
204 204
205static int wm8900_hp_event(struct snd_soc_dapm_widget *w, 205static int wm8900_hp_event(struct snd_soc_dapm_widget *w,
diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c
index 3d850b97037a..31e39ffd1d8e 100644
--- a/sound/soc/codecs/wm8940.c
+++ b/sound/soc/codecs/wm8940.c
@@ -378,23 +378,23 @@ static int wm8940_i2s_hw_params(struct snd_pcm_substream *substream,
378 iface |= (1 << 9); 378 iface |= (1 << 9);
379 379
380 switch (params_rate(params)) { 380 switch (params_rate(params)) {
381 case SNDRV_PCM_RATE_8000: 381 case 8000:
382 addcntrl |= (0x5 << 1); 382 addcntrl |= (0x5 << 1);
383 break; 383 break;
384 case SNDRV_PCM_RATE_11025: 384 case 11025:
385 addcntrl |= (0x4 << 1); 385 addcntrl |= (0x4 << 1);
386 break; 386 break;
387 case SNDRV_PCM_RATE_16000: 387 case 16000:
388 addcntrl |= (0x3 << 1); 388 addcntrl |= (0x3 << 1);
389 break; 389 break;
390 case SNDRV_PCM_RATE_22050: 390 case 22050:
391 addcntrl |= (0x2 << 1); 391 addcntrl |= (0x2 << 1);
392 break; 392 break;
393 case SNDRV_PCM_RATE_32000: 393 case 32000:
394 addcntrl |= (0x1 << 1); 394 addcntrl |= (0x1 << 1);
395 break; 395 break;
396 case SNDRV_PCM_RATE_44100: 396 case 44100:
397 case SNDRV_PCM_RATE_48000: 397 case 48000:
398 break; 398 break;
399 } 399 }
400 ret = snd_soc_write(codec, WM8940_ADDCNTRL, addcntrl); 400 ret = snd_soc_write(codec, WM8940_ADDCNTRL, addcntrl);
diff --git a/sound/soc/codecs/wm8974.c b/sound/soc/codecs/wm8974.c
index 81c57b5c591c..8812751da8c9 100644
--- a/sound/soc/codecs/wm8974.c
+++ b/sound/soc/codecs/wm8974.c
@@ -47,7 +47,7 @@ static const u16 wm8974_reg[WM8974_CACHEREGNUM] = {
47}; 47};
48 48
49#define WM8974_POWER1_BIASEN 0x08 49#define WM8974_POWER1_BIASEN 0x08
50#define WM8974_POWER1_BUFIOEN 0x10 50#define WM8974_POWER1_BUFIOEN 0x04
51 51
52struct wm8974_priv { 52struct wm8974_priv {
53 struct snd_soc_codec codec; 53 struct snd_soc_codec codec;
@@ -482,23 +482,23 @@ static int wm8974_pcm_hw_params(struct snd_pcm_substream *substream,
482 482
483 /* filter coefficient */ 483 /* filter coefficient */
484 switch (params_rate(params)) { 484 switch (params_rate(params)) {
485 case SNDRV_PCM_RATE_8000: 485 case 8000:
486 adn |= 0x5 << 1; 486 adn |= 0x5 << 1;
487 break; 487 break;
488 case SNDRV_PCM_RATE_11025: 488 case 11025:
489 adn |= 0x4 << 1; 489 adn |= 0x4 << 1;
490 break; 490 break;
491 case SNDRV_PCM_RATE_16000: 491 case 16000:
492 adn |= 0x3 << 1; 492 adn |= 0x3 << 1;
493 break; 493 break;
494 case SNDRV_PCM_RATE_22050: 494 case 22050:
495 adn |= 0x2 << 1; 495 adn |= 0x2 << 1;
496 break; 496 break;
497 case SNDRV_PCM_RATE_32000: 497 case 32000:
498 adn |= 0x1 << 1; 498 adn |= 0x1 << 1;
499 break; 499 break;
500 case SNDRV_PCM_RATE_44100: 500 case 44100:
501 case SNDRV_PCM_RATE_48000: 501 case 48000:
502 break; 502 break;
503 } 503 }
504 504
diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c
index 0ac1215dcd9b..e237bf615129 100644
--- a/sound/soc/codecs/wm9712.c
+++ b/sound/soc/codecs/wm9712.c
@@ -463,7 +463,8 @@ static int ac97_write(struct snd_soc_codec *codec, unsigned int reg,
463{ 463{
464 u16 *cache = codec->reg_cache; 464 u16 *cache = codec->reg_cache;
465 465
466 soc_ac97_ops.write(codec->ac97, reg, val); 466 if (reg < 0x7c)
467 soc_ac97_ops.write(codec->ac97, reg, val);
467 reg = reg >> 1; 468 reg = reg >> 1;
468 if (reg < (ARRAY_SIZE(wm9712_reg))) 469 if (reg < (ARRAY_SIZE(wm9712_reg)))
469 cache[reg] = val; 470 cache[reg] = val;
diff --git a/sound/soc/imx/mx27vis_wm8974.c b/sound/soc/imx/mx27vis_wm8974.c
index 0267d2d91685..07d2a248438c 100644
--- a/sound/soc/imx/mx27vis_wm8974.c
+++ b/sound/soc/imx/mx27vis_wm8974.c
@@ -180,7 +180,8 @@ static int mx27vis_hifi_hw_free(struct snd_pcm_substream *substream)
180 struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; 180 struct snd_soc_dai *codec_dai = rtd->dai->codec_dai;
181 181
182 /* disable the PLL */ 182 /* disable the PLL */
183 return codec_dai->ops->set_pll(codec_dai, IGNORED_ARG, 0, 0); 183 return codec_dai->ops->set_pll(codec_dai, IGNORED_ARG, IGNORED_ARG,
184 0, 0);
184} 185}
185 186
186/* 187/*
diff --git a/sound/soc/omap/sdp3430.c b/sound/soc/omap/sdp3430.c
index c071f9603a38..3c85c0f92823 100644
--- a/sound/soc/omap/sdp3430.c
+++ b/sound/soc/omap/sdp3430.c
@@ -24,7 +24,7 @@
24 24
25#include <linux/clk.h> 25#include <linux/clk.h>
26#include <linux/platform_device.h> 26#include <linux/platform_device.h>
27#include <linux/i2c/twl4030.h> 27#include <linux/i2c/twl.h>
28#include <sound/core.h> 28#include <sound/core.h>
29#include <sound/pcm.h> 29#include <sound/pcm.h>
30#include <sound/soc.h> 30#include <sound/soc.h>
@@ -321,11 +321,11 @@ static int __init sdp3430_soc_init(void)
321 *(unsigned int *)sdp3430_dai[1].cpu_dai->private_data = 2; /* McBSP3 */ 321 *(unsigned int *)sdp3430_dai[1].cpu_dai->private_data = 2; /* McBSP3 */
322 322
323 /* Set TWL4030 GPIO6 as EXTMUTE signal */ 323 /* Set TWL4030 GPIO6 as EXTMUTE signal */
324 twl4030_i2c_read_u8(TWL4030_MODULE_INTBR, &pin_mux, 324 twl_i2c_read_u8(TWL4030_MODULE_INTBR, &pin_mux,
325 TWL4030_INTBR_PMBR1); 325 TWL4030_INTBR_PMBR1);
326 pin_mux &= ~TWL4030_GPIO6_PWM0_MUTE(0x03); 326 pin_mux &= ~TWL4030_GPIO6_PWM0_MUTE(0x03);
327 pin_mux |= TWL4030_GPIO6_PWM0_MUTE(0x02); 327 pin_mux |= TWL4030_GPIO6_PWM0_MUTE(0x02);
328 twl4030_i2c_write_u8(TWL4030_MODULE_INTBR, pin_mux, 328 twl_i2c_write_u8(TWL4030_MODULE_INTBR, pin_mux,
329 TWL4030_INTBR_PMBR1); 329 TWL4030_INTBR_PMBR1);
330 330
331 ret = platform_device_add(sdp3430_snd_device); 331 ret = platform_device_add(sdp3430_snd_device);
diff --git a/sound/soc/s3c24xx/s3c24xx_simtec.c b/sound/soc/s3c24xx/s3c24xx_simtec.c
index d441c3b64631..4984754f3298 100644
--- a/sound/soc/s3c24xx/s3c24xx_simtec.c
+++ b/sound/soc/s3c24xx/s3c24xx_simtec.c
@@ -312,7 +312,7 @@ int simtec_audio_resume(struct device *dev)
312 return 0; 312 return 0;
313} 313}
314 314
315struct dev_pm_ops simtec_audio_pmops = { 315const struct dev_pm_ops simtec_audio_pmops = {
316 .resume = simtec_audio_resume, 316 .resume = simtec_audio_resume,
317}; 317};
318EXPORT_SYMBOL_GPL(simtec_audio_pmops); 318EXPORT_SYMBOL_GPL(simtec_audio_pmops);
diff --git a/sound/soc/s3c24xx/s3c24xx_simtec.h b/sound/soc/s3c24xx/s3c24xx_simtec.h
index 2714203af161..e18faee30cce 100644
--- a/sound/soc/s3c24xx/s3c24xx_simtec.h
+++ b/sound/soc/s3c24xx/s3c24xx_simtec.h
@@ -15,7 +15,7 @@ extern int simtec_audio_core_probe(struct platform_device *pdev,
15extern int simtec_audio_remove(struct platform_device *pdev); 15extern int simtec_audio_remove(struct platform_device *pdev);
16 16
17#ifdef CONFIG_PM 17#ifdef CONFIG_PM
18extern struct dev_pm_ops simtec_audio_pmops; 18extern const struct dev_pm_ops simtec_audio_pmops;
19#define simtec_audio_pm &simtec_audio_pmops 19#define simtec_audio_pm &simtec_audio_pmops
20#else 20#else
21#define simtec_audio_pm NULL 21#define simtec_audio_pm NULL
diff --git a/sound/soc/sh/fsi-ak4642.c b/sound/soc/sh/fsi-ak4642.c
index c7af09729c6e..5263ab18f827 100644
--- a/sound/soc/sh/fsi-ak4642.c
+++ b/sound/soc/sh/fsi-ak4642.c
@@ -42,42 +42,12 @@ static struct snd_soc_device fsi_snd_devdata = {
42 .codec_dev = &soc_codec_dev_ak4642, 42 .codec_dev = &soc_codec_dev_ak4642,
43}; 43};
44 44
45#define AK4642_BUS 0
46#define AK4642_ADR 0x12
47static int ak4642_add_i2c_device(void)
48{
49 struct i2c_board_info info;
50 struct i2c_adapter *adapter;
51 struct i2c_client *client;
52
53 memset(&info, 0, sizeof(struct i2c_board_info));
54 info.addr = AK4642_ADR;
55 strlcpy(info.type, "ak4642", I2C_NAME_SIZE);
56
57 adapter = i2c_get_adapter(AK4642_BUS);
58 if (!adapter) {
59 printk(KERN_DEBUG "can't get i2c adapter\n");
60 return -ENODEV;
61 }
62
63 client = i2c_new_device(adapter, &info);
64 i2c_put_adapter(adapter);
65 if (!client) {
66 printk(KERN_DEBUG "can't add i2c device\n");
67 return -ENODEV;
68 }
69
70 return 0;
71}
72
73static struct platform_device *fsi_snd_device; 45static struct platform_device *fsi_snd_device;
74 46
75static int __init fsi_ak4642_init(void) 47static int __init fsi_ak4642_init(void)
76{ 48{
77 int ret = -ENOMEM; 49 int ret = -ENOMEM;
78 50
79 ak4642_add_i2c_device();
80
81 fsi_snd_device = platform_device_alloc("soc-audio", -1); 51 fsi_snd_device = platform_device_alloc("soc-audio", -1);
82 if (!fsi_snd_device) 52 if (!fsi_snd_device)
83 goto out; 53 goto out;
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c
index 9c49c11c43ce..42813b808389 100644
--- a/sound/soc/sh/fsi.c
+++ b/sound/soc/sh/fsi.c
@@ -876,7 +876,7 @@ static int fsi_probe(struct platform_device *pdev)
876 876
877 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 877 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
878 irq = platform_get_irq(pdev, 0); 878 irq = platform_get_irq(pdev, 0);
879 if (!res || !irq) { 879 if (!res || (int)irq <= 0) {
880 dev_err(&pdev->dev, "Not enough FSI platform resources.\n"); 880 dev_err(&pdev->dev, "Not enough FSI platform resources.\n");
881 ret = -ENODEV; 881 ret = -ENODEV;
882 goto exit; 882 goto exit;
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index ef8f28284cb9..0a6440c6f54a 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1236,7 +1236,7 @@ static int soc_poweroff(struct device *dev)
1236 return 0; 1236 return 0;
1237} 1237}
1238 1238
1239static struct dev_pm_ops soc_pm_ops = { 1239static const struct dev_pm_ops soc_pm_ops = {
1240 .suspend = soc_suspend, 1240 .suspend = soc_suspend,
1241 .resume = soc_resume, 1241 .resume = soc_resume,
1242 .poweroff = soc_poweroff, 1242 .poweroff = soc_poweroff,