Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 – RobotHumans 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. – RobotHumans 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

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:

You may be interested about the list of drivers supporting Jack Sense:

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .