1
/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
2
* Use of this source code is governed by a BSD-style license that can be
3
* found in the LICENSE file.
13
/* An LR4 filter is two biquads with the same parameters connected in series:
15
* x -- [BIQUAD] -- y -- [BIQUAD] -- z
17
* Both biquad filter has the same parameter b[012] and a[12],
18
* The variable [xyz][12] keep the history values.
28
/* Three bands crossover filter:
30
* INPUT --+-- lp0 --+-- lp1 --+---> LOW (0)
34
* \-- hp0 --+-- lp2 ------> MID (1)
36
* \-- hp2 ------> HIGH (2)
40
* Each lp or hp is an LR4 filter, which consists of two second-order
41
* lowpass or highpass butterworth filters.
44
struct lr4 lp[3], hp[3];
47
/* Initializes a crossover filter
49
* xo - The crossover filter we want to initialize.
50
* freq1 - The normalized frequency splits low and mid band.
51
* freq2 - The normalized frequency splits mid and high band.
53
void crossover_init(struct crossover *xo, float freq1, float freq2);
55
/* Splits input samples to three bands.
57
* xo - The crossover filter to use.
58
* count - The number of input samples.
59
* data0 - The input samples, also the place to store low band output.
60
* data1 - The place to store mid band output.
61
* data2 - The place to store high band output.
63
void crossover_process(struct crossover *xo, int count, float *data0,
64
float *data1, float *data2);
70
#endif /* CROSSOVER_H_ */