X-Git-Url: https://git.grml.org/?p=grml-autoconfig.git;a=blobdiff_plain;f=autoconfig.functions;h=a5a550797de75243d280bc2984a6096bf70c909b;hp=833e6d58633c9458650c710c68ef5cff66dc2dae;hb=85222473ccf5fe78cbacdda208c48a07ec735e98;hpb=e24dfc7a5a88819dcbbde502b50b080d660e44aa diff --git a/autoconfig.functions b/autoconfig.functions index 833e6d5..a5a5507 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 + 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 + 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 $?