From: mnzaki Date: Tue, 14 Sep 2010 15:02:13 +0000 (+0300) Subject: Added de-emphasis filter functions and speaker protection. X-Git-Url: http://git.maemo.org/git/?p=aic34-eq;a=commitdiff_plain;h=73b3a14c93124179fea8d9e83f0ebac429e850ab;hp=73b3a14c93124179fea8d9e83f0ebac429e850ab Added de-emphasis filter functions and speaker protection. 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