mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Shenghao Ding <shenghao-ding@ti.com>,
	robh+dt@kernel.org, lgirdwood@gmail.com, perex@perex.cz,
	kevin-lu@ti.com, 13916275206@139.com,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	liam.r.girdwood@intel.com, mengdong.lin@intel.com,
	baojun.xu@ti.com, thomas.gfeller@q-drop.com, peeyush@ti.com,
	navada@ti.com, broonie@kernel.org, gentuser@gmail.com
Subject: Re: [PATCH v3 2/2] ALSA: hda/tas2781: Add tas2781 HDA driver
Date: Sun, 20 Aug 2023 11:16:08 +0200	[thread overview]
Message-ID: <87jztq9iqv.wl-tiwai@suse.de> (raw)
In-Reply-To: <ZN+j3LmfUW2vB+QS@smile.fi.intel.com>

On Fri, 18 Aug 2023 19:01:16 +0200,
Andy Shevchenko wrote:
> 
> On Fri, Aug 18, 2023 at 11:00:34AM -0500, Pierre-Louis Bossart wrote:
> 
> ...
> 
> > > +static int comp_match_tas2781_dev_name(struct device *dev,
> > > +	void *data)
> > > +{
> > > +	struct scodec_dev_name *p = data;
> > > +	const char *d = dev_name(dev);
> > > +	int n = strlen(p->bus);
> > > +	char tmp[32];
> > > +
> > > +	/* check the bus name */
> > > +	if (strncmp(d, p->bus, n))
> > > +		return 0;
> 
> > > +	/* skip the bus number */
> > > +	if (isdigit(d[n]))
> > > +		n++;
> 
> Why do you think it can't be two or more digits?
> 
> > > +	/* the rest must be exact matching */
> > > +	snprintf(tmp, sizeof(tmp), "-%s:00", p->hid);
> > 
> > ACPI can sometimes add :01 suffixes, this looks like the re-invention of
> > an ACPI helper?
> > 
> > Adding Andy for the ACPI review.
> > 
> > > +	return !strcmp(d + n, tmp);
> > > +}
> 
> Yes, this looks like reinventing a wheel.
> Just compare dev_name() against what is in p->....

Note that comp_match_tas7281_dev_name() is a copy of
comp_patch_cs35l41_dev_name() and it was implemented in a hackish way
to be applicable to both I2C and SPI device names that have slightly
different naming rules.

> ...
> 
> > > +static void tas2781_fixup_i2c(struct hda_codec *cdc,
> > > +	const struct hda_fixup *fix, int action)
> > > +{
> > > +	 tas2781_generic_fixup(cdc, action, "i2c", "TIAS2781");
> > 
> > TI ACPI ID is TXNW
> > 
> > https://uefi.org/ACPI_ID_List?search=TEXAS
> > 
> > There's also a PNP ID PXN
> > 
> > https://uefi.org/PNP_ID_List?search=TEXAS
> > 
> > "TIAS" looks like an invented identifier. It's not uncommon but should
> > be recorded with a comment if I am not mistaken.
> > 
> > > +}
> 
> Thank you, but actually it's a strong NAK to this even with the comment.
> We have to teach people to follow the specification (may be even hard way).
> 
> So where did you get the ill-formed ACPI ID?
> Is Texas Instrument aware of this?
> Can we have a confirmation letter from TI for this ID, please?

This is used already for products that have been long in the market,
so it's way too late to correct it, I'm afraid.

What we can do is to get the confirmation from TI, complain it, and
some verbose comment in the code, indeed.


thanks,

Takashi

  reply	other threads:[~2023-08-20  9:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-18  8:55 [PATCH v3 1/2] " Shenghao Ding
2023-08-18  8:55 ` [PATCH v3 2/2] " Shenghao Ding
2023-08-18 16:00   ` Pierre-Louis Bossart
2023-08-18 17:01     ` Andy Shevchenko
2023-08-20  9:16       ` Takashi Iwai [this message]
2023-08-21  9:06         ` Andy Shevchenko
2023-08-21  9:14           ` Takashi Iwai
2023-08-21  9:26             ` Andy Shevchenko
2023-08-18 16:30 ` [PATCH v3 1/2] " Pierre-Louis Bossart
2023-08-20  9:35   ` Takashi Iwai
2023-08-21 14:43     ` Pierre-Louis Bossart
2023-08-21 14:57       ` Takashi Iwai
2023-08-21 15:04         ` Pierre-Louis Bossart
  -- strict thread matches above, loose matches on Subject: below --
2023-08-17  8:26 Shenghao Ding
2023-08-17  8:26 ` [PATCH v3 2/2] " Shenghao Ding

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=87jztq9iqv.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=13916275206@139.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=baojun.xu@ti.com \
    --cc=broonie@kernel.org \
    --cc=gentuser@gmail.com \
    --cc=kevin-lu@ti.com \
    --cc=lgirdwood@gmail.com \
    --cc=liam.r.girdwood@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mengdong.lin@intel.com \
    --cc=navada@ti.com \
    --cc=peeyush@ti.com \
    --cc=perex@perex.cz \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=robh+dt@kernel.org \
    --cc=shenghao-ding@ti.com \
    --cc=thomas.gfeller@q-drop.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®