You are not logged in.

#1 2008-03-29 14:34:24

zamolxis
Member
Registered: 2008-03-29
Posts: 34

Mute PCM hack

Could anyone suggest some "hack" which could allow me to mute/un-mute the PCM channel in kdemod? (I had to set PCM as the master channel as nothing else seemed to fit the job...) Or maybe some script which mutes/unmutes simultaneously all the other channels (front, rear, LFE, headphones)?

Thanks!

Last edited by zamolxis (2008-03-29 14:36:48)

Offline

#2 2008-03-29 14:49:06

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,718
Website

Re: Mute PCM hack

Well... my idea is more a "total solution" than a hack, but you be the judge.
Install xbindkeys (pacman -Sy xbindkeys) then in the xbindkeysrc file you enter:

# Audio mute (Stop)
"amixer set PCM toggle"
    Mod4 + End

# Volume Up
"amixer set PCM 1+"
    Mod4 + Right

# Volume Down
"amixer set PCM 1-"
    Mod4 + Left

Now you can control, volume and toggle of sound to your heart's content.

Hope this helps.

R.


edit: Notice that I used the "end", left", and "right" keys in my laptop but if you have a multimedia keyboard you can use the corresponding Volume Up/Down and Mute buttons instead.
xbindkeys has detailed information about how to find the key codes for those keys.

Last edited by ralvez (2008-03-29 14:52:27)

Offline

#3 2008-03-29 17:24:21

zamolxis
Member
Registered: 2008-03-29
Posts: 34

Re: Mute PCM hack

Thanks for your reply. I already had my keyboard shortcuts configured (not via xbindkeysrc, just "normal" .Xmodmap file) - so my "mute" key is XF86AudioMute.

I tried your suggestion (amixer set PCM toggle) but it had no effect - i mean no more than dcop kmix Mixer0 toggleMasterMute. If I check the pcm status it appears as muted but ... the speakers and headphones are still "working hard"! On the other hand if I set the PCM volume to 0, everything is quite.

In the end what I did was go to Input Actions in control center and create a new "generic" action for my "mute" key which toggles mute for everything needed (pcm, front, rear, etc) - in other words 6 actions are executed everytime I press the mute key now and finally, it works - I get the "mute" status, icon and, best of all, NO SOUND smile when needed.

Last edited by zamolxis (2008-03-29 17:25:28)

Offline

Board footer

Powered by FluxBB