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
4 changes: 2 additions & 2 deletions src/audio/eq_iir/tune/sof_eq_blob_plot.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@

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

%% Handle input parameters
if nargin < 2
if findstr(blobfn, '_fir_')
if strfind(blobfn, '_fir')
eqtype = 'FIR';
else
eqtype = 'IIR';
Expand Down
17 changes: 13 additions & 4 deletions src/audio/eq_iir/tune/sof_eq_blob_read.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@

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

%% Use file suffix as type
if nargin < 2
idx = findstr(blobfn, '.');
idx = strfind(blobfn, '.');
fntype = blobfn(idx(end)+1:end);
end

%% Read the file
add_tlv_header = false;
switch lower(fntype)
case 'bin'
fh = fopen(blobfn, 'rb');
Expand All @@ -23,13 +24,21 @@
tmp = fscanf(fh, '%u,', Inf);
fclose(fh);
case 'm4'
% The blobs in topology are without TLV header. For simplicity
% add to beginning two 32 bit words (zeros) to be compatible
% with other blob formats.
tmp = get_parse_m4(blobfn);
add_tlv_header = true;
otherwise
error('Illegal file type, please give fntype argument');

end

blob = uint32(tmp);
if add_tlv_header
blob = uint32([0 0 tmp']');
else
blob = uint32(tmp);
end

end

Expand All @@ -46,7 +55,7 @@
n = 1;
ln = fgets(fh);
while ln ~= -1
idx = findstr(ln, '0x');
idx = strfind(ln, '0x');
for i = 1:length(idx)
bytes(n) = hex2dec(ln(idx(i)+2:idx(i)+3));
n = n + 1;
Expand Down
6 changes: 3 additions & 3 deletions src/audio/eq_iir/tune/sof_mls_freq_resp.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

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

Expand Down Expand Up @@ -332,12 +332,12 @@ function remote_capture(fn, cfg, t)
sens =[];
desc = '';
str = fgets(fh);
idx = findstr(str, '"');
idx = strfind(str, '"');
while length(idx) > 0
line = str(idx(1)+1:idx(2)-1);
desc = sprintf('%s%s ', desc, line);
str = fgets(fh);
idx = findstr(str, '"');
idx = strfind(str, '"');
end
if length(strfind(str, 'Sens'))
desc = str;
Expand Down