Revert "Sound Control: remove locked logic from opo branch"

This reverts commit 656c901cc8327c4f920ae8b31cdb77afb51a6f08.
Revert "ak_bacon_defconfig: enable SOUND_CONTROL"

This reverts commit 20fc1340c4c0fda95b2b8badb50b8812ef4750dd.
Revert "Sound Control: add line gain to cached and register lock"

This reverts commit 5d8b50378f2b87d99c4d8182c5728ed2e37eb8dc.
Revert "Sound Control: update to last Faux123 source - v3.5"

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

This reverts commit 17a9135bde6985c65ac6bdadbb1fe7326924056c.
Revert "Sound Control: let register lock be dependent on different HW revisions"

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

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

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

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

This reverts commit ae8a7180c34092dccde5da9c49abcabc48787d7d.
Revert "Sound Control: (Optional) work around for general audio issues"

This reverts commit 9574ca5b7d547d6737885338c24f380c75a2959e.
Revert "Sound Control: update speaker gain control for One Plus One"

This reverts commit 7cae1c7499b774d4a677c50cf6561d77e1601ead.
Revert "Sound Control: Initial GPL release for WCD9320 Audio Codec"

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

This reverts commit c1f85794e91eb71d2c98a0075e43b67d2a9aba4f.
sound: add sound control to increase headphones, speaker and mic gain.

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>
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: wcd9320: implement separate locks to prevent derps

* playback, speaker and record locks only to the changed
register values, we don't need the locks to go through other
registers
* this fixes a bug where a user adjusted the headphones gain
and speaker and/or mic would stop working because the lock was
enabled and the switch case would return earlier than it should
* qualcomm, up yours

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>