Repository navigation
mux: add channels checking in *_prepare_active_look_up() functions - #3583
Conversation
This commit changes prepare_active_look_up() function name to be mux specific. Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
This commit adds channel parameter checking in mux_prepare_active_look_up() function. Look up table should not include elements referring to channels higher than those actually set in source/sink buffers. Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
|
@lgirdwood I've also ask @jdrzaszcz to perform some more tests with it in order to find any other regression. Please do not merge before we will get feedback. |
|
@bkokoszx Can you please add a few more reviewers? The policy is "At least 2 approving reviews are required to merge this pull request." @lgirdwood Can you please review this PR? It's to fix SOF v1.6 sdw audio distorting on the left speakers #3499 |
| if ((cd->lookup[0].copy_elem[elem].in_ch > | ||
| (source->channels - 1)) || | ||
| (cd->lookup[0].copy_elem[elem].out_ch > | ||
| (sink->channels - 1))) |
There was a problem hiding this comment.
Are the in_ch and out_ch 0 based? Or '>xx->channels -1' here should be 'xx->channels'? The similar question for the demux part also.
There was a problem hiding this comment.
@keyonjie
in_ch and out_ch is 0 based here, similar as in demux part.
There was a problem hiding this comment.
Fwiw, a future optimisation could be the removal of the lookup[0] to just lookup. I dont think we have the need for an array here ?
There was a problem hiding this comment.
@keyonjie
in_chandout_chis0based here, similar as in demux part.
OK, then makes sense.
|
Hi, we performed the regression tests and stress tests with PR #3583 and there was no regression. |
|
@jdrzaszcz @zrombel any comment on the CI failures ? Do we need to rerun? |
| if ((cd->lookup[0].copy_elem[elem].in_ch > | ||
| (source->channels - 1)) || | ||
| (cd->lookup[0].copy_elem[elem].out_ch > | ||
| (sink->channels - 1))) |
There was a problem hiding this comment.
Fwiw, a future optimisation could be the removal of the lookup[0] to just lookup. I dont think we have the need for an array here ?
|
SOFCI TEST |
|
@lgirdwood I rerun CI, but it looks like there is some problem with static code inspection, @bkokoszx will take look at this |
|
@lgirdwood |
|
@lgirdwood |
|
@bkokoszx can you fix the checkpatch thing? otherwise I'm ok with this |
This commit adds demux_prepare_active_look_up() function. It contains channel parameter checking. Look up table should not include elements referring to channels higher than those actually set in source/sink buffers. Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
bf94ba9 to
aea020e
Compare
|
SOFCI TEST |
|
@lgirdwood @juimonen |
This commit adds channel parameter checking in demux/mux_prepare_active_look_up() functions.
Look up table should not include elements referring to channels higher than those actually set in
source/sink buffers.
fixes #3499