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] [day] [month] [year] [list]
Message-ID: <aFWF84HMipnQTOxs@opensource.cirrus.com>
Date: Fri, 20 Jun 2025 17:01:55 +0100
From: Charles Keepax <ckeepax@...nsource.cirrus.com>
To: Mark Brown <broonie@...nel.org>
Cc: 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,
        shengjiu.wang@...il.com
Subject: Re: [PATCH v3] ASoC: wm8524: enable constraints when sysclk is
 configured.

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.

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

Thanks,
Charles

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ