Commit Graph

22 Commits

Author SHA1 Message Date
Liam Girdwood d9f9340e1a tplg_parser: split out testbench logic and partition features per file.
This is another tplg_parser and testbench update on the road to provide
further flexibility around supporting new modules and IPC versions.
There will more to follow.

Changes are mostly mechanical code movements i.e. moving testbench related code
to the testbench, splitting the files into per module/component files and
making some functions static and public.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2022-08-29 14:11:29 +01:00
Liam Girdwood 0db4a82964 tplg parser: refactor and cleanup part 1
No functional change.

Move some common testbench code into the topology parser and group
feature parsing by file name.

Add a tplg_ prefix to external APIs without a prefix, others with an
existing prefix to follow this change.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2022-03-24 16:54:40 +00:00
Liam Girdwood 28761ec8ab testbench: add support for virtual cores as threads
This is the first step in running a full DSP topology on multiple testbench
"virtual" cores. Testbench will use threads to virtualise a emulate a core
allowing topologies with more than one core to run simultaneously.

This patch makes the following changes.

1) Adds and passes a topology testbench context to all APIs instead of
   relying on some globals.

2) Splits the testbench up into small functions that have a single purpose.

3) Creates a thread for each pipeline which in turn share a virtual core.

4) Adds the command line options to enable testing different cores and
   pipelines.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2022-01-31 16:16:27 +00:00
Curtis Malainey a0acad3414 CMake: require version 3.13
Without CMP0079 we cannot conditionally include libraries against SOF in
sub directories without seriously restructuring the project. This is
because the old policy requires the link target must be created in the
same folder. This does not work well from a configuration standpoint for
3P audio libraries trying to keep their config in src/audio/*. Rather
than enable the policy, lets simply upgrade since 3.13 is widely
available.

With this upgrade we can also remove the two version dependent checks at
the top of our scripts.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2021-09-10 17:19:29 +01:00
Marc Herbert fa5cc118b5 fuzzer: add deprecation README.md
As discussed in https://github.com/thesofproject/sof/pull/4132

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-05-24 15:27:18 -07:00
Liam Girdwood e79d5d1f8e fuzzer: fix build as with header order and ARRAY_SIZE redefinition
ARRAY_SIZE was being redefined, simplest option is to remove, but I think
this code has to additionally be compiled with external Fuzzer. Fix build.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2021-04-12 15:57:23 -07:00
Liam Girdwood 0f2c9d1230 cleanup: remove double blanks lines.
Several files had multiple blank lines even before the removal of
platform_shared_commit(). Fix them with "cat -s"

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2021-04-12 16:58:51 +01:00
Jaska Uimonen a40bb45be8 tools: testbench: add uuid based library loading
Add methods to load process libraries based on uuid. Testbench will
first search the old process enums and if match isn't found the same
search is done with uuid. Hence old process components should get loaded
with enums and new uuid based components should get loaded with uuids if
the uuid definition is declared and added to the library table.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2020-09-07 12:04:28 +01:00
Seppo Ingalsuo f430addec7 Tools: Fuzzer: Do not use illegal BUILD_COMMAND in CMakeLists.txt
This patch removes the incorrect usage of BUILD_COMMAND. Having it set
to "cmake" caused the cmake usage help text output to be shown only and
caused the ExternalProject_Add command to believe the
libsof_tplg_parser.so was built. The build for the library happened only
because the next install step performed the compilation. With this fix
the default build command is used instead. There's no need to define
it here.

Fixes #2656

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-08-31 11:30:26 +01:00
Diana Cretu 3b3d0ae2eb fuzzer: Add initial support for i.MX8 platform
Implement the fuzzer API for the i.MX8 platform. The difference
between other platforms and i.MX8 is the Messaging Unit(MU). We have
emulated the hardware functionality of MU by using SHMs to represent
Side A and Side B of the MU and the registers they each have. Both
qemu(VM) and fuzzer's write functions write to both sides of the MU to
successfully emulate it's functionality.

Signed-off-by: Diana Cretu <diana.cretu@nxp.com>
Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
2020-08-10 10:44:30 +01:00
Seppo Ingalsuo 0eeda80bdf Testbench: Add processing component load
This patch adds to testbench capability to run pipelines with EQ_IIR
and EQ_FIR components. The component is configured with the topology
embedded configuration blob when instantiated with new().

The load of volume component has been enhanced to parse volume tokens and
compute the min and max volume parameters.

The topology parsing and component library load has been changed to
support processing component load and extracting of control private
data. The testbench build has been changed to create libraries
for EQ components.

The testbench command line parsing has been improved to return
error for invalid library request.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-03-20 13:29:00 +00:00
Seppo Ingalsuo a4c663fbd7 Tools: Fix build of fuzzer due to testbench topology parser updates
This patch updates the load_aif_in_out(), load_dai_in_out(),
and load_pipeline() calls similarly as done for testbench to
prevent the Fuzzer build fail.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-02-26 22:29:10 +00:00
Seppo Ingalsuo 8b595069dc Fuzzer: Fix build fail for missing ASRC loader
This patch adds load of ASRC component to successfully build
the Fuzzer. The common topology parser with testbench depends
on load_asrc() function.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-02-24 11:51:10 +00:00
Liam Girdwood 25c8990d39 fuzzer: add BSW platform and fix fw_ready for CHT.
CHT was missing fw_ready callback. Add BSW platform.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-09-20 10:09:17 +01:00
Liam Girdwood 689ce5ac99 fuzzer: byt: align macros to line length limit.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-09-20 10:09:17 +01:00
Liam Girdwood 224f177020 fuzzer: add support for HSW and BDW platforms.
Can now send fuzzing IPCs and topologies to HSW/BDW VMs.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-09-20 10:09:17 +01:00
Liam Girdwood bf72bf7a7b fuzzer: cleanup mailbox platform abstraction
Pass mailbox as parameter and add convenience helper for platform ops.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-09-20 10:09:17 +01:00
Liam Girdwood 29a9b9d529 fuzzer: add more logging and cleanup printf
provide more detail to the user and print to stdout.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-09-20 10:09:17 +01:00
Liam Girdwood c33e1a3677 fuzzer: no need for extra new line.
message already contains the newline.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-09-20 10:09:17 +01:00
Liam Girdwood 5dce3fb8fb fuzzer: fix return value of topology loader.
Return the real error code.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-09-20 10:09:17 +01:00
Liam Girdwood 8cd194e624 fuzzer: fix fuzzer hardcoding of topology.
Command line option was ignored. Fix it.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-09-20 10:09:17 +01:00
Ranjani Sridharan 2f9b43bac0 tools: fuzzer: Introducing ingredients for fuzzing in SOF
This commit introduces the ingredients required for adding
fuzzing support in SOF. The main ingredients are as follows:

QEMU bridge: This creates the IO bridge to communicate with
the QEMU DSP

Core IA host support for BYT/CHT platforms: Provides the host
support for intializing the platform and communicating with
the QEMU DSP

Main application: The fuzzing application that sets up the
platform and initializes the communication with the QEMU DSP

Currently, running the fuzzer application only sets up the
platform IO bridge for communicating with the QEMU DSP,
boots the FW, parses the topology file and sets up the components
and connections in topology by sending the IPC messages to
the QEMU DSP. The next step is to add the fuzzing component
which will be responsible for sending fuzzed IPC messages
and monitoring the status.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-08-07 08:47:58 +02:00