[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1aad588c-c3b8-46a9-bf70-03028d28350f@linux.intel.com>
Date: Wed, 12 Jun 2024 15:43:36 +0200
From: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
To: "Ding, Shenghao" <shenghao-ding@...com>,
"broonie@...nel.org" <broonie@...nel.org>
Cc: "andriy.shevchenko@...ux.intel.com" <andriy.shevchenko@...ux.intel.com>,
"lgirdwood@...il.com" <lgirdwood@...il.com>, "perex@...ex.cz"
<perex@...ex.cz>, "13916275206@....com" <13916275206@....com>,
"zhourui@...qin.com" <zhourui@...qin.com>,
"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
"Salazar, Ivan" <i-salazar@...com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Chadha, Jasjot Singh" <j-chadha@...com>,
"liam.r.girdwood@...el.com" <liam.r.girdwood@...el.com>,
"Yue, Jaden" <jaden-yue@...com>,
"yung-chuan.liao@...ux.intel.com" <yung-chuan.liao@...ux.intel.com>,
"Rao, Dipa" <dipa@...com>, "yuhsuan@...gle.com" <yuhsuan@...gle.com>,
"Lo, Henry" <henry.lo@...com>, "tiwai@...e.de" <tiwai@...e.de>,
"Xu, Baojun" <baojun.xu@...com>, "soyer@....hu" <soyer@....hu>,
"Baojun.Xu@....com" <Baojun.Xu@....com>,
"judyhsiao@...gle.com" <judyhsiao@...gle.com>,
"Navada Kanyana, Mukund" <navada@...com>,
"cujomalainey@...gle.com" <cujomalainey@...gle.com>,
"Kutty, Aanya" <aanya@...com>, "Mahmud, Nayeem" <nayeem.mahmud@...com>,
"savyasanchi.shukla@...radyne.com" <savyasanchi.shukla@...radyne.com>,
"flaviopr@...rosoft.com" <flaviopr@...rosoft.com>,
"Ji, Jesse" <jesse-ji@...com>,
"darren.ye@...iatek.com" <darren.ye@...iatek.com>
Subject: Re: [EXTERNAL] Re: [RESEND PATCH v4] ASoc: tas2781: Enable RCA-based
playback without DSP firmware download
>> 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@...ux.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,
Powered by blists - more mailing lists