-
Notifications
You must be signed in to change notification settings - Fork 349
demux: fix demux look up table preparation #3846
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
Conversation
e543f8d to
366273f
Compare
|
@lgirdwood @juimonen |
366273f to
362eda6
Compare
Array streams represents streams on "many" side i.e. input for MUX and output for DEMUX. For DEMUX each stream has masks array - 1 mask per output channel. Each mask shows, from which input channel data should be taken. This commit reverts "demux" part of commit: "b1b31e7154a5c159d81459634eabd8013b434181" Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
362eda6 to
f84272d
Compare
|
hold on here... so is something broken? what is this fixing? |
|
so matrix row is input and column is output, despite is it mux or demux? so isn't this going exactly wrong now? |
|
so in case of mux you have multiple inputs and 1 output, so every matrix correspond to every input stream. with demux you have 1 input and multiple outputs so matrices correspond to the output streams. Anyway, the matrix maps the stream one-to-one, input to output and the matrix input channel is the row and output channel is the mask (column). You just have to always think which 2 streams this matrix connects. |
|
@juimonen It fixes issue which appeared in demux python tests. |
So this we exactly disagree :) IMHO the matrix interpretation of input/output should not change is it mux/demux. Mask should always show to which output the channel (row/input channel) is copied. At least to me it makes it really difficult to operate if I have to change the matrix interpretation. So I mean we can do it both ways, but I don't think we should :) @mwasko @lgirdwood your opinions? |
We need to make sure we align with the upstream topologies being used today. We may have a mix of different mappings that are working with our simple uses cases. @juimonen can you report on what the topologies are doing today (and hopefully they are all doing the same thing) ? |
|
All public demux configs I could find (I could've maybe missed something) are diagonal with 1's -> so doesn't too much matter except in pipe-amp-ref-capture.m4 (used in sof-smart-amplifier.m4) : 1,0,0,0,0,0,0,0, Second row is the interesting: with my interpretation it means copy input channel 2 to output 3, with @bkokoszx it is copy input channel 3 to output 2? @RDharageswari any idea what was the idea here? But yeah that's the only existing demux config that might cause issues... |
|
@juimonen thanks, I guess that |
|
@RDharageswari @bkokoszx can someone comment on |
|
@lgirdwood this is run with smart amp (closed) which I don't have, also I don't have smart amp spec so not sure what channels are supposed to be sent to user space in echo ref pcm. So I'm currently kind of blinded what is the use case here... the feedback channel matrix seems to be diagonal configuration, so that should matter here. |
|
@lgirdwood @juimonen
With this PR we do not have to change topology file. |
|
@bkokoszx ok. But this will then change forever how the demux is though to be configured -> and I think it is wrong. I don't want it to be like this from this point until the end of world. So is someone using this echo ref currently in products somewhere -> do we have possible issues with updating the matrix? |
|
So I mean if this is not used yet, just change: |
|
@juimonen This is used e.g. in: sof-tgl-max98373-rt5682.m4 @lgirdwood |
|
@bkokoszx yeah I know that it is in that topology -> the question is that is this echo ref used in real life somewhere in some product? So is there some sw in user space doing something with this data? if not -> nobody cares what we do now. If it is used -> we have a danger someone maybe using mismatched fw and topology -> other channel in echo ref is 0's. Just saying that later it just gets more difficult to change these. If this is not changed then please also fix sof docs so that it reads how to correctly configure the demux. Also was this the functionality before the simplification? if it was, I could have misinterpreted the functionality all the time -> and even if I did misinterpret it, it still doesn't seems logical. (that we interpret the matrix differently in case of mux compared to demux). |
|
@juimonen I'm not aware whether this data are used by somebody in user space. Sorry, but I think I do not also understand your second question: "Also was this the functionality before the simplification?". What functionality and simplification do you mean? |
Array streams represents streams on "many" side i.e. input
for MUX and output for DEMUX.
For DEMUX each stream has masks array - 1 mask per output
channel. Each mask shows, from which input channel data
should be taken.
This commit reverts "demux" part of commit:
b1b31e7
Signed-off-by: Bartosz Kokoszko bartoszx.kokoszko@linux.intel.com