[PATCH] ASoC: fsl_micfil: Add DC output remover control
Shengjiu Wang
shengjiu.wang at gmail.com
Tue Apr 21 17:40:12 AEST 2026
On Mon, Apr 20, 2026 at 8:50 PM Mark Brown <broonie at kernel.org> wrote:
>
> On Mon, Apr 20, 2026 at 04:53:44PM +0800, Shengjiu Wang wrote:
>
> > +static int micfil_put_dc_out_remover_state(struct snd_kcontrol *kcontrol,
> > + struct snd_ctl_elem_value *ucontrol)
> > +{
>
> > + if (val < 0 || val > 3)
> > + return -EINVAL;
> > +
> > + ret = pm_runtime_resume_and_get(comp->dev);
> > + if (ret)
> > + return ret;
> > +
> > + micfil->dc_out_remover = val;
>
> ...
>
> > + /* Update DC Remover mode for all channels */
> > + ret = snd_soc_component_update_bits(comp, REG_MICFIL_DC_OUT_CTRL,
> > + MICFIL_DC_CTRL_CONFIG, reg_val);
> > +
> > + pm_runtime_put_autosuspend(comp->dev);
> > +
> > + return ret;
>
> This will return 0 not 1 when the value changes, meaning event
> generation is missed. The mixer-test selftest should report this.
snd_soc_component_update_bits() will return 1 if the value is changed.
and the mixer-test pass
ok 120 get_value.micfilaudio.8
# micfilaudio.8 MICFIL DC Out Remover Control
ok 121 name.micfilaudio.8
ok 122 write_default.micfilaudio.8
ok 123 write_valid.micfilaudio.8
ok 124 write_invalid.micfilaudio.8
ok 125 event_missing.micfilaudio.8
ok 126 event_spurious.micfilaudio.8
Is there something I missed here?
Best regards
Shengjiu Wang
More information about the Linuxppc-dev
mailing list