Skip to content

Commit

Permalink
Merge tag 'asoc-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git…
Browse files Browse the repository at this point in the history
…/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.
  • Loading branch information
Takashi Iwai committed Jul 23, 2012
2 parents 108cc10 + 15d4776 commit c1b623d
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 29 deletions.
1 change: 1 addition & 0 deletions sound/soc/omap/omap-mcpdm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
33 changes: 12 additions & 21 deletions sound/soc/pxa/mioa701_wm9713.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
28 changes: 20 additions & 8 deletions sound/soc/soc-dapm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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: {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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);
}

/*
Expand Down

0 comments on commit c1b623d

Please sign in to comment.