Sound Control: Sound control for TPA amp used on many HTC devices

Compatible from Froyo to Jellybean

many models including G2x/Desire Z, MyTouch4G, Sensation, Amaze, Evo etc
including Beats models as well

Fully GPL'ed version.

Signed-off-by: faux123 <reioux@gmail.com>
staging: android: lowmemorykiller: Don't count reserved free memory

The amount of reserved memory varies between devices. Subtract it
here to reduce the amount of devices specific tuning needed for the
minfree values.

Change-Id: I466ae8b18f5972f6f6d8b5a7d8c4ae69660de53a
Signed-off-by: Arve Hjønnevåg <arve@android.com>
adapted from Linux 3.4 Android Kernel Common

Signed-off-by: faux123 <reioux@gmail.com>
staging: android: lowmemorykiller: Add config option to support oom_adj values

The conversion to use oom_score_adj instead of the deprecated oom_adj
values breaks existing user-space code. Add a config option to convert
oom_adj values written to oom_score_adj values if they appear to be
valid oom_adj values.

Change-Id: I68308125059b802ee2991feefb07e9703bc48549
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Adapted from Linux 3.4 from Android kernel common

Signed-off-by: faux123 <reioux@gmail.com>
Sound Control: fix register issue when fighting with HTC AudioHAL (rev 2)

HTC's Closed Sourced AudioHAL was doing something funky to their own shadow
registers which caused 1 of amps to be turned off when enabling another one.

Fixed a critical memory corruption derp on my part :( and added mutex
protections to prevent race conditions (making the updates atomic)

The original simplistic hacking force wasn't strong enough against the darkside
that is the HTC AudioHAL :p  Deep magic was needed to fully penetrate and
achieve its intended goal ;)

Bump to version 2.1 to indicate this update

Signed-off-by: faux123 <reioux@gmail.com>
config tweak and build fix