diff --git a/tools/tune/common/sof_ucm_blob_write.m b/tools/tune/common/sof_ucm_blob_write.m new file mode 100644 index 000000000000..0a6c4da4454a --- /dev/null +++ b/tools/tune/common/sof_ucm_blob_write.m @@ -0,0 +1,52 @@ +function sof_ucm_blob_write(fn, blob8) + +% Export blob to UCM2 cset-tlv binary format +% +% sof_ucm_blob_write(fn, blob) +% +% Input parameters +% fn - Filename for the blob +% blob - Vector of data with uint8 type +% + +% SPDX-License-Identifier: BSD-3-Clause +% +% Copyright (c) 2024, Intel Corporation. All rights reserved. + +% Export for UCM cset-tlv with additional 8 bytes header +SOF_CTRL_CMD_BINARY = 3; +nh = 8; +nb = length(blob8); +ublob8 = zeros(nb + nh, 1, 'uint8'); +ublob8(1:4) = w32b(SOF_CTRL_CMD_BINARY); +ublob8(5:8) = w32b(nb); +ublob8(9:end) = blob8; + +%% Write blob +check_create_dir(fn); +fh = fopen(fn, 'wb'); +fwrite(fh, ublob8, 'uint8'); +fclose(fh); + +%% Print as 8 bit hex +nb = length(ublob8); +nl = ceil(nb/16); +for i = 1:nl + m = min(16, nb-(i-1)*16); + for j = 1:m + fprintf(1, "%02x ", ublob8((i-1)*16 + j)); + end + fprintf(1, "\n"); +end + +fprintf(1, "\n"); +end + +function bytes = w32b(word) +sh = [0 -8 -16 -24]; +bytes = uint8(zeros(1,4)); +bytes(1) = bitand(bitshift(word, sh(1)), 255); +bytes(2) = bitand(bitshift(word, sh(2)), 255); +bytes(3) = bitand(bitshift(word, sh(3)), 255); +bytes(4) = bitand(bitshift(word, sh(4)), 255); +end diff --git a/tools/tune/crossover/example_crossover.m b/tools/tune/crossover/example_crossover.m index 6bdf596abc45..b33250af489f 100644 --- a/tools/tune/crossover/example_crossover.m +++ b/tools/tune/crossover/example_crossover.m @@ -39,7 +39,8 @@ function export_crossover(cr) endian = "little"; tpath1 = '../../topology/topology1/m4/crossover'; tpath2 = '../../topology/topology2/include/components/crossover'; -ctlpath = '../../ctl/ipc3'; +ctlpath3 = '../../ctl/ipc3/crossover'; +ctlpath4 = '../../ctl/ipc4/crossover'; str_way = sprintf('%dway', cr.num_sinks); str_freq = get_str_freq(cr); @@ -49,8 +50,10 @@ function export_crossover(cr) tplg1_fn = sprintf('%s/coef_%s_%s_%s.m4', tpath1, str_way, str_freq, str_pid); % Control Bytes File tplg2_fn = sprintf('%s/coef_%s_%s_%s.conf', tpath2, str_way, str_freq, str_pid); % Use those files with sof-ctl to update the component's configuration -blob_fn = sprintf('%s/crossover_coef_%dway.blob', ctlpath, cr.num_sinks); % Blob binary file -alsa_fn = sprintf('%s/crossover_coef_%dway.txt', ctlpath, cr.num_sinks); % ALSA CSV format file +blob3_fn = sprintf('%s/coef_%dway.blob', ctlpath3, cr.num_sinks); % Blob binary file +alsa3_fn = sprintf('%s/coef_%dway.txt', ctlpath3, cr.num_sinks); % ALSA CSV format file +blob4_fn = sprintf('%s/coef_%dway.blob', ctlpath4, cr.num_sinks); % Blob binary file +alsa4_fn = sprintf('%s/coef_%dway.txt', ctlpath4, cr.num_sinks); % ALSA CSV format file % This array is an example on how to assign a buffer from pipeline 1 to output 0, % buffer from pipeline 2 to output 1, etc... @@ -85,11 +88,14 @@ function export_crossover(cr) mkdir_check(tpath1); mkdir_check(tpath2); -mkdir_check(ctlpath); +mkdir_check(ctlpath3); +mkdir_check(ctlpath4); tplg_write(tplg1_fn, blob8, "CROSSOVER"); tplg2_write(tplg2_fn, blob8_ipc4, "crossover_config", 'Exported Control Bytes'); -blob_write(blob_fn, blob8); -alsactl_write(alsa_fn, blob8); +sof_ucm_blob_write(blob3_fn, blob8); +sof_ucm_blob_write(blob4_fn, blob8_ipc4); +alsactl_write(alsa3_fn, blob8); +alsactl_write(alsa4_fn, blob8_ipc4); % Plot Magnitude and Phase Response of each sink crossover_plot_freq(crossover.lp, crossover.hp, cr.fs, cr.num_sinks); diff --git a/tools/tune/dcblock/example_dcblock.m b/tools/tune/dcblock/example_dcblock.m index 6ffa179e5485..5e1d022c8e61 100644 --- a/tools/tune/dcblock/example_dcblock.m +++ b/tools/tune/dcblock/example_dcblock.m @@ -58,13 +58,13 @@ function dcblock_blob_calculate(prm) tplg_write(tplg1_fn, blob8, "DCBLOCK", ... "Exported with script example_dcblock.m", ... "cd tools/tune/dcblock; octave example_dcblock.m"); -blob_write(blob3_fn, blob8); +sof_ucm_blob_write(blob3_fn, blob8); alsactl_write(alsa3_fn, blob8); tplg2_write(tplg2_fn, blob8_ipc4, "dcblock_config", ... "Exported with script example_dcblock.m" , ... "cd tools/tune/dcblock; octave example_dcblock.m"); -blob_write(blob4_fn, blob8_ipc4); +sof_ucm_blob_write(blob4_fn, blob8_ipc4); alsactl_write(alsa4_fn, blob8_ipc4); % Plot Filter's Transfer Function and Step Response diff --git a/tools/tune/drc/example_drc.m b/tools/tune/drc/example_drc.m index 4ebae19c0be4..2a21fe1d9c3a 100644 --- a/tools/tune/drc/example_drc.m +++ b/tools/tune/drc/example_drc.m @@ -73,9 +73,9 @@ function drc_coefs_and_config_export(params, id) drc_howto = sprintf("cd tools/tune/drc; octave --no-window-system %s.m", my_name); tplg_write(tplg1_fn, blob8, "DRC", drc_note, drc_howto); tplg2_write(tplg2_fn, blob8_ipc4, "drc_config", drc_note, drc_howto); -blob_write(blob3_fn, blob8); +sof_ucm_blob_write(blob3_fn, blob8); alsactl_write(alsa3_fn, blob8); -blob_write(blob4_fn, blob8_ipc4); +sof_ucm_blob_write(blob4_fn, blob8_ipc4); alsactl_write(alsa4_fn, blob8_ipc4); % Plot x-y response in dB diff --git a/tools/tune/eq/eq_blob_write.m b/tools/tune/eq/eq_blob_write.m deleted file mode 100644 index 95f83854ba22..000000000000 --- a/tools/tune/eq/eq_blob_write.m +++ /dev/null @@ -1,49 +0,0 @@ -function eq_blob_write(fn, blob8) - -%% -% Copyright (c) 2016, Intel Corporation -% All rights reserved. -% -% Redistribution and use in source and binary forms, with or without -% modification, are permitted provided that the following conditions are met: -% * Redistributions of source code must retain the above copyright -% notice, this list of conditions and the following disclaimer. -% * Redistributions in binary form must reproduce the above copyright -% notice, this list of conditions and the following disclaimer in the -% documentation and/or other materials provided with the distribution. -% * Neither the name of the Intel Corporation nor the -% names of its contributors may be used to endorse or promote products -% derived from this software without specific prior written permission. -% -% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -% AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -% IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -% ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -% LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -% CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -% SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -% INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -% CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -% ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -% POSSIBILITY OF SUCH DAMAGE. -% -% Author: Seppo Ingalsuo -% - -%% Write blob -fh = fopen(fn, 'wb'); -fwrite(fh, blob8, 'uint8'); -fclose(fh); - -%% Print as 8 bit hex -nb = length(blob8); -nl = ceil(nb/16); -for i = 1:nl - m = min(16, nb-(i-1)*16); - for j = 1:m - fprintf(1, "%02x ", blob8((i-1)*16 + j)); - end - fprintf(1, "\n"); -end - -end diff --git a/tools/tune/eq/example_fir_eq.m b/tools/tune/eq/example_fir_eq.m index 3131b88992ac..8ff092db2379 100644 --- a/tools/tune/eq/example_fir_eq.m +++ b/tools/tune/eq/example_fir_eq.m @@ -10,17 +10,19 @@ function example_fir_eq() %% Common definitions fs = 48e3; -fn.cpath3 = '../../ctl/ipc3'; -fn.cpath4 = '../../ctl/ipc4'; +fn.cpath3 = '../../ctl/ipc3/eq_fir'; +fn.cpath4 = '../../ctl/ipc4/eq_fir'; fn.tpath1 = '../../topology/topology1/m4'; fn.tpath2 = '../../topology/topology2/include/components/eqfir'; fn.priv = 'DEF_EQFIR_PRIV'; +addpath ../common + %% ------------------- %% Example 1: Loudness %% ------------------- -fn.bin = 'eq_fir_loudness.bin'; -fn.txt = 'eq_fir_loudness.txt'; +fn.bin = 'loudness.blob'; +fn.txt = 'loudness.txt'; fn.tplg1 = 'eq_fir_coef_loudness.m4'; fn.tplg2 = 'loudness.conf'; comment = 'Loudness effect, created with example_fir_eq.m'; @@ -50,8 +52,8 @@ function example_fir_eq() %% ------------------- %% Example 2: Mid boost %% ------------------- -fn.bin = 'eq_fir_mid.bin'; -fn.txt = 'eq_fir_mid.txt'; +fn.bin = 'mid.blob'; +fn.txt = 'mid.txt'; fn.tplg1 = 'eq_fir_coef_mid.m4'; fn.tplg2 = 'midboost.conf'; comment = 'Mid boost, created with example_fir_eq.m'; @@ -77,8 +79,8 @@ function example_fir_eq() %% ------------------- %% Example 3: Flat EQ %% ------------------- -fn.bin = 'eq_fir_flat.bin'; -fn.txt = 'eq_fir_flat.txt'; +fn.bin = 'flat.blob'; +fn.txt = 'flat.txt'; fn.tplg1 = 'eq_fir_coef_flat.m4'; fn.tplg2 = 'flat.conf'; comment = 'Flat response, created with example_fir_eq.m'; @@ -104,8 +106,8 @@ function example_fir_eq() %% -------------------------- %% Example 4: Pass-through EQ %% -------------------------- -fn.bin = 'eq_fir_pass.bin'; -fn.txt = 'eq_fir_pass.txt'; +fn.bin = 'pass.blob'; +fn.txt = 'pass.txt'; fn.tplg1 = 'eq_fir_coef_pass.m4'; fn.tplg2 = 'passthrough.conf'; comment = 'Pass-through response, created with example_fir_eq.m'; @@ -133,6 +135,8 @@ function example_fir_eq() %% Done. %% -------------------------- +rmpath ../common + end %% ------------------- @@ -221,7 +225,7 @@ function eq_pack_export(bm, fn, note) bp = eq_fir_blob_pack(bm, 3); % IPC3 if ~isempty(fn.bin) - eq_blob_write(fullfile(fn.cpath3, fn.bin), bp); + sof_ucm_blob_write(fullfile(fn.cpath3, fn.bin), bp); end if ~isempty(fn.txt) eq_alsactl_write(fullfile(fn.cpath3, fn.txt), bp); @@ -232,7 +236,7 @@ function eq_pack_export(bm, fn, note) bp = eq_fir_blob_pack(bm, 4); % IPC4 if ~isempty(fn.bin) - eq_blob_write(fullfile(fn.cpath4, fn.bin), bp); + sof_ucm_blob_write(fullfile(fn.cpath4, fn.bin), bp); end if ~isempty(fn.txt) eq_alsactl_write(fullfile(fn.cpath4, fn.txt), bp); diff --git a/tools/tune/eq/example_iir_bandsplit.m b/tools/tune/eq/example_iir_bandsplit.m index 37e6bcd60336..86fec4486c4c 100644 --- a/tools/tune/eq/example_iir_bandsplit.m +++ b/tools/tune/eq/example_iir_bandsplit.m @@ -11,14 +11,16 @@ function example_iir_bandsplit() %% Common definitions fs = 48e3; tpath = '../../topology/topology1/m4'; -cpath = '../../ctl'; +cpath = '../../ctl/ipc3/eq_iir'; priv = 'DEF_EQIIR_PRIV'; +addpath ../common + %% -------------------------------------------------- %% Example: Band-split 2ch to 4ch low and high bands %% -------------------------------------------------- -blob_fn = fullfile(cpath, 'eq_iir_bandsplit.bin'); -alsa_fn = fullfile(cpath, 'eq_iir_bandsplit.txt'); +blob_fn = fullfile(cpath, 'bandsplit.blob'); +alsa_fn = fullfile(cpath, 'bandsplit.txt'); tplg_fn = fullfile(tpath, 'eq_iir_bandsplit.m4'); comment = 'Bandsplit, created with example_iir_bandsplit.m'; @@ -42,11 +44,11 @@ function example_iir_bandsplit() %% Pack and write file eq_pack_export(bm, blob_fn, alsa_fn, tplg_fn, priv, comment) - %% ------------------------------------ %% Done. %% ------------------------------------ +rmpath ../common end %% ------------------- @@ -126,7 +128,7 @@ function eq_pack_export(bm, bin_fn, ascii_fn, tplg_fn, priv, note) bp = eq_iir_blob_pack(bm); if ~isempty(bin_fn) - eq_blob_write(bin_fn, bp); + sof_ucm_blob_write(bin_fn, bp); end if ~isempty(ascii_fn) diff --git a/tools/tune/eq/example_iir_eq.m b/tools/tune/eq/example_iir_eq.m index 990ebcb7d317..ac2a43b146ab 100644 --- a/tools/tune/eq/example_iir_eq.m +++ b/tools/tune/eq/example_iir_eq.m @@ -10,17 +10,19 @@ function example_iir_eq() %% Common definitions fs = 48e3; -fn.cpath3 = '../../ctl/ipc3'; -fn.cpath4 = '../../ctl/ipc4'; +fn.cpath3 = '../../ctl/ipc3/eq_iir'; +fn.cpath4 = '../../ctl/ipc4/eq_iir'; fn.tpath1 = '../../topology/topology1/m4'; fn.tpath2 = '../../topology/topology2/include/components/eqiir'; fn.priv = 'DEF_EQIIR_PRIV'; +addpath ../common + %% ------------------- %% Example 1: Loudness %% ------------------- -fn.bin = 'eq_iir_loudness.bin'; -fn.txt = 'eq_iir_loudness.txt'; +fn.bin = 'loudness.blob'; +fn.txt = 'loudness.txt'; fn.tplg1 = 'eq_iir_coef_loudness.m4'; fn.tplg2 = 'loudness.conf'; comment = 'Loudness effect, created with example_iir_eq.m'; @@ -50,8 +52,8 @@ function example_iir_eq() %% ------------------------------------ %% Example 2: Bass boost %% ------------------------------------ -fn.bin = 'eq_iir_bassboost.bin'; -fn.txt = 'eq_iir_bassboost.txt'; +fn.bin = 'bassboost.blob'; +fn.txt = 'bassboost.txt'; fn.tplg1 = 'eq_iir_coef_bassboost.m4'; fn.tplg2 = 'bassboost.conf'; comment = 'Bass boost, created with example_iir_eq.m'; @@ -77,8 +79,8 @@ function example_iir_eq() %% ------------------------------------ %% Example 3: Band-pass %% ------------------------------------ -fn.bin = 'eq_iir_bandpass.bin'; -fn.txt = 'eq_iir_bandpass.txt'; +fn.bin = 'bandpass.blob'; +fn.txt = 'bandpass.txt'; fn.tplg1 = 'eq_iir_coef_bandpass.m4'; fn.tplg2 = 'bandpass.conf'; comment = 'Band-pass, created with example_iir_eq.m'; @@ -104,8 +106,8 @@ function example_iir_eq() %% ------------------- %% Example 4: Flat IIR %% ------------------- -fn.bin = 'eq_iir_flat.bin'; -fn.txt = 'eq_iir_flat.txt'; +fn.bin = 'flat.blob'; +fn.txt = 'flat.txt'; fn.tplg1 = 'eq_iir_coef_flat.m4'; fn.tplg2 = 'flat.conf'; comment = 'Flat response, created with example_iir_eq.m'; @@ -131,8 +133,8 @@ function example_iir_eq() %% --------------------------- %% Example 5: Pass-through IIR %% --------------------------- -fn.bin = 'eq_iir_pass.bin'; -fn.txt = 'eq_iir_pass.txt'; +fn.bin = 'pass.blob'; +fn.txt = 'pass.txt'; fn.tplg1 = 'eq_iir_coef_pass.m4'; fn.tplg2 = 'passthrough.conf'; comment = 'Pass-through, created with example_iir_eq.m'; @@ -159,9 +161,8 @@ function example_iir_eq() %% Example 6: 20/30/40/50 Hz high-pass %% ------------------------------------ -fn.bin = ''; % Don't create fs_list = [16e3 48e3]; -fc_list = [20 30 40 50]; +fc_list = [20 30 40 50 100]; g_list = [0 20]; for i = 1:length(fs_list) for j = 1:length(fc_list); @@ -173,10 +174,10 @@ function example_iir_eq() fn.tplg1 = sprintf('eq_iir_coef_highpass_%dhz_%ddb_%dkhz.m4', ... fc, g, fsk); fn.tplg2 = sprintf('highpass_%dhz_%ddb_%dkhz.conf', fc, g, fsk); - fn.txt = sprintf('eq_iir_highpass_%dhz_%ddb_%dkhz.txt', ... - fc, g, fsk); + fn.txt = sprintf('highpass_%dhz_%ddb_%dkhz.txt', fc, g, fsk); comment = sprintf('%d Hz second order high-pass, gain %d dB, created with example_iir_eq.m', ... fc, g); + fn.bin = sprintf('highpass_%dhz_%ddb_%dkhz.blob', fc, g, fsk); %% Design IIR high-pass eq_hp = hp_iir_eq(fs, fc, g); @@ -203,8 +204,8 @@ function example_iir_eq() %% Example 7: Merge previous desigs to single blob for use as presets %% ------------------------------------------------------------------ -fn.bin = 'eq_iir_bundle.bin'; -fn.txt = 'eq_iir_bundle.txt'; +fn.bin = 'bundle.blob'; +fn.txt = 'bundle.txt'; fn.tplg1 = 'eq_iir_bundle.m4'; fn.tplg2 = 'bundle.conf'; comment = 'Bundle of responses flat/loud/bass/band/high, created with example_iir_eq.m'; @@ -225,6 +226,8 @@ function example_iir_eq() %% Done. %% ------------------------------------ +rmpath ../common + end %% ------------------- @@ -349,8 +352,8 @@ function example_iir_eq() function eq_pack_export(bm, fn, note) bp = eq_iir_blob_pack(bm, 3); % IPC3 -if ~isempty(fn. bin) - eq_blob_write(fullfile(fn.cpath3, fn.bin), bp); +if ~isempty(fn.bin) + sof_ucm_blob_write(fullfile(fn.cpath3, fn.bin), bp); end if ~isempty(fn.txt) eq_alsactl_write(fullfile(fn.cpath3, fn.txt), bp); @@ -361,7 +364,7 @@ function eq_pack_export(bm, fn, note) bp = eq_iir_blob_pack(bm, 4); % IPC4 if ~isempty(fn.bin) - eq_blob_write(fullfile(fn.cpath4, fn.bin), bp); + sof_ucm_blob_write(fullfile(fn.cpath4, fn.bin), bp); end if ~isempty(fn.txt) eq_alsactl_write(fullfile(fn.cpath4, fn.txt), bp); diff --git a/tools/tune/eq/example_spk_eq.m b/tools/tune/eq/example_spk_eq.m index 80c4d1fac5c7..291d880afecd 100644 --- a/tools/tune/eq/example_spk_eq.m +++ b/tools/tune/eq/example_spk_eq.m @@ -15,8 +15,10 @@ function example_spk_eq() %% Defaults fs = 48e3; -fn.cpath3 = '../../ctl/ipc3'; -fn.cpath4 = '../../ctl/ipc4'; +iir.cpath3 = '../../ctl/ipc3/eq_iir'; +iir.cpath4 = '../../ctl/ipc4/eq_iir'; +fir.cpath3 = '../../ctl/ipc3/eq_fir'; +fir.cpath4 = '../../ctl/ipc4/eq_fir'; fn.tpath1 = '../../topology/topology1/m4'; fir.tpath2 = '../../topology/topology2/include/components/eqfir'; iir.tpath2 = '../../topology/topology2/include/components/eqiir'; @@ -26,15 +28,17 @@ function example_spk_eq() fir.comment = 'Speaker FIR+IIR EQ created with example_spk_eq.m'; %% File names -fir.txt = 'eq_fir_spk.txt'; -fir.bin = 'eq_fir_spk.bin'; +fir.txt = 'spk.txt'; +fir.bin = 'spk.blob'; fir.tplg1 = 'eq_fir_coef_spk.m4'; fir.tplg2 = 'example_speaker.conf'; -iir.txt = 'eq_iir_spk.txt'; -iir.bin = 'eq_iir_spk.bin'; +iir.txt = 'spk.txt'; +iir.bin = 'spk.blob'; iir.tplg1 = 'eq_iir_coef_spk.m4'; iir.tplg2 = 'example_speaker.conf'; +addpath ../common + %% Get defaults for equalizer design eq = eq_defaults(); @@ -132,12 +136,12 @@ function example_spk_eq() assign_response, ... [ bq_fir ]); bp_fir = eq_fir_blob_pack(bm_fir, 3); % IPC3 - eq_alsactl_write(fullfile(fn.cpath3, fir.txt), bp_fir); - eq_blob_write(fullfile(fn.cpath3, fir.bin), bp_fir); + eq_alsactl_write(fullfile(fir.cpath3, fir.txt), bp_fir); + sof_ucm_blob_write(fullfile(fir.cpath3, fir.bin), bp_fir); eq_tplg_write(fullfile(fn.tpath1, fir.tplg1), bp_fir, fir.priv, fir.comment); bp_fir = eq_fir_blob_pack(bm_fir, 4); % IPC4 - eq_alsactl_write(fullfile(fn.cpath4, fir.txt), bp_fir); - eq_blob_write(fullfile(fn.cpath4, fir.bin), bp_fir); + eq_alsactl_write(fullfile(fir.cpath4, fir.txt), bp_fir); + sof_ucm_blob_write(fullfile(fir.cpath4, fir.bin), bp_fir); eq_tplg2_write(fullfile(fir.tpath2, fir.tplg2), bp_fir, 'eq_fir', fir.comment); end @@ -149,13 +153,15 @@ function example_spk_eq() assign_response, ... [ bq_iir ]); bp_iir = eq_iir_blob_pack(bm_iir, 3); % IPC3 - eq_alsactl_write(fullfile(fn.cpath3, iir.txt), bp_iir); - eq_blob_write(fullfile(fn.cpath3, iir.bin), bp_iir); + eq_alsactl_write(fullfile(iir.cpath3, iir.txt), bp_iir); + sof_ucm_blob_write(fullfile(iir.cpath3, iir.bin), bp_iir); eq_tplg_write(fullfile(fn.tpath1, iir.tplg1), bp_iir, iir.priv, iir.comment); bp_iir = eq_iir_blob_pack(bm_iir, 4); % IPC4 - eq_alsactl_write(fullfile(fn.cpath4, iir.txt), bp_iir); - eq_blob_write(fullfile(fn.cpath4, iir.bin), bp_iir); + eq_alsactl_write(fullfile(iir.cpath4, iir.txt), bp_iir); + sof_ucm_blob_write(fullfile(iir.cpath4, iir.bin), bp_iir); eq_tplg2_write(fullfile(iir.tpath2, iir.tplg2), bp_iir, 'eq_iir', iir.comment); end +rmpath ../common + end diff --git a/tools/tune/multiband_drc/example_multiband_drc.m b/tools/tune/multiband_drc/example_multiband_drc.m index 486e79dd88b2..e5ab9880888a 100644 --- a/tools/tune/multiband_drc/example_multiband_drc.m +++ b/tools/tune/multiband_drc/example_multiband_drc.m @@ -140,9 +140,9 @@ function export_multiband_drc(prm) tplg_write(tplg1_fn, blob8, "MULTIBAND_DRC"); tplg2_write(tplg2_fn, blob8_ipc4, "multiband_drc_config", "Exported with script example_multiband_drc.m"); -blob_write(blob3_fn, blob8); +sof_ucm_blob_write(blob3_fn, blob8); alsactl_write(alsa3_fn, blob8); -blob_write(blob4_fn, blob8_ipc4); +sof_ucm_blob_write(blob4_fn, blob8_ipc4); alsactl_write(alsa4_fn, blob8_ipc4); rmpath ../common