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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAA+D8AMCZ8jbcMFPMEm1f6AK8e_iCwi7Jyg8Qb==zzUFO_1cog@mail.gmail.com>
Date: Tue, 24 Jun 2025 16:24:04 +0800
From: Shengjiu Wang <shengjiu.wang@...il.com>
To: Charles Keepax <ckeepax@...nsource.cirrus.com>
Cc: Mark Brown <broonie@...nel.org>, Shengjiu Wang <shengjiu.wang@....com>, lgirdwood@...il.com, 
	perex@...ex.cz, tiwai@...e.com, patches@...nsource.cirrus.com, 
	linux-sound@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] ASoC: wm8524: enable constraints when sysclk is configured.

On Sat, Jun 21, 2025 at 12:02 AM Charles Keepax
<ckeepax@...nsource.cirrus.com> wrote:
>
> On Fri, Jun 20, 2025 at 01:42:20PM +0100, Mark Brown wrote:
> > On Fri, Jun 20, 2025 at 09:42:58AM +0100, Charles Keepax wrote:
> > > On Fri, Jun 20, 2025 at 09:26:00AM +0100, Charles Keepax wrote:
> >
> > > > This is kinda the opposite of what I was hoping we could do. The
> > > > idea was to make sure we returned an error if we can't support
> > > > the given rate. So if we don't have the constraint, we check the
> > > > value in hw_params. This looks like it checks in hw_params only
> > > > in the case the constraint existed, but in that case there is no
> > > > need to check because we had the constraint.
> >
> > > Although perhaps I am mistaken here, I guess is the clock has
> > > been set by the machine driver then we would pass this check.
> > > Would it perhaps make more sense to return an error rather than
> > > zero here?
> >
> > The link hw_params() should be run before the CODEC ones so we would be
> > able to insist on the clocks having been configured first.
> >
> > Or I wonder if it might be easier to just implement clock API support in
> > the driver and if we get a MCLK we set it to a sensible value here?
> > That wouldn't work if the MCLK is coming from the other DAI though.
> > Also I'm really not sure how this bikeshed fits into the design concept
> > here.
>
> I think clock framework stuff is probably more work than makes
> sense here.
>
> If you are happy with this as is I don't object to it getting
> merged, ultimately if the machine driver doesn't configure the
> clock that is a bug in the machine driver and it will likely be
> relatively obvious audibily so the returning an error is really
> just a nice to have.

The code here wants to avoid returning an error when the machine driver
doesn't configure the sysclk. As wm8524 is a slave codec, it don't have
any registers to be configured, it can work without sysclk configured.

Maybe we can release this flexibility for wm8524?

Best regards
Shengjiu Wang

>
> Reviewed-by: Charles Keepax <ckeepax@...nsource.cirrus.com>
>
> Thanks,
> Charles

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ