Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

copier: Add bind function to configure source/sink buffers params #9276

Merged
merged 3 commits into from
Jul 15, 2024

Conversation

softwarecki
Copy link
Collaborator

Setting the source/sink buffers parameters in the copier_update_params function is not sufficient. If a sink buffer is attached during copier operation, the module will not set buffers parameters. Move the buffer parameter configurations to the new copier_bind bind function. Delete the sink buffers configurations from the copier_module_copy function. There is no need to configure sink buffers parameters on each copy. We are assured that they were configured at the time of bind.

Fixes: #9123

Copy link
Contributor

@iganakov iganakov left a comment

Choose a reason for hiding this comment

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

Looks like duplicate of
#9197 copier: update buffer format on bind

src/audio/copier/copier.c Outdated Show resolved Hide resolved
src/audio/copier/copier.c Outdated Show resolved Hide resolved
Copy link
Contributor

@iganakov iganakov left a comment

Choose a reason for hiding this comment

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

Driver sends SET_SINK_FORMAT IPC to configure copier module sink processing parameters before bind when there is no processing buffer between connected components. Please also remove sink buffer's update from copier_set_sink_fmt().
It would be nice to simplify copier bind operation, please find my suggestions below

src/audio/copier/copier.c Outdated Show resolved Hide resolved
src/audio/copier/copier.c Outdated Show resolved Hide resolved
A data producing component is responsible for setting a sink buffer
parameters. It is not necessary for the copier to override source buffer
parameters. Remove the code responsible for it.

Signed-off-by: Adrian Warecki <[email protected]>
Sink format can only be set when the sink buffer is not binded. Sink
buffer parameters will be set on binding. Remove redundant code.

Signed-off-by: Adrian Warecki <[email protected]>
Copy link
Contributor

@iganakov iganakov left a comment

Choose a reason for hiding this comment

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

Looks good to me

@lgirdwood
Copy link
Member

@softwarecki can you confirm if internal CI is good to merge ? Seeing some red on Jenkins, lets rerun to be sure.

@lgirdwood
Copy link
Member

SOFCI TEST

Setting the sink buffers parameters in the copier_update_params function is
not sufficient. If a sink buffer is attached during copier operation, the
module will not set buffers parameters. Add bind function to configure sink
buffers parameters.

There is no need to configure sink buffers parameters on each copy. We are
assured that they were configured at the time of bind. Remove
ipc4_update_buffer_format from the copier_module_copy function.

Fixes: thesofproject#9123

Signed-off-by: Adrian Warecki <[email protected]>
@softwarecki
Copy link
Collaborator Author

I restored the code that sets the sink parameters in the copier_update_params function. Parameters set in the bind function can be overwritten by the comp_verify_params function called by ipc4_pipeline_prepare -> ipc4_pipeline_params.

I look forward to the new CI results...

@lgirdwood
Copy link
Member

I restored the code that sets the sink parameters in the copier_update_params function. Parameters set in the bind function can be overwritten by the comp_verify_params function called by ipc4_pipeline_prepare -> ipc4_pipeline_params.

I look forward to the new CI results...

All look good except for LNL SDW, can you check ? I would expect copier changes to fail on all test (not just SDW), we can rerun again if you think its DUT or testing infra related.

@kv2019i
Copy link
Collaborator

kv2019i commented Jul 9, 2024

@lgirdwood wrote:

All look good except for LNL SDW, can you check ? I would expect copier changes to fail on all test (not just SDW), we can rerun again if you think its DUT or testing infra related.

The LNL SDW is caused by this: thesofproject/linux#5098

@marc-hb marc-hb removed their request for review July 9, 2024 23:35
@softwarecki
Copy link
Collaborator Author

SOFCI TEST

@marc-hb
Copy link
Collaborator

marc-hb commented Jul 12, 2024

@softwarecki
Copy link
Collaborator Author

SOFCI TEST

@softwarecki
Copy link
Collaborator Author

@lgirdwood Can we proceed with merge?

@kv2019i kv2019i merged commit 5c72569 into thesofproject:main Jul 15, 2024
46 of 47 checks passed
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.

LNL NOCODEC alsa-bat playback failure