Skip to content

Testbench: Fix topology parse error with volume playback topology#2824

Merged
lgirdwood merged 4 commits into
thesofproject:masterfrom
singalsu:testbench_add_coreid_token
May 7, 2020
Merged

Testbench: Fix topology parse error with volume playback topology#2824
lgirdwood merged 4 commits into
thesofproject:masterfrom
singalsu:testbench_add_coreid_token

Conversation

@singalsu
Copy link
Copy Markdown
Collaborator

@singalsu singalsu commented Apr 20, 2020

This first commit adds define for the SOF_TKN_CORE_ID token that is present in some topologies for buffer widget, e.g. pipe-volume-playback.m4.

The second commit for buffer widget load changes is now changed to quite similar to PCM widget so all the arrays get parsed.

The third commit addresses error codes return. The manually set error code is replaced by -errno with malloc() and fseek() calls.

The fourth commit adds return value checks to tplg_read_array() calls.

@singalsu
Copy link
Copy Markdown
Collaborator Author

I just pushed a new version with improved commit texts.

Comment thread tools/tplg_parser/tplg_parser.c Outdated
Comment thread src/include/kernel/tokens.h Outdated
Comment thread tools/tplg_parser/tplg_parser.c Outdated
@singalsu singalsu requested review from lgirdwood and ranj063 April 21, 2020 09:29
Comment thread tools/tplg_parser/tplg_parser.c Outdated
@singalsu singalsu force-pushed the testbench_add_coreid_token branch from 73db142 to 532a67c Compare April 22, 2020 09:12
@singalsu singalsu requested a review from lgirdwood April 22, 2020 09:15
Copy link
Copy Markdown
Member

@lgirdwood lgirdwood left a comment

Choose a reason for hiding this comment

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

Needs rebased as @ranj063 mentioned.

Comment thread src/include/kernel/tokens.h Outdated
Comment thread tools/tplg_parser/tplg_parser.c Outdated
Comment thread tools/tplg_parser/tplg_parser.c Outdated
Comment thread tools/testbench/topology.c Outdated
This patch adds the token into header file tokens.h. It is used for
topology parsing for testbench and fuzzer. The same token has been
already defined in topology m4 macros.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
In some topologies there is a component tokens array after buffer
tokens array for buffer widget. Since the earlier code version was
able to handle only single array and did not skip the remaining it
caused the remaining topology parsing to go out of sync and fail.

This patch changes the vendor array parsing to be similar as for PCM
widget that already had capability to handle several arrays. The core
id is retrieved if present in topology and passed via IPC.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
@singalsu singalsu force-pushed the testbench_add_coreid_token branch from 532a67c to d8e47a7 Compare April 23, 2020 12:07
This patch replaces the manually set error codes with errno that
is set to exact fail reason like ENOMEM etc. by these functions. The
missing return code checks for fseek() calls are added.

Include of header errno.h is added to topology.c. The order of
include statements is fixed.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds the missing error codes check to avoid the parsing
to continue after a possible file I/O fail.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
@singalsu singalsu force-pushed the testbench_add_coreid_token branch from d8e47a7 to b5f1c7c Compare April 23, 2020 12:21
@lgirdwood
Copy link
Copy Markdown
Member

SOFCI TEST

@singalsu
Copy link
Copy Markdown
Collaborator Author

This needs more reviews.

@singalsu singalsu requested review from juimonen and kv2019i April 30, 2020 08:40
Copy link
Copy Markdown

@juimonen juimonen left a comment

Choose a reason for hiding this comment

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

LGTM

@lgirdwood
Copy link
Copy Markdown
Member

CI looks like CI/DUT issue.

@lgirdwood lgirdwood merged commit 374a1d6 into thesofproject:master May 7, 2020
@singalsu singalsu deleted the testbench_add_coreid_token branch August 26, 2022 11:42
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.

5 participants