* SOF Platform data.
*/
struct snd_sof_pdata {
- const struct firmware *fw;
const char *name;
const char *platform;
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
* can take time or is handled in a workqueue. This callback
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:
kfree(fw_filename);
int snd_sof_load_firmware_memcpy(struct snd_sof_dev *sdev)
{
- struct snd_sof_pdata *plat_data = sdev->pdata;
int ret;
ret = snd_sof_load_firmware_raw(sdev);
error:
release_firmware(sdev->basefw.fw);
sdev->basefw.fw = NULL;
- plat_data->fw = NULL;
return ret;
}
/* TODO: support module unloading at runtime */
release_firmware(sdev->basefw.fw);
sdev->basefw.fw = NULL;
- sdev->pdata->fw = NULL;
}
EXPORT_SYMBOL(snd_sof_fw_unload);