From: Michael Prokop Date: Tue, 4 Feb 2014 11:15:55 +0000 (+0100) Subject: config_mixer: ignore "Console" devices for amixer X-Git-Tag: v0.11.3~1 X-Git-Url: http://git.grml.org/?p=grml-autoconfig.git;a=commitdiff_plain;h=b067eaa3953382530af6ee343de4a360e3eabec4 config_mixer: ignore "Console" devices for amixer Strings like 'Console,0' indicate a device where "amixer ... unmute" results in: | amixer: Invalid command! So ignore such devices. --- diff --git a/autoconfig.functions b/autoconfig.functions index 04bdc80..7fdb4be 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -1317,6 +1317,9 @@ config_mixer () { IFS=' ' for CONTROL in ${=CONTROLS} ; do + # such devices can not be controlled with amixer ... unmute + [[ "$CONTROL" == *Console* ]] && continue + if ! echo "${CONTROL}" | grep -q -i "mic" ; then if amixer -c $card sget "${CONTROL}" | grep -q 'Capabilities:.*pswitch' ; then amixer -c $card -q set "${CONTROL}" unmute