mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 20:22:09 +00:00
ASoC: SOF: Drop the firmware and fw_offset from snd_sof_pdata
The SOF stack now uses the sdev->basefw to work with the SOF firmware, the information from plat_data can be dropped. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Chao Song <chao.song@intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20221020121238.18339-7-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
4fd0f664bd
commit
e3775fda57
@ -59,15 +59,11 @@ enum sof_ipc_type {
|
|||||||
* SOF Platform data.
|
* SOF Platform data.
|
||||||
*/
|
*/
|
||||||
struct snd_sof_pdata {
|
struct snd_sof_pdata {
|
||||||
const struct firmware *fw;
|
|
||||||
const char *name;
|
const char *name;
|
||||||
const char *platform;
|
const char *platform;
|
||||||
|
|
||||||
struct device *dev;
|
struct device *dev;
|
||||||
|
|
||||||
/* indicate how many first bytes shouldn't be loaded into DSP memory. */
|
|
||||||
size_t fw_offset;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* notification callback used if the hardware initialization
|
* notification callback used if the hardware initialization
|
||||||
* can take time or is handled in a workqueue. This callback
|
* can take time or is handled in a workqueue. This callback
|
||||||
|
@ -58,12 +58,6 @@ int snd_sof_load_firmware_raw(struct snd_sof_dev *sdev)
|
|||||||
fw_filename, ret);
|
fw_filename, ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Until the platform code is switched to use the new container the fw
|
|
||||||
* and payload offset must be set in plat_data
|
|
||||||
*/
|
|
||||||
plat_data->fw = sdev->basefw.fw;
|
|
||||||
plat_data->fw_offset = sdev->basefw.payload_offset;
|
|
||||||
err:
|
err:
|
||||||
kfree(fw_filename);
|
kfree(fw_filename);
|
||||||
|
|
||||||
@ -73,7 +67,6 @@ EXPORT_SYMBOL(snd_sof_load_firmware_raw);
|
|||||||
|
|
||||||
int snd_sof_load_firmware_memcpy(struct snd_sof_dev *sdev)
|
int snd_sof_load_firmware_memcpy(struct snd_sof_dev *sdev)
|
||||||
{
|
{
|
||||||
struct snd_sof_pdata *plat_data = sdev->pdata;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = snd_sof_load_firmware_raw(sdev);
|
ret = snd_sof_load_firmware_raw(sdev);
|
||||||
@ -108,7 +101,6 @@ int snd_sof_load_firmware_memcpy(struct snd_sof_dev *sdev)
|
|||||||
error:
|
error:
|
||||||
release_firmware(sdev->basefw.fw);
|
release_firmware(sdev->basefw.fw);
|
||||||
sdev->basefw.fw = NULL;
|
sdev->basefw.fw = NULL;
|
||||||
plat_data->fw = NULL;
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -194,6 +186,5 @@ void snd_sof_fw_unload(struct snd_sof_dev *sdev)
|
|||||||
/* TODO: support module unloading at runtime */
|
/* TODO: support module unloading at runtime */
|
||||||
release_firmware(sdev->basefw.fw);
|
release_firmware(sdev->basefw.fw);
|
||||||
sdev->basefw.fw = NULL;
|
sdev->basefw.fw = NULL;
|
||||||
sdev->pdata->fw = NULL;
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(snd_sof_fw_unload);
|
EXPORT_SYMBOL(snd_sof_fw_unload);
|
||||||
|
Loading…
Reference in New Issue
Block a user