mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-12-23 04:56:30 +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
|
||||||
# mute mic
|
mixer Synth 90% unmute
|
||||||
amixer set Mic 0% mute >/dev/null 2>&1
|
mixer CD 90% unmute
|
||||||
# ESS 1969 chipset has 2 PCM channels
|
# mute mic
|
||||||
mixer PCM,1 90%
|
set Mic 0% mute
|
||||||
# Trident/YMFPCI/emu10k1
|
# ESS 1969 chipset has 2 PCM channels
|
||||||
mixer Wave 100%
|
set PCM,1 90% unmute
|
||||||
mixer Music 100%
|
# Trident/YMFPCI/emu10k1
|
||||||
mixer AC97 100%
|
set Wave 100% unmute
|
||||||
# CS4237B chipset:
|
set Music 100% unmute
|
||||||
mixer 'Master Digital' 75%
|
set AC97 100% unmute
|
||||||
# Envy24 chips with analog outs
|
# CS4237B chipset:
|
||||||
mixer DAC 90%
|
set 'Master Digital' 75% unmute
|
||||||
mixer DAC,0 90%
|
# Envy24 chips with analog outs
|
||||||
mixer DAC,1 90%
|
set DAC 90% unmute
|
||||||
# some notebooks use headphone instead of master
|
set DAC,0 90% unmute
|
||||||
mixer Headphone 75%
|
set DAC,1 90% unmute
|
||||||
mixer 'Internal Speaker' 75%
|
# some notebooks use headphone instead of master
|
||||||
mixer Playback 100%
|
set Headphone 75% unmute
|
||||||
# turn off digital switches
|
set Playback 100% unmute
|
||||||
amixer set "SB Live Analog/Digital Output Jack" off >/dev/null 2>&1
|
# turn off digital switches
|
||||||
amixer set "Audigy Analog/Digital Output Jack" off >/dev/null 2>&1
|
set "SB Live Analog/Digital Output Jack" off
|
||||||
|
set "Audigy Analog/Digital Output Jack" off
|
||||||
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue