Skip to content

ASoC: Intel: Clenaup SST initialization

Cezary Rojewski alsa-devel 1 version NAK

Status from this message: NAK.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest35 patches 71 repliesNAK

Patches in v1

#Subject and filesSizeRepliesApplied
1/35ASoC: Intel: Skylake: Put FW runtime params defs in one placesound/soc/intel/skylake/skl-messages.c sound/soc/intel/skylake/skl-sst-ipc.h+7 -50 replies
2/35ASoC: Intel: Skylake: Add FIRMWARE_CONFIG IPC requestsound/soc/intel/skylake/skl-sst-ipc.c sound/soc/intel/skylake/skl-sst-ipc.h sound/soc/intel/skylake/skl.h+195 -04 replies
3/35ASoC: Intel: Skylake: Add HARDWARE_CONFIG IPC requestsound/soc/intel/skylake/skl-messages.c sound/soc/intel/skylake/skl-sst-ipc.c sound/soc/intel/skylake/skl-sst-ipc.h +1 more+135 -02 replies
4/35ASoC: Intel: Skylake: Unify firmware loading mechanismsound/soc/intel/skylake/bxt-sst.c sound/soc/intel/skylake/cnl-sst-dsp.h sound/soc/intel/skylake/cnl-sst.c +6 more+40 -834 replies
5/35ASoC: Intel: Skylake: Reload libraries on D0 entry for CNLsound/soc/intel/skylake/bxt-sst.c sound/soc/intel/skylake/cnl-sst.c sound/soc/intel/skylake/skl-sst-dsp.h+15 -10 replies
6/35ASoC: Intel: Skylake: Unhardcode dsp cores numbersound/soc/intel/skylake/skl-messages.c sound/soc/intel/skylake/skl-sst-dsp.c sound/soc/intel/skylake/skl-sst-dsp.h +2 more+26 -380 replies
7/35ASoC: Intel: Skylake: Update interrupt disabling routinesound/soc/intel/skylake/skl-sst-ipc.c+2 -20 replies
8/35ASoC: Intel: Skylake: Inline ipc free operationssound/soc/intel/skylake/bxt-sst.c sound/soc/intel/skylake/cnl-sst-dsp.c sound/soc/intel/skylake/cnl-sst-dsp.h +5 more+9 -260 replies
9/35ASoC: Intel: Skylake: Unify driver cleanup mechanismsound/soc/intel/skylake/bxt-sst.c sound/soc/intel/skylake/cnl-sst-dsp.h sound/soc/intel/skylake/cnl-sst.c +4 more+14 -430 replies
10/35ASoC: Intel: Relocate irq thread header to sst_opssound/soc/intel/baytrail/sst-baytrail-dsp.c sound/soc/intel/baytrail/sst-baytrail-ipc.c sound/soc/intel/baytrail/sst-baytrail-ipc.h +10 more+26 -240 replies
11/35ASoC: Intel: Merge sst_dsp_device into sst_pdatasound/soc/intel/baytrail/sst-baytrail-ipc.c sound/soc/intel/common/sst-dsp-priv.h sound/soc/intel/common/sst-dsp.h +9 more+27 -472 replies
12/35ASoC: Intel: Skylake: Reuse sst_dsp_freesound/soc/intel/skylake/cnl-sst-dsp.c sound/soc/intel/skylake/skl-sst-dsp.c sound/soc/intel/skylake/skl-sst.c+1 -32 replies
13/35ASoC: Intel: Skylake: Reuse sst_dsp_newsound/soc/intel/skylake/bxt-sst.c sound/soc/intel/skylake/cnl-sst.c sound/soc/intel/skylake/skl-sst-dsp.c +3 more+8 -342 replies
14/35ASoC: Intel: Skylake: Remove skl_dsp_acquire_irqsound/soc/intel/skylake/skl-sst-dsp.c sound/soc/intel/skylake/skl-sst-dsp.h+0 -150 replies
15/35ASoC: Intel: Skylake: Use dsp loading functions directlysound/soc/intel/skylake/bxt-sst.c sound/soc/intel/skylake/cnl-sst.c sound/soc/intel/skylake/skl-messages.c +2 more+33 -242 replies
16/35ASoC: Intel: Skylake: Make dsp_ops::stream_tag obsoletesound/soc/intel/skylake/bxt-sst.c sound/soc/intel/skylake/cnl-sst.c+12 -150 replies
17/35ASoC: Intel: Skylake: Remove skl_dsp_loader_opssound/soc/intel/common/sst-dsp-priv.h sound/soc/intel/skylake/bxt-sst.c sound/soc/intel/skylake/cnl-sst-dsp.h +6 more+12 -762 replies
18/35ASoC: Intel: Skylake: Remove window0 sst_addr fieldssound/soc/intel/common/sst-dsp-priv.h sound/soc/intel/skylake/bxt-sst.c sound/soc/intel/skylake/cnl-sst.c +3 more+2 -92 replies
19/35ASoC: Intel: Skylake: Remove redundant W0 and W1 macrossound/soc/intel/skylake/bxt-sst.c sound/soc/intel/skylake/cnl-sst-dsp.h sound/soc/intel/skylake/cnl-sst.c +3 more+18 -273 replies
20/35ASoC: Intel: Skylake: Remove redundant SRAM fieldssound/soc/intel/common/sst-dsp-priv.h sound/soc/intel/skylake/bxt-sst.c sound/soc/intel/skylake/cnl-sst.c +1 more+0 -80 replies
21/35ASoC: Intel: Expose ACPI loading memberssound/soc/intel/common/sst-acpi.c sound/soc/intel/common/sst-dsp.h+25 -192 replies
22/35ASoC: Intel: Haswell: Define separate ACPI loadersound/soc/intel/Kconfig sound/soc/intel/common/sst-acpi.c sound/soc/intel/haswell/Makefile +1 more+70 -332 replies
23/35ASoC: Intel: Baytrail: Define separate ACPI loadersound/soc/intel/Kconfig sound/soc/intel/baytrail/Makefile sound/soc/intel/baytrail/acpi.c +3 more+49 -451 reply
24/35ASoC: Intel: Refactor probing of ACPI devicessound/soc/intel/baytrail/acpi.c sound/soc/intel/common/sst-acpi.c sound/soc/intel/common/sst-dsp.h +3 more+82 -592 replies
25/35ASoC: Intel: Skylake: Simplify skl_sst_ctx_init declarationsound/soc/intel/skylake/bxt-sst.c sound/soc/intel/skylake/cnl-sst.c sound/soc/intel/skylake/skl-sst-dsp.h +3 more+15 -190 replies
26/35ASoC: Intel: Skylake: Simplify all sst_dsp_init declarationssound/soc/intel/skylake/bxt-sst.c sound/soc/intel/skylake/cnl-sst-dsp.h sound/soc/intel/skylake/cnl-sst.c +4 more+37 -630 replies
27/35ASoC: Intel: Skylake: Define platform descriptorssound/soc/intel/skylake/bxt-sst.c sound/soc/intel/skylake/cnl-sst.c sound/soc/intel/skylake/skl-sst.c +2 more+46 -75 replies
28/35ASoC: Intel: Skylake: Update skl_ids tablesound/soc/intel/skylake/skl.c+11 -91 reply
29/35ASoC: Intel: Skylake: Flip SST initialization ordersound/soc/intel/skylake/bxt-sst.c sound/soc/intel/skylake/cnl-sst-dsp.h sound/soc/intel/skylake/cnl-sst.c +5 more+20 -414 replies
30/35ASoC: Intel: Reuse sst_pdata::fw_name fieldsound/soc/intel/common/sst-acpi.c sound/soc/intel/common/sst-firmware.c sound/soc/intel/skylake/skl-messages.c +3 more+6 -132 replies
31/35ASoC: Intel: Reuse sst_pdata::fw fieldsound/soc/intel/skylake/bxt-sst.c sound/soc/intel/skylake/cnl-sst.c sound/soc/intel/skylake/skl-sst.c+30 -240 replies
32/35ASoC: Intel: Skylake: Remove skl_dsp_opssound/soc/intel/skylake/skl-messages.c sound/soc/intel/skylake/skl.h+0 -610 replies
33/35ASoC: Intel: Skylake: Privatize SST init handlerssound/soc/intel/skylake/bxt-sst.c sound/soc/intel/skylake/cnl-sst-dsp.h sound/soc/intel/skylake/cnl-sst.c +2 more+35 -422 replies
34/35ASoC: Intel: Skylake: Merge skl_sst_ctx_init into skl_init_dspsound/soc/intel/skylake/skl-messages.c sound/soc/intel/skylake/skl-sst-dsp.h sound/soc/intel/skylake/skl-sst-utils.c+15 -300 replies
35/35ASoC: Intel: Remove obsolete firmware fieldssound/soc/intel/common/soc-acpi-intel-bxt-match.c sound/soc/intel/common/soc-acpi-intel-byt-match.c sound/soc/intel/common/soc-acpi-intel-cnl-match.c +8 more+0 -322 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/35] ASoC: Intel: Clenaup SST initialization

This segment targets initialization procedures for all SST drivers. For legacy:
- it concentrates on updating ACPI loader so generic DSP framework is not fed any platform specific data. sst-acpi module ceases to exist and is replaced by hsw-acpi and byt-acpi

For cAVS (Skylake+):
- Repairs what is currently an initialization mess, given the order of invocation of engaged handlers and sheer amount of them.
- provides interface to offload hardware-specifics away from driver

Following is the order of Skylake initialization currently:
- skl_probe
-> schedule skl_probe_work
- skl_first_init
- skl_create

-> skl_init_dsp
--> skl/ bxt/ cnl_sst_dsp_init
---> skl_sst_ctx_init
----> skl_dsp_ctx_init
-----> sst_dsp_new
------> sst_ops::init (invoked but unimplemented!)

Listing all the types engaged together with the naming chosen for the above paints an even darker picture. Code is unreadable and hides initialization for diffenret members is various handlers. Moreover, due to existing ill relationship between skl_dev, sst_dsp and sst_generic_ipc, one must be extra careful when accessing so called "dsp/ thread_context" as they all don't get initialized immediately before object is yield for further processing. However, 100/100 series is nonsense and thus cleanups have been divided into chunks and prioritized.

Code seen here is part of new Skylake fundament, located at the very bottom of internal mainline. Said mainline is tested constantly on at least sigle platform from every cAVS bucket (description below). This week, BDW has been added to the CI family and was essential in validating legacy changes. Baytrail platform is still missing. Changes for BYT directly mirror HSW/ BDW but due to current lack of platform were untested.
Boards engaged in testing: rt286, rt298, rt274.

!!! IMPORTANT !!!

Some upstream FW binaries are not compatible with existing /skylake driver while changes found here (HARDWARE_CONFIG/ FIRMWARE_CONFIG) make use of firmware ability to offload hardware-specifics away from driver. These and more are core part of any cAVS design and are to be implemented and used by host. This too is missing on Linux upstream.

As explanined once, five main FW branches are available:
- kbl, 1.5 cAVS (supports SKL, KBL, KBL-R, ABL, more..)
- apl_auto, 1.5+ cAVS (supports APL, GLK)
- cnl, 1.8 cAVS (supports CNL, CFL, WHL, CML)
- icl, 2.0 cAVS (supports ICL, LKF)
- master, 2.5 cAVS (supports TGL, EHL and everything above)

SKL FW binary existing on upstream is a descendant of old spt branch, obsoleted for 4-5 years now. That FW is a stub, quickly replaced by kbl which is to be used on all 1.5 cAVS platforms.

The same story goes with bxtn binary, a descendant of apl branch, replaced by apl_auto 2-3 years ago. All vendors, entire validation and development is located on apl_auto.

Message: all FW binaries are to be updated as we cannot guarantee these are still functional. Given the fact that all vendors are fed with new binaries on regular basis from all main branches, it's highly probable some scenarios fail with existing FWs. In consequence, linux-firmware patch will be provided with fresh, updated binaries, soon. Once more, please note, we do not support, nor test platforms using obsolete FW binaries. That includes all platforms, not just SKL or APL.

Amadeusz Sławiński (1):
ASoC: Intel: Skylake: Put FW runtime params defs in one place

Cezary Rojewski (34):
ASoC: Intel: Skylake: Add FIRMWARE_CONFIG IPC request
ASoC: Intel: Skylake: Add HARDWARE_CONFIG IPC request
ASoC: Intel: Skylake: Unify firmware loading mechanism
ASoC: Intel: Skylake: Reload libraries on D0 entry for CNL
ASoC: Intel: Skylake: Unhardcode dsp cores number
ASoC: Intel: Skylake: Update interrupt disabling routine
ASoC: Intel: Skylake: Inline ipc free operations
ASoC: Intel: Skylake: Unify driver cleanup mechanism
ASoC: Intel: Relocate irq thread header to sst_ops
ASoC: Intel: Merge sst_dsp_device into sst_pdata
ASoC: Intel: Skylake: Reuse sst_dsp_free
ASoC: Intel: Skylake: Reuse sst_dsp_new
ASoC: Intel: Skylake: Remove skl_dsp_acquire_irq
ASoC: Intel: Skylake: Use dsp loading functions directly
ASoC: Intel: Skylake: Make dsp_ops::stream_tag obsolete
ASoC: Intel: Skylake: Remove skl_dsp_loader_ops
ASoC: Intel: Skylake: Remove window0 sst_addr fields
ASoC: Intel: Skylake: Remove redundant W0 and W1 macros
ASoC: Intel: Skylake: Remove redundant SRAM fields
ASoC: Intel: Expose ACPI loading members
ASoC: Intel: Haswell: Define separate ACPI loader
ASoC: Intel: Baytrail: Define separate ACPI loader
ASoC: Intel: Refactor probing of ACPI devices
ASoC: Intel: Skylake: Simplify skl_sst_ctx_init declaration
ASoC: Intel: Skylake: Simplify all sst_dsp_init declarations
ASoC: Intel: Skylake: Define platform descriptors
ASoC: Intel: Skylake: Update skl_ids table
ASoC: Intel: Skylake: Flip SST initialization order
ASoC: Intel: Reuse sst_pdata::fw_name field
ASoC: Intel: Reuse sst_pdata::fw field
ASoC: Intel: Skylake: Remove skl_dsp_ops
ASoC: Intel: Skylake: Privatize SST init handlers
ASoC: Intel: Skylake: Merge skl_sst_ctx_init into skl_init_dsp
ASoC: Intel: Remove obsolete firmware fields

 sound/soc/intel/Kconfig                       |  14 +-
 sound/soc/intel/baytrail/Makefile             |   2 +
 sound/soc/intel/baytrail/acpi.c               |  64 +++++
 sound/soc/intel/baytrail/sst-baytrail-dsp.c   |   2 +-
 sound/soc/intel/baytrail/sst-baytrail-ipc.c   |  13 +-
 sound/soc/intel/baytrail/sst-baytrail-ipc.h   |   2 +
 sound/soc/intel/common/Makefile               |   4 +-
 .../intel/common/soc-acpi-intel-bxt-match.c   |   2 -
 .../intel/common/soc-acpi-intel-byt-match.c   |   2 -
 .../intel/common/soc-acpi-intel-cnl-match.c   |   1 -
 .../intel/common/soc-acpi-intel-glk-match.c   |   3 -
 .../intel/common/soc-acpi-intel-hda-match.c   |   2 -
 .../common/soc-acpi-intel-hsw-bdw-match.c     |   4 -
 .../intel/common/soc-acpi-intel-icl-match.c   |   1 -
 .../intel/common/soc-acpi-intel-kbl-match.c   |  12 -
 .../intel/common/soc-acpi-intel-skl-match.c   |   3 -
 sound/soc/intel/common/sst-acpi.c             | 117 +--------
 sound/soc/intel/common/sst-dsp-priv.h         |   8 +-
 sound/soc/intel/common/sst-dsp.h              |  37 +--
 sound/soc/intel/common/sst-firmware.c         |  13 +-
 sound/soc/intel/haswell/Makefile              |   2 +
 sound/soc/intel/haswell/acpi.c                |  78 ++++++
 sound/soc/intel/haswell/sst-haswell-dsp.c     |   1 +
 sound/soc/intel/haswell/sst-haswell-ipc.c     |  13 +-
 sound/soc/intel/haswell/sst-haswell-ipc.h     |   2 +
 sound/soc/intel/skylake/bxt-sst.c             | 143 ++++-------
 sound/soc/intel/skylake/cnl-sst-dsp.c         |  13 +-
 sound/soc/intel/skylake/cnl-sst-dsp.h         |  15 +-
 sound/soc/intel/skylake/cnl-sst.c             | 142 ++++-------
 sound/soc/intel/skylake/skl-debug.c           |   2 +-
 sound/soc/intel/skylake/skl-messages.c        | 194 ++------------
 sound/soc/intel/skylake/skl-pcm.c             |  22 +-
 sound/soc/intel/skylake/skl-sst-cldma.c       |  10 +-
 sound/soc/intel/skylake/skl-sst-dsp.c         |  79 ++----
 sound/soc/intel/skylake/skl-sst-dsp.h         |  55 ++--
 sound/soc/intel/skylake/skl-sst-ipc.c         | 238 ++++++++++++++++--
 sound/soc/intel/skylake/skl-sst-ipc.h         | 124 ++++++++-
 sound/soc/intel/skylake/skl-sst-utils.c       |  28 +--
 sound/soc/intel/skylake/skl-sst.c             | 150 ++++++-----
 sound/soc/intel/skylake/skl.c                 |  65 +++--
 sound/soc/intel/skylake/skl.h                 |  26 +-
 41 files changed, 877 insertions(+), 831 deletions(-)
 create mode 100644 sound/soc/intel/baytrail/acpi.c
 create mode 100644 sound/soc/intel/haswell/acpi.c
Signature · 6 lines
2.17.1

_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel