aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-03-05 09:43:39 -0500
committerTakashi Iwai <tiwai@suse.de>2013-03-05 09:43:39 -0500
commit2069d483b39a603a5f3428a19d3b4ac89aa97f48 (patch)
tree0d8e0ea4dbd52498b774e82ff2593262f86f6af4
parent85c50a5899b23f4f893b0898b286023157b98376 (diff)
ALSA: vmaster: Fix slave change notification
When a value of a vmaster slave control is changed, the ctl change notification is sometimes ignored. This happens when the master control overrides, e.g. when the corresponding master control is muted. The reason is that slave_put() returns the value of the actual slave put callback, and it doesn't reflect the virtual slave value change. This patch fixes the function just to return 1 whenever a slave value is changed. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/core/vmaster.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/core/vmaster.c b/sound/core/vmaster.c
index 857586135d18..0097f3619faa 100644
--- a/sound/core/vmaster.c
+++ b/sound/core/vmaster.c
@@ -213,7 +213,10 @@ static int slave_put(struct snd_kcontrol *kcontrol,
213 } 213 }
214 if (!changed) 214 if (!changed)
215 return 0; 215 return 0;
216 return slave_put_val(slave, ucontrol); 216 err = slave_put_val(slave, ucontrol);
217 if (err < 0)
218 return err;
219 return 1;
217} 220}
218 221
219static int slave_tlv_cmd(struct snd_kcontrol *kcontrol, 222static int slave_tlv_cmd(struct snd_kcontrol *kcontrol,