Skip to content

Commit 31ddc62

Browse files
committed
ASoC: fsl_easrc: Fix event generation in fsl_easrc_iec958_set_reg()
ALSA controls should return 1 if the value in the control changed but the control put operation fsl_easrc_set_reg() only returns 0 or a negative error code, causing ALSA to not generate any change events. Add a suitable check by using regmap_update_bits_check() with the underlying regmap, this is more clearly and simply correct than trying to verify that one of the generic ops is exactly equivalent to this one. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://patch.msgid.link/20260205-asoc-fsl-easrc-fix-events-v1-2-39d4c766918b@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 54a86cf commit 31ddc62

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

sound/soc/fsl/fsl_easrc.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,17 @@ static int fsl_easrc_set_reg(struct snd_kcontrol *kcontrol,
9696
struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
9797
struct soc_mreg_control *mc =
9898
(struct soc_mreg_control *)kcontrol->private_value;
99+
struct fsl_asrc *easrc = snd_soc_component_get_drvdata(component);
99100
unsigned int regval = ucontrol->value.integer.value[0];
101+
bool changed;
100102
int ret;
101103

102-
ret = snd_soc_component_write(component, mc->regbase, regval);
103-
if (ret < 0)
104+
ret = regmap_update_bits_check(easrc->regmap, mc->regbase,
105+
GENMASK(31, 0), regval, &changed);
106+
if (ret != 0)
104107
return ret;
105108

106-
return 0;
109+
return changed;
107110
}
108111

109112
#define SOC_SINGLE_REG_RW(xname, xreg) \

0 commit comments

Comments
 (0)