Skip to contentSkip to conversation

ASoC: dapm: Fix auto-disable for inverted controls

PATCH Applied Lars-Peter Clausen 2 participants 2 messages Aug 30, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 sound/soc/soc-dapm.c | 2 ++
 1 file changed, 2 insertions(+)
sound/soc/soc-dapm.c +2 -0
index 548b1c9..c17c14c 100644
@@ -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) {
Signature · 1 line
1.8.0
maintainer Applied
#1 lore raw
Quoted 2 lines · Lars-Peter Clausen

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.

Applied, thanks.