[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d112d7dd-de80-4c5b-9600-039758c56352@collabora.com>
Date: Thu, 14 Dec 2023 13:40:25 +0200
From: Cristian Ciocaltea <cristian.ciocaltea@...labora.com>
To: Péter Ujfalusi <peter.ujfalusi@...ux.intel.com>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
Bard Liao <yung-chuan.liao@...ux.intel.com>,
Ranjani Sridharan <ranjani.sridharan@...ux.intel.com>,
Daniel Baluta <daniel.baluta@....com>,
Kai Vehmanen <kai.vehmanen@...ux.intel.com>,
Venkata Prasad Potturu <venkataprasad.potturu@....com>,
Alper Nebi Yasak <alpernebiyasak@...il.com>,
Syed Saba Kareem <Syed.SabaKareem@....com>,
Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>,
Marian Postevca <posteuca@...ex.one>,
Vijendar Mukunda <Vijendar.Mukunda@....com>,
V sujith kumar Reddy <Vsujithkumar.Reddy@....com>,
Mastan Katragadda <Mastan.Katragadda@....com>,
Ajit Kumar Pandey <AjitKumar.Pandey@....com>
Cc: linux-sound@...r.kernel.org, linux-kernel@...r.kernel.org,
sound-open-firmware@...a-project.org, kernel@...labora.com
Subject: Re: [PATCH 07/11] ASoC: SOF: core: Skip firmware test for undefined
fw_name
On 12/14/23 13:35, Péter Ujfalusi wrote:
>
>
> On 14/12/2023 13:29, Cristian Ciocaltea wrote:
>>> diff --git a/sound/soc/sof/fw-file-profile.c b/sound/soc/sof/fw-file-profile.c
>>> index 138a1ca2c4a8..7b91c9551ada 100644
>>> --- a/sound/soc/sof/fw-file-profile.c
>>> +++ b/sound/soc/sof/fw-file-profile.c
>>> @@ -89,6 +89,15 @@ static int sof_test_topology_file(struct device *dev,
>>> return ret;
>>> }
>>>
>>> +static bool sof_platform_uses_generic_loader(struct snd_sof_dev *sdev)
>>> +{
>>> + if (sdev->pdata->desc->ops->load_firmware == snd_sof_load_firmware_raw ||
>>> + sdev->pdata->desc->ops->load_firmware == snd_sof_load_firmware_memcpy)
>>> + return true;
>>> +
>>> + return false;
>>> +}
>>
>> I would drop the conditional and simply return.
>
> What do you mean? We need to check if the platform is using either type
> of the generic load_firmware helper (the _memcpy is calling the _raw to
> load the file).
I mean to simply replace the if statement with:
static bool sof_platform_uses_generic_loader(struct snd_sof_dev *sdev)
{
return (sdev->pdata->desc->ops->load_firmware == snd_sof_load_firmware_raw ||
sdev->pdata->desc->ops->load_firmware == snd_sof_load_firmware_memcpy);
}
Powered by blists - more mailing lists