#!/bin/sh # # set default volumes for playback on ALSA # # set_default_mixer [-f] [card#] # # written by Takashi Iwai # if [ -f /etc/asound.state -a x$1 != x-f ]; then /usr/sbin/alsactl restore >/dev/null 2>&1 exit 0 fi if [ x$1 = x-f ]; then shift fi if [ -n "$1" ]; then case "$1" in [0-9]*) card="-D hw:$1";; *) card="-D $1";; esac else card="-D hw" fi amixer -q -s $card <