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.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQDSB4AAoJEBus8iNuMP3d7rYP/in6d3kH48tNMZU1K6YJi2fi
 5f7pmq7RAH86Py5jHD1m0/aGeXzltJqF2UFgOQGoh0JLsM3bnJtAXV4uCqxBc8wr
 wNfueXV5az3eZtDcZKzX0ZmgqZV06/MugDzP/P+roZB7cAH8bHA2yBajgiNLIYpB
 7DD4HMOQcHtVPeM4ioHsFq3xXIiiZ/ZbJ353gKluYgUhHFjzptMSjz/1eE3gv5RU
 CY0LQe36nfJH7cbmZseftnwf+BCWZoWxgEkjM0dcHs+uw1xe1DjpH9zVvyl1MpnS
 1Kgl6+SiVHmqmUEyS8pU1PsMo7ssrLUh4sNxA/FIJQEdl8x/ykraOILU9tdGX3gS
 HLi7okK6p0sMoPlTBayoqY/EgFI9NL6e3xG9jSVICareSqh0Zd32bCZ7bOaQC7G4
 Zd9i3Mkr3ce1OqTuiaS+CMT+j6KH7w54X/lPP8zQhT/f0sF9fZ8Y9VXwHQhe5pFD
 B4BJDk8nPB5Bc1izM/dRWF/Y3NP0O33PB3tFHLNZVPXpeuk8TUP6YLr51UYwxmip
 /++UAIwJFv0EvZ4772raIOGwQcr8ypPdClp17Uj7xqVX68wcueFH8uiLzLkJRbF0
 wB0BbDj+IQeU/fwN216hvS44qteJD0XrSv54jd0C6jDqxz6bj53kt6PvttSgjvZq
 tj5BifekUSCK3TQyN6LN
 =47kf
 -----END PGP SIGNATURE-----

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.
This commit is contained in:
Takashi Iwai 2012-07-23 14:34:42 +02:00
commit c1b623d9e4
3 changed files with 33 additions and 29 deletions

View File

@ -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");

View File

@ -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;
}

View File

@ -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);
}
/*