ASoC: SOF: ipc4: Define platform dependent library loading callback
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Thu, 20 Oct 2022 12:12:32 +0000 (15:12 +0300)
committerMark Brown <broonie@kernel.org>
Fri, 21 Oct 2022 12:05:05 +0000 (13:05 +0100)
Platforms where external libraries can be supported should set the
load_library callback to implement this functionality.

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-14-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/ipc4-priv.h

index ecfa9f7..7e7115a 100644 (file)
@@ -66,6 +66,8 @@ struct sof_ipc4_fw_library {
  * @mtrace_log_bytes: log bytes as reported by the firmware via fw_config reply
  * @max_libs_count: Maximum number of libraries support by the FW including the
  *                 base firmware
+ *
+ * @load_library: Callback function for platform dependent library loading
  */
 struct sof_ipc4_fw_data {
        u32 manifest_fw_hdr_offset;
@@ -74,6 +76,9 @@ struct sof_ipc4_fw_data {
        enum sof_ipc4_mtrace_type mtrace_type;
        u32 mtrace_log_bytes;
        u32 max_libs_count;
+
+       int (*load_library)(struct snd_sof_dev *sdev,
+                           struct sof_ipc4_fw_library *fw_lib, bool reload);
 };
 
 extern const struct sof_ipc_fw_loader_ops ipc4_loader_ops;