1function example_pass_config() 2 3% example_pass_config() 4% 5% Creates a number for topologies a special configuration blob 6% that instantiates two min. length filters and configures 7% each channel to pass. 8 9% SPDX-License-Identifier: BSD-3-Clause 10% 11% Copyright (c) 2020, Intel Corporation. All rights reserved. 12% 13% Author: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com> 14 15% Setup for two channels 16bf = bf_defaults(); 17bf.input_channel_select = [0 1]; % Input two channels 18bf.output_channel_mix = [1 2]; % Filter1 -> ch0, filter2 -> ch1 19bf.output_stream_mix = [0 0]; % Mix both filters to stream 0 20bf.num_output_channels = 2; % Two channels 21bf.num_output_streams = 1; % One sink stream 22bf.beam_off_defined = 0; % No need for separate bypass definition 23bf.num_angles = 0; % No beams defined 24bf.num_filters = 2; % Two filters 25 26% Minimal manual design fields for successful export 27bf.w = [1 0 0 0; 1 0 0 0]'; % Two FIR filters with first tap set to one 28 29% Files 30bf.sofctl_fn = fullfile(bf.sofctl_path, 'coef_line2_pass.txt'); 31bf.tplg_fn = fullfile(bf.tplg_path, 'coef_line2_pass.m4'); 32bf_export(bf); 33 34% Setup for four channels 35bf.input_channel_select = [0 1 2 3]; % Input two channels 36bf.output_channel_mix = [1 2 4 8]; % Filter1 -> ch0, filter2 -> ch1 37bf.output_stream_mix = [0 0 0 0]; % Mix both filters to stream 0 38bf.num_output_channels = 4; % Four channels 39bf.num_output_streams = 1; % One sink stream 40 41% Minimal manual design fields for successful export 42bf.num_filters = 4; 43bf.w = [1 0 0 0; 1 0 0 0; 1 0 0 0; 1 0 0 0]'; % Four FIR filters with first tap set to one 44 45% Files 46bf.sofctl_fn = fullfile(bf.sofctl_path, 'coef_line4_pass.txt'); 47bf.tplg_fn = fullfile(bf.tplg_path, 'coef_line4_pass.m4'); 48bf_export(bf); 49 50end 51