diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-07-23 08:34:42 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-07-23 08:34:42 -0400 |
commit | c1b623d9e4117d18d244e9b7fb30d2c27aeaf074 (patch) | |
tree | 4359ba3978e19d8659aea4832391480dc36ce513 /sound | |
parent | 108cc108a3bb42fe4705df1317ff98e1e29428a6 (diff) | |
parent | 15d47763b354256053c390a9b7bc9f2b4f197711 (diff) |
Merge tag 'asoc-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Additional updates for 3.6
A few more fixes for 3.6, some of which are relatively important -
they've all been in -next for at least some time.
- DAPM fixes for the recent locking changes.
- Fix for _PRE and _POST widgets (which have been broken for a few
releases now).
- A couple of minor driver updates.
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/omap/omap-mcpdm.c | 1 | ||||
-rw-r--r-- | sound/soc/pxa/mioa701_wm9713.c | 33 | ||||
-rw-r--r-- | sound/soc/soc-dapm.c | 28 |
3 files changed, 33 insertions, 29 deletions
diff --git a/sound/soc/omap/omap-mcpdm.c b/sound/soc/omap/omap-mcpdm.c index 59d47ab5b15d..2c66e2498a45 100644 --- a/sound/soc/omap/omap-mcpdm.c +++ b/sound/soc/omap/omap-mcpdm.c | |||
@@ -527,6 +527,7 @@ static struct platform_driver asoc_mcpdm_driver = { | |||
527 | 527 | ||
528 | module_platform_driver(asoc_mcpdm_driver); | 528 | module_platform_driver(asoc_mcpdm_driver); |
529 | 529 | ||
530 | MODULE_ALIAS("platform:omap-mcpdm"); | ||
530 | MODULE_AUTHOR("Misael Lopez Cruz <misael.lopez@ti.com>"); | 531 | MODULE_AUTHOR("Misael Lopez Cruz <misael.lopez@ti.com>"); |
531 | MODULE_DESCRIPTION("OMAP PDM SoC Interface"); | 532 | MODULE_DESCRIPTION("OMAP PDM SoC Interface"); |
532 | MODULE_LICENSE("GPL"); | 533 | MODULE_LICENSE("GPL"); |
diff --git a/sound/soc/pxa/mioa701_wm9713.c b/sound/soc/pxa/mioa701_wm9713.c index 9c585af59b5f..8687c1c65d29 100644 --- a/sound/soc/pxa/mioa701_wm9713.c +++ b/sound/soc/pxa/mioa701_wm9713.c | |||
@@ -186,36 +186,27 @@ static struct snd_soc_card mioa701 = { | |||
186 | .num_links = ARRAY_SIZE(mioa701_dai), | 186 | .num_links = ARRAY_SIZE(mioa701_dai), |
187 | }; | 187 | }; |
188 | 188 | ||
189 | static struct platform_device *mioa701_snd_device; | 189 | static int __devinit mioa701_wm9713_probe(struct platform_device *pdev) |
190 | |||
191 | static int mioa701_wm9713_probe(struct platform_device *pdev) | ||
192 | { | 190 | { |
193 | int ret; | 191 | int rc; |
194 | 192 | ||
195 | if (!machine_is_mioa701()) | 193 | if (!machine_is_mioa701()) |
196 | return -ENODEV; | 194 | return -ENODEV; |
197 | 195 | ||
198 | dev_warn(&pdev->dev, "Be warned that incorrect mixers/muxes setup will" | 196 | mioa701.dev = &pdev->dev; |
199 | "lead to overheating and possible destruction of your device." | 197 | rc = snd_soc_register_card(&mioa701); |
200 | "Do not use without a good knowledge of mio's board design!\n"); | 198 | if (!rc) |
201 | 199 | dev_warn(&pdev->dev, "Be warned that incorrect mixers/muxes setup will" | |
202 | mioa701_snd_device = platform_device_alloc("soc-audio", -1); | 200 | "lead to overheating and possible destruction of your device." |
203 | if (!mioa701_snd_device) | 201 | " Do not use without a good knowledge of mio's board design!\n"); |
204 | return -ENOMEM; | 202 | return rc; |
205 | |||
206 | platform_set_drvdata(mioa701_snd_device, &mioa701); | ||
207 | |||
208 | ret = platform_device_add(mioa701_snd_device); | ||
209 | if (!ret) | ||
210 | return 0; | ||
211 | |||
212 | platform_device_put(mioa701_snd_device); | ||
213 | return ret; | ||
214 | } | 203 | } |
215 | 204 | ||
216 | static int __devexit mioa701_wm9713_remove(struct platform_device *pdev) | 205 | static int __devexit mioa701_wm9713_remove(struct platform_device *pdev) |
217 | { | 206 | { |
218 | platform_device_unregister(mioa701_snd_device); | 207 | struct snd_soc_card *card = platform_get_drvdata(pdev); |
208 | |||
209 | snd_soc_unregister_card(card); | ||
219 | return 0; | 210 | return 0; |
220 | } | 211 | } |
221 | 212 | ||
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index f7a13f720529..4d181df95dc3 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -291,9 +291,9 @@ static int snd_soc_dapm_set_bias_level(struct snd_soc_dapm_context *dapm, | |||
291 | if (dapm->codec->driver->set_bias_level) | 291 | if (dapm->codec->driver->set_bias_level) |
292 | ret = dapm->codec->driver->set_bias_level(dapm->codec, | 292 | ret = dapm->codec->driver->set_bias_level(dapm->codec, |
293 | level); | 293 | level); |
294 | else | 294 | } else |
295 | dapm->bias_level = level; | 295 | dapm->bias_level = level; |
296 | } | 296 | |
297 | if (ret != 0) | 297 | if (ret != 0) |
298 | goto out; | 298 | goto out; |
299 | 299 | ||
@@ -324,11 +324,10 @@ static void dapm_set_path_status(struct snd_soc_dapm_widget *w, | |||
324 | 324 | ||
325 | val = soc_widget_read(w, reg); | 325 | val = soc_widget_read(w, reg); |
326 | val = (val >> shift) & mask; | 326 | val = (val >> shift) & mask; |
327 | if (invert) | ||
328 | val = max - val; | ||
327 | 329 | ||
328 | if ((invert && !val) || (!invert && val)) | 330 | p->connect = !!val; |
329 | p->connect = 1; | ||
330 | else | ||
331 | p->connect = 0; | ||
332 | } | 331 | } |
333 | break; | 332 | break; |
334 | case snd_soc_dapm_mux: { | 333 | case snd_soc_dapm_mux: { |
@@ -1598,7 +1597,15 @@ static int dapm_power_widgets(struct snd_soc_dapm_context *dapm, int event) | |||
1598 | } | 1597 | } |
1599 | 1598 | ||
1600 | list_for_each_entry(w, &card->widgets, list) { | 1599 | list_for_each_entry(w, &card->widgets, list) { |
1601 | list_del_init(&w->dirty); | 1600 | switch (w->id) { |
1601 | case snd_soc_dapm_pre: | ||
1602 | case snd_soc_dapm_post: | ||
1603 | /* These widgets always need to be powered */ | ||
1604 | break; | ||
1605 | default: | ||
1606 | list_del_init(&w->dirty); | ||
1607 | break; | ||
1608 | } | ||
1602 | 1609 | ||
1603 | if (w->power) { | 1610 | if (w->power) { |
1604 | d = w->dapm; | 1611 | d = w->dapm; |
@@ -3660,10 +3667,13 @@ EXPORT_SYMBOL_GPL(snd_soc_dapm_free); | |||
3660 | 3667 | ||
3661 | static void soc_dapm_shutdown_codec(struct snd_soc_dapm_context *dapm) | 3668 | static void soc_dapm_shutdown_codec(struct snd_soc_dapm_context *dapm) |
3662 | { | 3669 | { |
3670 | struct snd_soc_card *card = dapm->card; | ||
3663 | struct snd_soc_dapm_widget *w; | 3671 | struct snd_soc_dapm_widget *w; |
3664 | LIST_HEAD(down_list); | 3672 | LIST_HEAD(down_list); |
3665 | int powerdown = 0; | 3673 | int powerdown = 0; |
3666 | 3674 | ||
3675 | mutex_lock(&card->dapm_mutex); | ||
3676 | |||
3667 | list_for_each_entry(w, &dapm->card->widgets, list) { | 3677 | list_for_each_entry(w, &dapm->card->widgets, list) { |
3668 | if (w->dapm != dapm) | 3678 | if (w->dapm != dapm) |
3669 | continue; | 3679 | continue; |
@@ -3686,6 +3696,8 @@ static void soc_dapm_shutdown_codec(struct snd_soc_dapm_context *dapm) | |||
3686 | snd_soc_dapm_set_bias_level(dapm, | 3696 | snd_soc_dapm_set_bias_level(dapm, |
3687 | SND_SOC_BIAS_STANDBY); | 3697 | SND_SOC_BIAS_STANDBY); |
3688 | } | 3698 | } |
3699 | |||
3700 | mutex_unlock(&card->dapm_mutex); | ||
3689 | } | 3701 | } |
3690 | 3702 | ||
3691 | /* | 3703 | /* |