1

I'm asking mainly out of curiosity, partially because the linux audio stack always confuses the heck out of me and maybe because I wan't to implement something that enhances the behavior.

My question is: which piece of software mutes the audio output when I unplug the headphones from my laptop? I.e. which code actually pushes the "mute" button for me? How does it do this?

Secondary question would be how to listen for such events without brainlessly reading some log file every x miliseconds?

4
  • 1
  • 1
    Does this question help?
    – dirkt
    Feb 1, 2017 at 9:29
  • @dirkt yeah, the answer on acpi gives a solution to the second question. I'll post the rest of my findings here later. Feb 1, 2017 at 11:16
  • 1
    Note that it's a bit hardware dependent - ACPI is always hardware specific, listen for the /dev/input events of type EV_SW (e.g. on Intel HDA hardware) is very portable.
    – dirkt
    Feb 1, 2017 at 11:52

0

You must log in to answer this question.

Browse other questions tagged .