Skip to content

Commit 7b8da69

Browse files
lyakhlgirdwood
authored andcommitted
module-adapter: allow different statuses
The following problem is observed when testing pause functionality: in a case of a playback stream host -> mixin -> mixout -> DAI where host and mixin belong to the pipeline A and mixout and DAI belong to pipeline B, pipeline B is scheduled before A. So at start we get: scheduler start B: no data A: read 1 period of data scheduler sleep (1 period of data pending in pipeline A) scheduler start B: send 1 period of data out A: read 1 period of data scheduler sleep (1 period of data pending in pipeline A) PAUSE RELEASE scheduler start B: old data before sleep isn't sent because A is PAUSED A: read 1 period of data scheduler sleep (2 periods of data pending in pipeline A) ... With repeated pause-release cycles this leads to buffer overrun. To fix this allow sending out data by pipeline B when A is still paused. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
1 parent aaac08a commit 7b8da69

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/audio/module_adapter/module_adapter.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -622,12 +622,6 @@ module_single_sink_setup(struct comp_dev *dev,
622622
int i = 0;
623623

624624
list_for_item(blist, &dev->bsource_list) {
625-
/* check if the source dev is in the same state as the dev */
626-
if (source_c[i]->source->state != dev->state) {
627-
i++;
628-
continue;
629-
}
630-
631625
comp_get_copy_limits_frame_aligned(source_c[i], sinks_c[0], &c);
632626

633627
if (!mod->skip_src_buffer_invalidate)
@@ -665,12 +659,6 @@ module_single_source_setup(struct comp_dev *dev,
665659
int i = 0;
666660

667661
list_for_item(blist, &dev->bsink_list) {
668-
/* check if the sink dev is in the same state as the dev */
669-
if (sinks_c[i]->sink->state != dev->state) {
670-
i++;
671-
continue;
672-
}
673-
674662
comp_get_copy_limits_frame_aligned(source_c[0], sinks_c[i], &c);
675663

676664
min_frames = MIN(min_frames, c.frames);

0 commit comments

Comments
 (0)