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.

I'm using Ubuntu 11.04. There is no notification generated when an audio jack is connected/disconnected.

Is there any method to get such a notification?

share|improve this question
    
that would require polling the jack at intervals. it automagically toggles when you adjust the volume. if you must have a notification look at the volume up/down code –  hbdgaf Sep 26 '11 at 10:19
    
when we connect audio jack there is any interrupt generated or there is any information available in proc file system. –  Nikhil Sep 26 '11 at 11:39
    
i would think that would be driver/hardware specific. it almost always adjusts when you play with volume. polling is the best option. –  hbdgaf Oct 3 '11 at 0:34
    
thank you aking for attention.I check a function 'snd_hda_jack_detect' in hda_codec.c. In that I monitor return value of 'snd_hda_jack_detect' using printk but from that value I not get any idea about jack is connected or not. plz tell me if you have any idea about what this function return ? –  Nikhil Oct 4 '11 at 10:38

1 Answer 1

You may use Jack Sense if it has an interface you can poll but you soundcard driver must support it. Details are scarce on Jack Sense but you can find an interesting discussion about here: https://lists.ubuntu.com/archives/kernel-team/2011-November/017692.html

You may be interested about the list of drivers supporting Jack Sense: http://www.kernel.org/doc/Documentation/sound/alsa/HD-Audio-Models.txt

share|improve this answer

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.