Commit c1b623d9 authored by Takashi Iwai's avatar Takashi Iwai

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.
parents 108cc108 15d47763
......@@ -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");
......@@ -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;
}
......
......@@ -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);
}
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment