diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-03-05 15:43:39 +0100 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2013-03-20 15:03:23 +0000 |
commit | 80e841638927953e753fa80b95077a3e88caab61 (patch) | |
tree | f3191c5ca8ae9d12fad0f9079b80958b0997ddcd | |
parent | 4533ed41f0afffa36413ce4f04cc4413e215b321 (diff) | |
download | linux-stable-80e841638927953e753fa80b95077a3e88caab61.tar.gz linux-stable-80e841638927953e753fa80b95077a3e88caab61.tar.bz2 linux-stable-80e841638927953e753fa80b95077a3e88caab61.zip |
ALSA: vmaster: Fix slave change notification
commit 2069d483b39a603a5f3428a19d3b4ac89aa97f48 upstream.
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.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r-- | sound/core/vmaster.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/core/vmaster.c b/sound/core/vmaster.c index 130cfe677d60..ac0af035f911 100644 --- a/sound/core/vmaster.c +++ b/sound/core/vmaster.c @@ -209,7 +209,10 @@ static int slave_put(struct snd_kcontrol *kcontrol, } if (!changed) return 0; - return slave_put_val(slave, ucontrol); + err = slave_put_val(slave, ucontrol); + if (err < 0) + return err; + return 1; } static int slave_tlv_cmd(struct snd_kcontrol *kcontrol, |