From 176aec773cde803cec9b1dc275b2d4f64a0107d7 Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Fri, 25 Aug 2023 13:40:04 +0300 Subject: [PATCH] Tools: Tune: DRC: Export ascii and binary IPC4 blobs for sof-ctl The passthrough and enabled blobs are exported to tools/ctl/ipc4/drc. Signed-off-by: Seppo Ingalsuo --- tools/tune/drc/example_drc.m | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tools/tune/drc/example_drc.m b/tools/tune/drc/example_drc.m index 39958d0b7246..cc5cb40aef0d 100644 --- a/tools/tune/drc/example_drc.m +++ b/tools/tune/drc/example_drc.m @@ -41,8 +41,10 @@ function drc_coefs_and_config_export(params, id) tplg1_fn = sprintf("../../topology/topology1/m4/drc_coef_%s.m4", id); % Control Bytes File tplg2_fn = sprintf("../../topology/topology2/include/components/drc/%s.conf", id); % Control Bytes File % Use those files with sof-ctl to update the component's configuration -blob_fn = sprintf("../../ctl/ipc3/drc_coef_%s.blob", id); % Blob binary file -alsa_fn = sprintf("../../ctl/ipc3/drc_coef_%s.txt", id); % ALSA CSV format file +blob3_fn = sprintf("../../ctl/ipc3/drc_coef_%s.blob", id); % Blob binary file +alsa3_fn = sprintf("../../ctl/ipc3/drc_coef_%s.txt", id); % ALSA CSV format file +blob4_fn = sprintf("../../ctl/ipc4/drc/%s.blob", id); % Blob binary file +alsa4_fn = sprintf("../../ctl/ipc4/drc/%s.txt", id); % ALSA CSV format file endian = "little"; sample_rate = 48000; @@ -60,8 +62,10 @@ function drc_coefs_and_config_export(params, id) % Generate output files tplg_write(tplg1_fn, blob8, "DRC"); tplg2_write(tplg2_fn, blob8_ipc4, "drc_config", 'Exported Control Bytes'); -blob_write(blob_fn, blob8); -alsactl_write(alsa_fn, blob8); +blob_write(blob3_fn, blob8); +alsactl_write(alsa3_fn, blob8); +blob_write(blob4_fn, blob8_ipc4); +alsactl_write(alsa4_fn, blob8_ipc4); % Plot x-y response in dB drc_plot_db_curve(coefs);