[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAA+D8APEa2+iGkONgEOWpRe-w1Ni-CmBpC90qPRYQj6mV72-YQ@mail.gmail.com>
Date: Tue, 27 Jan 2026 21:01:02 +0800
From: Shengjiu Wang <shengjiu.wang@...il.com>
To: Charles Keepax <ckeepax@...nsource.cirrus.com>
Cc: Shengjiu Wang <shengjiu.wang@....com>, lgirdwood@...il.com, broonie@...nel.org,
perex@...ex.cz, tiwai@...e.com, kuninori.morimoto.gx@...esas.com,
sebastian.krzyszkowiak@...i.sm, brgl@...nel.org,
patches@...nsource.cirrus.com, linux-sound@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ASoC: wm8962: add .set_tdm_slot callback function
On Tue, Jan 27, 2026 at 7:03 PM Charles Keepax
<ckeepax@...nsource.cirrus.com> wrote:
>
> On Tue, Jan 27, 2026 at 06:33:26PM +0800, Shengjiu Wang wrote:
> > The slot_width can be different with the params_width(), for example,
> > DSP_A mode, slot_width = 32, but data format is S16_LE, if the word
> > length is configured to be 16, there is no sound on the right speaker.
> >
> > So add .set_tdm_slot() callback function to configure the slot_width and
> > update the word length according to slot_width in hw_params().
> >
> > Signed-off-by: Shengjiu Wang <shengjiu.wang@....com>
> > ---
> > +static int wm8962_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
> > + unsigned int rx_mask, int slots, int slot_width)
> > +{
> > + struct snd_soc_component *component = dai->component;
> > + struct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);
> > +
> > + if (slots <= 0 || slot_width <= 0)
> > + return 0;
>
> You probably shouldn't bail out here, how does one disable TDM if
> it is no longer required?
Should we add some checks for the slots and slot_width here?
or just remove these two lines?
Best regards
Shengjiu Wang
>
> I think the rest looks good.
>
> Thanks,
> Charles
Powered by blists - more mailing lists