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
1415function setup_mfcc(cfg )
1516
@@ -45,12 +46,14 @@ function setup_mfcc(cfg)
4546 cfg.top_db = 200 ; % Set to 80 for librosa
4647end
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' ];
4952cfg.tplg_ver = 1 ;
5053cfg.ipc_ver = 3 ;
5154export_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' ] ;
5457cfg.tplg_ver = 2 ;
5558cfg.ipc_ver = 4 ;
5659export_mfcc_setup(cfg );
@@ -60,7 +63,7 @@ function setup_mfcc(cfg)
6063function 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
6669nbytes_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." );
132135end
133136
134- rmpath(' .. /common' );
137+ rmpath([ cfg . tools ' tune /common' ] );
135138
136139end
137140
0 commit comments