summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-08-30 17:39:33 +0200
committerMark Brown <broonie@linaro.org>2013-08-30 16:41:06 +0100
commit2daabd7848b89afddd93be616f1be5639ea78822 (patch)
tree18ccfe6e4d4d944740df0b0c69eba0aba9761852
parent34742cb02bd368c1af3349c041d3e4446f7ac6ef (diff)
downloadlinux-2daabd7848b89afddd93be616f1be5639ea78822.tar.bz2
ASoC: dapm: Fix auto-disable for inverted controls
We need to make sure that the control's cached value is initialized to the same value as the control's widget->on_val. Otherwise updates might be lost. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r--sound/soc/soc-dapm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 7e9afbc49ef2..13fcb61a922f 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -229,6 +229,8 @@ static int dapm_kcontrol_data_alloc(struct snd_soc_dapm_widget *widget,
template.id = snd_soc_dapm_kcontrol;
template.name = kcontrol->id.name;
+ data->value = template.on_val;
+
data->widget = snd_soc_dapm_new_control(widget->dapm,
&template);
if (!data->widget) {