ASoC: dapm: Remove bodges for no-widget CODECs
PATCH 1/1 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.
---
I don't actually have any no widget CODECs so can't really test - Timur, would it be possible for you to give it a spin?
sound/soc/soc-dapm.c | 36 ++++-------------------------------- 1 files changed, 4 insertions(+), 32 deletions(-)
sound/soc/soc-dapm.c +4 -32
@@ -1441,12 +1441,10 @@ static int dapm_power_widgets(struct snd_soc_dapm_context *dapm, int event)trace_snd_soc_dapm_start (card);list_for_each_entry (d, &card->dapm_list, list) { -if (d->n_widgets || d->codec ==NULL ) { -if (d->idle_bias_off) - d->target_bias_level =SND_SOC_BIAS_OFF ; -else - d->target_bias_level =SND_SOC_BIAS_STANDBY ; - } +if (d->idle_bias_off) + d->target_bias_level =SND_SOC_BIAS_OFF ; +else + d->target_bias_level =SND_SOC_BIAS_STANDBY ; }dapm_reset (card);
@@ -1491,32 +1489,6 @@ static int dapm_power_widgets(struct snd_soc_dapm_context *dapm, int event) } -/* If there are no DAPM widgets then try to figure out power from the -* event type. -*/ -if (!dapm->n_widgets) { -switch (event) { -case SND_SOC_DAPM_STREAM_START : -case SND_SOC_DAPM_STREAM_RESUME : - dapm->target_bias_level =SND_SOC_BIAS_ON ; -break ; -case SND_SOC_DAPM_STREAM_STOP : -if (dapm->codec && dapm->codec->active) - dapm->target_bias_level =SND_SOC_BIAS_ON ; -else - dapm->target_bias_level =SND_SOC_BIAS_STANDBY ; -break ; -case SND_SOC_DAPM_STREAM_SUSPEND : - dapm->target_bias_level =SND_SOC_BIAS_STANDBY ; -break ; -case SND_SOC_DAPM_STREAM_NOP : - dapm->target_bias_level = dapm->bias_level; -break ; -default : -break ; - } - } -/* Force all contexts in the card to the same bias state if * they're not ground referenced. */
Signature · 1 line
1.7.9.1
Quoted 2 lines · Mark Brown
I don't actually have any no widget CODECs so can't really test - Timur, would it be possible for you to give it a spin?
I'm assuming you're talking about the CS4270? I don't even know what a dapm widget is. Is there anything in particular I should check when testing this patch?
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
Quoted 8 lines · On Fri, Mar 09, 2012 at 02:19:02AM +0000, Tabi Timur-B04825 wrote:
Quoted 2 lines · Mark Brown
I don't actually have any no widget CODECs so can't really test - Timur, would it be possible for you to give it a spin?
I'm assuming you're talking about the CS4270? I don't even know what a dapm widget is. Is there anything in particular I should check when testing this patch?
Does it power up.
Liam Girdwood
Acked-byQuoted 11 lines · Mark Brown
Quoted 8 lines · On Fri, Mar 09, 2012 at 02:19:02AM +0000, Tabi Timur-B04825 wrote:
Quoted 2 lines · Mark Brown
I don't actually have any no widget CODECs so can't really test - Timur, would it be possible for you to give it a spin?
I'm assuming you're talking about the CS4270? I don't even know what a dapm widget is. Is there anything in particular I should check when testing this patch?
Does it power up.
If it works as expected:-
Quoted 9 lines · Mark Brown
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 <[email protected]>---
I don't actually have any no widget CODECs so can't really test - Timur, would it be possible for you to give it a spin?
It doesn't break anything, so:
Note that I don't have any DAPM support on my board.
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale