Skip to content

audio: base_fw: do not use platform interface for vendor extensions - #9103

Merged
lgirdwood merged 2 commits into
thesofproject:mainfrom
kv2019i:202405-move-basefw-from-platfrom-to-vendor
May 8, 2024
Merged

lgirdwood merged 2 commits into
thesofproject:mainfrom
kv2019i:202405-move-basefw-from-platfrom-to-vendor

Conversation

@kv2019i

@kv2019i kv2019i commented May 7, 2024

Copy link
Copy Markdown
Collaborator

In commit 14c4e86 ("audio: base_fw: add platform layer to IPC4 hw_config data"), the platform specific code was moved to platform layer.

This commit implements a lighter weight abstraction for the moved code. Instead of using the platform layer, the Intel specific vendor code is added directly in base_fw_intel.c and guarded by a Kconfig. All other IPC4 build targets will use an empty implementation.

This avoids the need to add a platform definition for all IPC4 targets. The common implementation in base_fw.c is sufficient to cover all mandatory functionality required e.g. by the upstream SOF Linux driver's IPC4 implementation.

The interfaces are renamed to refer to "vendor" instead of "platform", to avoid any confusion with the platform layer with the new implementation.

In commit 14c4e86 ("audio: base_fw: add platform layer to IPC4
hw_config data"), the platform specific code was moved to platform
layer.

This commit implements a lighter weight abstraction for the moved
code. Instead of using the platform layer, the Intel specific vendor
code is added directly in base_fw_intel.c and guarded by a Kconfig.
All other IPC4 build targets will use an empty implementation.

This avoids the need to add a platform definition for all IPC4 targets.
The common implementation in base_fw.c is sufficient to cover all
mandatory functionality required e.g. by the upstream SOF Linux driver's
IPC4 implementation.

The interfaces are renamed to refer to "vendor" instead of "platform",
to avoid any confusion with the platform layer with the new
implementation.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
@kv2019i

kv2019i commented May 7, 2024

Copy link
Copy Markdown
Collaborator Author

For background, this is a follow-up agreed in #9060 (review)

@lgirdwood more in line now? this requires addition of new build time conditionals (Kconfig in this PR) as we can't use the platform selection to choose the implemetnation, but given we only have two implementations, this is pretty light. If longterm, there are not going to be many build targets that need to variate this, this approach will be better. If we end up having customizations for majority of build targets, then (re)using platform layer would be better.

@thesofproject/nxp please chime in, you are the first non-intel target this affects.

@kv2019i kv2019i mentioned this pull request May 7, 2024
1 task done
Use tabs for indentation consistently.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
@kv2019i

kv2019i commented May 7, 2024

Copy link
Copy Markdown
Collaborator Author

V2:

@kv2019i

kv2019i commented May 7, 2024

Copy link
Copy Markdown
Collaborator Author

CI fails are caused by #9101 , rest are good. Waiting for reviews...

@gbernatxintel gbernatxintel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@lgirdwood
lgirdwood merged commit 81348f0 into thesofproject:main May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants