66 lines
1.2 KiB
Bash
66 lines
1.2 KiB
Bash
#!/bin/sh
|
|
#
|
|
# set default volumes for playback on ALSA
|
|
#
|
|
# set_default_mixer [-f] [card#]
|
|
#
|
|
# written by Takashi Iwai <tiwai@suse.de>
|
|
#
|
|
|
|
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
|
|
card="-c $1"
|
|
fi
|
|
|
|
amixer -q -s $card <<EOF
|
|
set Master 75% unmute
|
|
set Master -12dB
|
|
set 'Master Mono' 75% unmute
|
|
set 'Master Mono' -12dB
|
|
set Front 75% unmute
|
|
set Front -12dB
|
|
set PCM 90% unmute
|
|
set PCM 0dB
|
|
set Synth 90% unmute
|
|
set Synth 0dB
|
|
set Speaker 90% unmute
|
|
set Speaker -12dB
|
|
set CD 90% unmute
|
|
set CD 0dB
|
|
# mute mic
|
|
set Mic 0% mute
|
|
# ESS 1969 chipset has 2 PCM channels
|
|
set PCM,1 90% unmute
|
|
set PCM,1 0dB
|
|
# Trident/YMFPCI/emu10k1
|
|
set Wave 100% unmute
|
|
set Music 100% unmute
|
|
set AC97 100% unmute
|
|
# CS4237B chipset:
|
|
set 'Master Digital' 75% unmute
|
|
# Envy24 chips with analog outs
|
|
set DAC 90% unmute
|
|
set DAC -12dB
|
|
set DAC,0 90% unmute
|
|
set DAC,0 -12dB
|
|
set DAC,1 90% unmute
|
|
set DAC,1 -12dB
|
|
# some notebooks use headphone instead of master
|
|
set Headphone 75% unmute
|
|
set Headphone -12dB
|
|
set Playback 100% unmute
|
|
# turn off digital switches
|
|
set "SB Live Analog/Digital Output Jack" off
|
|
set "Audigy Analog/Digital Output Jack" off
|
|
EOF
|
|
|
|
exit 0
|