Re: [PATCH 11/11] ASoC: fsl_easrc: Change the type for iec958 channel status controls
From: Shengjiu Wang
Date: Mon Mar 30 2026 - 21:59:35 EST
On Mon, Mar 30, 2026 at 9:23 PM Mark Brown <broonie@xxxxxxxxxx> wrote:
>
> On Mon, Mar 30, 2026 at 07:25:55PM +0800, Shengjiu Wang wrote:
> > Use the type SNDRV_CTL_ELEM_TYPE_IEC958 for iec958 channel status
> > controls, the original type will cause mixer-test to iterate all 32bit
> > values, which costs a lot of time. And using IEC958 type can reduce the
> > control numbers.
>
> > Also enable pm runtime before updating registers to make the regmap cache
> > data align with the value in hardware.
>
> > @@ -100,22 +130,52 @@ static int fsl_easrc_set_reg(struct snd_kcontrol *kcontrol,
>
> > - ret = regmap_update_bits_check(easrc->regmap, mc->regbase,
> > - GENMASK(31, 0), regval, &changed);
> > - if (ret != 0)
> > + ret = pm_runtime_resume_and_get(component->dev);
> > + if (ret)
> > return ret;
> >
> > - return changed;
> > + ret = regmap_update_bits(easrc->regmap, REG_EASRC_CS0(mc->regbase),
> > + GENMASK(31, 0), regval[0]);
> > + if (ret != 0)
> > + goto err;
>
> This drops all the checking for changed values that we used to do so we
> won't generate notifications to userspace.
Yes, as the type is changed to IEC958, the notification is not
acquired by the mixer-test.
Do we still need to add the notification?
best regards
Shengjiu Wang