- ERROR=$(aumix -w $VOL -v $VOL -p $VOL -m $MICVOL 2>&1) ; RC=$?
- if [ -n "$ERROR" ] ; then
- eindent
- eerror "Problem setting mixer volumes: $ERROR (no soundcard?)"
- eoutdent
+ RC=0
+ for CONTROL in Master PCM ; do
+ amixer -q set ${CONTROL} ${VOL}%
+ if [ $? -ne 0 ] ; then RC=$? ; fi
+ done
+ # dont know how to set microphone volume for all soundcards with amixer,
+ # so use aumix instead :/
+ if [ ${MICVOL} -ne 0 -a -x /usr/bin/aumix ] ; then
+ aumix -m $MICVOL &>/dev/null
+ if [ $? -ne 0 ] ; then RC=$? ; fi