aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/blackfin/bf5xx-ad73311.c2
-rw-r--r--sound/soc/codecs/ssm2602.c3
-rw-r--r--sound/soc/codecs/wm8753.c4
-rw-r--r--sound/soc/codecs/wm8962.c26
-rw-r--r--sound/soc/omap/mcpdm.c2
-rw-r--r--sound/soc/omap/mcpdm.h2
-rw-r--r--sound/soc/omap/omap-mcbsp.c6
-rw-r--r--sound/soc/pxa/zylonite.c8
-rw-r--r--sound/soc/soc-core.c18
9 files changed, 32 insertions, 39 deletions
diff --git a/sound/soc/blackfin/bf5xx-ad73311.c b/sound/soc/blackfin/bf5xx-ad73311.c
index 732a247f2527..b94eb7ef7d16 100644
--- a/sound/soc/blackfin/bf5xx-ad73311.c
+++ b/sound/soc/blackfin/bf5xx-ad73311.c
@@ -128,7 +128,7 @@ static int snd_ad73311_configure(void)
128 return 0; 128 return 0;
129} 129}
130 130
131static int bf5xx_probe(struct platform_device *pdev) 131static int bf5xx_probe(struct snd_soc_card *card)
132{ 132{
133 int err; 133 int err;
134 if (gpio_request(GPIO_SE, "AD73311_SE")) { 134 if (gpio_request(GPIO_SE, "AD73311_SE")) {
diff --git a/sound/soc/codecs/ssm2602.c b/sound/soc/codecs/ssm2602.c
index 84f4ad568556..9801cd7cfcb5 100644
--- a/sound/soc/codecs/ssm2602.c
+++ b/sound/soc/codecs/ssm2602.c
@@ -431,7 +431,8 @@ static int ssm2602_set_dai_fmt(struct snd_soc_dai *codec_dai,
431static int ssm2602_set_bias_level(struct snd_soc_codec *codec, 431static int ssm2602_set_bias_level(struct snd_soc_codec *codec,
432 enum snd_soc_bias_level level) 432 enum snd_soc_bias_level level)
433{ 433{
434 u16 reg = snd_soc_read(codec, SSM2602_PWR) & 0xff7f; 434 u16 reg = snd_soc_read(codec, SSM2602_PWR);
435 reg &= ~(PWR_POWER_OFF | PWR_OSC_PDN);
435 436
436 switch (level) { 437 switch (level) {
437 case SND_SOC_BIAS_ON: 438 case SND_SOC_BIAS_ON:
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
index ffa2ffe5ec11..aa091a0d8187 100644
--- a/sound/soc/codecs/wm8753.c
+++ b/sound/soc/codecs/wm8753.c
@@ -1454,8 +1454,8 @@ static int wm8753_probe(struct snd_soc_codec *codec)
1454 /* set the update bits */ 1454 /* set the update bits */
1455 snd_soc_update_bits(codec, WM8753_LDAC, 0x0100, 0x0100); 1455 snd_soc_update_bits(codec, WM8753_LDAC, 0x0100, 0x0100);
1456 snd_soc_update_bits(codec, WM8753_RDAC, 0x0100, 0x0100); 1456 snd_soc_update_bits(codec, WM8753_RDAC, 0x0100, 0x0100);
1457 snd_soc_update_bits(codec, WM8753_LDAC, 0x0100, 0x0100); 1457 snd_soc_update_bits(codec, WM8753_LADC, 0x0100, 0x0100);
1458 snd_soc_update_bits(codec, WM8753_RDAC, 0x0100, 0x0100); 1458 snd_soc_update_bits(codec, WM8753_RADC, 0x0100, 0x0100);
1459 snd_soc_update_bits(codec, WM8753_LOUT1V, 0x0100, 0x0100); 1459 snd_soc_update_bits(codec, WM8753_LOUT1V, 0x0100, 0x0100);
1460 snd_soc_update_bits(codec, WM8753_ROUT1V, 0x0100, 0x0100); 1460 snd_soc_update_bits(codec, WM8753_ROUT1V, 0x0100, 0x0100);
1461 snd_soc_update_bits(codec, WM8753_LOUT2V, 0x0100, 0x0100); 1461 snd_soc_update_bits(codec, WM8753_LOUT2V, 0x0100, 0x0100);
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index 1725550c293e..d2c315fa1b9b 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -3479,31 +3479,6 @@ int wm8962_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack)
3479} 3479}
3480EXPORT_SYMBOL_GPL(wm8962_mic_detect); 3480EXPORT_SYMBOL_GPL(wm8962_mic_detect);
3481 3481
3482#ifdef CONFIG_PM
3483static int wm8962_resume(struct snd_soc_codec *codec)
3484{
3485 u16 *reg_cache = codec->reg_cache;
3486 int i;
3487
3488 /* Restore the registers */
3489 for (i = 1; i < codec->driver->reg_cache_size; i++) {
3490 switch (i) {
3491 case WM8962_SOFTWARE_RESET:
3492 continue;
3493 default:
3494 break;
3495 }
3496
3497 if (reg_cache[i] != wm8962_reg[i])
3498 snd_soc_write(codec, i, reg_cache[i]);
3499 }
3500
3501 return 0;
3502}
3503#else
3504#define wm8962_resume NULL
3505#endif
3506
3507#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) 3482#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
3508static int beep_rates[] = { 3483static int beep_rates[] = {
3509 500, 1000, 2000, 4000, 3484 500, 1000, 2000, 4000,
@@ -4015,7 +3990,6 @@ static int wm8962_remove(struct snd_soc_codec *codec)
4015static struct snd_soc_codec_driver soc_codec_dev_wm8962 = { 3990static struct snd_soc_codec_driver soc_codec_dev_wm8962 = {
4016 .probe = wm8962_probe, 3991 .probe = wm8962_probe,
4017 .remove = wm8962_remove, 3992 .remove = wm8962_remove,
4018 .resume = wm8962_resume,
4019 .set_bias_level = wm8962_set_bias_level, 3993 .set_bias_level = wm8962_set_bias_level,
4020 .reg_cache_size = WM8962_MAX_REGISTER + 1, 3994 .reg_cache_size = WM8962_MAX_REGISTER + 1,
4021 .reg_word_size = sizeof(u16), 3995 .reg_word_size = sizeof(u16),
diff --git a/sound/soc/omap/mcpdm.c b/sound/soc/omap/mcpdm.c
index 928f03707451..50e59194ad81 100644
--- a/sound/soc/omap/mcpdm.c
+++ b/sound/soc/omap/mcpdm.c
@@ -449,7 +449,7 @@ exit:
449 return ret; 449 return ret;
450} 450}
451 451
452int __devexit omap_mcpdm_remove(struct platform_device *pdev) 452int omap_mcpdm_remove(struct platform_device *pdev)
453{ 453{
454 struct omap_mcpdm *mcpdm_ptr = platform_get_drvdata(pdev); 454 struct omap_mcpdm *mcpdm_ptr = platform_get_drvdata(pdev);
455 455
diff --git a/sound/soc/omap/mcpdm.h b/sound/soc/omap/mcpdm.h
index df3e16fb51f3..20c20a8649fe 100644
--- a/sound/soc/omap/mcpdm.h
+++ b/sound/soc/omap/mcpdm.h
@@ -150,4 +150,4 @@ extern int omap_mcpdm_request(void);
150extern void omap_mcpdm_free(void); 150extern void omap_mcpdm_free(void);
151extern int omap_mcpdm_set_offset(int offset1, int offset2); 151extern int omap_mcpdm_set_offset(int offset1, int offset2);
152int __devinit omap_mcpdm_probe(struct platform_device *pdev); 152int __devinit omap_mcpdm_probe(struct platform_device *pdev);
153int __devexit omap_mcpdm_remove(struct platform_device *pdev); 153int omap_mcpdm_remove(struct platform_device *pdev);
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c
index ebcc2d4d2b18..478d60778453 100644
--- a/sound/soc/omap/omap-mcbsp.c
+++ b/sound/soc/omap/omap-mcbsp.c
@@ -516,6 +516,12 @@ static int omap_mcbsp_dai_set_dai_sysclk(struct snd_soc_dai *cpu_dai,
516 struct omap_mcbsp_reg_cfg *regs = &mcbsp_data->regs; 516 struct omap_mcbsp_reg_cfg *regs = &mcbsp_data->regs;
517 int err = 0; 517 int err = 0;
518 518
519 if (mcbsp_data->active)
520 if (freq == mcbsp_data->in_freq)
521 return 0;
522 else
523 return -EBUSY;
524
519 /* The McBSP signal muxing functions are only available on McBSP1 */ 525 /* The McBSP signal muxing functions are only available on McBSP1 */
520 if (clk_id == OMAP_MCBSP_CLKR_SRC_CLKR || 526 if (clk_id == OMAP_MCBSP_CLKR_SRC_CLKR ||
521 clk_id == OMAP_MCBSP_CLKR_SRC_CLKX || 527 clk_id == OMAP_MCBSP_CLKR_SRC_CLKX ||
diff --git a/sound/soc/pxa/zylonite.c b/sound/soc/pxa/zylonite.c
index b6445757fc54..2b8350b52232 100644
--- a/sound/soc/pxa/zylonite.c
+++ b/sound/soc/pxa/zylonite.c
@@ -196,20 +196,20 @@ static int zylonite_probe(struct snd_soc_card *card)
196 if (clk_pout) { 196 if (clk_pout) {
197 pout = clk_get(NULL, "CLK_POUT"); 197 pout = clk_get(NULL, "CLK_POUT");
198 if (IS_ERR(pout)) { 198 if (IS_ERR(pout)) {
199 dev_err(&pdev->dev, "Unable to obtain CLK_POUT: %ld\n", 199 dev_err(card->dev, "Unable to obtain CLK_POUT: %ld\n",
200 PTR_ERR(pout)); 200 PTR_ERR(pout));
201 return PTR_ERR(pout); 201 return PTR_ERR(pout);
202 } 202 }
203 203
204 ret = clk_enable(pout); 204 ret = clk_enable(pout);
205 if (ret != 0) { 205 if (ret != 0) {
206 dev_err(&pdev->dev, "Unable to enable CLK_POUT: %d\n", 206 dev_err(card->dev, "Unable to enable CLK_POUT: %d\n",
207 ret); 207 ret);
208 clk_put(pout); 208 clk_put(pout);
209 return ret; 209 return ret;
210 } 210 }
211 211
212 dev_dbg(&pdev->dev, "MCLK enabled at %luHz\n", 212 dev_dbg(card->dev, "MCLK enabled at %luHz\n",
213 clk_get_rate(pout)); 213 clk_get_rate(pout));
214 } 214 }
215 215
@@ -241,7 +241,7 @@ static int zylonite_resume_pre(struct snd_soc_card *card)
241 if (clk_pout) { 241 if (clk_pout) {
242 ret = clk_enable(pout); 242 ret = clk_enable(pout);
243 if (ret != 0) 243 if (ret != 0)
244 dev_err(&pdev->dev, "Unable to enable CLK_POUT: %d\n", 244 dev_err(card->dev, "Unable to enable CLK_POUT: %d\n",
245 ret); 245 ret);
246 } 246 }
247 247
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index d2ef014af215..ef69f5a02709 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -30,6 +30,7 @@
30#include <linux/bitops.h> 30#include <linux/bitops.h>
31#include <linux/debugfs.h> 31#include <linux/debugfs.h>
32#include <linux/platform_device.h> 32#include <linux/platform_device.h>
33#include <linux/ctype.h>
33#include <linux/slab.h> 34#include <linux/slab.h>
34#include <sound/ac97_codec.h> 35#include <sound/ac97_codec.h>
35#include <sound/core.h> 36#include <sound/core.h>
@@ -1434,9 +1435,20 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card)
1434 "%s", card->name); 1435 "%s", card->name);
1435 snprintf(card->snd_card->longname, sizeof(card->snd_card->longname), 1436 snprintf(card->snd_card->longname, sizeof(card->snd_card->longname),
1436 "%s", card->long_name ? card->long_name : card->name); 1437 "%s", card->long_name ? card->long_name : card->name);
1437 if (card->driver_name) 1438 snprintf(card->snd_card->driver, sizeof(card->snd_card->driver),
1438 strlcpy(card->snd_card->driver, card->driver_name, 1439 "%s", card->driver_name ? card->driver_name : card->name);
1439 sizeof(card->snd_card->driver)); 1440 for (i = 0; i < ARRAY_SIZE(card->snd_card->driver); i++) {
1441 switch (card->snd_card->driver[i]) {
1442 case '_':
1443 case '-':
1444 case '\0':
1445 break;
1446 default:
1447 if (!isalnum(card->snd_card->driver[i]))
1448 card->snd_card->driver[i] = '_';
1449 break;
1450 }
1451 }
1440 1452
1441 if (card->late_probe) { 1453 if (card->late_probe) {
1442 ret = card->late_probe(card); 1454 ret = card->late_probe(card);