Skip to content

Commit

Permalink
ASoC: dapm: Fix auto-disable for inverted controls
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lars-Peter Clausen authored and Mark Brown committed Aug 30, 2013
1 parent 34742cb commit 2daabd7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sound/soc/soc-dapm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 2daabd7

Please sign in to comment.