Lines Matching refs:bq

30 static void set_coefficient(struct biquad *bq, double b0, double b1, double b2,  in set_coefficient()  argument
34 bq->b0 = b0 * a0_inv; in set_coefficient()
35 bq->b1 = b1 * a0_inv; in set_coefficient()
36 bq->b2 = b2 * a0_inv; in set_coefficient()
37 bq->a1 = a1 * a0_inv; in set_coefficient()
38 bq->a2 = a2 * a0_inv; in set_coefficient()
41 static void biquad_lowpass(struct biquad *bq, double cutoff, double resonance) in biquad_lowpass() argument
48 set_coefficient(bq, 1, 0, 0, 1, 0, 0); in biquad_lowpass()
67 set_coefficient(bq, b0, b1, b2, 1, a1, a2); in biquad_lowpass()
72 set_coefficient(bq, 0, 0, 0, 1, 0, 0); in biquad_lowpass()
76 static void biquad_highpass(struct biquad *bq, double cutoff, double resonance) in biquad_highpass() argument
83 set_coefficient(bq, 0, 0, 0, 1, 0, 0); in biquad_highpass()
102 set_coefficient(bq, b0, b1, b2, 1, a1, a2); in biquad_highpass()
109 set_coefficient(bq, 1, 0, 0, 1, 0, 0); in biquad_highpass()
113 static void biquad_bandpass(struct biquad *bq, double frequency, double Q) in biquad_bandpass() argument
134 set_coefficient(bq, b0, b1, b2, a0, a1, a2); in biquad_bandpass()
140 set_coefficient(bq, 1, 0, 0, 1, 0, 0); in biquad_bandpass()
149 set_coefficient(bq, 0, 0, 0, 1, 0, 0); in biquad_bandpass()
153 static void biquad_lowshelf(struct biquad *bq, double frequency, double db_gain) in biquad_lowshelf() argument
162 set_coefficient(bq, A * A, 0, 0, 1, 0, 0); in biquad_lowshelf()
180 set_coefficient(bq, b0, b1, b2, a0, a1, a2); in biquad_lowshelf()
183 set_coefficient(bq, 1, 0, 0, 1, 0, 0); in biquad_lowshelf()
187 static void biquad_highshelf(struct biquad *bq, double frequency, in biquad_highshelf() argument
197 set_coefficient(bq, 1, 0, 0, 1, 0, 0); in biquad_highshelf()
215 set_coefficient(bq, b0, b1, b2, a0, a1, a2); in biquad_highshelf()
218 set_coefficient(bq, A * A, 0, 0, 1, 0, 0); in biquad_highshelf()
222 static void biquad_peaking(struct biquad *bq, double frequency, double Q, in biquad_peaking() argument
246 set_coefficient(bq, b0, b1, b2, a0, a1, a2); in biquad_peaking()
252 set_coefficient(bq, A * A, 0, 0, 1, 0, 0); in biquad_peaking()
256 set_coefficient(bq, 1, 0, 0, 1, 0, 0); in biquad_peaking()
260 static void biquad_notch(struct biquad *bq, double frequency, double Q) in biquad_notch() argument
281 set_coefficient(bq, b0, b1, b2, a0, a1, a2); in biquad_notch()
287 set_coefficient(bq, 0, 0, 0, 1, 0, 0); in biquad_notch()
291 set_coefficient(bq, 1, 0, 0, 1, 0, 0); in biquad_notch()
295 static void biquad_allpass(struct biquad *bq, double frequency, double Q) in biquad_allpass() argument
316 set_coefficient(bq, b0, b1, b2, a0, a1, a2); in biquad_allpass()
322 set_coefficient(bq, -1, 0, 0, 1, 0, 0); in biquad_allpass()
326 set_coefficient(bq, 1, 0, 0, 1, 0, 0); in biquad_allpass()
330 void biquad_set(struct biquad *bq, enum biquad_type type, double freq, double Q, in biquad_set() argument
334 set_coefficient(bq, 1, 0, 0, 1, 0, 0); in biquad_set()
335 bq->x1 = 0; in biquad_set()
336 bq->x2 = 0; in biquad_set()
337 bq->y1 = 0; in biquad_set()
338 bq->y2 = 0; in biquad_set()
342 biquad_lowpass(bq, freq, Q); in biquad_set()
345 biquad_highpass(bq, freq, Q); in biquad_set()
348 biquad_bandpass(bq, freq, Q); in biquad_set()
351 biquad_lowshelf(bq, freq, gain); in biquad_set()
354 biquad_highshelf(bq, freq, gain); in biquad_set()
357 biquad_peaking(bq, freq, Q, gain); in biquad_set()
360 biquad_notch(bq, freq, Q); in biquad_set()
363 biquad_allpass(bq, freq, Q); in biquad_set()