From: Lars-Peter Clausen Date: Fri, 30 Aug 2013 15:39:33 +0000 (+0200) Subject: ASoC: dapm: Fix auto-disable for inverted controls X-Git-Tag: v3.12-rc1~43^2~7^2~2^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2daabd7848b89afddd93be616f1be5639ea78822;p=profile%2Fcommon%2Fkernel-common.git 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 Signed-off-by: Mark Brown --- diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 7e9afbc4..13fcb61 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) {