@@ -39,7 +39,8 @@ function export_crossover(cr)
3939endian = " little" ;
4040tpath1 = ' ../../topology/topology1/m4/crossover' ;
4141tpath2 = ' ../../topology/topology2/include/components/crossover' ;
42- ctlpath = ' ../../ctl/ipc3' ;
42+ ctlpath3 = ' ../../ctl/ipc3/crossover' ;
43+ ctlpath4 = ' ../../ctl/ipc4/crossover' ;
4344
4445str_way = sprintf(' %d way' , cr .num_sinks );
4546str_freq = get_str_freq(cr );
@@ -49,8 +50,10 @@ function export_crossover(cr)
4950tplg1_fn = sprintf(' %s /coef_%s _%s _%s .m4' , tpath1 , str_way , str_freq , str_pid ); % Control Bytes File
5051tplg2_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_%d way.blob' , ctlpath , cr .num_sinks ); % Blob binary file
53- alsa_fn = sprintf(' %s /crossover_coef_%d way.txt' , ctlpath , cr .num_sinks ); % ALSA CSV format file
53+ blob3_fn = sprintf(' %s /coef_%d way.blob' , ctlpath3 , cr .num_sinks ); % Blob binary file
54+ alsa3_fn = sprintf(' %s /coef_%d way.txt' , ctlpath3 , cr .num_sinks ); % ALSA CSV format file
55+ blob4_fn = sprintf(' %s /coef_%d way.blob' , ctlpath4 , cr .num_sinks ); % Blob binary file
56+ alsa4_fn = sprintf(' %s /coef_%d way.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
8689mkdir_check(tpath1 );
8790mkdir_check(tpath2 );
88- mkdir_check(ctlpath );
91+ mkdir_check(ctlpath3 );
92+ mkdir_check(ctlpath4 );
8993tplg_write(tplg1_fn , blob8 , " CROSSOVER" );
9094tplg2_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
95101crossover_plot_freq(crossover .lp , crossover .hp , cr .fs , cr .num_sinks );
0 commit comments