X-Git-Url: https://git.grml.org/?p=grml-autoconfig.git;a=blobdiff_plain;f=autoconfig.functions;h=d8856e9b2b2667584448d9d6727e56e2f82edf04;hp=833e6d58633c9458650c710c68ef5cff66dc2dae;hb=0a1cf64a39684427cfcf8722a29027ece5d80f07;hpb=f2fca92216478dbc551d753952a300c7c434ce8d diff --git a/autoconfig.functions b/autoconfig.functions index 833e6d5..d8856e9 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -1176,18 +1176,20 @@ config_mixer () { IFS=' ' for CONTROL in ${=CONTROLS} ; do - if $(amixer -c $card sget ${CONTROL} | grep -q 'Capabilities:.*pswitch') ; then - amixer -c $card -q set "${CONTROL}" unmute - fi - if $(amixer -c $card sget ${CONTROL} | grep -q -P 'Capabilities:.*(pvolume| volume)') ; then - amixer -c $card -q set "${CONTROL}" "${VOL}"% + 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 + fi + if amixer -c $card sget "${CONTROL}" | grep -q -P 'Capabilities:.*(pvolume| volume)' ; then + amixer -c $card -q set "${CONTROL}" "${VOL}"% + fi fi if [ ${MICVOL} -ne 0 ] ; then - if $(amixer -c $card sget ${CONTROL} | grep -q 'Capabilities:.*cswitch') ; then + if amixer -c $card sget "${CONTROL}" | grep -q 'Capabilities:.*cswitch' ; then amixer -c $card -q set "${CONTROL}" unmute fi - if $(amixer -c $card sget ${CONTROL} | grep -q 'Capabilities:.*cvolume') ; then + if amixer -c $card sget "${CONTROL}" | grep -q 'Capabilities:.*cvolume' ; then amixer -c $card -q set "${CONTROL}" $MICVOL% fi eend $?