ipc: ipc4: fixes to DMA driver use in user-space builds#10844
Open
kv2019i wants to merge 3 commits into
Open
Conversation
Use sof_dma_get_status() call to allow the audio pipeline to be run in user-space. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Fix a few remaining uses of direct DMA driver calls. Use the sof_dma.h wrapper instead, allowing the code to be used also from user-space. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Do not use IRQ disable/enable when built for user-space. The driver list is immutable by IPC processing time so no lock is needed. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates IPC4 code paths to be compatible with Zephyr user-space LL builds by avoiding privileged DMA and interrupt APIs, while keeping existing behavior for non-user-space builds.
Changes:
- Make IPC4 component driver lookup avoid
irq_local_disable()in user-space LL builds. - Switch IPC4 DAI DMA operations from direct Zephyr DMA calls to
sof_dma_*()wrappers for stop/release/status.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/ipc/ipc4/helper.c | Conditionally avoids IRQ masking during driver lookup in user-space LL builds. |
| src/ipc/ipc4/dai.c | Uses sof_dma_*() wrapper APIs for DMA stop/release/status in IPC4 DAI paths. |
Comment on lines
+1134
to
+1136
| #ifndef CONFIG_SOF_USERSPACE_LL | ||
| uint32_t flags; | ||
| #endif |
| * list is immutable by this point so no lock is needed. | ||
| */ | ||
| #ifndef CONFIG_SOF_USERSPACE_LL | ||
| irq_local_disable(flags); |
| } | ||
|
|
||
| #ifndef CONFIG_SOF_USERSPACE_LL | ||
| irq_local_enable(flags); |
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.
A set of small fixes to how IPC4 code uses DMA driver and driver look-up interfaces.
Patches part of feature development done in #10558