My laptop is Thinkpad Edge series, of which laptop will produce a beep when the power supply being unplugged. But I noticed that the beep has been blocked if the alsa is turned to mute.
So, I wonder if I can add an exception of "mute rules".
The wide variety of sound cards and ac adapters may make this difficult for a universal answer, but the basics are:
Note: if you don't have /proc/acpi/ac_adapter/state, use something else that would change when the cord is pulled ... like /proc/acpi/battery/BAT1/state (the charging state would become discharging)
You can not. Alsa mutes using hardware mixer so well that not even a mouse whisper passes.