mirror of https://github.com/thesofproject/sof.git
Audio: Crossover: Fix paths after scripts move
The paths to topology and sof-ctl blobs are updated. The paths to other setup scripts (common, eq) are set with a new helper function crossover_paths.m. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This commit is contained in:
parent
80c621aeff
commit
4bac61ca32
|
@ -3,8 +3,6 @@ function crossover_quant = crossover_coef_quant(lowpass, highpass);
|
|||
bits_iir = 32; % Q2.30
|
||||
qf_iir = 30;
|
||||
|
||||
addpath ./../eq
|
||||
|
||||
if length(lowpass) ~= length(highpass)
|
||||
error("length of lowpass and highpass array do not match");
|
||||
end
|
||||
|
@ -27,5 +25,4 @@ end
|
|||
crossover_quant.lp_coef = cell2mat(crossover_quant.lp_coef);
|
||||
crossover_quant.hp_coef = cell2mat(crossover_quant.hp_coef);
|
||||
|
||||
rmpath ./../eq
|
||||
end
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
function crossover = crossover_gen_coefs(fs, fc_low, fc_mid, fc_high)
|
||||
|
||||
addpath ./../eq/
|
||||
switch nargin
|
||||
case 2, crossover = crossover_generate_2way(fs, fc_low);
|
||||
case 3, crossover = crossover_generate_3way(fs, fc_low, fc_mid);
|
||||
case 4, crossover = crossover_generate_4way(fs, fc_low, fc_mid, fc_high);
|
||||
otherwise, error("Invalid number of arguments");
|
||||
end
|
||||
rmpath ./../eq
|
||||
|
||||
end
|
||||
|
||||
function crossover_2way = crossover_generate_2way(fs, fc)
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
function crossover_paths(enable)
|
||||
|
||||
% crossover_paths(enable)
|
||||
% enable - set to true to enable needed search path
|
||||
% set to false to disable the search paths
|
||||
%
|
||||
|
||||
% SPDX-License-Identifier: BSD-3-Clause
|
||||
%
|
||||
% Copyright (c) 2024, Intel Corporation. All rights reserved.
|
||||
|
||||
common = '../../../../tools/tune/common';
|
||||
eq = '../../../../tools/tune/eq';
|
||||
# After #9187 merge use this:
|
||||
# eq = '../../eq_iir/tune';
|
||||
if enable
|
||||
addpath(common);
|
||||
addpath(eq);
|
||||
else
|
||||
rmpath(common);
|
||||
rmpath(eq);
|
||||
end
|
||||
end
|
|
@ -1,7 +1,5 @@
|
|||
function example_crossover()
|
||||
|
||||
addpath ./../common
|
||||
|
||||
% Sampling Frequency and Frequency cut-offs for crossover
|
||||
cr.fs = 48e3;
|
||||
cr.fc_low = 200;
|
||||
|
@ -30,17 +28,18 @@ export_crossover(cr);
|
|||
cr.sinks = [0 1 2 3];
|
||||
export_crossover(cr);
|
||||
|
||||
rmpath ./../common
|
||||
|
||||
end
|
||||
|
||||
function export_crossover(cr)
|
||||
|
||||
crossover_paths(true);
|
||||
|
||||
endian = "little";
|
||||
tpath1 = '../../topology/topology1/m4/crossover';
|
||||
tpath2 = '../../topology/topology2/include/components/crossover';
|
||||
ctlpath3 = '../../ctl/ipc3/crossover';
|
||||
ctlpath4 = '../../ctl/ipc4/crossover';
|
||||
sof_tools = '../../../../tools';
|
||||
tpath1 = fullfile(sof_tools, 'topology/topology1/m4/crossover');
|
||||
tpath2 = fullfile(sof_tools, 'topology/topology2/include/components/crossover');
|
||||
ctlpath3 = fullfile(sof_tools, 'ctl/ipc3/crossover');
|
||||
ctlpath4 = fullfile(sof_tools, 'ctl/ipc4/crossover');
|
||||
|
||||
str_way = sprintf('%dway', cr.num_sinks);
|
||||
str_freq = get_str_freq(cr);
|
||||
|
@ -100,6 +99,7 @@ alsactl_write(alsa4_fn, blob8_ipc4);
|
|||
% Plot Magnitude and Phase Response of each sink
|
||||
crossover_plot_freq(crossover.lp, crossover.hp, cr.fs, cr.num_sinks);
|
||||
|
||||
crossover_paths(false);
|
||||
end
|
||||
|
||||
% Frequencies part for filename
|
||||
|
|
Loading…
Reference in New Issue