mbox series

[v2,00/19] ASoC: SOF: Intel/IPC4: Support for external firmware libraries

Message ID 20221020121238.18339-1-peter.ujfalusi@linux.intel.com
Headers show
Series ASoC: SOF: Intel/IPC4: Support for external firmware libraries | expand

Message

Peter Ujfalusi Oct. 20, 2022, 12:12 p.m. UTC
Hi,

Changes since v1:
- rebased on "[PATCH v2] ASoC: SOF: Intel: pci-tgl: fix ADL-N descriptor"

Cover letter:

In IPC4 all DSP loadable executable is a 'library' containing modules. The main
or basefw is also a library which contains multiple modules.
IPC4 allows to use loadable libraries to extend the functionality of the booted
basefw.

This series adds support for loading external libraries in case they are needed
by the loaded topology file.

The libraries must be placed to a specific firmware directory (fw_lib_prefix),
which is:
intel/avs-lib|sof-ipc4-lib/ followed by the platform name and in case of
community key use a 'community' directory.

For example for upx-i11 (community key): intel/avs-lib/tgl/community is the
default path.

The name of the library should be the UUID of the module it contains since the
library loading is going to look for the file as <module_UUID>.bin
In case there is a need to bundle multiple modules into single library, symlinks
can be used to point to the file:

module_boundle.bin
<UUID1>.bin -> module_boundle.bin
<UUID2>.bin -> module_boundle.bin
<UUID3>.bin -> module_boundle.bin

But note that in this case all modules will be loaded to the DSP since only the
whole library can be loaded, not individual modules.

Regards,
Peter
---
Peter Ujfalusi (18):
  ASoC: SOF: Introduce container struct for SOF firmware
  ASoC: SOF: amd: Use the basefw firmware container directly
  ASoC: SOF: Intel: hda-loader: Use the basefw firmware container
    directly
  ASoC: SOF: Intel: hda-loader-skl: Use the basefw firmware container
    directly
  ASoC: SOF: Drop the firmware and fw_offset from snd_sof_pdata
  ASoC: SOF: ipc: ops: Add support for optional init and exit callbacks
  ASoC: SOF: ipc4-loader: Save the maximum number of libraries supported
  ASoC: SOF: ipc4: Convert the firmware handling (loader) to library
    convention
  ASoC: SOF: IPC4: Add helper for looking up module by UUID
  ASoC: SOF: Add path definition for external firmware libraries
  ASoC: SOF: Intel: Set the default firmware library path for IPC4
  ASoC: SOF: ipc4: Define platform dependent library loading callback
  ASoC: SOF: Intel: hda: Add flag to indicate that the firmware is IMR
    booted
  ASoC: SOF: Intel: Add ipc4 library loading implementation
  ASoC: SOF: loader: Add support for IPC dependent post firmware boot
    ops
  ASoC: SOF: ipc4: Stop using the query_fw_configuration fw_loader ops
  ASoC: SOF: loader: Remove the query_fw_configuration ops
  ASoC: SOF: ipc4-loader: Support for loading external libraries

Ranjani Sridharan (1):
  ASoC: SOF: loader: Set complete state before post_fw_run op

 include/sound/sof.h                  |  10 +-
 include/sound/sof/ipc4/header.h      |   4 +
 sound/soc/sof/amd/acp-loader.c       |   6 +-
 sound/soc/sof/intel/apl.c            |   3 +
 sound/soc/sof/intel/cnl.c            |   3 +
 sound/soc/sof/intel/hda-loader-skl.c |   7 +-
 sound/soc/sof/intel/hda-loader.c     |  83 +++++++++-
 sound/soc/sof/intel/hda.h            |   4 +
 sound/soc/sof/intel/icl.c            |   3 +
 sound/soc/sof/intel/mtl.c            |   3 +
 sound/soc/sof/intel/pci-apl.c        |   6 +
 sound/soc/sof/intel/pci-cnl.c        |   9 ++
 sound/soc/sof/intel/pci-icl.c        |   6 +
 sound/soc/sof/intel/pci-mtl.c        |   3 +
 sound/soc/sof/intel/pci-tgl.c        |  24 +++
 sound/soc/sof/intel/tgl.c            |   3 +
 sound/soc/sof/ipc.c                  |   6 +
 sound/soc/sof/ipc3-loader.c          |  26 ++-
 sound/soc/sof/ipc4-loader.c          | 233 ++++++++++++++++++++++++---
 sound/soc/sof/ipc4-priv.h            |  65 ++++++--
 sound/soc/sof/ipc4-topology.c        |  17 +-
 sound/soc/sof/ipc4.c                 |  41 +++++
 sound/soc/sof/loader.c               |  25 ++-
 sound/soc/sof/sof-pci-dev.c          |  26 +++
 sound/soc/sof/sof-priv.h             |  27 +++-
 25 files changed, 543 insertions(+), 100 deletions(-)

Comments

Mark Brown Oct. 21, 2022, 7:05 p.m. UTC | #1
On Thu, 20 Oct 2022 15:12:19 +0300, Peter Ujfalusi wrote:
> Changes since v1:
> - rebased on "[PATCH v2] ASoC: SOF: Intel: pci-tgl: fix ADL-N descriptor"
> 
> Cover letter:
> 
> In IPC4 all DSP loadable executable is a 'library' containing modules. The main
> or basefw is also a library which contains multiple modules.
> IPC4 allows to use loadable libraries to extend the functionality of the booted
> basefw.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[01/19] ASoC: SOF: loader: Set complete state before post_fw_run op
        commit: 9b9db0d69bc16072a1d549ed4f343fd55ddfc48c
[02/19] ASoC: SOF: Introduce container struct for SOF firmware
        commit: 4f373ccf226e37a20fdc15a3df8034517a6045fd
[03/19] ASoC: SOF: amd: Use the basefw firmware container directly
        commit: b9bed09aa97f90a40695eb472b1baba81242e3ed
[04/19] ASoC: SOF: Intel: hda-loader: Use the basefw firmware container directly
        commit: 410a321c9721bb3e839f64ffe60b45492d0f1f65
[05/19] ASoC: SOF: Intel: hda-loader-skl: Use the basefw firmware container directly
        commit: 4fd0f664bdcdd63ce95542227f65459447426aa4
[06/19] ASoC: SOF: Drop the firmware and fw_offset from snd_sof_pdata
        commit: e3775fda57d49984eaa2cfd86665a152806bfd81
[07/19] ASoC: SOF: ipc: ops: Add support for optional init and exit callbacks
        commit: aa23b375363f6aba208761ff9985231cc69d00b8
[08/19] ASoC: SOF: ipc4-loader: Save the maximum number of libraries supported
        commit: b0a12fa905fad870bd941df2726953edafb489f3
[09/19] ASoC: SOF: ipc4: Convert the firmware handling (loader) to library convention
        commit: 5a932cfce4401491c942ddcb7fd3ca669e507b4d
[10/19] ASoC: SOF: IPC4: Add helper for looking up module by UUID
        commit: c73f8b470855d3123ab4b443aa9c255412dc1a13
[11/19] ASoC: SOF: Add path definition for external firmware libraries
        commit: 25bbc0c59ee15cfc37acaaa831de447f2c2fbcb9
[12/19] ASoC: SOF: Intel: Set the default firmware library path for IPC4
        commit: cd6f2a2e6346ea0955c9bed0c60add8c13b3d5f7
[13/19] ASoC: SOF: ipc4: Define platform dependent library loading callback
        commit: a5ab431e18d48e618166e8507a3555568d570cd8
[14/19] ASoC: SOF: Intel: hda: Add flag to indicate that the firmware is IMR booted
        commit: 5d5d915bcde228cd78f5d42062fb65babe651363
[15/19] ASoC: SOF: Intel: Add ipc4 library loading implementation
        commit: 3ab2c21e65188cac151de1fbe6adf841f2ecb082
[16/19] ASoC: SOF: loader: Add support for IPC dependent post firmware boot ops
        commit: cbb984b68b8d03aa423a3a0bf2946175b9e25345
[17/19] ASoC: SOF: ipc4: Stop using the query_fw_configuration fw_loader ops
        commit: e68513106eec04eba9da30d761ba0d22a4cf9e93
[18/19] ASoC: SOF: loader: Remove the query_fw_configuration ops
        commit: ba42b8bac3fd10b90eefbe42d8d0839d71bf7638
[19/19] ASoC: SOF: ipc4-loader: Support for loading external libraries
        commit: 73c091a2fe96fac2b893ba166fa7cd11eff45947

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark