userspace: dp: add a Kconfig option to simplify conditionals#10460
Merged
lgirdwood merged 1 commit intothesofproject:mainfrom Jan 5, 2026
Merged
userspace: dp: add a Kconfig option to simplify conditionals#10460lgirdwood merged 1 commit intothesofproject:mainfrom
lgirdwood merged 1 commit intothesofproject:mainfrom
Conversation
Add an automatic (non-user selectable) Kconfig option to enable the "application variant" of the DP userspace implementation. Effectively it replaces (CONFIG_USERSPACE && !CONFIG_SOF_USERSPACE_PROXY) with a single new option. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
There was a problem hiding this comment.
Pull request overview
This PR introduces a new Kconfig option SOF_USERSPACE_APPLICATION to simplify and improve readability of conditional compilation throughout the codebase. The new option effectively acts as a shorthand for the frequently used (CONFIG_USERSPACE && !CONFIG_SOF_USERSPACE_PROXY) condition pattern.
Key changes:
- Added
SOF_USERSPACE_APPLICATIONKconfig option that automatically evaluates to true whenUSERSPACEis enabled andSOF_USERSPACE_PROXYis disabled - Replaced all occurrences of the complex conditional pattern with the new simplified option
- Updated build system logic in CMakeLists.txt to use the new option
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| zephyr/Kconfig | Defines the new SOF_USERSPACE_APPLICATION config option with automatic default value |
| src/schedule/zephyr_dp_schedule.h | Replaces complex conditionals with SOF_USERSPACE_APPLICATION for struct definitions and function declarations |
| src/schedule/zephyr_dp_schedule.c | Updates preprocessor conditionals and scheduler operations table to use the new option |
| src/schedule/CMakeLists.txt | Simplifies file inclusion logic by using the new config option |
| src/audio/module_adapter/module_adapter.c | Replaces conditionals in trigger and free functions with the new simplified option |
| src/audio/module_adapter/module/generic.c | Updates multiple module lifecycle functions (init, prepare, reset, free, bind, unbind) to use the new option |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
kv2019i
approved these changes
Dec 30, 2025
Collaborator
Author
|
MTL SDW CI failure https://sof-ci.01.org/sofpr/PR10460/build18353/devicetest/index.html?model=MTLP_SDW_AIOC&testcase=check-playback-10sec on gk-mtlp-rvp-04 is known and unrelated |
lgirdwood
approved these changes
Jan 5, 2026
Member
|
Thanks @lyakh, looks much better |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add an automatic (non-user selectable) Kconfig option to enable the "application variant" of the DP userspace implementation. Effectively it replaces (CONFIG_USERSPACE && !CONFIG_SOF_USERSPACE_PROXY) with a single new option.