[Sound-open-firmware] [PATCH] SOFT: Add SRC coefficients generate tool

Seppo Ingalsuo seppo.ingalsuo at linux.intel.com
Mon Jun 4 11:48:14 CEST 2018



On 04.06.2018 12:13, Liam Girdwood wrote:
> On Mon, 2018-06-04 at 11:02 +0300, Seppo Ingalsuo wrote:
>> This patch adds the scripts src_std_int32.m and src_tiny_int16.m those
>> were used to create the conversions matrices for the default and tiny
>> profiles. The scripts call the included src_generate function that
>> does the task with help from the filter design and coefficients
>> export utilities.
>>
>> The quality and resources consumption of SRC can be customized with
>> this tool.
>>
> Thanks I've applied, but some minor comments.
>
>> Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo at linux.intel.com>
>> ---
>>   tune/src/README                |  36 +++++
> This will need moved to doc/ and converted to our markup format (more on that
> later).

OK, I will study it.

>>   tune/src/src_export_coef.m     | 212 ++++++++++++++++++++++++++++
>>   tune/src/src_export_defines.m  |  66 +++++++++
>>   tune/src/src_export_table_2s.m | 190 +++++++++++++++++++++++++
>>   tune/src/src_factor1_lm.m      |  44 ++++++
>>   tune/src/src_factor2_lm.m      | 155 ++++++++++++++++++++
>>   tune/src/src_find_l0m0.m       |  71 ++++++++++
>>   tune/src/src_generate.m        | 311
>> +++++++++++++++++++++++++++++++++++++++++
>>   tune/src/src_get.m             | 254 +++++++++++++++++++++++++++++++++
>>   tune/src/src_param.m           |  87 ++++++++++++
>>   tune/src/src_std_int32.m       |  30 ++++
>>   tune/src/src_tiny_int16.m      |  41 ++++++
>>   12 files changed, 1497 insertions(+)
>>   create mode 100644 tune/src/README
>>   create mode 100644 tune/src/src_export_coef.m
>>   create mode 100644 tune/src/src_export_defines.m
>>   create mode 100644 tune/src/src_export_table_2s.m
>>   create mode 100644 tune/src/src_factor1_lm.m
>>   create mode 100644 tune/src/src_factor2_lm.m
>>   create mode 100644 tune/src/src_find_l0m0.m
>>   create mode 100644 tune/src/src_generate.m
>>   create mode 100644 tune/src/src_get.m
>>   create mode 100644 tune/src/src_param.m
>>   create mode 100644 tune/src/src_std_int32.m
>>   create mode 100644 tune/src/src_tiny_int16.m
> We should also add a check for GNU octave in configure.ac and a simple script
> that runs octave and outputs a C file with the new coefficients (by default it
> should just emit the same coefficients we use today).

That will be run of "octave --no-gui src_std_int32.m" and "octave 
--no-gui src_tiny_int16.m". I'll add that. With Kaiser filters the 
design is quite fast and the run won't take much more time than 
topologies compile. So it should be acceptable

That option will still open Gnuplot windows to desktop to show the 
filter responses but they are closed when the script completes. By 
adding option --no-window-system the plots appear as coarse ASCII to 
console. What would be preferred?

The "std" coefficients set output matches with current git while "tiny" 
doesn't. I'll see if it's best to update tiny again to achieve that. 
Tiny set had and also what is generated now still has a number of fails 
in audio quality tests so I've been trying to alter it to minimize the 
number of fails. There's no bugs but just the limitation that FIR 
filters can't have strong stop-band with short type.

Thank,
Seppo


>
> Thanks
>
> Liam
> _______________________________________________
> Sound-open-firmware mailing list
> Sound-open-firmware at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/sound-open-firmware
>



More information about the Sound-open-firmware mailing list