Skip to content

Commit

Permalink
Tools: Tune: DRC: Export ascii and binary IPC4 blobs for sof-ctl
Browse files Browse the repository at this point in the history
The passthrough and enabled blobs are exported to tools/ctl/ipc4/drc.

Signed-off-by: Seppo Ingalsuo <[email protected]>
  • Loading branch information
singalsu authored and lgirdwood committed Aug 31, 2023
1 parent 7d41360 commit 176aec7
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tools/tune/drc/example_drc.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit 176aec7

Please sign in to comment.