Skip to content

Commit 54a86cf

Browse files
committed
ASoC: fsl_easrc: Fix event generation in fsl_easrc_iec958_put_bits()
ALSA controls should return 1 if the value in the control changed but the control put operation fsl_easrc_iec958_put_bits() unconditionally returns 0, causing ALSA to not generate any change events. This is detected by mixer-test with large numbers of messages in the form: No event generated for Context 3 IEC958 CS5 Context 3 IEC958 CS5.0 orig 5224 read 5225, is_volatile 0 Add a suitable check. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://patch.msgid.link/20260205-asoc-fsl-easrc-fix-events-v1-1-39d4c766918b@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 11439c4 commit 54a86cf

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

sound/soc/fsl/fsl_easrc.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,13 @@ static int fsl_easrc_iec958_put_bits(struct snd_kcontrol *kcontrol,
5252
struct soc_mreg_control *mc =
5353
(struct soc_mreg_control *)kcontrol->private_value;
5454
unsigned int regval = ucontrol->value.integer.value[0];
55+
int ret;
56+
57+
ret = (easrc_priv->bps_iec958[mc->regbase] != regval);
5558

5659
easrc_priv->bps_iec958[mc->regbase] = regval;
5760

58-
return 0;
61+
return ret;
5962
}
6063

6164
static int fsl_easrc_iec958_get_bits(struct snd_kcontrol *kcontrol,

0 commit comments

Comments
 (0)