Ranjani Sridharan | 48c52ee | 2018-05-31 19:29:09 -0700 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | #build host library |
| 4 | sudo ./scripts/host-build-all.sh |
| 5 | |
| 6 | #input file |
| 7 | input_file="48000Hz_stereo_16bit.raw" |
| 8 | |
| 9 | #output_file |
| 10 | output_file="out.raw" |
| 11 | |
| 12 | #input bit format |
| 13 | bits_in="S16_LE" |
| 14 | |
Ranjani Sridharan | 990046e | 2018-06-27 21:16:44 -0700 | [diff] [blame] | 15 | #input sample rate (this is an optional argument for SRC based pipelines) |
| 16 | #should be used with -r option |
| 17 | fs_in="48000" |
| 18 | |
| 19 | #output sample rate (this is an optional argument for SRC based pipelines) |
| 20 | #should be used with -R option |
| 21 | fs_out="96000" |
| 22 | |
Ranjani Sridharan | 48c52ee | 2018-05-31 19:29:09 -0700 | [diff] [blame] | 23 | # topology file |
Ranjani Sridharan | 990046e | 2018-06-27 21:16:44 -0700 | [diff] [blame] | 24 | # please use simple volume/src topologies for now |
| 25 | |
| 26 | topology_file="../soft.git/topology/test/test-playback-ssp2-I2S-volume-s16le-s32le-48k-24576k-codec.tplg" |
| 27 | |
| 28 | #example src topology |
| 29 | #topology_file="../soft.git/topology/test/test-playback-ssp5-LEFT_J-src-s24le-s24le-48k-19200k-codec.tplg" |
Ranjani Sridharan | 48c52ee | 2018-05-31 19:29:09 -0700 | [diff] [blame] | 30 | |
| 31 | #optional libraries to override |
Ranjani Sridharan | 990046e | 2018-06-27 21:16:44 -0700 | [diff] [blame] | 32 | libraries="vol=libsof_volume.so,src=libsof_src.so" |
Ranjani Sridharan | 48c52ee | 2018-05-31 19:29:09 -0700 | [diff] [blame] | 33 | |
| 34 | # Use -d to enable debug prints |
| 35 | |
Ranjani Sridharan | 990046e | 2018-06-27 21:16:44 -0700 | [diff] [blame] | 36 | # run volume testbench |
Ranjani Sridharan | 48c52ee | 2018-05-31 19:29:09 -0700 | [diff] [blame] | 37 | ./src/host/testbench -i $input_file -o $output_file -b $bits_in -t $topology_file -a $libraries -d |
Ranjani Sridharan | 990046e | 2018-06-27 21:16:44 -0700 | [diff] [blame] | 38 | |
| 39 | # run src testbench |
| 40 | #./src/host/testbench -i $input_file -o $output_file -b $bits_in -t $topology_file -a $libraries -r $fs_in -R $fs_out -d |