Re: [PATCH v3 7/7] ASoC: tas2770: expose SDOUT bus keeper via set_tdm_idle

From: James Calligeros

Date: Fri Mar 13 2026 - 22:32:57 EST


On Friday, 13 March 2026 12:33:05 am Australian Eastern Standard Time Mark Brown wrote:
> On Sun, Mar 01, 2026 at 06:05:26PM +1000, James Calligeros wrote:
> > +static int tas2770_set_dai_tdm_idle(struct snd_soc_dai *dai,
> > + unsigned int tx_mask,
> > + unsigned int rx_mask,
> > + int tx_mode, int rx_mode)
> > +{
> >
> > + switch (tx_mode) {
> > + case SND_SOC_DAI_TDM_IDLE_PULLDOWN:
> > + ret = snd_soc_component_update_bits(component, TAS2770_DIN_PD,
> > + TAS2770_DIN_PD_SDOUT,
> > + TAS2770_DIN_PD_SDOUT);
> > + if (ret)
> > + return ret;
> > +
> > + break;
>
> This and all the other cases only updates the bits it's specifically
> setting for the mode, so _ZERO and _HIZ don't update the pull and this
> doesn't update the _KEEP/_FILL settings. Not sure how often anyone is
> going to change this at runtime though.

I didn't notice any side effects caused by not explicitly turning off
the weak pulldown, but it makes sense to do if the consumer has asked
for a mode that is not pulldown.

> > + case SND_SOC_DAI_TDM_IDLE_OFF:
> > + ret = snd_soc_component_update_bits(component, TAS2770_DIN_PD,
> > + TAS2770_DIN_PD_SDOUT, 0);
> > + if (ret)
> > + return ret;
> > +
> > + ret = snd_soc_component_update_bits(component, TAS2770_TDM_CFG_REG4,
> > + TAS2770_TDM_CFG_REG4_TX_KEEPER, 0);
>
> Actually this does _KEEP but not _FILL.

_KEEPER is the important one. _FILL just controls the behaviour
of the bus keeper (zero or Hi-Z) when _KEEPER is set. If _KEEPER is
cleared, the bus keeper is turned off and the value of _FILL doesn't
matter.