Alsa-Devel Archive on lore.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>,
	"zhourui@huaqin.com" <zhourui@huaqin.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"Salazar, Ivan" <i-salazar@ti.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Chadha, Jasjot Singh" <j-chadha@ti.com>,
	"liam.r.girdwood@intel.com" <liam.r.girdwood@intel.com>,
	"Yue, Jaden" <jaden-yue@ti.com>,
	"yung-chuan.liao@linux.intel.com"
	<yung-chuan.liao@linux.intel.com>, "Rao, Dipa" <dipa@ti.com>,
	"yuhsuan@google.com" <yuhsuan@google.com>,
	"Lo, Henry" <henry.lo@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>,
	"judyhsiao@google.com" <judyhsiao@google.com>,
	"Navada Kanyana, Mukund" <navada@ti.com>,
	"cujomalainey@google.com" <cujomalainey@google.com>,
	"Kutty, Aanya" <aanya@ti.com>,
	"Mahmud, Nayeem" <nayeem.mahmud@ti.com>,
	"savyasanchi.shukla@netradyne.com"
	<savyasanchi.shukla@netradyne.com>,
	"flaviopr@microsoft.com" <flaviopr@microsoft.com>,
	"Ji, Jesse" <jesse-ji@ti.com>,
	"darren.ye@mediatek.com" <darren.ye@mediatek.com>
Subject: RE: [EXTERNAL] Re: [RESEND PATCH v4] ASoc: tas2781: Enable RCA-based playback without DSP firmware download
Date: Wed, 12 Jun 2024 11:51:55 +0000	[thread overview]
Message-ID: <c56ec5c5bd7349a788251230deead24a@ti.com> (raw)
In-Reply-To: <146da765-c53f-4eb4-874e-53625daeb03e@linux.intel.com>

Hi Pierre
Sorry for missing your valuable review comments, thanks for Broonie's remind.

> -----Original Message-----
> From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> Sent: Thursday, June 6, 2024 9:09 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; zhourui@huaqin.com; alsa-
> devel@alsa-project.org; Salazar, Ivan <i-salazar@ti.com>; linux-
> kernel@vger.kernel.org; Chadha, Jasjot Singh <j-chadha@ti.com>;
> liam.r.girdwood@intel.com; Yue, Jaden <jaden-yue@ti.com>; yung-
> chuan.liao@linux.intel.com; Rao, Dipa <dipa@ti.com>; yuhsuan@google.com;
> Lo, Henry <henry.lo@ti.com>; tiwai@suse.de; Xu, Baojun <baojun.xu@ti.com>;
> soyer@irl.hu; Baojun.Xu@fpt.com; judyhsiao@google.com; Navada Kanyana,
> Mukund <navada@ti.com>; cujomalainey@google.com; Kutty, Aanya
> <aanya@ti.com>; Mahmud, Nayeem <nayeem.mahmud@ti.com>;
> savyasanchi.shukla@netradyne.com; flaviopr@microsoft.com; Ji, Jesse <jesse-
> ji@ti.com>; darren.ye@mediatek.com
> Subject: [EXTERNAL] Re: [RESEND PATCH v4] ASoc: tas2781: Enable RCA-based
> playback without DSP firmware download
> 
> I am afraid there are still circular logic issues, or the code/comments don't
> capture what you are trying to do. . . . > diff --git a/include/sound/tas2781-
> dsp. h b/include/sound/tas2781-dsp. h > index 7fba7ea26a4b. . 3cda9da14f6d
> 100644 > 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. If you wish to report this message to IT
> Security, please forward the message as an attachment to phishing@list.ti.com
> 
> ZjQcmQRYFpfptBannerEnd
> I am afraid there are still circular logic issues, or the code/comments don't
> capture what you are trying to do....
> 
> 
..................................
> ... and here this TASDEVICE_RCA_FW_OK really means a fail.
> 
> so how can [1] consider TASDEVICE_RCA_FW_OK as a success case?
> 
> Or this this saying that the baseline is the RCA case, and then the code
> attempts to load firmware but in case of failures just keep going, i.e.
> failing to load firmware is NOT an error?
Correct.
> 
> That would be somewhat different to the commit title that says 'without DSP
> firmware download'.
> 
> Would you mind clarifying the steps please?
There's two bin files for tas2781, one is register settings(RCA bin file), the other is the dsp firmware and filter coeff.
If no RCA bin file is load, the tas2781 can't work, it will be TASDEVICE_DSP_FW_FAIL.
If only RCA bin file load, the tas2781 will work in bypass mode, which dsp do not work, neither spk protection nor acoustic 
algorithm is enabled 
(TASDEVICE_RCA_FW_OK).
If both RCA bin and dsp firmware are loaded, that is TASDEVICE_DSP_FW_ALL_OK, tas2781 work in dsp mode, both spk protection
and acoustic algorithm are enabled
> 
> 
> >  		tasdevice_dsp_remove(tas_priv);
> >  	}
> >  	mutex_unlock(&tas_priv->codec_lock);
> > @@ -466,14 +474,14 @@ static int tasdevice_startup(struct
> > snd_pcm_substream *substream,  {
> >  	struct snd_soc_component *codec = dai->component;
> >  	struct tasdevice_priv TASDEVICE_RCA_FW_OK*tas_priv =
> snd_soc_component_get_drvdata(codec);
> > -	int ret = 0;
> >
> > -	if (tas_priv->fw_state != TASDEVICE_DSP_FW_ALL_OK) {
> > -		dev_err(tas_priv->dev, "DSP bin file not loaded\n");
> > -		ret = -EINVAL;
> > +	switch (tas_priv->fw_state) {
> > +	case TASDEVICE_RCA_FW_OK:
> > +	case TASDEVICE_DSP_FW_ALL_OK:
> > +		return 0;
> > +	default:
> > +		return -EINVAL;
> >  	}
> > -
> > -	return ret;
> >  }
> >
> >  static int tasdevice_hw_params(struct snd_pcm_substream *substream,

  reply	other threads:[~2024-06-12 11:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-06 12:41 [RESEND PATCH v4] ASoc: tas2781: Enable RCA-based playback without DSP firmware download Shenghao Ding
2024-06-06 12:41 ` Shenghao Ding
2024-06-06 13:09 ` Pierre-Louis Bossart
2024-06-12 11:51   ` Ding, Shenghao [this message]
2024-06-12 13:43     ` [EXTERNAL] " Pierre-Louis Bossart

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=c56ec5c5bd7349a788251230deead24a@ti.com \
    --to=shenghao-ding@ti.com \
    --cc=13916275206@139.com \
    --cc=Baojun.Xu@fpt.com \
    --cc=aanya@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=baojun.xu@ti.com \
    --cc=broonie@kernel.org \
    --cc=cujomalainey@google.com \
    --cc=darren.ye@mediatek.com \
    --cc=dipa@ti.com \
    --cc=flaviopr@microsoft.com \
    --cc=henry.lo@ti.com \
    --cc=i-salazar@ti.com \
    --cc=j-chadha@ti.com \
    --cc=jaden-yue@ti.com \
    --cc=jesse-ji@ti.com \
    --cc=judyhsiao@google.com \
    --cc=lgirdwood@gmail.com \
    --cc=liam.r.girdwood@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=navada@ti.com \
    --cc=nayeem.mahmud@ti.com \
    --cc=perex@perex.cz \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=savyasanchi.shukla@netradyne.com \
    --cc=soyer@irl.hu \
    --cc=tiwai@suse.de \
    --cc=yuhsuan@google.com \
    --cc=yung-chuan.liao@linux.intel.com \
    --cc=zhourui@huaqin.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