mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
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>
This commit is contained in:
@@ -52,10 +52,13 @@ static int fsl_easrc_iec958_put_bits(struct snd_kcontrol *kcontrol,
|
||||
struct soc_mreg_control *mc =
|
||||
(struct soc_mreg_control *)kcontrol->private_value;
|
||||
unsigned int regval = ucontrol->value.integer.value[0];
|
||||
int ret;
|
||||
|
||||
ret = (easrc_priv->bps_iec958[mc->regbase] != regval);
|
||||
|
||||
easrc_priv->bps_iec958[mc->regbase] = regval;
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int fsl_easrc_iec958_get_bits(struct snd_kcontrol *kcontrol,
|
||||
|
||||
Reference in New Issue
Block a user