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: <aDtXfknr5yslSaM0@smile.fi.intel.com>
Date: Sat, 31 May 2025 22:24:46 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Baojun Xu <baojun.xu@...com>
Cc: tiwai@...e.de, broonie@...nel.org, alsa-devel@...a-project.org,
	shenghao-ding@...com, navada@...com, 13916275206@....com,
	v-hampiholi@...com, v-po@...com, linux-sound@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] ALSA: hda/tas2781: Add compatible for hardware id
 TIAS2781 and TXNW2781

On Sat, May 31, 2025 at 08:17:33PM +0800, Baojun Xu wrote:
> TIAS2781 is unofficial hardware id in acpi for tas2781 in HDA,

ACPI

> has been used for several projects. TXNW is the official hardware
> id for TI, will be used in new projects, including device on SPI bus.
> This patch will support both TIAS2781 and TXNW2781 in acpi

ACPI

> with tas2781 under HDA.

...

> +	hda_priv->save_calibration = tas2781_save_calibration;
> +	tas_hda->priv->global_addr = TAS2781_GLOBAL_ADDR;

No, just add these lines to a new branch.

>  	if (strstr(dev_name(&clt->dev), "TIAS2781")) {
>  		device_name = "TIAS2781";
> -		hda_priv->save_calibration = tas2781_save_calibration;
> -		tas_hda->priv->global_addr = TAS2781_GLOBAL_ADDR;
> +	} else if (strstr(dev_name(&clt->dev), "TXNW2781:00-tas2781-hda.0")) {

Why do you need to match the full device instance name?
Moreover, strstr() is incorrect. Should be strstarts() or str_has_prefix().

> +		device_name = "TXNW2781";
>  	} else if (strstr(dev_name(&clt->dev), "INT8866")) {
>  		device_name = "INT8866";
>  		hda_priv->save_calibration = tas2563_save_calibration;
>  		tas_hda->priv->global_addr = TAS2563_GLOBAL_ADDR;
> -	} else

> +	} else {
>  		return -ENODEV;
> +	}

Unrelated change.

...

>  static const struct acpi_device_id tas2781_acpi_hda_match[] = {
>  	{"TIAS2781", 0 },
> +	{"TXNW2781", 0 },
>  	{"INT8866", 0 },

Keep them sorted, please. Perhaps an additional patch?

>  	{}
>  };

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ