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.
This commit is contained in:
Mark Brown 2026-03-02 23:11:46 +00:00
commit 70c3054505
No known key found for this signature in database
GPG key ID: 24D68B725D5487D0

View file

@ -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) \