mbox series

[0/9] ASoC: SOF: IPC client infrastructure

Message ID 20220210105519.19795-1-peter.ujfalusi@linux.intel.com
Headers show
Series ASoC: SOF: IPC client infrastructure | expand

Message

Peter Ujfalusi Feb. 10, 2022, 10:55 a.m. UTC
Hi,

The Linux SOF implementation is historically monolithic in a sense that all
features accessible in the firmware can be used via the snd_sof_dev struct in
one way or another.

Support for features can not be added or removed runtime and with the current
way of things it is hard if not impossible to implement support for dynamic
feature support when based on the firmware manifest we can easily enable/access
independent modules with the SOF.

In order to be able to support such modularity this series introduces a small
framework within SOF for client support using the Auxiliary bus.

Client drivers can be removed runtime and later re-loaded if needed without
affecting the core's behaviour, but it is the core's and the platform's duty
to create the Auxiliary devices usable in the platform and via the firmware.

There is still a need for SOF manifest update to convey information about
features to really make the full dynamic client device creation.

The series will introduce the core SOF client support and converts the generic
ipc flood test, ipc message injector and the probes (Intel HDA only) to a client
driver.

Regards,
Peter
---
Peter Ujfalusi (8):
  ASoC: SOF: Drop unused DSP power states: D3_HOT and D3_COLD
  ASoC: SOF: Move the definition of enum sof_dsp_power_states to global
    header
  ASoC: SOF: ipc: Read and pass the whole message to handlers for IPC
    events
  ASoC: SOF: Split up utils.c into sof-utils and iomem-utils
  ASoC: SOF: Introduce IPC SOF client support
  ASoC: SOF: sof-client: Add support for clients not managed by pm
    framework
  ASoC: SOF: Convert the generic IPC message injector into SOF client
  ASoC: SOF: Convert the generic probe support to SOF client

Ranjani Sridharan (1):
  ASoC: SOF: Convert the generic IPC flood test into SOF client

 include/sound/sof.h                         |   8 +
 sound/soc/sof/Kconfig                       |  33 +-
 sound/soc/sof/Makefile                      |  15 +-
 sound/soc/sof/core.c                        |  50 +-
 sound/soc/sof/debug.c                       | 565 --------------
 sound/soc/sof/intel/Kconfig                 |  19 +-
 sound/soc/sof/intel/apl.c                   |  13 +-
 sound/soc/sof/intel/cnl.c                   |  13 +-
 sound/soc/sof/intel/hda-dai.c               |  19 -
 sound/soc/sof/intel/hda-dsp.c               |   6 -
 sound/soc/sof/intel/hda-probes.c            |  72 +-
 sound/soc/sof/intel/hda.c                   |  10 +
 sound/soc/sof/intel/hda.h                   |  49 +-
 sound/soc/sof/intel/icl.c                   |  13 +-
 sound/soc/sof/intel/tgl.c                   |  13 +-
 sound/soc/sof/{utils.c => iomem-utils.c}    |  61 +-
 sound/soc/sof/ipc.c                         |  88 ++-
 sound/soc/sof/ops.h                         |  43 -
 sound/soc/sof/pcm.c                         |   7 +-
 sound/soc/sof/pm.c                          |  13 +-
 sound/soc/sof/sof-client-ipc-flood-test.c   | 396 ++++++++++
 sound/soc/sof/sof-client-ipc-msg-injector.c | 192 +++++
 sound/soc/sof/sof-client-probes.c           | 821 ++++++++++++++++++++
 sound/soc/sof/sof-client-probes.h           |  31 +
 sound/soc/sof/sof-client.c                  | 469 +++++++++++
 sound/soc/sof/sof-client.h                  |  67 ++
 sound/soc/sof/sof-priv.h                    | 139 ++--
 sound/soc/sof/sof-probes.c                  | 364 ---------
 sound/soc/sof/sof-probes.h                  |  38 -
 sound/soc/sof/sof-utils.c                   |  77 ++
 sound/soc/sof/sof-utils.h                   |  19 +
 sound/soc/sof/trace.c                       |   1 +
 32 files changed, 2415 insertions(+), 1309 deletions(-)
 rename sound/soc/sof/{utils.c => iomem-utils.c} (59%)
 create mode 100644 sound/soc/sof/sof-client-ipc-flood-test.c
 create mode 100644 sound/soc/sof/sof-client-ipc-msg-injector.c
 create mode 100644 sound/soc/sof/sof-client-probes.c
 create mode 100644 sound/soc/sof/sof-client-probes.h
 create mode 100644 sound/soc/sof/sof-client.c
 create mode 100644 sound/soc/sof/sof-client.h
 delete mode 100644 sound/soc/sof/sof-probes.c
 delete mode 100644 sound/soc/sof/sof-probes.h
 create mode 100644 sound/soc/sof/sof-utils.c
 create mode 100644 sound/soc/sof/sof-utils.h

Comments

Peter Ujfalusi Feb. 10, 2022, 2:41 p.m. UTC | #1
On 10/02/2022 15:54, Mark Brown wrote:
> On Thu, Feb 10, 2022 at 12:55:19PM +0200, Peter Ujfalusi wrote:
>> Add a new client driver for probes support and move
>> all the probes-related code from the core to the
>> client driver.
> 
> This breaks an x86 allmodconfig build:
> 
> /mnt/kernel/sound/soc/sof/compress.c: In function 'create_page_table':
> /mnt/kernel/sound/soc/sof/compress.c:87:9: error: implicit declaration of function 'snd_sof_create_page_table'; did you mean 'create_page_table'? [-Werror=implicit-function-declaration]
>    87 |  return snd_sof_create_page_table(component->dev, dmab,
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~
>       |         create_page_table

Interesting, we have this under constant builds for months and we
certainly are building things as modules.

Let me check and fix this.
Mark Brown Feb. 10, 2022, 6:17 p.m. UTC | #2
On Thu, 10 Feb 2022 12:55:10 +0200, Peter Ujfalusi wrote:
> The Linux SOF implementation is historically monolithic in a sense that all
> features accessible in the firmware can be used via the snd_sof_dev struct in
> one way or another.
> 
> Support for features can not be added or removed runtime and with the current
> way of things it is hard if not impossible to implement support for dynamic
> feature support when based on the firmware manifest we can easily enable/access
> independent modules with the SOF.
> 
> [...]

Applied to

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

Thanks!

[1/9] ASoC: SOF: Drop unused DSP power states: D3_HOT and D3_COLD
      commit: 2439a35508277922ea116c99ff4d4a32c607464c
[2/9] ASoC: SOF: Move the definition of enum sof_dsp_power_states to global header
      commit: 5fdc1242453e2ae88b2cdb607e4eda6b687f084c
[3/9] ASoC: SOF: ipc: Read and pass the whole message to handlers for IPC events
      commit: ab3a2189a3744527f54ace1be19eb13e6c3d24df
[4/9] ASoC: SOF: Split up utils.c into sof-utils and iomem-utils
      commit: ee8443050b2bf06d80fdd2c78cc25cae2abdedcd
[5/9] ASoC: SOF: Introduce IPC SOF client support
      commit: 6955d9512d0ea814f1c2761bef7ad7b3cedf4d68
[6/9] ASoC: SOF: sof-client: Add support for clients not managed by pm framework
      commit: 1069967afe1e6b728061682ff99ec534a55a5613
[7/9] ASoC: SOF: Convert the generic IPC flood test into SOF client
      commit: 6e9548cdb30e5d6724236dd7b89a79a270751485
[8/9] ASoC: SOF: Convert the generic IPC message injector into SOF client
      commit: cac0b0887e5304bddfda91a4a7106f9328c31318
[9/9] ASoC: SOF: Convert the generic probe support to SOF client
      commit: 3dc0d709177828a22dfc9d0072e3ac937ef90d06

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