All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ding, Shenghao" <shenghao-ding@ti.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: Shenghao Ding <13916275206@139.com>,
	"broonie@kernel.org" <broonie@kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"krzysztof.kozlowski+dt@linaro.org"
	<krzysztof.kozlowski+dt@linaro.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
	"perex@perex.cz" <perex@perex.cz>,
	"pierre-louis.bossart@linux.intel.com"
	<pierre-louis.bossart@linux.intel.com>,
	"Lu, Kevin" <kevin-lu@ti.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Xu, Baojun" <x1077012@ti.com>, "Gupta, Peeyush" <peeyush@ti.com>,
	"Navada Kanyana, Mukund" <navada@ti.com>,
	"gentuser@gmail.com" <gentuser@gmail.com>,
	"Ryan_Chu@wistron.com" <Ryan_Chu@wistron.com>,
	"Sam_Wu@wistron.com" <Sam_Wu@wistron.com>
Subject: RE: [EXTERNAL] Re: [PATCH v3 4/5] ALSA: hda/tas2781: Add tas2781 HDA driver
Date: Thu, 25 May 2023 12:53:38 +0000	[thread overview]
Message-ID: <0102db2e22dc472091a586bb73b467d9@ti.com> (raw)
In-Reply-To: <87353ngtp1.wl-tiwai@suse.de>



> -----Original Message-----
> From: Takashi Iwai <tiwai@suse.de>
> Sent: Tuesday, May 23, 2023 7:43 PM
> To: Ding, Shenghao <shenghao-ding@ti.com>
> Cc: Shenghao Ding <13916275206@139.com>; broonie@kernel.org;
> devicetree@vger.kernel.org; krzysztof.kozlowski+dt@linaro.org;
> robh+dt@kernel.org; lgirdwood@gmail.com; perex@perex.cz; pierre-
> louis.bossart@linux.intel.com; Lu, Kevin <kevin-lu@ti.com>; alsa-
> devel@alsa-project.org; linux-kernel@vger.kernel.org; Xu, Baojun
> <x1077012@ti.com>; Gupta, Peeyush <peeyush@ti.com>; Navada Kanyana,
> Mukund <navada@ti.com>; gentuser@gmail.com; Ryan_Chu@wistron.com;
> Sam_Wu@wistron.com
> Subject: Re: [EXTERNAL] Re: [PATCH v3 4/5] ALSA: hda/tas2781: Add tas2781
> HDA driver
> 
> On Tue, 23 May 2023 13:22:03 +0200,
> Ding, Shenghao wrote:
> >
> > > +	[ALC287_FIXUP_TAS2781_I2C_2] = {
> > > +		.type = HDA_FIXUP_FUNC,
> > > +		.v.func = tas2781_fixup_i2c,
> > > +		.chained = true,
> > > +		.chain_id = ALC269_FIXUP_THINKPAD_ACPI,
> > > +	},
> > > +	[ALC287_FIXUP_TAS2781_I2C_4] = {
> > > +		.type = HDA_FIXUP_FUNC,
> > > +		.v.func = tas2781_fixup_i2c,
> > > +		.chained = true,
> > > +		.chain_id = ALC269_FIXUP_THINKPAD_ACPI,
> > > +	},
> >
> > What's a difference between *_2 and *_4?
> > Combine them into ALC287_FIXUP_TAS2781_I2C
> 
> Hm, so there is no difference in stereo and quad speakers?
Yes, our firmware defines the stereo or quad speaker
> 
> > > +static int tas2781_save_calibration(struct tasdevice_priv
> > > +*tas_priv) {
> > > +	efi_guid_t efi_guid = EFI_GUID(0x02f9af02, 0x7734, 0x4233, 0xb4,
> 0x3d,
> > > +		0x93, 0xfe, 0x5a, 0xa3, 0x5d, 0xb3);
> > > +	static efi_char16_t efi_name[] = L"CALI_DATA";
> > > +	struct hda_codec *codec = tas_priv->codec;
> > > +	unsigned int subid = codec->core.subsystem_id & 0xFFFF;
> > > +	struct tm *tm = &tas_priv->tm;
> > > +	unsigned int attr, crc;
> > > +	unsigned int *tmp_val;
> > > +	efi_status_t status;
> > > +	int ret = 0;
> > > +
> > > +	//Lenovo devices
> > > +	if ((subid == 0x387d) || (subid == 0x387e) || (subid == 0x3881)
> > > +		|| (subid == 0x3884) || (subid == 0x3886) || (subid == 0x38a7)
> > > +		|| (subid == 0x38a8) || (subid == 0x38ba) || (subid ==
> 0x38bb)
> > > +		|| (subid == 0x38be) || (subid == 0x38bf) || (subid == 0x38c3)
> > > +		|| (subid == 0x38cb) || (subid == 0x38cd))
> > > +		efi_guid = EFI_GUID(0x1f52d2a1, 0xbb3a, 0x457d, 0xbc, 0x09,
> > > +			0x43, 0xa3, 0xf4, 0x31, 0x0a, 0x92);
> >
> > Here can be a problem: the device ID is embedded here, and it's hard to
> find out.  You'd better to make it some quirk flag that is set in a common
> place and check the flag here instead of checking ID at each place.
> >
> > Do you have example of the solution? I found some quirk flag is static in
> the patch_realtek.c, can't be accessed outside that file.
> 
> You may store some values in struct hda_component, I suppose?
I will try it.
> 
> BTW, please try to fix your mailer to do citation more correctly...
accept
> 
> 
> thanks,
> 
> Takashi

      reply	other threads:[~2023-05-25 12:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-19  8:02 [PATCH v3 4/5] ALSA: hda/tas2781: Add tas2781 HDA driver Shenghao Ding
2023-05-21  8:02 ` Takashi Iwai
2023-05-23 11:22   ` [EXTERNAL] " Ding, Shenghao
2023-05-23 11:42     ` Takashi Iwai
2023-05-25 12:53       ` Ding, Shenghao [this message]

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=0102db2e22dc472091a586bb73b467d9@ti.com \
    --to=shenghao-ding@ti.com \
    --cc=13916275206@139.com \
    --cc=Ryan_Chu@wistron.com \
    --cc=Sam_Wu@wistron.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gentuser@gmail.com \
    --cc=kevin-lu@ti.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --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=tiwai@suse.de \
    --cc=x1077012@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.