Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Conversation

kv2019i
Copy link
Collaborator

@kv2019i kv2019i commented May 7, 2024

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
Copy link
Collaborator Author

kv2019i commented May 7, 2024

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
Use tabs for indentation consistently.

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

kv2019i commented May 7, 2024

V2:

@kv2019i
Copy link
Collaborator Author

kv2019i commented May 7, 2024

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

Copy link
Contributor

@gbernatxintel gbernatxintel left a comment

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
41 of 45 checks passed
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