diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-04-13 11:27:03 +0100 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-04-13 11:59:01 +0100 |
commit | f6d655a6e6974e474a11b25052c29d10b80814b3 (patch) | |
tree | cf1366799bc44d41775d5cc946a39af60d4dafc8 /sound | |
parent | 025756eca458b4a3d5e3d76baaffb2e8e3df79db (diff) | |
download | kernel_samsung_aries-f6d655a6e6974e474a11b25052c29d10b80814b3.zip kernel_samsung_aries-f6d655a6e6974e474a11b25052c29d10b80814b3.tar.gz kernel_samsung_aries-f6d655a6e6974e474a11b25052c29d10b80814b3.tar.bz2 |
ASoC: Support DAPM events for DACs and ADCs
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/soc-dapm.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 713d125..a6d7337 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -598,18 +598,22 @@ static int dapm_power_widget(struct snd_soc_codec *codec, int event, if (w->id == snd_soc_dapm_adc && w->active) { in = is_connected_input_ep(w); dapm_clear_walk(w->codec); - w->power = (in != 0) ? 1 : 0; - dapm_update_bits(w); - return 0; + power = (in != 0) ? 1 : 0; + if (power == w->power) + return 0; + w->power = power; + return dapm_generic_apply_power(w); } /* active DAC */ if (w->id == snd_soc_dapm_dac && w->active) { out = is_connected_output_ep(w); dapm_clear_walk(w->codec); - w->power = (out != 0) ? 1 : 0; - dapm_update_bits(w); - return 0; + power = (out != 0) ? 1 : 0; + if (power == w->power) + return 0; + w->power = power; + return dapm_generic_apply_power(w); } /* pre and post event widgets */ |