Skip to contentSkip to conversation

ALSA: vmaster: Fix slave change notification

PATCH New Takashi Iwai 1 participant 1 message Mar 7, 2013 Sound

lore
Share & tools
lore
#0 lore raw

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

---
 sound/core/vmaster.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
sound/core/vmaster.c +4 -1
index 8575861..0097f36 100644
@@ -213,7 +213,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,
Signature · 1 line
1.8.1.4