mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:24:47 +01: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:
parent
11439c4635
commit
54a86cf48e
1 changed files with 4 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue