You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG]DEMUX comp not work normally with channel 4 to 2 with format conversion #2959
Describe the bug
Used to be #2533
The DEMUX should copy the data from source to sink without any error, but now with DEMXU comp, the copy out data is broken when copy channel 4 to channel 2 with format conversion
To Reproduce
Use demux test tplg sof-apl-demux-pcm512x.tplg (#2958 ) to replace the sof-apl-nocodec.tplg with sof-apl-demux-nocodec.tplg
@xiulipan although all bugs are bad, we should probably try playing S16 data as I don't see too many user space folks/apps ever using s32. Demux should be able to convert this to s32/s24 if some fw internal component uses that (or use the original S16).
Or is CRAS for example playing s32? just checking here, as I don't know...
@juimonen Playing s32 and demux extract s16 is broken.
I will try to playback s16 and update the test case. Not sure what CRAS will behave @keyonjie Could you help to give more info with the smart amp usage here?
Can we fix demux #2687 please. This will greatly simplify the code too. i.e.
/* stores all copy src/dest with increments - built during prepare() */structcopy_elem {
void*src;
intsrc_increment;
void*dest;
intdest_increment;
};
/* copy - check for overflow BEFORE copy and alter num_copies to fit */for (i=0; i<num_copies; i++) {
for (j=0; j<num_elems; j++) {
memcpy(elem[j].dest, elem[j].src, size); // memcpy used as example, but do this directly to save func callelem[j].dest+=elem[j].dest_increment;
elem[j].src+=elem[j].src_increment;
}
}
I am not clear what the implementation plan for that, but the PR #2788 should help to reject and avoid getting and providing wrong data to the user space.
@keyonjie@xiulipan I want demux/mux to only to muxing and demuxing only. No mixing or format conversions please. I am not following from your comments if you are aligned with this ?
@keyonjie@xiulipan I want demux/mux to only to muxing and demuxing only. No mixing or format conversions please. I am not following from your comments if you are aligned with this ?
I got your point, but looks nobody is working on that #2687, everybody is waiting for the mux/demux author @akloniex to work on that?
Activity
juimonen commentedon May 20, 2020
@xiulipan can you still be more specific, so you are playing s32, so is the 32 or 16 bit demux data broken?
juimonen commentedon May 20, 2020
@xiulipan although all bugs are bad, we should probably try playing S16 data as I don't see too many user space folks/apps ever using s32. Demux should be able to convert this to s32/s24 if some fw internal component uses that (or use the original S16).
Or is CRAS for example playing s32? just checking here, as I don't know...
xiulipan commentedon May 20, 2020
@juimonen Playing s32 and demux extract s16 is broken.
I will try to playback s16 and update the test case. Not sure what CRAS will behave
@keyonjie Could you help to give more info with the smart amp usage here?
xiulipan commentedon May 20, 2020
@juimonen with s16 source. the s32 demux is not working. So I think we do not support format switch in the demxu.

keyonjie commentedon May 20, 2020
yes, @xiulipan mux/demux is expected to do channel mux/demux only, no sample rate or sample format changing inside it.
lgirdwood commentedon May 20, 2020
Can we fix demux #2687 please. This will greatly simplify the code too. i.e.
keyonjie commentedon May 21, 2020
@mmaka1 has a discussion topic related to this here: https://github.com/orgs/thesofproject/teams/sof-developers/discussions/38
I am not clear what the implementation plan for that, but the PR #2788 should help to reject and avoid getting and providing wrong data to the user space.
lgirdwood commentedon May 21, 2020
@keyonjie @xiulipan I want demux/mux to only to muxing and demuxing only. No mixing or format conversions please. I am not following from your comments if you are aligned with this ?
keyonjie commentedon May 21, 2020
I got your point, but looks nobody is working on that #2687, everybody is waiting for the mux/demux author @akloniex to work on that?
lgirdwood commentedon May 21, 2020
@juimonen fyi on #2687
slawblauciak commentedon Jun 2, 2020
Please verify topology and DAI configuration, which is responsible for format conversion.
xiulipan commentedon Jun 3, 2020
Close as this is not an issue, we have limitation with format convert.
@keyonjie has #2788 to solve this kind of wrong usage