Re: [EXTERNAL] Re: [RESEND PATCH v4] ASoc: tas2781: Enable RCA-based playback without DSP firmware download

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




>> 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@xxxxxxxxxxxxxxx>


>>>  		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,



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux