Skip to content

Commit e8fcaf6

Browse files
singalsulgirdwood
authored andcommitted
Tools: Tune: Crossover: Cleanup blob files paths
This patch moves blobs for crossover component into sub-directory "crossover" to clean up clutter from ctl/ipc3 and ipc4 level. The patch also adds export of blobs for IPC4 mode that was missing. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
1 parent 70449a3 commit e8fcaf6

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

tools/tune/crossover/example_crossover.m

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ function export_crossover(cr)
3939
endian = "little";
4040
tpath1 = '../../topology/topology1/m4/crossover';
4141
tpath2 = '../../topology/topology2/include/components/crossover';
42-
ctlpath = '../../ctl/ipc3';
42+
ctlpath3 = '../../ctl/ipc3/crossover';
43+
ctlpath4 = '../../ctl/ipc4/crossover';
4344

4445
str_way = sprintf('%dway', cr.num_sinks);
4546
str_freq = get_str_freq(cr);
@@ -49,8 +50,10 @@ function export_crossover(cr)
4950
tplg1_fn = sprintf('%s/coef_%s_%s_%s.m4', tpath1, str_way, str_freq, str_pid); % Control Bytes File
5051
tplg2_fn = sprintf('%s/coef_%s_%s_%s.conf', tpath2, str_way, str_freq, str_pid);
5152
% Use those files with sof-ctl to update the component's configuration
52-
blob_fn = sprintf('%s/crossover_coef_%dway.blob', ctlpath, cr.num_sinks); % Blob binary file
53-
alsa_fn = sprintf('%s/crossover_coef_%dway.txt', ctlpath, cr.num_sinks); % ALSA CSV format file
53+
blob3_fn = sprintf('%s/coef_%dway.blob', ctlpath3, cr.num_sinks); % Blob binary file
54+
alsa3_fn = sprintf('%s/coef_%dway.txt', ctlpath3, cr.num_sinks); % ALSA CSV format file
55+
blob4_fn = sprintf('%s/coef_%dway.blob', ctlpath4, cr.num_sinks); % Blob binary file
56+
alsa4_fn = sprintf('%s/coef_%dway.txt', ctlpath4, cr.num_sinks); % ALSA CSV format file
5457

5558
% This array is an example on how to assign a buffer from pipeline 1 to output 0,
5659
% buffer from pipeline 2 to output 1, etc...
@@ -85,11 +88,14 @@ function export_crossover(cr)
8588

8689
mkdir_check(tpath1);
8790
mkdir_check(tpath2);
88-
mkdir_check(ctlpath);
91+
mkdir_check(ctlpath3);
92+
mkdir_check(ctlpath4);
8993
tplg_write(tplg1_fn, blob8, "CROSSOVER");
9094
tplg2_write(tplg2_fn, blob8_ipc4, "crossover_config", 'Exported Control Bytes');
91-
sof_ucm_blob_write(blob_fn, blob8);
92-
alsactl_write(alsa_fn, blob8);
95+
sof_ucm_blob_write(blob3_fn, blob8);
96+
sof_ucm_blob_write(blob4_fn, blob8_ipc4);
97+
alsactl_write(alsa3_fn, blob8);
98+
alsactl_write(alsa4_fn, blob8_ipc4);
9399

94100
% Plot Magnitude and Phase Response of each sink
95101
crossover_plot_freq(crossover.lp, crossover.hp, cr.fs, cr.num_sinks);

0 commit comments

Comments
 (0)