Skip to content

Conversation

@keyonjie
Copy link
Contributor

The sof_mux_config.num_channels is designed to denote the channel number
of the "1" branch of "1->N" or "N->1", that is the source of demux
(1->N) and the sink of mux (N->1), add an separated .params() for demux
to fix the noise issue root caused to be the wrong num_channels in the
demux scenarios that input_channels != output_channels.

Signed-off-by: Keyon Jie yang.jie@linux.intel.com

@keyonjie
Copy link
Contributor Author

This is verified to fix the noise happened in DSM+Echo Ref scenario.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@keyonjie the change looks correct but to avoid duplication of code, can we re-use the same mux_params and check for dev->drv->type and set the buffer to sourcebuffer or sink_buffer accordingly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ranj063 we can for sure making change like that, but that is actually another kind of waste, we already know it is mux or demux, why we need to check it again?

Copy link
Member

Choose a reason for hiding this comment

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

Can we have an inline comment here describing what we are doing with channels and frame format here.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@keyonjie what I was suggesting to avoid unnecessary code duplication. It is true that we already know it's a mux or a demux, then we can also argue to separate these into 2 files, no? This change really is about whether we're getting the params from the source or the sink buffer. So adding an extra line to add the check is a lot less wasteful that duplicating the entire params function

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@keyonjie what I was suggesting to avoid unnecessary code duplication. It is true that we already know it's a mux or a demux, then we can also argue to separate these into 2 files, no? This change really is about whether we're getting the params from the source or the sink buffer. So adding an extra line to add the check is a lot less wasteful that duplicating the entire params function

Fair enough, let me change it, thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can we have an inline comment here describing what we are doing with channels and frame format here.

I had difficulty to understand it at first glance also, let me add some comment here.

Copy link
Member

Choose a reason for hiding this comment

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

Can we have an inline comment here describing what we are doing with channels and frame format here.

@akloniex
Copy link
Member

@keyonjie Have you seen my PR #2600 whichm among others, should address such issues?
In that PR I've completely removed dependency on num_channels param, and read correct value from source/sink buffers properly.
Please verify that my PR solves problems which your PR addresses.

@keyonjie
Copy link
Contributor Author

keyonjie commented Mar 30, 2020

@keyonjie Have you seen my PR #2600 whichm among others, should address such issues?
In that PR I've completely removed dependency on num_channels param, and read correct value from source/sink buffers properly.
Please verify that my PR solves problems which your PR addresses.

@akloniex I think so if the mux/demux doesn't care the num_channels anymore, but as your PR is doing refinement and ABI bump required, so it's better to fix issues exposed inside the old ABI first, that will help on releases delivered with the old version mux/demux component, agree?

The sof_mux_config.num_channels is designed to denote the channel number
of the "1" branch of "1->N" or "N->1", that is the source of demux
(1->N) and the sink of mux (N->1), add handle of the demux type to fix
the noise issue root caused to be the wrong num_channels in the demux
scenarios that input_channels != output_channels.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
@akloniex
Copy link
Member

@akloniex I think so if the mux/demux doesn't care the num_channels anymore, but as your PR is doing refinement and ABI bump required, so it's better to fix issues exposed inside the old ABI first, that will help on releases delivered with the old version mux/demux component, agree?

@keyonjie ABI bump is in the last commit in my PR, and it really only is there, because I wanted to leave the interface clean. In fact, ABI, binary interface, is completely unaffected.
All the real improvements are to be considered old ABI, and iff they fix the issue, they are better, due to being more elastic.

@keyonjie
Copy link
Contributor Author

@akloniex the review process with ABI bumping related PR might take quite long time and the issue keep staying there and blocking releases, if you can send separated PR to fix it and get it merged soon, it will be really appreciated.

By the way, during the smart amplifier implementation, we found there are issues that the frame_fmt among buffers connected to the mux/demux are not aligned sometimes, please pay attention and figure out solution for it also.

@lgirdwood
Copy link
Member

@keyonjie @akloniex ABI is unblocking now...

@keyonjie
Copy link
Contributor Author

keyonjie commented Apr 2, 2020

yes, once @akloniex 's #2600 is merged let me close this one, it is needed on tgl-004-drop-stable only then.

@lgirdwood
Copy link
Member

@keyonjie #2600 now merged, can you fix conflicts

@keyonjie
Copy link
Contributor Author

keyonjie commented Apr 3, 2020

@keyonjie #2600 now merged, can you fix conflicts

We are seeing some issues on smart amplifier after #2600 merged, so we might need some more time to address it.

@keyonjie
Copy link
Contributor Author

This will be handled by #2788, closing it.

@keyonjie keyonjie closed this Apr 26, 2020
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.

4 participants