lkml.org 
[lkml]   [2013]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] ASoC: dapm: Fix auto-disable for inverted controls
Date
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>
---
sound/soc/soc-dapm.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 548b1c9..c17c14c 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) {
--
1.8.0


\
 
 \ /
  Last update: 2013-08-30 18:01    [W:0.027 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site