diff --git a/tools/tune/eq/example_fir_eq.m b/tools/tune/eq/example_fir_eq.m index 07a8a7e99..8ff092db2 100644 --- a/tools/tune/eq/example_fir_eq.m +++ b/tools/tune/eq/example_fir_eq.m @@ -10,8 +10,8 @@ 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'; @@ -21,8 +21,8 @@ addpath ../common %% ------------------- %% Example 1: Loudness %% ------------------- -fn.bin = 'eq_fir_loudness.blob'; -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'; @@ -52,8 +52,8 @@ eq_pack_export(bm, fn, comment); %% ------------------- %% Example 2: Mid boost %% ------------------- -fn.bin = 'eq_fir_mid.blob'; -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'; @@ -79,8 +79,8 @@ eq_pack_export(bm, fn, comment); %% ------------------- %% Example 3: Flat EQ %% ------------------- -fn.bin = 'eq_fir_flat.blob'; -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'; @@ -106,8 +106,8 @@ eq_pack_export(bm, fn, comment); %% -------------------------- %% Example 4: Pass-through EQ %% -------------------------- -fn.bin = 'eq_fir_pass.blob'; -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'; diff --git a/tools/tune/eq/example_iir_bandsplit.m b/tools/tune/eq/example_iir_bandsplit.m index a4e9b02e8..86fec4486 100644 --- a/tools/tune/eq/example_iir_bandsplit.m +++ b/tools/tune/eq/example_iir_bandsplit.m @@ -11,7 +11,7 @@ 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 @@ -19,8 +19,8 @@ addpath ../common %% -------------------------------------------------- %% Example: Band-split 2ch to 4ch low and high bands %% -------------------------------------------------- -blob_fn = fullfile(cpath, 'eq_iir_bandsplit.blob'); -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'; @@ -44,7 +44,6 @@ bm = eq_iir_blob_merge(channels_in_config, ... %% Pack and write file eq_pack_export(bm, blob_fn, alsa_fn, tplg_fn, priv, comment) - %% ------------------------------------ %% Done. %% ------------------------------------ diff --git a/tools/tune/eq/example_iir_eq.m b/tools/tune/eq/example_iir_eq.m index f924f1c65..ac2a43b14 100644 --- a/tools/tune/eq/example_iir_eq.m +++ b/tools/tune/eq/example_iir_eq.m @@ -10,8 +10,8 @@ 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'; @@ -21,8 +21,8 @@ addpath ../common %% ------------------- %% Example 1: Loudness %% ------------------- -fn.bin = 'eq_iir_loudness.blob'; -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'; @@ -52,8 +52,8 @@ eq_pack_export(bm, fn, comment) %% ------------------------------------ %% Example 2: Bass boost %% ------------------------------------ -fn.bin = 'eq_iir_bassboost.blob'; -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'; @@ -79,8 +79,8 @@ eq_pack_export(bm, fn, comment) %% ------------------------------------ %% Example 3: Band-pass %% ------------------------------------ -fn.bin = 'eq_iir_bandpass.blob'; -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'; @@ -106,8 +106,8 @@ eq_pack_export(bm, fn, comment) %% ------------------- %% Example 4: Flat IIR %% ------------------- -fn.bin = 'eq_iir_flat.blob'; -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'; @@ -133,8 +133,8 @@ eq_pack_export(bm, fn, comment) %% --------------------------- %% Example 5: Pass-through IIR %% --------------------------- -fn.bin = 'eq_iir_pass.blob'; -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'; @@ -174,11 +174,10 @@ for i = 1:length(fs_list) 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('eq_iir_highpass_%dhz_%ddb_%dkhz.blob', fc, g, fsk); + fn.bin = sprintf('highpass_%dhz_%ddb_%dkhz.blob', fc, g, fsk); %% Design IIR high-pass eq_hp = hp_iir_eq(fs, fc, g); @@ -205,8 +204,8 @@ end %% Example 7: Merge previous desigs to single blob for use as presets %% ------------------------------------------------------------------ -fn.bin = 'eq_iir_bundle.blob'; -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'; diff --git a/tools/tune/eq/example_spk_eq.m b/tools/tune/eq/example_spk_eq.m index 23c99dda3..291d880af 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,12 +28,12 @@ iir.comment = 'Speaker FIR+IIR EQ created with example_spk_eq.m'; 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.blob'; +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.blob'; +iir.txt = 'spk.txt'; +iir.bin = 'spk.blob'; iir.tplg1 = 'eq_iir_coef_spk.m4'; iir.tplg2 = 'example_speaker.conf'; @@ -134,12 +136,12 @@ if eq.enable_fir assign_response, ... [ bq_fir ]); bp_fir = eq_fir_blob_pack(bm_fir, 3); % IPC3 - eq_alsactl_write(fullfile(fn.cpath3, fir.txt), bp_fir); - sof_ucm_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); - sof_ucm_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 @@ -151,12 +153,12 @@ if eq.enable_iir assign_response, ... [ bq_iir ]); bp_iir = eq_iir_blob_pack(bm_iir, 3); % IPC3 - eq_alsactl_write(fullfile(fn.cpath3, iir.txt), bp_iir); - sof_ucm_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); - sof_ucm_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