Add cyanogen-dsp library (initial import).

For comparison / troubleshooting, the library can be disabled and
stock 2.3 DSP restored by defining a makefile variable HAVE_2_3_DSP=1.

Change-Id: Ice1fc85b86468c1157df02fc5c0a461f81be0c4b
Issue 2875, multiplied frequency by 1000 to convert from Hz to milliHz to match API spec

Change-Id: I431c4834ff212e42f1c7f6e52f17dfe00d0e40cd
Add audio dithering for intermediate quantizations

Mask quantization effects under classic high-pass triangular
dithering.

Change-Id: I567ad3a7ae31002f04569ae0dec3685de2846d24
Fix compression effect

- correct sign mistake that resulted in pretty wild volume boosts
- avoid maximum volume while compression is disabled
  (until android removes it)
- support strength parameter (updated DSPManager required)

Change-Id: I3b781d006cd7a21e0d66c3b6b4c608ac250fe1cc
Fix enable/disable behavior and improve effects

- when android requests audioeffect to become disabled, the effect
  must acknowledge its safe removal by returning -ENODATA error code
  from process(). We just return -ENODATA immediately.

- Improve compression to better deal with very sharp level changes.

Change-Id: I8f280f5ae47e9ae4bfad65fcac9b2603eaf7f540
Compression accuracy improvement

Use separate biquads per channel so that granule size can not
affect the loudness measurement by introducing discontinuities.

Change-Id: I4ce2fd5987e867c6b3a040eae66ed08c661a72a9
Add loudness compensation to eq

The equalizer is now capable of adjusting bass booth based on the
ISO equal loudness contours and a tunable that matches the sound
digital level with the level experienced by ear. Typical values
for the adjustment parameter should be between 40 dB to 20 dB.

Change-Id: I1b15130d42607ecb57c980038180ba7703411039
Compression-related improvements

- use a hybrid of A- and C-weighing filter to estimate loudness in compression.

- make equalizer's automatic loudness adjustment begin from 50 % midpoint
  to avoid an initial strong bass boost effect.
Reduce loudness compensation latency and noise

- The equalizer is now updated 100 times per second to follow the
  changes in the estimated loudness. Noise is controlled by restricting
  the adjustment to <= 0.075 dB per adjustment.

- Equalizer now has treble boost, and bass boost is slightly reduced.
Use smooth fade in/out for effect enable/disable

Affects: equalizer, compression. The rest of changes are just
minor API updates.

Equalizer fade in/out is perfect. It is configured to take about
2 seconds.

Compression remains is difficult because android gives us
volumes only after enabling has happened, thus, easily causing a
discontinuity. For this reason, compression always fades in from
full silence. Fade out is seamless, however.

Change-Id: I61b49555185fbc9020445fa69098f3e815e579bc
Remove weighing filter from loudness equalization

I was estimating loudness based on my own hybrid A+C weighing
filter. This looks like the wrong thing to do, because the
ISO 226:2003 curves are defined for dB(SPL).

Also restoring correction back to my originally derived values,
after this bug made me lower the boosts slightly.
Do headset filter in center+side audio space

- Remove the slow integer division in the headset filter code, opting
  for more standard center+side channel calculation.
- Lay the groundwork for applying FIR-based directional emphasis
  filters. (No such filters are yet applied, however.)
- Reduce the delay line length in Haas effect to reduce audible
  ringing in the "Stage" mode.

Change-Id: If521af4c3a501be4f496de17ce179281fbd5b568
Bias estimate of sound pressure level upwards

This patch introduced asymmetry in the loudness estimate
for the dynamic loudness correction. The effect is to
bias the estimated loudness towards the strongest sounds
heard in the last few seconds. This should fix the following
defects:

- reduce pumping treble associated with slow drum beats
- reduce the bass boost for sounds preceded by silence.

Change-Id: I5832ba7c43933ff4b71521ea4818aa9f7e3b4b65
Add a sub-bass eq band at 16 Hz

This band is used for a boost of up to 40 dB during loudness
correction. The band is also made visible to DSPManager.

Change-Id: Iaa93680a7bf54819d913e690b2ec45f7c200c81f
Smooth biquad interpolation for equalizer

Equalizer now uses linear coefficient interpolation to reduce
chance of producing snapping artifacts in the dynamic mode.

Change-Id: I2f3c175e7c647da7c800202157479112409f39ac
Make loudness estimation rise-time instantenous

The loudness is now estimated using watermark algorithm with
fall speed of 10 dB/s. This greatly reduces any bass boosting
artifacts on drums that were preceded by long silence.

Change-Id: If8ad30a56121b5df3d6c8979e480dfbd8053c865