diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-09-23 09:26:37 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-09-23 09:26:37 -0400 |
commit | 3127b6aa752d1329dbd79f669b53027905d1976a (patch) | |
tree | 66358407c3ddec5a8cc4190321d03bb11522f755 /sound | |
parent | 362e4e49abe53e89d87455dfcd7c1bbaf08a839d (diff) | |
parent | f0e8ed858edb327802ee65fd695cc1538286226f (diff) |
Merge branch 'fix/asoc' into for-linus
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/blackfin/bf5xx-ad73311.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/wm8962.c | 26 | ||||
-rw-r--r-- | sound/soc/soc-core.c | 18 |
3 files changed, 16 insertions, 30 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 | ||
131 | static int bf5xx_probe(struct platform_device *pdev) | 131 | static 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/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 | } |
3480 | EXPORT_SYMBOL_GPL(wm8962_mic_detect); | 3480 | EXPORT_SYMBOL_GPL(wm8962_mic_detect); |
3481 | 3481 | ||
3482 | #ifdef CONFIG_PM | ||
3483 | static 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) |
3508 | static int beep_rates[] = { | 3483 | static 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) | |||
4015 | static struct snd_soc_codec_driver soc_codec_dev_wm8962 = { | 3990 | static 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/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); |