mirror of https://github.com/thesofproject/sof.git
mixin-mixout: fix frames-to-produce calculation
When calculating the number of frames to produce, ignore inactive and empty inputs. On the one hand an inactive empty input shouldn't block producing data from active or non-empty inputs. OTOH if an inactive input has pending data, it should be used instead of letting the data stall. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This commit is contained in:
parent
f141b6017e
commit
2417f0bc6d
|
@ -512,7 +512,9 @@ static int mixout_process(struct processing_module *mod,
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
pending_frames = md->pending_frames[source_index];
|
pending_frames = md->pending_frames[source_index];
|
||||||
frames_to_produce = MIN(frames_to_produce, pending_frames);
|
|
||||||
|
if (source->state == COMP_STATE_ACTIVE || pending_frames)
|
||||||
|
frames_to_produce = MIN(frames_to_produce, pending_frames);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (frames_to_produce > 0 && frames_to_produce < INT32_MAX) {
|
if (frames_to_produce > 0 && frames_to_produce < INT32_MAX) {
|
||||||
|
|
Loading…
Reference in New Issue