Skip to content

topology: remove extra demux channel definitions - #3586

Merged
lgirdwood merged 1 commit into
thesofproject:stable-v1.6from
juimonen:dell_demux_fix
Nov 9, 2020
Merged

lgirdwood merged 1 commit into
thesofproject:stable-v1.6from
juimonen:dell_demux_fix

Conversation

@juimonen

@juimonen juimonen commented Nov 5, 2020

Copy link
Copy Markdown

sof-icl-rt711-rt1308-rt715-hdmi.m4 has all 8 channels set to 1 in demux
matrix definitions even though all streams use only 2 channels. This
confuses the demux component to make extra copies, consume more cpu and
causing extra distortion every now and then.

The real fix is to limit the demux operation at runtime to stream
channel count, so not using all channels defined in matrix. However,
this fix is orthogonal and can be used together with the real demux fix.

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

sof-icl-rt711-rt1308-rt715-hdmi.m4 has all 8 channels set to 1 in demux
matrix definitions even though all streams use only 2 channels. This
confuses the demux component to make extra copies, consume more cpu and
causing extra distortion every now and then.

The real fix is to limit the demux operation at runtime to stream
channel count, so not using all channels defined in matrix. However,
this fix is orthogonal and can be used together with the real demux fix.

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

bardliao commented Nov 5, 2020

Copy link
Copy Markdown
Collaborator

Thanks @juimonen Verified on a CML + 2 rt1308 device.

@libinyang

Copy link
Copy Markdown
Contributor

Verified on a CML + 2 rt1308 device. Works well

@libinyang libinyang mentioned this pull request Nov 5, 2020

@keyonjie keyonjie left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We actually don't need bit mask anymore and the big route matrix can be removed thoroughly for both FW and tplg side, but that is for the next cleanup @bkokoszx @juimonen , others looks good, thanks for the fix @juimonen .

@xiulipan xiulipan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the fix, so we do not need to change other DEMUX user as we will refine the DEMUX configuration @keyonjie

@lgirdwood

Copy link
Copy Markdown
Member

@zrombel any input on the build failure here ?

`BITS_TO_BYTE(0, 0, 0 ,0 ,0 ,0 ,0 ,0)',
`BITS_TO_BYTE(0, 0, 0 ,0 ,0 ,0 ,0 ,0)',
`BITS_TO_BYTE(0, 0, 0 ,0 ,0 ,0 ,0 ,0)',
`BITS_TO_BYTE(0, 0, 0 ,0 ,0 ,0 ,0 ,0)')')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@juimonen can you remind me why we have an 8x8 matrix when a 2x2 seemed to do the job? Is this because we hard-coded the demux component to 8ch?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@plbossart we support max 8ch streams, so this is the configuration block for "possibly" all channels. We don't have extra parameters to specify the size or row numbers etc.

I think we had a misunderstanding in the "simplification" code, in a way that demux interpreted all 1's to be used somehow, even though that would lie in a channel count above the stream channel count. So runtime stream channel count should dictate what is used from the matrix, and that is what is now fixed in #3583

It is like you would have multiband eq, where the top band lies above 8khz, if you send there 4kHz sine this band should not have any effect on your sine. It should not however stop you defining the bands in your config.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@plbossart we support max 8ch streams, so this is the configuration block for "possibly" all channels. We don't have extra parameters to specify the size or row numbers etc.

I think we had a misunderstanding in the "simplification" code, in a way that demux interpreted all 1's to be used somehow, even though that would lie in a channel count above the stream channel count. So runtime stream channel count should dictate what is used from the matrix, and that is what is now fixed in #3583

It is like you would have multiband eq, where the top band lies above 8khz, if you send there 4kHz sine this band should not have any effect on your sine. It should not however stop you defining the bands in your config.

Right, but usually you can define the number of bands... I find it odd that we force the demux to deal with 8ch even though we don't have a use case for it on playback. Anyways, that will be for another day and another optimization, this is good enough for now.

@zrombel

zrombel commented Nov 9, 2020

Copy link
Copy Markdown

@lgirdwood I have run this PR without TGL-H configuration and all builds and tests PASSED so it's good to merge.

@lgirdwood
lgirdwood merged commit cd74b46 into thesofproject:stable-v1.6 Nov 9, 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.

9 participants