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: <8187d109eb70f6d459df63f3507a0be79efd9aa9.camel@irl.hu>
Date: Wed, 27 Aug 2025 03:34:19 +0200
From: Gergo Koteles <soyer@....hu>
To: Shenghao Ding <shenghao-ding@...com>, tiwai@...e.de
Cc: broonie@...nel.org, andriy.shevchenko@...ux.intel.com,
  13564923607@....com, 13916275206@....com,
  alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
  baojun.xu@...com, Baojun.Xu@....com, jesse-ji@...com
Subject: Re: [PATCH v2] ALSA: hda/tas2781: Fix EFI name for calibration
 beginning with 1 instead of 0

Hi Shenghao,

On Tue, 2025-08-26 at 17:41 +0800, Shenghao Ding wrote:
> A bug reported by one of my customers that EFI name beginning with 0
> instead of 1.
> 
> Fixes: 4fe238513407 ("ALSA: hda/tas2781: Move and unified the calibrated-data getting function for SPI and I2C into the tas2781_hda lib")
> Signed-off-by: Shenghao Ding <shenghao-ding@...com>
> 
> ---
> v2:
>  - remove unrelated change
> v1:
>  - Fix EFI name beginning with 1 instead of 0
>  - Add extra comments on EFI name for calibration
>  - Remove an extra space
> ---
>  sound/hda/codecs/side-codecs/tas2781_hda_i2c.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c b/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c
> index ed7771ab9475..635cbd8820ac 100644
> --- a/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c
> +++ b/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c
> @@ -340,7 +340,8 @@ static int tas2563_save_calibration(struct tas2781_hda *h)
>  		data[offset] = i;
>  		offset++;
>  		for (j = 0; j < TASDEV_CALIB_N; ++j) {
> -			ret = snprintf(var8, sizeof(var8), vars[j], i);
> +			/* EFI name for calibration started with 1, not 0 */
> +			ret = snprintf(var8, sizeof(var8), vars[j], i + 1);
>  
>  			if (ret < 0 || ret >= sizeof(var8) - 1) {
>  				dev_err(p->dev, "%s: Read %s failed\n",
> @@ -349,7 +350,7 @@ static int tas2563_save_calibration(struct tas2781_hda *h)
>  			}
>  			/*
>  			 * Our variable names are ASCII by construction, but
> -			 * EFI names are wide chars.  Convert and zero-pad.
> +			 * EFI names are wide chars. Convert and zero-pad.
>  			 */
>  			memset(efi_name, 0, sizeof(efi_name));
>  			for (k = 0; k < sizeof(var8) && var8[k]; k++)

In the tas2563_save_calibration() function the variables are read in
the following order: R0, InvR0, R0_Low, Power, TLim.
They are also included in cali_data in this order.

But the tasdev_load_calibrated_data() function reads them from
cali_data as R0, R0_Low, InvR0, Power, TLim.

And this may be true for tas2781 as well.

Could you check this also?

Thanks,
Gergo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ