Skip to content

Conversation

@lyakh
Copy link
Collaborator

@lyakh lyakh commented Jan 6, 2026

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 separate struct sof_source *source[] and struct sof_sink *sink[] arrays
  • Removed CONFIG_USERSPACE conditional compilation from zephyr_dp_schedule_application.c since it's specific to userspace scenarios
  • Simplified semaphore handling by removing the kernel thread fallback (sem_struct) and always using k_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.

lyakh added 2 commits January 6, 2026 12:56
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>
Copy link
Contributor

@jsarha jsarha left a comment

Choose a reason for hiding this comment

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

LGTM

@softwarecki softwarecki self-requested a review January 7, 2026 14:37
@lgirdwood lgirdwood merged commit 53e5423 into thesofproject:main Jan 7, 2026
38 of 43 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.

3 participants