Added de-emphasis filter functions and speaker protection.
authormnzaki <mnzaki@gmail.com>
Tue, 14 Sep 2010 15:02:13 +0000 (18:02 +0300)
committermnzaki <mnzaki@gmail.com>
Tue, 14 Sep 2010 15:02:13 +0000 (18:02 +0300)
Added functions to manipulate the filter's coeffs and enable/disable it.
Also changed the machine layer (rx51.c) to set up the filter as a highpass
and turn it on when on speaker output for speaker protection.

TODO: Change filter coeffs if sample rate is changed. Right now it's fit
for 48kHz (and possibly fine with 44.1kHz).

Filter designed using scilab:

fc = [0.015 0.010884354 0.01]
hz = iir(1, 'hp', 'ellip', [fc(3) 0], [0.1 0.1])
[hzm,fr]=frmag(hz,256);
plot2d(fr',hzm')
xtitle('Discrete IIR filter band pass  0.15<fr<0.25 ',' ',' ');
q=poly(0,'q');     //to express the result in terms of the ...
hzd=horner(hz,1/q) //delay operator q=z^-1


No differences found