audio: host-zephyr: add HOST_DMA_IPC_POSITION_UPDATES Kconfig#10849
Open
kv2019i wants to merge 1 commit into
Open
audio: host-zephyr: add HOST_DMA_IPC_POSITION_UPDATES Kconfig#10849kv2019i wants to merge 1 commit into
kv2019i wants to merge 1 commit into
Conversation
Collaborator
Author
|
For context, part of #10558 |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a Kconfig option to control whether host DMA stream position updates are reported via IPC messages, and uses it to compile-time disable the IPC notification path in the Zephyr host implementation.
Changes:
- Introduce
HOST_DMA_IPC_POSITION_UPDATESKconfig (default enabled for IPC3). - Guard IPC position-update sending (and
ipc_msgallocation/free) inhost-zephyr.cbehind the new Kconfig. - Make
struct host_data::msgconditional onCONFIG_HOST_DMA_IPC_POSITION_UPDATES.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/audio/Kconfig | Adds the new Kconfig switch controlling IPC-based position updates. |
| src/audio/host-zephyr.c | Wraps IPC position update logic and message lifecycle with the new config option. |
| src/audio/copier/host_copier.h | Makes the ipc_msg *msg member conditional on the new config. |
Comment on lines
108
to
+111
| struct sof_ipc_stream_posn posn; /* TODO: update this */ | ||
| #if CONFIG_HOST_DMA_IPC_POSITION_UPDATES | ||
| struct ipc_msg *msg; /**< host notification */ | ||
| #endif |
Comment on lines
+45
to
+47
| config HOST_DMA_IPC_POSITION_UPDATES | ||
| bool "Support for stream position updates via IPC messages" | ||
| default y if IPC_MAJOR_3 |
Add a built option HOST_DMA_IPC_POSITION_UPDATES to control whether functionality to send IPC stream position updates is enabled or not. Most platforms provide more efficient means for host to monitor DMA state, so this code is in most cases unncessary. The current IPC sending code (from audio context) also assume kernel context, so making this functionality user-space compatible will require extra work. Enable DMA IPC position updates by default for IPC3 as the feature can be controlled by host with sof_ipc_stream_params.no_stream_position IPC interface. Disable the feature by default for IPC4, as there is no host IPC interface to control this and copier_update_params() unconditionally disables IPC updates for IPC4 now, so this code is never used. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
be41a4b to
143d6c2
Compare
Collaborator
Author
|
V2 pushed:
|
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 a built option HOST_DMA_IPC_POSITION_UPDATES to control whether functionality to send IPC stream position updates is enabled or not. Most platforms provide more efficient means for host to monitor DMA state, so this code is in most cases unncessary.
The current IPC sending code (from audio context) also assume kernel context, so making this functionality user-space compatible will require extra work.
Enable DMA IPC position updates by default for IPC3 as the feature can be controlled by host with sof_ipc_stream_params.no_stream_position IPC interface. Disable the feature by default for IPC4, as there is no host IPC interface to control this and copier_update_params() unconditionally disables IPC updates for IPC4 now, so this code is never used.