Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a headphone daemon for Linux like there is for maemo? It is really convenient that whenever you unplug your headphones, the media player automatically stops playing.

share|improve this question
    
It seems unlikely that would you describe would actually exist - largely because of the fact that the kernel probably wouldn't need to know itself. It'd be a major hack, so I'd be surprised if you find such a thing. Don't let it stop your trying, though. –  new123456 Mar 30 '11 at 0:18
    
Maybe a simple program that get list of devices from PulseAudio, and checks if a new device with type of headphone is connected, do the job. But how to getting list of PulseAudio devices (with their types) is the point. –  ilius Jun 11 '11 at 13:36
add comment

1 Answer

the hda driver, covers most of the new HD sound cards now has a way to detect plug changes. So if you did have a newer sound card, an input event happens when ever you change headphones. An input event could be mapped to a virtual keypress, such as mute. With that, just map the keypress to "MUTE" or one of the other multi-media keys.

share|improve this answer
    
Ok, I will have to read up on that. Thanks for the info. –  Walter White Jul 18 '11 at 12:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.