You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Audio: Buffers: Add support for DP-to-DP component binding
Previously binding two DP (Data Processing) scheduled components
was rejected with IPC4_INVALID_REQUEST. This patch adds support
for DP-to-DP binding by creating a dual ring buffer configuration
where each DP module gets its own ring buffer on either side of
the intermediate comp_buffer.
Data flow for DP-to-DP:
src_DP -> ring_buf_src -> comp_buffer -> ring_buf_sink -> sink_DP
Changes in Kconfig:
- Add CONFIG_DP_TO_DP_BIND (default y) depending on
CONFIG_ZEPHYR_DP_SCHEDULER to allow enabling/disabling
DP-to-DP component binding.
Changes in helper.c:
- Allow DP-to-DP binding when CONFIG_DP_TO_DP_BIND is enabled;
reject with IPC4_INVALID_REQUEST when disabled.
- Add src_is_dp, sink_is_dp, and dp_to_dp flags to detect the
DP-to-DP case.
- Create a second ring_buffer allocated from the source module's
mod_alloc_ctx for the source side of the comp_buffer.
- Refcount the DP vregion for each created ring_buffer via
vregion_get(), guarded by CONFIG_DP_TO_DP_BIND.
Changes in audio_buffer.c:
- When CONFIG_DP_TO_DP_BIND is enabled, change
audio_buffer_attach_secondary_buffer() from a global rejection
to per-side checks, allowing both secondary_buffer_sink and
secondary_buffer_source to be set simultaneously.
- Add a dual-secondary sync path in audio_buffer_sync_secondary_buffer()
under CONFIG_DP_TO_DP_BIND that cascades data through:
input ring_buffer -> comp_buffer -> output ring_buffer, with
rate-limiting applied on the output side.
Changes in ring_buffer.c:
- For DP-to-DP binding, release the DP vregion in ring_buffer_free()
via vregion_put() and free the mod_alloc_ctx when the refcount
reaches zero, guarded by CONFIG_DP_TO_DP_BIND.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
0 commit comments