You are not logged in.

#1 2011-08-18 13:58:16

Registered: 2010-02-27
Posts: 156

alsamixer unmute by some script

I have a Creative Audigy 2 ZS soundcard. The restoration of volume
settings does not work, i tried all three methods discribed in the wiki.
With the onboard soundchip, it works however.

What annoys me is, that i have to unmute some channel called
'SPDIF / Output Jack' or whatever (i'm not sitting on my machine at the moment).
That one doesn't have a volume, just the mute/unmute box. Without
it unmuted, i have no sond at all. My speakers are connected analog.

I have the strong feeling, that this is a hardware issue, since i also had
problems with this card on Ubuntu und Windows 7. However, it basically
works, so i stick with it. Sometimes, i even had to mute to channel,
instead of unmuting it to hear some music. This behaviour is too strange,
that i think it's a software issue. However, if somebody has an idea
what i can try, i'd be glad to hear that.

Anyway, what i would like to do is to write a script, which unmutes this
specific channel, so that i don't have to open alsamixer all the time,
search the channel and unmute it by hand. I might even put that script
in .bash_login.

Has anybody done something like this or is familiar with alsa(mixer) access
from some bash script?


#2 2011-08-18 14:22:01

Registered: 2007-04-03
Posts: 3,742

Re: alsamixer unmute by some script

I use:

amixer -q set "Channel Mode" "6ch"
amixer -q set Center 90% unmute
amixer -q set LFE 94% unmute
amixer -q set Surround 96% unmute

amixer -q set Master 80% unmute
amixer -q set PCM 90% unmute
amixer -q set Front 96% unmute

amixer -q set "Input Source",0 "Front Mic"
amixer -q set 'Mic Boost',0 0
amixer -q set 'Capture',0 80%

Create a script e.g. /usr/local/bin/resetvolume

Edit: Can also be mixed into 1 command:

amixer -s -q <<EOF
set "Channel Mode" "6ch"
set Center 94% unmute
set LFE 94% unmute
set Surround 86% unmute
set Digital 0
set Master 80% unmute
set PCM 92% unmute
set 'Mic Boost',0 0
set Mic,0 0% mute
set 'Capture',0 85% unmute
set "Auto-Mute Mode" Enabled
set Headphone 96%
set IEC958 off
set 'IEC958 Default PCM' off
set 'Speaker CLFE' on
set 'Speaker Front' 92% unmute
set 'Speaker Surround' 92% unmute

Last edited by brebs (2013-10-09 22:49:26)


#3 2011-08-20 16:15:17

Registered: 2010-02-27
Posts: 156

Re: alsamixer unmute by some script

Thanks a lot brebs, this is exactly what i wanted.


Board footer

Powered by FluxBB