Using Method 1 from http://ez.analog.com/message/5485 but on a 2nd order HighPass on an ADAU1442

I'm having trouble generating the coefficients for the 2nd order HPF algorithms, they don't match what I see in the Capture window and they mess the audio up when I implement them. Does anyone see what I'm doing wrong?

// 2nd Order High-Pass filter

HPFcutoff = 20; // Hz

gain = 1; // unity

Q = 0.53;

#define MyPI 3.14159265359

w0 = 2.0 * MyPI * (float)HPFcutoff / 48000.0; // 2*pi*f0/Fs

alpha = sin(w0)/(2.0*Q);

a1 = -2.0 * cos(w0);

a2 = 1 - alpha;

b0 = (1 + cos(w0)) * (gain / 2);

b1 =- (1 + cos(w0)) * (gain);

b2 = (1 + cos(w0)) * (gain / 2);

calculated by uP (and confirmed via Ti-89) as:

w0 = 0.0026179

alpha = 0.0024598

a1 = -1.9999932

a2 = 0.9975301

b0 = 0.9999982

b1 = -1.9999964

b2 = 0.99999982

Working example: Sigma Studio output seen in Caputure Window after pressing enable button:

Hi MagicRub,

There is a typo in the help documentation. There is a discussion of this problem in this post.

The update to the help file is long overdue. I have it on my list for the next SigmaStudio release. Sorry for the trouble.