All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Baojun Xu <baojun.xu@ti.com>
Cc: tiwai@suse.de, broonie@kernel.org, alsa-devel@alsa-project.org,
	shenghao-ding@ti.com, navada@ti.com, 13916275206@139.com,
	v-hampiholi@ti.com, v-po@ti.com, linux-sound@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] ALSA: hda/tas2781: Add compatible for hardware id TIAS2781 and TXNW2781
Date: Sat, 31 May 2025 22:24:46 +0300	[thread overview]
Message-ID: <aDtXfknr5yslSaM0@smile.fi.intel.com> (raw)
In-Reply-To: <20250531121733.17493-1-baojun.xu@ti.com>

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



  reply	other threads:[~2025-05-31 19:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-31 12:17 [PATCH v1] ALSA: hda/tas2781: Add compatible for hardware id TIAS2781 and TXNW2781 Baojun Xu
2025-05-31 19:24 ` Andy Shevchenko [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-06-16  3:56 Baojun Xu
2025-06-16  6:31 ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aDtXfknr5yslSaM0@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=13916275206@139.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=baojun.xu@ti.com \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=navada@ti.com \
    --cc=shenghao-ding@ti.com \
    --cc=tiwai@suse.de \
    --cc=v-hampiholi@ti.com \
    --cc=v-po@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.