Revert "Sound Control: add line gain to cached and register lock"

This reverts commit bd0623552431a92030e37f9d8668d306726abb1b.
Revert "Sound Control: separate locking mechanism for recording and playback"

This reverts commit 35e901c1006073e55572dde151b58789c0f7aadd.
Revert "Sound Control: let register lock be dependent on different hw revisions"

This reverts commit 8d156d2bb82330f988930d4697e1dd1e702f83a7.
Revert "Sound Control: Misc clean up for newer WCD9xxx SOCs"

This reverts commit 8e4b8fbc378be93950e24b18952b56bed80258dd.
Revert "Sound Control: expose direct register manipulations to userspace"

This reverts commit 2de9acf70647066d6b323c2ab9aa50f33f36a7dd.
Revert "sound: Hack Faux sound"

This reverts commit 3fe89b8d0a1badcb781a64e95b0b2b4be7a482aa.
Revert "sound control: add register cache"

This reverts commit 301ca3a948f7397a97200fc4ae710125b70b9523.
Revert "Sound Control: (OPTIONAL) add power amp registers access control as well"

This reverts commit 6a037d8e36d6cdf9c6119c7c1de07b1858f4dd93.
Revert "Sound Control: (Optional) work around for Nexus 4/5 audio issues"

This reverts commit b95ccaaed2c359ce5c376b5ae7916a53ac941d0c.
Revert "Sound Control: WCD9320: expose additional controls"

This reverts commit 5506ca85be74e254bafc0148b77ab2826f33c9ab.
Revert "sound control: WCD9320: update speaker gain control for Z1"

This reverts commit 432f56dac87225e941ee232586cfff99d75a66b4.
Revert "sound control 3.x: Initial GPL release for WCD9320 Audio Codec"

This reverts commit 1d9fe629f4fe1aa456146394c64b218694c493ae.
sound_control: initial code push for Headphones gain userspace interface.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
sound_control: add headset, speaker and mic gain interfaces. Also add the sysfs control file.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
sound_control: add workaround to prevent audio resets after using custom values. Based on https://github.com/faux123/Nexus_5/commit/33407fd2d63290540eb0054bc7c6611f2080ea8b

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
sound_control: clean the code

* proper 80-char indentation
* add module_exit
* clean up the store functions using proper and modern kstroul
* use unsigned boost vars since we're not accepting negative
values anymore
* remove that stupid and useless version define
sound_control: goodbye externs

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
sound: wcd9320: tidy up things a little bit. Only accept signed values from now on. The 'headset gain' will only be used to remove some gain noise, increasing it beyond 1 step above the default doesn't make a difference so rather just have it decrease the gain.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
ASoC: wcd9320: remove hard coded mad mic bias

Currently MICBIAS1 is hard coded as bias needs to be turned on
by MAD HW. Expose a control to user space to set MIC input needs
be used by MAD. Based on the mic, set the correct mic bias to be
used by MAD HW by scanning machine audio routes.

CRs-Fixed: 538266
Change-Id: Ib85be87e50554b9587f7bafb5b58333a88df6766
Signed-off-by: Kiran Kandi <kkandi@codeaurora.org>
Signed-off-by: Eric Laurent <elaurent@google.com>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>