2018-06-01 10:29:09 +08:00
|
|
|
#!/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"
|
|
|
|
|
2018-06-28 12:16:44 +08:00
|
|
|
#input sample rate (this is an optional argument for SRC based pipelines)
|
|
|
|
#should be used with -r option
|
|
|
|
fs_in="48000"
|
|
|
|
|
|
|
|
#output sample rate (this is an optional argument for SRC based pipelines)
|
|
|
|
#should be used with -R option
|
|
|
|
fs_out="96000"
|
|
|
|
|
2018-06-01 10:29:09 +08:00
|
|
|
# topology file
|
2018-06-28 12:16:44 +08:00
|
|
|
# please use simple volume/src topologies for now
|
|
|
|
|
|
|
|
topology_file="../soft.git/topology/test/test-playback-ssp2-I2S-volume-s16le-s32le-48k-24576k-codec.tplg"
|
|
|
|
|
|
|
|
#example src topology
|
|
|
|
#topology_file="../soft.git/topology/test/test-playback-ssp5-LEFT_J-src-s24le-s24le-48k-19200k-codec.tplg"
|
2018-06-01 10:29:09 +08:00
|
|
|
|
|
|
|
#optional libraries to override
|
2018-06-28 12:16:44 +08:00
|
|
|
libraries="vol=libsof_volume.so,src=libsof_src.so"
|
2018-06-01 10:29:09 +08:00
|
|
|
|
|
|
|
# Use -d to enable debug prints
|
|
|
|
|
2018-06-28 12:16:44 +08:00
|
|
|
# run volume testbench
|
2018-06-01 10:29:09 +08:00
|
|
|
./src/host/testbench -i $input_file -o $output_file -b $bits_in -t $topology_file -a $libraries -d
|
2018-06-28 12:16:44 +08:00
|
|
|
|
|
|
|
# run src testbench
|
|
|
|
#./src/host/testbench -i $input_file -o $output_file -b $bits_in -t $topology_file -a $libraries -r $fs_in -R $fs_out -d
|