diff options
author | Andrew Cady <d@jerkface.net> | 2017-01-23 14:37:55 -0500 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2017-01-23 14:37:55 -0500 |
commit | b58303a996c026d58c17328133be1a6a193d8be8 (patch) | |
tree | 30440577a255f7c4ad98c95c9d600015fe7e9383 /dot | |
parent | 5a4fb662502f37a0489c214514ce8ee103011fd3 (diff) |
amixer-enable-mic: set mic boost separately from mic level (to 50% by default)
Diffstat (limited to 'dot')
-rwxr-xr-x | dot/local/bin/amixer-enable-mic | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/dot/local/bin/amixer-enable-mic b/dot/local/bin/amixer-enable-mic index cc488fd..9362b88 100755 --- a/dot/local/bin/amixer-enable-mic +++ b/dot/local/bin/amixer-enable-mic | |||
@@ -1,6 +1,7 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | SETME=${1:-100%} | 3 | SETME=${1:-100%} |
4 | SETME_BOOST=${2:-50%} | ||
4 | 5 | ||
5 | enable_recording() | 6 | enable_recording() |
6 | { | 7 | { |
@@ -8,8 +9,11 @@ enable_recording() | |||
8 | amixer -D "$DEV" controls | ( | 9 | amixer -D "$DEV" controls | ( |
9 | IFS=, | 10 | IFS=, |
10 | while read a b c _; do | 11 | while read a b c _; do |
11 | case "${c#name=}" in *Capture*|*Boost*) | 12 | case "${c#name=}" in |
12 | amixer -D "$DEV" cset "$a,$b,$c" "$SETME";; | 13 | *Boost*) |
14 | amixer -D "$DEV" cset "$a,$b,$c" "$SETME_BOOST";; | ||
15 | *Capture*) | ||
16 | amixer -D "$DEV" cset "$a,$b,$c" "$SETME";; | ||
13 | esac | 17 | esac |
14 | done | 18 | done |
15 | ) | 19 | ) |