Skip to content

Conversation

@lyakh
Copy link
Collaborator

@lyakh lyakh commented Feb 20, 2023

Fix a case of empty or inactive sources and audio_stream_set_zero() error handling

num_input_buffers in module_single_sink_setup() and
num_output_buffers in module_single_source_setup() don't have to be
incremented inside the loop together with the loop counter i. Just
assign them after the loops.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
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>
If audio_stream_set_zero() fails in mixout_process(), the output data
size should be set to 0.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
.process() callback receives input and output buffer arrays as
function arguments, no need to fetch them from the module object
again.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Copy link
Collaborator

@kv2019i kv2019i left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other patches ok, but not sure about the behaviour change in the second patch. Please see question inline.

Copy link
Collaborator

@kv2019i kv2019i left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @lyakh , clear now.

@lgirdwood lgirdwood merged commit 84e9791 into thesofproject:main Feb 21, 2023
@lyakh lyakh deleted the mixin branch February 22, 2023 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants