Skip to content

[RFC] mux: check individual channels set and not entire row - #3624

Merged
lgirdwood merged 1 commit into
thesofproject:masterfrom
juimonen:mux_mix_fix
Dec 1, 2020
Merged

lgirdwood merged 1 commit into
thesofproject:masterfrom
juimonen:mux_mix_fix

Conversation

@juimonen

@juimonen juimonen commented Nov 19, 2020 •

Copy link
Copy Markdown

Currently we are checking if matrix row contains any 1's (popcount). In
mux case this doesn't tell us if channels are mixed. For example if we
have 2 input matrix in which first row's position 2 and 4 have value 1,
it means that both streams channel 1 is copied to output channels 2 and
4, so not mixed. So change the check to be channel specific.

Signed-off-by: Jaska Uimonen jaska.uimonen@intel.com

@juimonen
juimonen requested a review from akloniex as a code owner November 19, 2020 12:41
@juimonen

Copy link
Copy Markdown
Author

@bkokoszx @libinyang FYI

Comment thread src/audio/mux/mux.c Resolved
@libinyang

Copy link
Copy Markdown
Contributor

@juimonen when I apply your patch, It shows the below warning. I know we can use --no-verify to skip this warning. But it should be better to fix this warning, right?

WARNING: Too many leading tabs - consider code refactoring
#31: FILE: src/audio/mux/mux.c:91:
+                                               if (!channel_set) {

WARNING: Too many leading tabs - consider code refactoring
#33: FILE: src/audio/mux/mux.c:93:
+                                               } else {

@bkokoszx bkokoszx left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@juimonen
Thanks for this PR. I have one concern. Do we also check whether we perform mixing inside each individual input stream? I mean that we have e.g.:
cfg->streams[0].mask[0] = 0x1
cfg->streams[0].mask[1] = 0x1
It means that 0 and 1 channel from 0 stream goes to first channel at output, so there are also mixed. I think we do not check this case ATM.

@juimonen

Copy link
Copy Markdown
Author

@bkokoszx yes you are right, let me try to make separate check functions for individual matrix and "inter-matrix", they are little bit nasty to combine and checkpatch goes also crazy for intendation level.

@juimonen

Copy link
Copy Markdown
Author

@libinyang @bkokoszx new version, can you help to test and review?

Comment thread src/audio/mux/mux.c Resolved

@bkokoszx bkokoszx left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Now, looks good to me. Thanks

@lgirdwood

Copy link
Copy Markdown
Member

@juimonen can you check the CI

@juimonen

Copy link
Copy Markdown
Author

SOFCI TEST

Currently we are checking if matrix row contains any 1's (popcount). In
mux case this doesn't tell us if channels are mixed. For example if we
have 2 input matrix in which first row's position 2 and 4 have value 1,
it means that both streams channel 1 is copied to output channels 2 and
4, so not mixed. So change the check to be channel specific.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
@juimonen

Copy link
Copy Markdown
Author

updated: removed some rimage related bogus and added general comment to the check function

@lgirdwood
lgirdwood merged commit 67f3b06 into thesofproject:master Dec 1, 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