ASoC: SOF: ipc4: Convert the firmware handling (loader) to library convention
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Thu, 20 Oct 2022 12:12:28 +0000 (15:12 +0300)
committerMark Brown <broonie@kernel.org>
Fri, 21 Oct 2022 12:05:01 +0000 (13:05 +0100)
commit5a932cfce4401491c942ddcb7fd3ca669e507b4d
treedf88b86c7f6a1e2a154c86a8aefc1526ba9899c8
parentb0a12fa905fad870bd941df2726953edafb489f3
ASoC: SOF: ipc4: Convert the firmware handling (loader) to library convention

With IPC4 each DSP loadable binary is a library, which contains
ext_manifest section and loadable modules.
The basefw is no exception, it is always library 0 and it can contain
several modules, depending on the firmware build.

The current code assumes only one binary, which is the basefw and has no
concept of libraries.
This patch introduces the library+modules abstraction and represents the
basefw as library for the IPC4 loader codebase.
The basefw loading and handling is not changing, it is still done by the
generic code, but it's information is cloned under the library
representation.

The libraries are managed via XArray to offload the list and ID management.

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