DP: application: cleanup unneeded conditions, use strong types#10467
Merged
lgirdwood merged 2 commits intothesofproject:mainfrom Jan 7, 2026
Merged
DP: application: cleanup unneeded conditions, use strong types#10467lgirdwood merged 2 commits intothesofproject:mainfrom
lgirdwood merged 2 commits intothesofproject:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR performs cleanup and type safety improvements in the DP (Data Processing) scheduler application code. The changes remove unnecessary conditional compilation and introduce strong typing for source/sink arrays.
Key Changes:
- Replaced weak-typed
void *source_sink[]array with strongly-typed separatestruct sof_source *source[]andstruct sof_sink *sink[]arrays - Removed
CONFIG_USERSPACEconditional compilation fromzephyr_dp_schedule_application.csince it's specific to userspace scenarios - Simplified semaphore handling by removing the kernel thread fallback (
sem_struct) and always usingk_object_alloc
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/schedule/zephyr_dp_schedule_application.c | Removed CONFIG_USERSPACE conditionals, replaced single source_sink array with separate typed source/sink arrays, simplified semaphore allocation to always use k_object_alloc, updated comment on scheduler lock usage |
| src/schedule/zephyr_dp_schedule.h | Removed sem_struct field as semaphores are now always dynamically allocated in application variant |
| src/schedule/zephyr_dp_schedule.c | Simplified k_object_free call for semaphore by removing conditional check against sem_struct |
| src/audio/pipeline/pipeline-schedule.c | Updated flag determination logic to always use K_USER for CONFIG_SOF_USERSPACE_APPLICATION |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The application mode DP implementation always runs in userspace, remove all the redundant checks and the unused semaphore structure. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Now that we use a fixed size array for source and sink pointers, we can also split it into two to simplify calculations and remove type casts. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
lgirdwood
approved these changes
Jan 6, 2026
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.
No description provided.