lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHgNfTwLfqCP-TL_pdqxs0AC+1z845Ca1zU6dUS=xwNMgaz+5Q@mail.gmail.com>
Date: Thu, 13 Mar 2025 10:49:40 +1000
From: James Calligeros <jcalligeros99@...il.com>
To: Rob Herring <robh@...nel.org>
Cc: Liam Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>, 
	Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>, Shenghao Ding <shenghao-ding@...com>, 
	Kevin Lu <kevin-lu@...com>, Baojun Xu <baojun.xu@...com>, Dan Murphy <dmurphy@...com>, 
	Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, 
	Shi Fu <shifu0704@...ndersoft.com>, Jean Delvare <jdelvare@...e.com>, 
	Guenter Roeck <linux@...ck-us.net>, Alyssa Rosenzweig <alyssa@...enzweig.io>, 
	Martin Povišer <povik+lin@...ebit.org>, 
	Hector Martin <marcan@...can.st>, linux-sound@...r.kernel.org, 
	linux-kernel@...r.kernel.org, devicetree@...r.kernel.org, 
	asahi@...ts.linux.dev, linux-hwmon@...r.kernel.org
Subject: Re: [PATCH v3 17/20] ASoC: dt-bindings: tas2770: add flags for SDOUT
 pulldown and zero-fill

On Wed, Mar 12, 2025 at 10:58 PM Rob Herring <robh@...nel.org> wrote:
>
> On Mon, Mar 10, 2025 at 07:30:07PM +1000, James Calligeros wrote:
> > On Sat, Mar 8, 2025 at 6:51 AM Rob Herring <robh@...nel.org> wrote:
> > > How would it work when you need a mask? "dai-tdm-slot-tx-mask" is
> > > enough?
> >
> > The existing TX/RX slot masks are used to control which slots the codec
> > is operating on, AIUI. I don't know if it makes sense to alter how codecs
> > deal with this. Could we combine the suggested dai-tdm-slot-tx-idle
> > with an optional dai-tdm-slot-tx-idle-mask property? From the machine
> > driver's perspective, the API would then be similar to the existing
> > set_tdm_slot ops. The current downstream macaudio machine driver builds
> > its links by allowing multiple codecs and CPUs to be linked to a DAI,
> > like so:
>
> Wouldn't the NOT of dai-tdm-slot-tx-mask be the idle mask?

Theoretically it should be, and that's probably just what we should do.
We would then just have the dai-tdm-slot-tx-idle-mode property to worry
about. There may be a reason a unique property was added however, as only
some codecs have it set in our downstream DTs. Perhaps Martin can shed
some light on this?

> >
> > dai-link@0 {
> >       cpu {
> >               sound-dai = <&cpu0>, <&cpu1>;
> >       };
> >       codec {
> >               sound-dai = <&speaker0>,
> >                         ...,
> >                         <&speaker6>;
> >       };
> > };
> >
> > In this case, the codec-specific mask property was added so that a mask
> > could be applied to a specific codec rather than the whole dai, however
> > from upstream drivers tt looks like the way this should be handled is to
> > have "dai-tdm-slot-tx-idle-mask-n" properties at the dai level, then have
> > the machine driver set the mask for the appropriate codec during setup. So
> > for macaudio, assuming speaker5 requires this zerofill mask, we would
> > have something like this:
>
> I'm now confused why you need n masks and what does n represent?

We can have n cpus linked to m codecs in macaudio, and we need to specify
the TDM properties for each codec individually . There seem to be a couple
of ways upstream drivers deal with this, but the "nicest" way I've seen is
what amlogic[1] does, which is extend the dai-tdm-slot-* properties with
an index (-n) representing the specific codec it's for.

Regards,
James

[1] https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/sound/amlogic%2Caxg-sound-card.yaml

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ