diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-03-08 10:06:09 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-04-01 06:28:28 -0400 |
commit | 497098beffaa898ea9fa0076e626f055ef5c832e (patch) | |
tree | eb2bf61a3ed1a65e97218d785557a13acac58ff0 /sound/soc/soc-dapm.c | |
parent | c448303e86c970cca4833bd9480c08f09b948b40 (diff) |
ASoC: dapm: Remove bodges for no-widget CODECs
Now that we're creating widgets for all DAIs there should be no more
need for the bodges we've been carrying for non-DAPM CODEC drivers so
remove them.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Timur Tabi <timur@freescale.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r-- | sound/soc/soc-dapm.c | 36 |
1 files changed, 4 insertions, 32 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index dd603fa38097..69e9452386e6 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -1441,12 +1441,10 @@ static int dapm_power_widgets(struct snd_soc_dapm_context *dapm, int event) | |||
1441 | trace_snd_soc_dapm_start(card); | 1441 | trace_snd_soc_dapm_start(card); |
1442 | 1442 | ||
1443 | list_for_each_entry(d, &card->dapm_list, list) { | 1443 | list_for_each_entry(d, &card->dapm_list, list) { |
1444 | if (d->n_widgets || d->codec == NULL) { | 1444 | if (d->idle_bias_off) |
1445 | if (d->idle_bias_off) | 1445 | d->target_bias_level = SND_SOC_BIAS_OFF; |
1446 | d->target_bias_level = SND_SOC_BIAS_OFF; | 1446 | else |
1447 | else | 1447 | d->target_bias_level = SND_SOC_BIAS_STANDBY; |
1448 | d->target_bias_level = SND_SOC_BIAS_STANDBY; | ||
1449 | } | ||
1450 | } | 1448 | } |
1451 | 1449 | ||
1452 | dapm_reset(card); | 1450 | dapm_reset(card); |
@@ -1491,32 +1489,6 @@ static int dapm_power_widgets(struct snd_soc_dapm_context *dapm, int event) | |||
1491 | 1489 | ||
1492 | } | 1490 | } |
1493 | 1491 | ||
1494 | /* If there are no DAPM widgets then try to figure out power from the | ||
1495 | * event type. | ||
1496 | */ | ||
1497 | if (!dapm->n_widgets) { | ||
1498 | switch (event) { | ||
1499 | case SND_SOC_DAPM_STREAM_START: | ||
1500 | case SND_SOC_DAPM_STREAM_RESUME: | ||
1501 | dapm->target_bias_level = SND_SOC_BIAS_ON; | ||
1502 | break; | ||
1503 | case SND_SOC_DAPM_STREAM_STOP: | ||
1504 | if (dapm->codec && dapm->codec->active) | ||
1505 | dapm->target_bias_level = SND_SOC_BIAS_ON; | ||
1506 | else | ||
1507 | dapm->target_bias_level = SND_SOC_BIAS_STANDBY; | ||
1508 | break; | ||
1509 | case SND_SOC_DAPM_STREAM_SUSPEND: | ||
1510 | dapm->target_bias_level = SND_SOC_BIAS_STANDBY; | ||
1511 | break; | ||
1512 | case SND_SOC_DAPM_STREAM_NOP: | ||
1513 | dapm->target_bias_level = dapm->bias_level; | ||
1514 | break; | ||
1515 | default: | ||
1516 | break; | ||
1517 | } | ||
1518 | } | ||
1519 | |||
1520 | /* Force all contexts in the card to the same bias state if | 1492 | /* Force all contexts in the card to the same bias state if |
1521 | * they're not ground referenced. | 1493 | * they're not ground referenced. |
1522 | */ | 1494 | */ |