mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-12-23 09:26:34 +01:00
Use amixer -s option
Optimize to use amixer with -s option.
This commit is contained in:
parent
35c0bd63ec
commit
6106ed8720
1 changed files with 28 additions and 31 deletions
|
@ -399,38 +399,35 @@ remove_ac_block() {
|
||||||
#
|
#
|
||||||
# set default mixer volumes
|
# set default mixer volumes
|
||||||
#
|
#
|
||||||
mixer() {
|
|
||||||
amixer set "$1" "$2" unmute >/dev/null 2>&1
|
|
||||||
amixer set "$1" unmute >/dev/null 2>&1
|
|
||||||
}
|
|
||||||
|
|
||||||
set_mixers() {
|
set_mixers() {
|
||||||
mixer Master 75%
|
amixer -s -q <<EOF
|
||||||
mixer Front 75%
|
set Master 75% unmute
|
||||||
mixer PCM 90%
|
set 'Master Mono' 75% unmute
|
||||||
mixer Synth 90%
|
set Front 75% unmute
|
||||||
mixer CD 90%
|
set PCM 90% unmute
|
||||||
|
mixer Synth 90% unmute
|
||||||
|
mixer CD 90% unmute
|
||||||
# mute mic
|
# mute mic
|
||||||
amixer set Mic 0% mute >/dev/null 2>&1
|
set Mic 0% mute
|
||||||
# ESS 1969 chipset has 2 PCM channels
|
# ESS 1969 chipset has 2 PCM channels
|
||||||
mixer PCM,1 90%
|
set PCM,1 90% unmute
|
||||||
# Trident/YMFPCI/emu10k1
|
# Trident/YMFPCI/emu10k1
|
||||||
mixer Wave 100%
|
set Wave 100% unmute
|
||||||
mixer Music 100%
|
set Music 100% unmute
|
||||||
mixer AC97 100%
|
set AC97 100% unmute
|
||||||
# CS4237B chipset:
|
# CS4237B chipset:
|
||||||
mixer 'Master Digital' 75%
|
set 'Master Digital' 75% unmute
|
||||||
# Envy24 chips with analog outs
|
# Envy24 chips with analog outs
|
||||||
mixer DAC 90%
|
set DAC 90% unmute
|
||||||
mixer DAC,0 90%
|
set DAC,0 90% unmute
|
||||||
mixer DAC,1 90%
|
set DAC,1 90% unmute
|
||||||
# some notebooks use headphone instead of master
|
# some notebooks use headphone instead of master
|
||||||
mixer Headphone 75%
|
set Headphone 75% unmute
|
||||||
mixer 'Internal Speaker' 75%
|
set Playback 100% unmute
|
||||||
mixer Playback 100%
|
|
||||||
# turn off digital switches
|
# turn off digital switches
|
||||||
amixer set "SB Live Analog/Digital Output Jack" off >/dev/null 2>&1
|
set "SB Live Analog/Digital Output Jack" off
|
||||||
amixer set "Audigy Analog/Digital Output Jack" off >/dev/null 2>&1
|
set "Audigy Analog/Digital Output Jack" off
|
||||||
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue