Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions tools/tune/src/README → src/audio/src/tune/README
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ of objective audio quality parameters.
The tools need GNU Octave version 4.0.0 or later with octave-signal
package.

src_std_int32.m
---------------
sof_src_std_int32.m
-------------------

This script creates the default coefficient set and contains nothing
else but call for src_generate.

src_tiny_int16.m
----------------
sof_src_tiny_int16.m
--------------------

This script creates the tiny coefficient set. The script contains an
example how to customize the input/output rates matrix and in a simple
Expand All @@ -24,8 +24,8 @@ be done by editing file src_param.m directly. Note that int16
presentation for SRC coefficients will degrade even the default
quality.

src_generate.m
--------------
sof_src_generate.m
------------------

Creates the header files to include to C into directory "include". A
report of create modes is written to directory "reports". The
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
function src_generate(fs_in, fs_out, fs_inout, cfg);
function sof_src_generate(fs_in, fs_out, fs_inout, cfg);

% src_generate - export src conversions for given fs_in and fs_out
% sof_src_generate - export src conversions for given fs_in and fs_out
%
% src_generate(fs_in, fs_out <, fs_inout, <cfg>>)
% sof_src_generate(fs_in, fs_out <, fs_inout, <cfg>>)
%
% fs_in - vector of input sample rates (M)
% fs_out - vector of output sample rates (N)
Expand All @@ -23,12 +23,11 @@

% SPDX-License-Identifier: BSD-3-Clause
%
% Copyright (c) 2016-2022, Intel Corporation. All rights reserved.
% Copyright (c) 2016-2024, Intel Corporation. All rights reserved.
%
% Author: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>

addpath('../../test/audio/std_utils');
addpath('../../test/audio/test_utils');
src_paths(1);

if (nargin < 2) || (nargin > 4)
error('Incorrect arguments for function!');
Expand Down Expand Up @@ -282,6 +281,8 @@
fclose(fh);
type(fn);

src_paths(0);

end

%% Helper functions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
cfg.speed = 0;
cfg.gain = 0; % Make gain 0 dB

src_generate(fs1, fs2, fs_matrix, cfg);
sof_src_generate(fs1, fs2, fs_matrix, cfg);
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@
cfg.speed = 0;
cfg.gain = 0;

src_generate(fs1, fs2, fs_matrix, cfg);
sof_src_generate(fs1, fs2, fs_matrix, cfg);
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@
cfg.speed = 0;
cfg.gain = 0;

src_generate(fs1, fs2, fs_matrix, cfg);
sof_src_generate(fs1, fs2, fs_matrix, cfg);
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@
cfg.speed = 1;
cfg.gain = 0;

src_generate(fs1, fs2, fsm, cfg);
sof_src_generate(fs1, fs2, fsm, cfg);
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 22 additions & 0 deletions src/audio/src/tune/src_paths.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
function src_paths(enable)

% src_paths(enable)
% enable - set to 1 to enable needed search path
% set to 0 to disable the search paths
%

% SPDX-License-Identifier: BSD-3-Clause
%
% Copyright (c) 2024, Intel Corporation. All rights reserved.

audio_test = '../../../../tools/test/audio/';

if enable
addpath(fullfile(audio_test, 'std_utils'));
addpath(fullfile(audio_test, 'test_utils'));
else
rmpath(fullfile(audio_test, 'std_utils'));
rmpath(fullfile(audio_test, 'test_utils'));
end

end