[Sound-open-firmware] [RFC PATCH 5/6] scripts: add script for building host library and invoking the testbench

Ranjani Sridharan ranjani.sridharan at linux.intel.com
Fri Jun 1 04:29:09 CEST 2018


Signed-off-by: Ranjani Sridharan <ranjani.sridharan at linux.intel.com>
---
 doc/README.host           | 23 +++++++++++++++++++++++
 scripts/host-testbench.sh | 25 +++++++++++++++++++++++++
 2 files changed, 48 insertions(+)
 create mode 100644 doc/README.host
 create mode 100755 scripts/host-testbench.sh

diff --git a/doc/README.host b/doc/README.host
new file mode 100644
index 0000000..30ad583
--- /dev/null
+++ b/doc/README.host
@@ -0,0 +1,23 @@
+The host testbench is meant to serve as a vehicle to test components for functionality
+and quality of processed samples.
+
+Compilation steps:
+
+Run the host-build-all.sh to build the required libraries for the testbench.
+It should also build the testbench executable.
+
+Running the Testbench:
+
+The test can be invoked by running the "testbench" bin in the src/host directory.
+
+Compile and run using script provided (Recommended):
+
+Set up the input arguments for the test in
+"host-testbench.sh" and invoke it to compile the host libraries
+and execute the testbench.
+
+Known Limitations:
+
+1. Currently, testbench code supports simple volume topologies only.
+
+2. When setting up arguments, please keep the same file format for input and output files
diff --git a/scripts/host-testbench.sh b/scripts/host-testbench.sh
new file mode 100755
index 0000000..fe84af9
--- /dev/null
+++ b/scripts/host-testbench.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+#build host library
+sudo ./scripts/host-build-all.sh
+
+#input file
+input_file="48000Hz_stereo_16bit.raw"
+
+#output_file
+output_file="out.raw"
+
+#input bit format
+bits_in="S16_LE"
+
+# topology file
+# please use only simple volume topologies for now
+topology_file="../sound-open-firmware-tools/topology/test/test-playback-ssp2-I2S-volume-s16le-s32le-48k-24576k-codec.tplg"
+
+#optional libraries to override
+libraries="vol=libsof_volume.so"
+
+# Use -d to enable debug prints
+
+# run testbench
+./src/host/testbench -i $input_file -o $output_file -b $bits_in -t $topology_file -a $libraries -d
-- 
2.17.0



More information about the Sound-open-firmware mailing list