Skip to content

Commit f24e966

Browse files
[DO NOT UPSTREAM] re-introduce accidently removed bu size code
this code has been upstreamed 3 motnths ago, accidently removed Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
1 parent f9f0ce3 commit f24e966

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

src/ipc/ipc4/helper.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -539,8 +539,18 @@ int ipc_comp_connect(struct ipc *ipc, ipc_pipe_comp_connect *_connect)
539539
ibs = sink_src_cfg.ibs;
540540
}
541541

542-
/* allocate buffer with size large enough to fit ibs of the sink or obs of the source */
543-
buf_size = MAX(ibs * 2, obs * 2);
542+
/* create a buffer
543+
* in case of LL -> LL or LL->DP
544+
* size = 2*obs of source module (obs is single buffer size)
545+
* in case of DP -> LL
546+
* size = 2*ibs of destination (LL) module. DP queue will handle obs of DP module
547+
*/
548+
if (source->ipc_config.proc_domain == COMP_PROCESSING_DOMAIN_LL)
549+
buf_size = source_src_cfg.obs * 2;
550+
else
551+
buf_size = sink_src_cfg.ibs * 2;
552+
553+
544554
buffer = ipc4_create_buffer(source, cross_core_bind, buf_size, bu->extension.r.src_queue,
545555
bu->extension.r.dst_queue);
546556
if (!buffer) {

0 commit comments

Comments
 (0)