Skip to content

Commit 4e3d573

Browse files
singalsukv2019i
authored andcommitted
Audio: MFCC: Move setup and run scripts to module directory
This patch moves the files from tools/tune/mfcc to directory src/audio/mfcc/tune. The patchs are fixed for the new location. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
1 parent 3e60207 commit 4e3d573

4 files changed

Lines changed: 11 additions & 8 deletions

File tree

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
% below from code
66
%
77
% Create binary configuration blob for MFCC component. The hex data
8-
% is written to tools/topology/topology1/m4/mfcc/mfcc_config.m4
8+
% is written to tools/topology/topology2/include/components/mfcc and
9+
% tools/topology/topology1/m4/mfcc.
910

1011
% SPDX-License-Identifier: BSD-3-Clause
1112
%
12-
% Copyright (c) 2018-2020, Intel Corporation. All rights reserved.
13+
% Copyright (c) 2018-2026, Intel Corporation. All rights reserved.
1314

1415
function setup_mfcc(cfg)
1516

@@ -45,12 +46,14 @@ function setup_mfcc(cfg)
4546
cfg.top_db = 200; % Set to 80 for librosa
4647
end
4748

48-
cfg.tplg_fn = '../../topology/topology1/m4/mfcc/mfcc_config.m4';
49+
cfg.tools = '../../../../tools/';
50+
51+
cfg.tplg_fn = [cfg.tools 'topology/topology1/m4/mfcc/mfcc_config.m4'];
4952
cfg.tplg_ver = 1;
5053
cfg.ipc_ver = 3;
5154
export_mfcc_setup(cfg);
5255

53-
cfg.tplg_fn = '../../topology/topology2/include/components/mfcc/default.conf';
56+
cfg.tplg_fn = [cfg.tools 'topology/topology2/include/components/mfcc/default.conf'];
5457
cfg.tplg_ver = 2;
5558
cfg.ipc_ver = 4;
5659
export_mfcc_setup(cfg);
@@ -60,7 +63,7 @@ function setup_mfcc(cfg)
6063
function export_mfcc_setup(cfg)
6164

6265
%% Use blob tool from EQ
63-
addpath('../common');
66+
addpath([cfg.tools 'tune/common']);
6467

6568
%% Blob size, size plus reserved(8) + current parameters
6669
nbytes_data = 104;
@@ -122,16 +125,16 @@ function export_mfcc_setup(cfg)
122125
case 1
123126
sof_tplg_write(cfg.tplg_fn, b8, "DEF_MFCC_PRIV", ...
124127
"Exported with script setup_mfcc.m", ...
125-
"cd tools/tune/mfcc; octave setup_mfcc.m");
128+
"cd src/audio/mfcc/tune; octave setup_mfcc.m");
126129
case 2
127130
sof_tplg2_write(cfg.tplg_fn, b8, "mfcc_config", ...
128131
"Exported MFCC configuration", ...
129-
"cd tools/tune/mfcc; octave setup_mfcc.m");
132+
"cd src/audio/mfcc/tune; octave setup_mfcc.m");
130133
otherwise
131134
error("Illegal cfg.tplg_ver, use 1 for topology v1 or 2 topology v2.");
132135
end
133136

134-
rmpath('../common');
137+
rmpath([cfg.tools 'tune/common']);
135138

136139
end
137140

0 commit comments

Comments
 (0)