Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/audio/src/src.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ static struct comp_dev *src_new(const struct comp_driver *drv,
comp_cl_info(&comp_src, "src_new()");

/* validate init data - either SRC sink or source rate must be set */
if (ipc_src->source_rate == 0 && ipc_src->sink_rate == 0) {
if (ipc_src->source_rate == 0 || ipc_src->sink_rate == 0) {
comp_cl_err(&comp_src, "src_new(): SRC sink and source rate are not set");
return NULL;
}
Comment on lines -465 to 468
Copy link
Member

Choose a reason for hiding this comment

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

please change condition in error message also, and -> or

Copy link
Contributor Author

Choose a reason for hiding this comment

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

HI @ktrzcinx : This is not the final solution. Once it's decided, will update the error messages accordingly.

Copy link
Member

Choose a reason for hiding this comment

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

ok, can we have an inline comment (as a reminder) that this is intermediate solution and the final solution is pending on X.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. I will do that.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Be careful! In topologies load in new() the the fixed side rate is set only, the variable side (from host or PCM params) is left to zero. Have you tested this in a real device with real topology?

Copy link
Collaborator

Choose a reason for hiding this comment

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

As far as I know there's no CI test for SRC. The testbench run overrides the topology for rates so it's not the same as IPC from linux kernel.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@singalsu : Sorry for the late reply. I didn't test this on a real device with real topology. But, the logic i have used here (&& -> ||) is wrong. I have to change this.

Expand Down