diff options
| author | Mark Brown <broonie@kernel.org> | 2026-03-02 23:11:46 +0000 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-03-02 23:11:46 +0000 |
| commit | 70c3054505bbb7c6a876761eb26407f97c36e001 (patch) | |
| tree | 7fa6ac5a9fdddb12880ee3d6ac991c5d5ac463e3 | |
| parent | a8df7892a9f42b2e2d5851f8835c734bd7fe8ad4 (diff) | |
| parent | 31ddc62c1cd92e51b9db61d7954b85ae2ec224da (diff) | |
ASoC: fsl_easrc: Fix control writes
Merge series from Mark Brown <broonie@kernel.org>:
I noticed that neither of the put() operations for the controls defined
by the fsl_easrc driver was flagging value changes properly, fix that.
| -rw-r--r-- | sound/soc/fsl/fsl_easrc.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sound/soc/fsl/fsl_easrc.c b/sound/soc/fsl/fsl_easrc.c index e64a0d97afd0..6c56134c60cc 100644 --- a/sound/soc/fsl/fsl_easrc.c +++ b/sound/soc/fsl/fsl_easrc.c @@ -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, @@ -93,14 +96,17 @@ static int fsl_easrc_set_reg(struct snd_kcontrol *kcontrol, struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); struct soc_mreg_control *mc = (struct soc_mreg_control *)kcontrol->private_value; + struct fsl_asrc *easrc = snd_soc_component_get_drvdata(component); unsigned int regval = ucontrol->value.integer.value[0]; + bool changed; int ret; - ret = snd_soc_component_write(component, mc->regbase, regval); - if (ret < 0) + ret = regmap_update_bits_check(easrc->regmap, mc->regbase, + GENMASK(31, 0), regval, &changed); + if (ret != 0) return ret; - return 0; + return changed; } #define SOC_SINGLE_REG_RW(xname, xreg) \ |
