summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-07-23 14:34:42 +0200
committerTakashi Iwai <tiwai@suse.de>2012-07-23 14:34:42 +0200
commitc1b623d9e4117d18d244e9b7fb30d2c27aeaf074 (patch)
tree4359ba3978e19d8659aea4832391480dc36ce513 /sound
parent108cc108a3bb42fe4705df1317ff98e1e29428a6 (diff)
parent15d47763b354256053c390a9b7bc9f2b4f197711 (diff)
downloadlinux-stable-c1b623d9e4117d18d244e9b7fb30d2c27aeaf074.tar.gz
linux-stable-c1b623d9e4117d18d244e9b7fb30d2c27aeaf074.tar.bz2
linux-stable-c1b623d9e4117d18d244e9b7fb30d2c27aeaf074.zip
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.c1
-rw-r--r--sound/soc/pxa/mioa701_wm9713.c33
-rw-r--r--sound/soc/soc-dapm.c28
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 = {
module_platform_driver(asoc_mcpdm_driver);
+MODULE_ALIAS("platform:omap-mcpdm");
MODULE_AUTHOR("Misael Lopez Cruz <misael.lopez@ti.com>");
MODULE_DESCRIPTION("OMAP PDM SoC Interface");
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 = {
.num_links = ARRAY_SIZE(mioa701_dai),
};
-static struct platform_device *mioa701_snd_device;
-
-static int mioa701_wm9713_probe(struct platform_device *pdev)
+static int __devinit mioa701_wm9713_probe(struct platform_device *pdev)
{
- int ret;
+ int rc;
if (!machine_is_mioa701())
return -ENODEV;
- dev_warn(&pdev->dev, "Be warned that incorrect mixers/muxes setup will"
- "lead to overheating and possible destruction of your device."
- "Do not use without a good knowledge of mio's board design!\n");
-
- mioa701_snd_device = platform_device_alloc("soc-audio", -1);
- if (!mioa701_snd_device)
- return -ENOMEM;
-
- platform_set_drvdata(mioa701_snd_device, &mioa701);
-
- ret = platform_device_add(mioa701_snd_device);
- if (!ret)
- return 0;
-
- platform_device_put(mioa701_snd_device);
- return ret;
+ mioa701.dev = &pdev->dev;
+ rc = snd_soc_register_card(&mioa701);
+ if (!rc)
+ dev_warn(&pdev->dev, "Be warned that incorrect mixers/muxes setup will"
+ "lead to overheating and possible destruction of your device."
+ " Do not use without a good knowledge of mio's board design!\n");
+ return rc;
}
static int __devexit mioa701_wm9713_remove(struct platform_device *pdev)
{
- platform_device_unregister(mioa701_snd_device);
+ struct snd_soc_card *card = platform_get_drvdata(pdev);
+
+ snd_soc_unregister_card(card);
return 0;
}
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,
if (dapm->codec->driver->set_bias_level)
ret = dapm->codec->driver->set_bias_level(dapm->codec,
level);
- else
- dapm->bias_level = level;
- }
+ } else
+ dapm->bias_level = level;
+
if (ret != 0)
goto out;
@@ -324,11 +324,10 @@ static void dapm_set_path_status(struct snd_soc_dapm_widget *w,
val = soc_widget_read(w, reg);
val = (val >> shift) & mask;
+ if (invert)
+ val = max - val;
- if ((invert && !val) || (!invert && val))
- p->connect = 1;
- else
- p->connect = 0;
+ p->connect = !!val;
}
break;
case snd_soc_dapm_mux: {
@@ -1598,7 +1597,15 @@ static int dapm_power_widgets(struct snd_soc_dapm_context *dapm, int event)
}
list_for_each_entry(w, &card->widgets, list) {
- list_del_init(&w->dirty);
+ switch (w->id) {
+ case snd_soc_dapm_pre:
+ case snd_soc_dapm_post:
+ /* These widgets always need to be powered */
+ break;
+ default:
+ list_del_init(&w->dirty);
+ break;
+ }
if (w->power) {
d = w->dapm;
@@ -3660,10 +3667,13 @@ EXPORT_SYMBOL_GPL(snd_soc_dapm_free);
static void soc_dapm_shutdown_codec(struct snd_soc_dapm_context *dapm)
{
+ struct snd_soc_card *card = dapm->card;
struct snd_soc_dapm_widget *w;
LIST_HEAD(down_list);
int powerdown = 0;
+ mutex_lock(&card->dapm_mutex);
+
list_for_each_entry(w, &dapm->card->widgets, list) {
if (w->dapm != dapm)
continue;
@@ -3686,6 +3696,8 @@ static void soc_dapm_shutdown_codec(struct snd_soc_dapm_context *dapm)
snd_soc_dapm_set_bias_level(dapm,
SND_SOC_BIAS_STANDBY);
}
+
+ mutex_unlock(&card->dapm_mutex);
}
/*