Skip to content

Commit

Permalink
Audio: EQ: Tune: Add to blobs instructions how to generate
Browse files Browse the repository at this point in the history
The common functions version of topology blob export supports
the howto comment. These changes add the instructions text to
all equalizer blobs.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
  • Loading branch information
singalsu committed Dec 19, 2024
1 parent d03b1bf commit 4737a4d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
5 changes: 3 additions & 2 deletions src/audio/eq_iir/tune/sof_example_fir_eq.m
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ function sof_example_fir_eq()
% Pack and write file common function for all exports
function sof_eq_pack_export(bm, fn, note)

howto = 'cd src/audio/eq_iir/tune; octave --no-window-system sof_example_fir_eq.m';
bp = sof_eq_fir_blob_pack(bm, 3); % IPC3
if ~isempty(fn.bin)
sof_ucm_blob_write(fullfile(fn.cpath3, fn.bin), bp);
Expand All @@ -234,7 +235,7 @@ function sof_eq_pack_export(bm, fn, note)
sof_alsactl_write(fullfile(fn.cpath3, fn.txt), bp);
end
if ~isempty(fn.tplg1)
sof_tplg_write(fullfile(fn.tpath1, fn.tplg1), bp, fn.priv, note);
sof_tplg_write(fullfile(fn.tpath1, fn.tplg1), bp, fn.priv, note, howto);
end

bp = sof_eq_fir_blob_pack(bm, 4); % IPC4
Expand All @@ -245,7 +246,7 @@ function sof_eq_pack_export(bm, fn, note)
sof_alsactl_write(fullfile(fn.cpath4, fn.txt), bp);
end
if ~isempty(fn.tplg2)
sof_tplg2_write(fullfile(fn.tpath2, fn.tplg2), bp, 'fir_eq', note);
sof_tplg2_write(fullfile(fn.tpath2, fn.tplg2), bp, 'fir_eq', note, howto);
end

end
5 changes: 3 additions & 2 deletions src/audio/eq_iir/tune/sof_example_iir_eq.m
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ function sof_example_iir_eq()
% Pack and write file common function for all exports
function sof_eq_pack_export(bm, fn, note)

howto = 'cd src/audio/eq_iir/tune; octave --no-window-system sof_example_iir_eq.m';
bp = sof_eq_iir_blob_pack(bm, 3); % IPC3
if ~isempty(fn.bin)
sof_ucm_blob_write(fullfile(fn.cpath3, fn.bin), bp);
Expand All @@ -362,7 +363,7 @@ function sof_eq_pack_export(bm, fn, note)
sof_alsactl_write(fullfile(fn.cpath3, fn.txt), bp);
end
if ~isempty(fn.tplg1)
sof_tplg_write(fullfile(fn.tpath1, fn.tplg1), bp, fn.priv, note);
sof_tplg_write(fullfile(fn.tpath1, fn.tplg1), bp, fn.priv, note, howto);
end

bp = sof_eq_iir_blob_pack(bm, 4); % IPC4
Expand All @@ -373,7 +374,7 @@ function sof_eq_pack_export(bm, fn, note)
sof_alsactl_write(fullfile(fn.cpath4, fn.txt), bp);
end
if ~isempty(fn.tplg2)
sof_tplg2_write(fullfile(fn.tpath2, fn.tplg2), bp, 'iir_eq', note);
sof_tplg2_write(fullfile(fn.tpath2, fn.tplg2), bp, 'iir_eq', note, howto);
end

end
9 changes: 5 additions & 4 deletions src/audio/eq_iir/tune/sof_example_spk_eq.m
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ function sof_example_spk_eq()
fir.priv = 'DEF_EQFIR_PRIV';
iir.comment = 'Speaker FIR+IIR EQ created with example_spk_eq.m';
fir.comment = 'Speaker FIR+IIR EQ created with example_spk_eq.m';
howto = 'cd src/audio/eq_iir/tune; octave --no-window-system sof_example_spk_eq.m';

%% File names
fir.txt = 'spk.txt';
Expand Down Expand Up @@ -144,11 +145,11 @@ function sof_example_spk_eq()
bp_fir = sof_eq_fir_blob_pack(bm_fir, 3); % IPC3
sof_alsactl_write(fullfile(fir.cpath3, fir.txt), bp_fir);
sof_ucm_blob_write(fullfile(fir.cpath3, fir.bin), bp_fir);
sof_tplg_write(fullfile(fn.tpath1, fir.tplg1), bp_fir, fir.priv, fir.comment);
sof_tplg_write(fullfile(fn.tpath1, fir.tplg1), bp_fir, fir.priv, fir.comment, howto);
bp_fir = sof_eq_fir_blob_pack(bm_fir, 4); % IPC4
sof_alsactl_write(fullfile(fir.cpath4, fir.txt), bp_fir);
sof_ucm_blob_write(fullfile(fir.cpath4, fir.bin), bp_fir);
sof_tplg2_write(fullfile(fir.tpath2, fir.tplg2), bp_fir, 'eq_fir', fir.comment);
sof_tplg2_write(fullfile(fir.tpath2, fir.tplg2), bp_fir, 'eq_fir', fir.comment, howto);
end

%% Export IIR part
Expand All @@ -161,11 +162,11 @@ function sof_example_spk_eq()
bp_iir = sof_eq_iir_blob_pack(bm_iir, 3); % IPC3
sof_alsactl_write(fullfile(iir.cpath3, iir.txt), bp_iir);
sof_ucm_blob_write(fullfile(iir.cpath3, iir.bin), bp_iir);
sof_tplg_write(fullfile(fn.tpath1, iir.tplg1), bp_iir, iir.priv, iir.comment);
sof_tplg_write(fullfile(fn.tpath1, iir.tplg1), bp_iir, iir.priv, iir.comment, howto);
bp_iir = sof_eq_iir_blob_pack(bm_iir, 4); % IPC4
sof_alsactl_write(fullfile(iir.cpath4, iir.txt), bp_iir);
sof_ucm_blob_write(fullfile(iir.cpath4, iir.bin), bp_iir);
sof_tplg2_write(fullfile(iir.tpath2, iir.tplg2), bp_iir, 'eq_iir', iir.comment);
sof_tplg2_write(fullfile(iir.tpath2, iir.tplg2), bp_iir, 'eq_iir', iir.comment, howto);
end

sof_eq_paths(0);
Expand Down

0 comments on commit 4737a4d

Please sign in to comment.