You are not logged in.

#1 2009-05-22 02:58:04

Peasantoid
Member
Registered: 2009-04-26
Posts: 928
Website

ALSA: What's taking over my XF86AudioMute key?

So something is intercepting keypresses from the XF86AudioMute button and setting Master accordingly (I'm using ALSA).

In my window manager config, I have XF86AudioMute bound to the following hefty command:

vol=$(aumix -w q | sed 's/pcm [0-9]*, //'); if [ $vol = 0 ]; then aumix -w $(cat ~/.aumix-vol); else echo $vol > ~/.aumix-vol; aumix -w 0; fi

Basically: if the volume is 0, it attempts to restore it from a file saved in my home dir; otherwise, it saves the volume to that file and then sets it to 0. Simple toggling functionality.

The problem is that something else is intercepting XF86AudioMute before it reaches my command and using it to set Master rather than PCM. I'd be okay with that, were it not for the fact that [un]muting Master makes the built-in speakers turn back on even if my headphones are plugged in (this is bad).

That being said, does anyone know what process/daemon/whatever could be the culprit?

Last edited by Peasantoid (2009-05-22 02:58:55)

Offline

#2 2009-05-22 03:03:09

Peasantoid
Member
Registered: 2009-04-26
Posts: 928
Website

Re: ALSA: What's taking over my XF86AudioMute key?

/me sighs at length

Okay, duh, I should've seen this one coming. The problem was pommed. I just commented out the entire "audio" section in /etc/pommed.conf.

And of course I post this thread right before I find the solution... roll

# Actually, this solution has problems, in that pommed just uses the defaults anyway. Better fix: set the "volume", "speakers", and "headphones" options to something useless like "none".

Last edited by Peasantoid (2009-05-22 03:07:31)

Offline

#3 2009-05-22 03:10:32

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: ALSA: What's taking over my XF86AudioMute key?

As a side note, can't you more easily implement muting/unmuting PCM with "amixer sset PCM toggle"?

Offline

#4 2009-05-22 03:14:23

Peasantoid
Member
Registered: 2009-04-26
Posts: 928
Website

Re: ALSA: What's taking over my XF86AudioMute key?

ataraxia wrote:

As a side note, can't you more easily implement muting/unmuting PCM with "amixer sset PCM toggle"?

Eh... no. Nothing happens. And when I say "nothing", well... that's what I mean. Even the return code is 0.

# Now it does. Go figure.

Last edited by Peasantoid (2009-05-22 04:03:33)

Offline

Board footer

Powered by FluxBB