Skip to content

Commit 7ed55e5

Browse files
singalsulgirdwood
authored andcommitted
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>
1 parent a9702cc commit 7ed55e5

5 files changed

Lines changed: 15 additions & 15 deletions

File tree

src/audio/dcblock/tune/dcblock_build_blob.m renamed to src/audio/dcblock/tune/sof_dcblock_build_blob.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function blob8 = dcblock_build_blob(R_coeffs, endian, ipc_ver)
1+
function blob8 = sof_dcblock_build_blob(R_coeffs, endian, ipc_ver)
22

33
%% Settings
44
qy_R = 30;

src/audio/dcblock/tune/dcblock_paths.m renamed to src/audio/dcblock/tune/sof_dcblock_paths.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function dcblock_paths(enable)
1+
function sof_dcblock_paths(enable)
22

33
% dcblock_paths(enable)
44
% enable - set to true to enable needed search path

src/audio/dcblock/tune/dcblock_plot_stepfn.m renamed to src/audio/dcblock/tune/sof_dcblock_plot_stepfn.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function dcblock_plot_stepfn(R, fs)
1+
function sof_dcblock_plot_stepfn(R, fs)
22
% Plot the step response of a DC Blocking Filter
33
% For a DC Blocking filter: H(z) = (1-1/z)/(1 - R/z)
44
% Therefore the coefficients are b = [1 -1], a = [1 -R]

src/audio/dcblock/tune/dcblock_plot_transferfn.m renamed to src/audio/dcblock/tune/sof_dcblock_plot_transferfn.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function dcblock_plot_transferfn(R, fs)
1+
function sof_dcblock_plot_transferfn(R, fs)
22
% Plot the transfer function.
33
% For a DC Blocking filter: H(z) = (1-1/z)/(1 - R/z)
44
% Therefore the coefficients are b = [1 -1], a = [1 -R]

src/audio/dcblock/tune/example_dcblock.m renamed to src/audio/dcblock/tune/sof_example_dcblock.m

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function example_dcblock()
1+
function sof_example_dcblock()
22

33
% Default blob, about 150 Hz cut-off @ 48 kHz
44
prm.fc = [];
@@ -52,32 +52,32 @@ function dcblock_blob_calculate(prm)
5252
R_coeffs = R * ones(1, channels);
5353
end
5454

55-
dcblock_paths(true);
55+
sof_dcblock_paths(true);
5656

57-
blob8 = dcblock_build_blob(R_coeffs, endian);
58-
blob8_ipc4 = dcblock_build_blob(R_coeffs, endian, 4);
57+
blob8 = sof_dcblock_build_blob(R_coeffs, endian);
58+
blob8_ipc4 = sof_dcblock_build_blob(R_coeffs, endian, 4);
5959

6060
% Generate output files
6161
tplg_write(tplg1_fn, blob8, "DCBLOCK", ...
62-
"Exported with script example_dcblock.m", ...
63-
"cd tools/tune/dcblock; octave example_dcblock.m");
62+
"Exported with script sof_example_dcblock.m", ...
63+
"cd tools/tune/dcblock; octave sof_example_dcblock.m");
6464
sof_ucm_blob_write(blob3_fn, blob8);
6565
alsactl_write(alsa3_fn, blob8);
6666

6767
tplg2_write(tplg2_fn, blob8_ipc4, "dcblock_config", ...
68-
"Exported with script example_dcblock.m" , ...
69-
"cd tools/tune/dcblock; octave example_dcblock.m");
68+
"Exported with script sof_example_dcblock.m" , ...
69+
"cd tools/tune/dcblock; octave sof_example_dcblock.m");
7070
sof_ucm_blob_write(blob4_fn, blob8_ipc4);
7171
alsactl_write(alsa4_fn, blob8_ipc4);
7272

7373
% Plot Filter's Transfer Function and Step Response
7474
% As an example, plot the graphs of the first coefficient
7575
fs = 48e3;
76-
dcblock_plot_transferfn(R_coeffs(1), fs);
76+
sof_dcblock_plot_transferfn(R_coeffs(1), fs);
7777
figure
78-
dcblock_plot_stepfn(R_coeffs(1), fs);
78+
sof_dcblock_plot_stepfn(R_coeffs(1), fs);
7979

80-
dcblock_paths(false);
80+
sof_dcblock_paths(false);
8181

8282
end
8383

0 commit comments

Comments
 (0)