Skip to content

Commit edd489a

Browse files
abonislawskikv2019i
authored andcommitted
dp: do not block ppl because of sink/source limits
Module adapter DP copy checks shouldn't block pipeline, similarly to LL-only scenario Add sink free size check to calculate copy size Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
1 parent 6f33aee commit edd489a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/audio/module_adapter/module_adapter.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,8 +1079,9 @@ static int module_adapter_copy_dp_queues(struct comp_dev *dev)
10791079
struct sof_source *following_mod_data_source =
10801080
audio_stream_get_source(&buffer->stream);
10811081
struct sof_source *data_src = dp_queue_get_source(dp_queue);
1082-
uint32_t to_copy = MIN(source_get_min_available(following_mod_data_source),
1083-
source_get_data_available(data_src));
1082+
uint32_t to_copy = MIN(MIN(source_get_min_available(following_mod_data_source),
1083+
source_get_data_available(data_src)),
1084+
sink_get_free_size(data_sink));
10841085

10851086
err = source_to_sink_copy(data_src, data_sink, true, to_copy);
10861087
if (err) {

0 commit comments

Comments
 (0)