Last active
September 16, 2017 13:37
-
-
Save maz-1/9261a097e128c6aedb71c68a58909299 to your computer and use it in GitHub Desktop.
Kernel Adiutor custom setting to tweak headphone gain through sound_control
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"version":1,"control":{"apply":"#!\/system\/bin\/sh\n\necho $1 > \/sys\/kernel\/sound_control\/headphone_gain\n#echo \"-20 -20\" > \/sys\/kernel\/sound_control\/headphone_gain","value":"#!\/system\/bin\/sh\n\n\norigval=$(cat \/sys\/kernel\/sound_control\/headphone_gain)\nleftval=${origval% *}\nrightval=${origval#* }\n\nif [ $leftval -ge 172 ]\nthen\n leftval=$(expr $leftval - 256)\nfi\n\nif [ $rightval -ge 172 ]\nthen\n rightval=$(expr $rightval - 256)\nfi\n\necho $leftval $rightval","title":"headphone volume control","description":"headphone volume gain","id":"generic"}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment