mirror of https://github.com/thesofproject/sof.git
Audio: DCblock: Tune: Prefix top level functions with sof_
This patch renames with prefix sof_ all the top level functions for dcblock blobs design. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This commit is contained in:
parent
a9702cc168
commit
7ed55e5b15
|
@ -1,4 +1,4 @@
|
|||
function blob8 = dcblock_build_blob(R_coeffs, endian, ipc_ver)
|
||||
function blob8 = sof_dcblock_build_blob(R_coeffs, endian, ipc_ver)
|
||||
|
||||
%% Settings
|
||||
qy_R = 30;
|
|
@ -1,4 +1,4 @@
|
|||
function dcblock_paths(enable)
|
||||
function sof_dcblock_paths(enable)
|
||||
|
||||
% dcblock_paths(enable)
|
||||
% enable - set to true to enable needed search path
|
|
@ -1,4 +1,4 @@
|
|||
function dcblock_plot_stepfn(R, fs)
|
||||
function sof_dcblock_plot_stepfn(R, fs)
|
||||
% Plot the step response of a DC Blocking Filter
|
||||
% For a DC Blocking filter: H(z) = (1-1/z)/(1 - R/z)
|
||||
% Therefore the coefficients are b = [1 -1], a = [1 -R]
|
|
@ -1,4 +1,4 @@
|
|||
function dcblock_plot_transferfn(R, fs)
|
||||
function sof_dcblock_plot_transferfn(R, fs)
|
||||
% Plot the transfer function.
|
||||
% For a DC Blocking filter: H(z) = (1-1/z)/(1 - R/z)
|
||||
% Therefore the coefficients are b = [1 -1], a = [1 -R]
|
|
@ -1,4 +1,4 @@
|
|||
function example_dcblock()
|
||||
function sof_example_dcblock()
|
||||
|
||||
% Default blob, about 150 Hz cut-off @ 48 kHz
|
||||
prm.fc = [];
|
||||
|
@ -52,32 +52,32 @@ else
|
|||
R_coeffs = R * ones(1, channels);
|
||||
end
|
||||
|
||||
dcblock_paths(true);
|
||||
sof_dcblock_paths(true);
|
||||
|
||||
blob8 = dcblock_build_blob(R_coeffs, endian);
|
||||
blob8_ipc4 = dcblock_build_blob(R_coeffs, endian, 4);
|
||||
blob8 = sof_dcblock_build_blob(R_coeffs, endian);
|
||||
blob8_ipc4 = sof_dcblock_build_blob(R_coeffs, endian, 4);
|
||||
|
||||
% Generate output files
|
||||
tplg_write(tplg1_fn, blob8, "DCBLOCK", ...
|
||||
"Exported with script example_dcblock.m", ...
|
||||
"cd tools/tune/dcblock; octave example_dcblock.m");
|
||||
"Exported with script sof_example_dcblock.m", ...
|
||||
"cd tools/tune/dcblock; octave sof_example_dcblock.m");
|
||||
sof_ucm_blob_write(blob3_fn, blob8);
|
||||
alsactl_write(alsa3_fn, blob8);
|
||||
|
||||
tplg2_write(tplg2_fn, blob8_ipc4, "dcblock_config", ...
|
||||
"Exported with script example_dcblock.m" , ...
|
||||
"cd tools/tune/dcblock; octave example_dcblock.m");
|
||||
"Exported with script sof_example_dcblock.m" , ...
|
||||
"cd tools/tune/dcblock; octave sof_example_dcblock.m");
|
||||
sof_ucm_blob_write(blob4_fn, blob8_ipc4);
|
||||
alsactl_write(alsa4_fn, blob8_ipc4);
|
||||
|
||||
% Plot Filter's Transfer Function and Step Response
|
||||
% As an example, plot the graphs of the first coefficient
|
||||
fs = 48e3;
|
||||
dcblock_plot_transferfn(R_coeffs(1), fs);
|
||||
sof_dcblock_plot_transferfn(R_coeffs(1), fs);
|
||||
figure
|
||||
dcblock_plot_stepfn(R_coeffs(1), fs);
|
||||
sof_dcblock_plot_stepfn(R_coeffs(1), fs);
|
||||
|
||||
dcblock_paths(false);
|
||||
sof_dcblock_paths(false);
|
||||
|
||||
end
|
||||
|
Loading…
Reference in New Issue