From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: "Ding, Shenghao" <shenghao-ding@ti.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 15:43:36 +0200 [thread overview]
Message-ID: <1aad588c-c3b8-46a9-bf70-03028d28350f@linux.intel.com> (raw)
In-Reply-To: <c56ec5c5bd7349a788251230deead24a@ti.com>
>> 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
Now I get it, and I guess I was thrown off by the title of your commit
message and previous comments that the DSP_FW_FAIL state is used for the
HDaudio mode.
It's not that the RCA mode is enabled by this patch. It was present
already in the existing driver code. This patch allows this RCA mode to
become a fallback if the DSP firmware load fails, but the DSP_FW_FAIL is
still used on RCA bin load problems.
So you may want to clarify the commit title and message, but from a code
perspective things looks ok:
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
>>> 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,
prev parent reply other threads:[~2024-06-12 13:43 UTC|newest]
Thread overview: 4+ 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 13:09 ` Pierre-Louis Bossart
2024-06-12 11:51 ` [EXTERNAL] " Ding, Shenghao
2024-06-12 13:43 ` Pierre-Louis Bossart [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=1aad588c-c3b8-46a9-bf70-03028d28350f@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.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=savyasanchi.shukla@netradyne.com \
--cc=shenghao-ding@ti.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