Skip to content

audio: pipeline-schedule: make pipeline_schedule_triggered() user safe#10993

Merged
kv2019i merged 1 commit into
thesofproject:mainfrom
kv2019i:202607-audio-triggered-for-user
Jul 15, 2026
Merged

audio: pipeline-schedule: make pipeline_schedule_triggered() user safe#10993
kv2019i merged 1 commit into
thesofproject:mainfrom
kv2019i:202607-audio-triggered-for-user

Conversation

@kv2019i

@kv2019i kv2019i commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Add support to run pipeline_schedule_triggered() in user-space. Use the user_ll_lock/unlock_sched() interface if building with CONFIG_SOF_USERSPACE_LL.

Copilot AI review requested due to automatic review settings July 13, 2026 17:00
@kv2019i

kv2019i commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator Author

For context, related to #10558

Copilot AI 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.

Pull request overview

This PR updates pipeline_schedule_triggered() to be callable from user-space builds by replacing the kernel-only IRQ critical section (irq_local_disable()/enable()) with the user-space LL scheduler lock (user_ll_lock_sched()/unlock_sched()) when CONFIG_SOF_USERSPACE_LL is enabled.

Changes:

  • Add CONFIG_SOF_USERSPACE_LL locking path using user_ll_lock_sched()/user_ll_unlock_sched() around pipeline trigger scheduling.
  • Keep the existing IRQ-disable critical section for kernel-space builds.

Comment thread src/audio/pipeline/pipeline-schedule.c Outdated
*/
int sched_core = ppl_data->start->ipc_config.core;

user_ll_lock_sched(sched_core);

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in V2.

Comment thread src/audio/pipeline/pipeline-schedule.c Outdated
Comment on lines +293 to +296
int sched_core = ppl_data->start->ipc_config.core;

user_ll_lock_sched(sched_core);
#else

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This fixed in V2.

Comment thread src/audio/pipeline/pipeline-schedule.c Outdated

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.

Minor improvement: If this comment describes the same issue that you would like to prevent in Uspace, I would just merge those comments and add a small remark that we use different synchronization primitives depending on USpace option. Otherwise looks good.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Ack @wjablon1 did this in V2. The comments were too verbose -- combined them now.

Add support to run pipeline_schedule_triggered() in user-space.
Use the user_ll_lock/unlock_sched() interface if building
with CONFIG_SOF_USERSPACE_LL.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
@kv2019i kv2019i force-pushed the 202607-audio-triggered-for-user branch from 10b7a8f to e742825 Compare July 15, 2026 09:33
@kv2019i

kv2019i commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator Author

V2 pushed:

  • address comments so far
  • build warning due to missing headers fixed

Copilot AI 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.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@kv2019i kv2019i merged commit 4e1a180 into thesofproject:main Jul 15, 2026
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.

4 participants