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: <601c4455-cac6-441f-a8a3-15fe2d81b3c7@sirena.org.uk>
Date: Tue, 24 Jun 2025 12:40:31 +0100
From: Mark Brown <broonie@...nel.org>
To: wangweidong.a@...nic.com
Cc: colin.i.king@...il.com, lgirdwood@...il.com,
	linux-kernel@...r.kernel.org, linux-sound@...r.kernel.org,
	perex@...ex.cz, thorsten.blum@...ux.dev, tiwai@...e.com,
	u.kleine-koenig@...libre.com, yijiangtao@...nic.com,
	zhujun2@...s.chinamobile.com
Subject: Re: [PATCH V2] ASoC: codecs: Add calibration function to aw88399 chip

On Tue, Jun 24, 2025 at 02:57:48PM +0800, wangweidong.a@...nic.com wrote:
> On Fri, Jun 20, 2025 at 14:21:25PM +0100, broonie@...nel.org wrote:
> > On Fri, Jun 20, 2025 at 07:08:44PM +0800, wangweidong.a@...nic.com wrote:

> >> +	ret = aw_cali_svc_cali_re_mode_enable(aw_dev, true);

> >> +	msleep(3000);

> > Callibration takes 3s which is a fairly long time.

> This time is because the chip needs to wait for 
> the data to stabilise during calibration 
> in order to ensure more accurate calibration values.
> I will reduce this time to 1s.

If you can do that safely that'd be great, but if it takes 3s then it
takes 3s - I was more noting this for context on the comments on how
callibration is triggered.

> > AFAICT it's triggered if the device is powered on and userspace reads
> > the control that reports the callibration value.  That seems like it's a
> > bit too easy to trigger - something like running amixer would read the

> > BTW since the calibration is dynamically done the control should be
> > flagged as volatile.
> I will make the following two changes:
> 1.Add an additional "Calib Switch" Kcontrol to 
>   indicate whether calibration operations can be performed.
> 2.Add "Trigger Calib" to Kcontrol. 
>   This Kcontrol is write-only. When calibration is allowed,
>   perform the calibration operation.

Great, that should work a lot better with diverse userspaces.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ