Skip to content

mux: implement ipc4 support - #6385

Merged
mwasko merged 3 commits into
thesofproject:mainfrom
fkwasowi:mux_module_ipc4_support
Oct 20, 2022
Merged

mux: implement ipc4 support#6385
mwasko merged 3 commits into
thesofproject:mainfrom
fkwasowi:mux_module_ipc4_support

Conversation

@fkwasowi

@fkwasowifkwasowi commented Oct 10, 2022

Copy link
Copy Markdown
Contributor

mux module does not support ipc4

A change is needed to work properly: thesofproject/rimage#112

@fkwasowi
fkwasowiforce-pushed the mux_module_ipc4_support branch from 4ed7f08 to 929075fCompareOctober 10, 2022 10:32

@lgirdwoodlgirdwood left a comment

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.

Lots of complex looking code in here, can you provide more inline comments on each block to help reviewers. Thanks.

@kv2019ikv2019i 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.

Thanks @fkwasowi ! A few comments inline, please see.

Comment threadsrc/audio/mux/mux.c Outdated
Comment threadsrc/audio/mux/mux.c Outdated
Comment threadsrc/audio/mux/mux.c Outdated
Comment threadsrc/audio/mux/mux.c Outdated
Comment threadsrc/audio/mux/mux.c Outdated
Comment threadsrc/audio/mux/mux.c Outdated
Comment threadsrc/audio/mux/mux.c Outdated
Comment threadsrc/audio/mux/mux.c Outdated
Comment threadsrc/audio/mux/mux.c Outdated
Comment threadsrc/audio/mux/mux.c Outdated
@fkwasowi
fkwasowiforce-pushed the mux_module_ipc4_support branch 3 times, most recently from 020c9d1 to a472329CompareOctober 10, 2022 13:06
@fkwasowi
fkwasowiforce-pushed the mux_module_ipc4_support branch from a472329 to 6f542b2CompareOctober 10, 2022 13:23
@juimonen

juimonen commented Oct 10, 2022

Copy link
Copy Markdown

@fkwasowi is it so that copier or mixinmixout can't do the operations the mux/demux is doing? Anyway good to have this, but we need to get the "full story" how these parameters are coming from the user space via topology and kernel to firmware. As I understand current mux/demux is a "process component" with binary blob interface -> so it should be ipc agnostic? so why do we need a new interface for it?

@fkwasowi
fkwasowiforce-pushed the mux_module_ipc4_support branch from 6f542b2 to 52b971eCompareOctober 10, 2022 13:31
Comment threadsrc/audio/mux/mux.c Outdated
Comment threadsrc/audio/mux/mux.c Outdated
Comment threadsrc/audio/mux/mux.c Outdated
@fkwasowi
fkwasowiforce-pushed the mux_module_ipc4_support branch 3 times, most recently from a523547 to 1daad89CompareOctober 11, 2022 09:35

@kv2019ikv2019i 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.

Thanks, the comment in build_config() is very good. Only one very minor nit left, please see inline, otherwise seems good to go.

Comment threadsrc/audio/mux/mux.c Outdated
Comment threadsrc/audio/mux/mux.c Outdated
@fkwasowi

Copy link
Copy Markdown
ContributorAuthor

Fine to me. @fkwasowi If you compare to #6429 , the rimage history is missing from commit description, but this is not a mandatory part (and is missing from some earlier updates as well). I'm good with this version as well. We can merge this directly when Marc approves.

Commit message changed

@fkwasowi
fkwasowiforce-pushed the mux_module_ipc4_support branch from 58dc1ae to 6c0b8b3CompareOctober 18, 2022 06:55
Comment threadsrc/audio/copier/copier.c Outdated
marc-hb
marc-hb previously requested changes Oct 18, 2022

@marc-hbmarc-hb 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.

Fails to compile TGL in https://sof-ci.01.org/sof-pr-viewer/#/build/PR6385/build10613048

/localdisk/tools/xtensa/RG-2017.8-linux/XtensaTools/bin/xt-xcc -DBLD_COUNTERS=0 -DRELATIVE_FILE=\"src/audio/copier/copier.c\" -I/quickbuild/workspace1/24733/SOF_FW/src/platform/intel/cavs/include -I/quickbuild/workspace1/24733/SOF_FW/src/arch/xtensa/include -I/quickbuild/workspace1/24733/SOF_FW/src/arch/xtensa/xtos -I/quickbuild/workspace1/24733/SOF_FW/xtos/include -I/quickbuild/workspace1/24733/SOF_FW/src/platform/tigerlake/include -I/localdisk/tools/xtensa/RG-2017.8-linux/cavs2x_LX6HiFi3_2017_8/xtensa-elf/arch/include -I/localdisk/tools/xtensa/RG-2017.8-linux/cavs2x_LX6HiFi3_2017_8/xtensa-elf/include -I/quickbuild/workspace1/24733/SOF_FW/rimage/src/include -I/quickbuild/workspace1/24733/SOF_FW/src/include -I/quickbuild/workspace1/24733/SOF_FW/build_fw/generated/include -I/quickbuild/workspace1/24733/SOF_FW/third_party_include -nostdlib -fno-inline-functions -mlongcalls -O2 -g -Wall -Werror -Wl,-EL -Wmissing-prototypes -Wpointer-arith -mtext-section-literals -imacros/quickbuild/workspace1/24733/SOF_FW/build_fw/generated/include/autoconfig.h -MD -MT CMakeFiles/sof.dir/src/audio/copier/copier.c.o -MF CMakeFiles/sof.dir/src/audio/copier/copier.c.o.d -o CMakeFiles/sof.dir/src/audio/copier/copier.c.o -c /quickbuild/workspace1/24733/SOF_FW/src/audio/copier/copier.c
/quickbuild/workspace1/24733/SOF_FW/src/audio/copier/copier.c: In function ‘copier_new’:
/quickbuild/workspace1/24733/SOF_FW/src/audio/copier/copier.c:463: error: ‘for’ loop initial declaration used outside C99 mode
/quickbuild/workspace1/24733/SOF_FW/src/audio/copier/copier.c: In function ‘copier_prepare’:
/quickbuild/workspace1/24733/SOF_FW/src/audio/copier/copier.c:622: error: ‘for’ loop initial declaration used outside C99 mode
CMakeFiles/sof.dir/build.make:1037: recipe for target 'CMakeFiles/sof.dir/src/audio/copier/copier.c.o' failed
make[3]: *** [CMakeFiles/sof.dir/src/audio/copier/copier.c.o] Error 2

TGL compiles just fine in https://sof-ci.01.org/sofpr/PR6385/build1949/build/tgl_zph.txt with xcc/install/builds/RG-2017.8-linux/cavs2x_LX6HiFi3_2017_8 and (hopefully) in your workspace too? What toolchain did you use?

So this looks a CI misconfiguration problem. CI should never compile anything with "secret flags" or secret options / configurations that developers cannot reproduce easily, all the entire build configurations MUST be available in version control. No CI "secret sauce" ever.

Whatever the root cause is, we can't merge code that does not compile for whatever reason.

@fkwasowi
fkwasowiforce-pushed the mux_module_ipc4_support branch 2 times, most recently from a51e0b7 to 00bdacbCompareOctober 19, 2022 09:57
@fkwasowi

fkwasowi commented Oct 19, 2022

Copy link
Copy Markdown
ContributorAuthor

Fails to compile TGL in https://sof-ci.01.org/sof-pr-viewer/#/build/PR6385/build10613048

/localdisk/tools/xtensa/RG-2017.8-linux/XtensaTools/bin/xt-xcc -DBLD_COUNTERS=0 -DRELATIVE_FILE=\"src/audio/copier/copier.c\" -I/quickbuild/workspace1/24733/SOF_FW/src/platform/intel/cavs/include -I/quickbuild/workspace1/24733/SOF_FW/src/arch/xtensa/include -I/quickbuild/workspace1/24733/SOF_FW/src/arch/xtensa/xtos -I/quickbuild/workspace1/24733/SOF_FW/xtos/include -I/quickbuild/workspace1/24733/SOF_FW/src/platform/tigerlake/include -I/localdisk/tools/xtensa/RG-2017.8-linux/cavs2x_LX6HiFi3_2017_8/xtensa-elf/arch/include -I/localdisk/tools/xtensa/RG-2017.8-linux/cavs2x_LX6HiFi3_2017_8/xtensa-elf/include -I/quickbuild/workspace1/24733/SOF_FW/rimage/src/include -I/quickbuild/workspace1/24733/SOF_FW/src/include -I/quickbuild/workspace1/24733/SOF_FW/build_fw/generated/include -I/quickbuild/workspace1/24733/SOF_FW/third_party_include -nostdlib -fno-inline-functions -mlongcalls -O2 -g -Wall -Werror -Wl,-EL -Wmissing-prototypes -Wpointer-arith -mtext-section-literals -imacros/quickbuild/workspace1/24733/SOF_FW/build_fw/generated/include/autoconfig.h -MD -MT CMakeFiles/sof.dir/src/audio/copier/copier.c.o -MF CMakeFiles/sof.dir/src/audio/copier/copier.c.o.d -o CMakeFiles/sof.dir/src/audio/copier/copier.c.o -c /quickbuild/workspace1/24733/SOF_FW/src/audio/copier/copier.c
/quickbuild/workspace1/24733/SOF_FW/src/audio/copier/copier.c: In function ‘copier_new’:
/quickbuild/workspace1/24733/SOF_FW/src/audio/copier/copier.c:463: error: ‘for’ loop initial declaration used outside C99 mode
/quickbuild/workspace1/24733/SOF_FW/src/audio/copier/copier.c: In function ‘copier_prepare’:
/quickbuild/workspace1/24733/SOF_FW/src/audio/copier/copier.c:622: error: ‘for’ loop initial declaration used outside C99 mode
CMakeFiles/sof.dir/build.make:1037: recipe for target 'CMakeFiles/sof.dir/src/audio/copier/copier.c.o' failed
make[3]: *** [CMakeFiles/sof.dir/src/audio/copier/copier.c.o] Error 2

Fixed

@marc-hb

marc-hb commented Oct 19, 2022

Copy link
Copy Markdown
Collaborator

So this looks a CI misconfiguration problem. CI should never compile anything with "secret flags" or secret options / configurations that developers cannot reproduce easily, all the entire build configurations MUST be available in version control. No CI "secret sauce" ever.

Fixed

What was fixed, is the CI secret sauce gone? It looks like you just changed the code to avoid the issue.

@marc-hb

Copy link
Copy Markdown
Collaborator

Fails to compile TGL in https://sof-ci.01.org/sof-pr-viewer/#/build/PR6385/build10613048

Apologies, this was not a Zephyr build. Thanks @mwasko for the tip.

@marc-hb
marc-hb dismissed their stale reviewOctober 20, 2022 01:16

Now compiles

upgrade rimage to
3ee717e3ee717e probe: mtl.toml invaliv probe type
1f4a36e mux: fix module type
dcfd11b mux: add mux cfg to list of modules
d957e03 rimage: make ace15 signing to support openssl3
a1b6e6d manifest: add fw_ver_micro to manifest
fb28357 config: mtl: add probe module
Signed-off-by: Kwasowiec, Fabiola <fabiola.kwasowiec@intel.com>
mux module does not support ipc4
Signed-off-by: "Kwasowiec, Fabiola" <fabiola.kwasowiec@intel.com>
conversion function and out_fmt
is set only for first pin
Signed-off-by: "Kwasowiec, Fabiola" <fabiola.kwasowiec@intel.com>
@fkwasowi
fkwasowiforce-pushed the mux_module_ipc4_support branch from 3c3ad13 to f7c0b29CompareOctober 20, 2022 07:07
@aborisovich

Copy link
Copy Markdown
Contributor

SOF CI

@fkwasowi

Copy link
Copy Markdown
ContributorAuthor

@kv2019i , You recently released a change with the same failing step (#6383), "Known fail in IPC4 test set, proceeding with merge."-could I also ask for such a merge? Because I do not know how to pass the step sof-ci. I have the same problem as Tomasz Lissowski had.

@mwasko
mwasko merged commit 8083eb0 into thesofproject:mainOct 20, 2022
@marc-hb

Copy link
Copy Markdown
Collaborator

I merged @kv2019i 's hard work in thesofproject/sof-test#971 so https://sof-ci.01.org/sofpr/PR6385/build2000/devicetest is all green. No need to ask for any exception now

Sign up for freeto 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.

11 participants

@fkwasowi@juimonen@kv2019i@marc-hb@aborisovich@lyakh@lgirdwood@mwasko@RanderWang@mmaka1@aiChaoSONG