public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Ding, Shenghao" <shenghao-ding@ti.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	"broonie@kernel.org" <broonie@kernel.org>
Cc: "andriy.shevchenko@linux.intel.com"
	<andriy.shevchenko@linux.intel.com>,
	"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
	"perex@perex.cz" <perex@perex.cz>,
	"13916275206@139.com" <13916275206@139.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"liam.r.girdwood@intel.com" <liam.r.girdwood@intel.com>,
	"bard.liao@intel.com" <bard.liao@intel.com>,
	"mengdong.lin@intel.com" <mengdong.lin@intel.com>,
	"yung-chuan.liao@linux.intel.com"
	<yung-chuan.liao@linux.intel.com>, "Lu, Kevin" <kevin-lu@ti.com>,
	"tiwai@suse.de" <tiwai@suse.de>, "Xu, Baojun" <baojun.xu@ti.com>,
	"soyer@irl.hu" <soyer@irl.hu>,
	"Baojun.Xu@fpt.com" <Baojun.Xu@fpt.com>,
	"Navada Kanyana, Mukund" <navada@ti.com>
Subject: RE: [EXTERNAL] Re: [PATCH v11] ASoc: tas2783: Add tas2783 codec driver
Date: Tue, 26 Mar 2024 12:36:05 +0000	[thread overview]
Message-ID: <51a81ac8aace456aae7d07634912367c@ti.com> (raw)
In-Reply-To: <34f404cd-a12d-4ffa-9398-72de3be244b3@linux.intel.com>

Hi Guy
Thanks for your comments. Feedback inline

> -----Original Message-----
> From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> Sent: Tuesday, March 19, 2024 11:35 PM
> To: Ding, Shenghao <shenghao-ding@ti.com>; broonie@kernel.org
> Cc: andriy.shevchenko@linux.intel.com; lgirdwood@gmail.com;
> perex@perex.cz; 13916275206@139.com; alsa-devel@alsa-project.org;
> linux-kernel@vger.kernel.org; liam.r.girdwood@intel.com;
> bard.liao@intel.com; mengdong.lin@intel.com; yung-
> chuan.liao@linux.intel.com; Lu, Kevin <kevin-lu@ti.com>; tiwai@suse.de; Xu,
> Baojun <baojun.xu@ti.com>; soyer@irl.hu; Baojun.Xu@fpt.com; Navada
> Kanyana, Mukund <navada@ti.com>
> Subject: [EXTERNAL] Re: [PATCH v11] ASoc: tas2783: Add tas2783 codec
> driver
> 
> > +static bool tas2783_readable_register(struct device *dev, > +
> > +unsigned int reg) > +{ > + switch (reg) { > + /* Page 0 */ > + case
> > +0x8000 .. . 0x807F: > + return true; > + default: > + return false;
> > +so only the registers
> ZjQcmQRYFpfptBannerStart
> This message was sent from outside of Texas Instruments.
> Do not click links or open attachments unless you recognize the source of
> this email and know the content is safe.
> 
> ZjQcmQRYFpfptBannerEnd
> 
> > +static bool tas2783_readable_register(struct device *dev,
................................................
> > +
> > +	/* Check Calibrated Data V2 */
> > +	if (tmp_val[0] == 2783) {
> > +		const struct calibdatav2_info calib_info = {
> > +			.number_of_devices = tmp_val[1],
> > +			.crc32_indx = 3 + tmp_val[1] * 6,
> > +			.byt_sz = 12 + tmp_val[1] * 24,
> > +			.cali_data = &tmp_val[3]
> > +		};
> > +
> > +		if (calib_info.number_of_devices >
> TAS2783_MAX_DEV_NUM ||
> > +			calib_info.number_of_devices == 0) {
> > +			dev_dbg(tas_dev->dev, "No dev in calibrated data
> V2.");
> 
> the log is not aligned with the first condition where you have too many
> devices.
> 
> It's not clear why it's not an error.
playback still work without calibrated data stored in UEFI, for example bypass mode.
Even if in case of bypass mode, algo can still work with default calibrated data.
So, not an error.
> 
> > +			return;
> > +		}
> > +		crc = crc32(~0, cali_data.data, calib_info.byt_sz)
> > +			^ ~0;
> > +		if (crc == tmp_val[calib_info.crc32_indx]) {
> > +			tas2783_apply_calibv2(tas_dev, &calib_info);
> > +			dev_dbg(tas_dev->dev, "V2: %ptTs",
> 
> same, is this needed?
Accepted.
> > +
> 	&tmp_val[TAS2783_CALIDATAV2_TIMESTAMP_INDX]);
> > +		} else {
> > +			dev_dbg(tas_dev->dev,
> > +				"V2: CRC 0x%08x not match 0x%08x\n",
> > +				crc, tmp_val[calib_info.crc32_indx]);
> 
> is this not an error?
> 
> > +		}
> > +	} else {
> > +		dev_err(tas_dev->dev, "Non-2783 chip\n");
> > +	}
> > +}
> 
> the error level seem inconsistent and it's not clear why errors are ignored?
Maybe set them as dev_warn?


  reply	other threads:[~2024-03-26 12:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-19 13:58 [PATCH v11] ASoc: tas2783: Add tas2783 codec driver Shenghao Ding
2024-03-19 15:35 ` Pierre-Louis Bossart
2024-03-26 12:36   ` Ding, Shenghao [this message]
2024-03-26 15:00     ` [EXTERNAL] " Pierre-Louis Bossart
  -- strict thread matches above, loose matches on Subject: below --
2024-03-05 13:26 Shenghao Ding
2024-03-05 16:03 ` Pierre-Louis Bossart
2024-03-10  0:47   ` [EXTERNAL] " Ding, Shenghao
2024-03-11 15:25     ` Pierre-Louis Bossart
2024-03-05 16:04 ` Amadeusz Sławiński
2024-03-16 12:44   ` [EXTERNAL] " Ding, Shenghao
2024-03-18  9:12     ` Amadeusz Sławiński

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=51a81ac8aace456aae7d07634912367c@ti.com \
    --to=shenghao-ding@ti.com \
    --cc=13916275206@139.com \
    --cc=Baojun.Xu@fpt.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=baojun.xu@ti.com \
    --cc=bard.liao@intel.com \
    --cc=broonie@kernel.org \
    --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=perex@perex.cz \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=soyer@irl.hu \
    --cc=tiwai@suse.de \
    --cc=yung-chuan.liao@linux.intel.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