This patch replaces in topology sof-hda-generic.m4 the use of macro
pipe-volume-capture.m4 usage with a new macro pipe-highpass-capture.m4.
The used 40 Hz cut-off is sufficient to suppress the DC pulse in the
beginning of capture from headset with minimal impact to other
applications such as recording music.
The capture volume ramp length is changed from 250 ms to 400 ms. The
longer ramp is feasible because the microphone path seems to open
at 500 ms from capture. It helps to attenuate the remaining noises
in the beginning of capture.
The patch also adds additional high-pass responses macros for
topology with different 20-50 Hz cut-off frequencies into
SOF/tools/topology/m4.
The changes for Matlab/Octave script example_iir_eq.m that
generated the filter coefficients are included here as well.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The Xtensa GCC build on APL platform can process about 40 taps
FIR filter so it is useful to have one such configuration. The
eq_fir_mid.txt is be applied with sof-ctl tool.
The patch contains the Octave script modification. The print of final
filter length is added to blob packer script to see the resulting
length when the filter is generated. The small filter spec change
helps the filter tool to achieve result that is close to requested
shape.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds command line option "-g" to generate and with help
of options "-o <file>" to store the current ABI version header data
into file. Use "-b" to change the default CSV format to binary.
It is used by external tools to create configuration data blobs for
SOF audio processing components.
The parameter for size is the configuration data payload size with
the size of sof_abi_hdr struct excluded. It does not impact the
the length of printed header. It just places the length into the
correct location in the header.
This patch also fixes the permissions of file output. The mode
need to be provided for open() to avoid having no access to
created file and allow overwrite of existing file.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
If no control name is passed to sof-ctl, it currently pops an error,
dumps the usage and then segfaults:
root@gr-mrb:~# sof-ctl -D hw:0
Error: No control was requested.
Usage: ...
Segmentation fault (core dumped)
Fix all that by jumping to the right label.
Signed-off-by: Dragos Tarcatu <dragos_tarcatu@mentor.com>
Move ctl_elem pointers and buffer initialization out of main(), and
replace calling alloca APIs with malloc ones to make they are shareable
between different functions.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Firmware may use different component specified type in abi header, to
support more than one kcontrols for the same component, here add '-t' to
support specifying this component specified type in the abi header.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Split buffer allocating and freeing part from main(), add separated
functions and call them from main().
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Using '-r' with '-s' means no abi header for the input file, and asks
for not dumping abi header when using '-r' without '-s'.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
This will be used on large input file scenario, we need to allocate
buffer according to the input file size.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
We might dump kcontrol values in different format, create data_dump()
and csv_data_dump() for that.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Add a globle struct which will store params and be shared among
functions in the later commits, to make the code more readable.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Dump the ABI header from source CSV or DSP data. This will make it
obvious if there are any ABI differences.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This tool is generic and can be used with any binary kcontrol to
send data to/from components at runtime.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>