STA323W
8 USER PROGRAMMABLE PROCESSING
8.1 EQ - BIQUAD EQUATION
The biquads use the equation that follows. This is diagrammed in Figure 14 below.
Y[n] = 2(b0/2)X[n] + 2(b1/2)X[n-1] + b2X[n-2] - 2(a1/2)Y[n-1] - a2Y[n-2]
= b0X[n] + b1X[n-1] + b2X[n-2] - a1Y[n-1] - a2Y[n-2]
where Y[n] represents the output and X[n] represents the input. Multipliers are 28-bit signed fractional
multipliers, with coefficient values in the range of 800000h (-1) to 7FFFFFh (0.9999998808).
Coefficients stored in the User Defined Coefficient RAM are referenced in the following manner:
– CxHy0 = b1/2
– CxHy1 = b2
– CxHy2 = -a1/2
– CxHy3 = -a2
– CxHy4 = b0/2
The x represents the channel and the y the biquad number. For example C3H41 is the b0/2 coefficient in
the fourth biquad for channel 3
Figure 15. - Biquad Filter
b0 /2
2
Z -1
b1 /2
2
Z -1
b2
+
Z -1
+
2
-a1 /2
Z -1
+
-a2
8.2 PRE-SCALE
The Pre-Scale block which precedes the first biquad is used for attenuation when filters are designed that
boost frequencies above 0dBFS. This is a single 28-bit signed multiplier, with 800000h = -1 and 7FFFFFh
= 0.9999998808. By default, all pre-scale factors are set to 7FFFFFh.
8.3 POST-SCALE
The STA323W provides one additional multiplication after the last interpolation stage and before the dis-
tortion compensation on each channel. This is a 24-bit signed fractional multiplier. The scale factor for
this multiplier is loaded into RAM using the same I2C registers as the biquad coefficients and the mix. All
channels can use the same settings as channel 1 by setting the post-scale link bit.
8.4 MIX/BASS MANAGEMENT
The STA323W provides a post-EQ mixing block per channel. Each channel has 2 mixing coefficients,
which are each 24-bit signed fractional multipliers, that correspond to the 2 channels of input to the mixing
block. These coefficients are accessible via the User Controlled Coefficient RAM described below. The
mix coefficients are expressed as 24-bit signed; fractional numbers in the range +1.0 (8388607) to -1.0 (-
8388608) are used used to provide three channels of output from two channels of filtered input.
31/41