Is some kind of signal emitted when an earphone/headphone is plugged in? I want detect when they are plugged in and run a script accordingly.
Asked
Active
Viewed 206 times
2
-
You used confusing tags. Which are you running? debian, ubuntu, or lubuntu? – Seth Mar 12 '16 at 15:58
-
@Seth It should work with any Linux version I guess. – ott-- Mar 12 '16 at 16:09
-
It depends on what Linux distribution you're using, and what type of hardware you are running it on. – Mar 12 '16 at 16:22
-
Hi, yes it should work on all distros. I tried the solution given in the question of which this is a duplicate. i.e. if fired the command cat /proc/asound/card0/codec#0 However, the command shows no difference between the outputs when the headphone is connected to the jack and when it's not. I even did a "diff" between the two outputs to be sure. What could be the problem? (commenting here as I don't have reputation enough to comment there) – RodrikTheReader Mar 15 '16 at 02:01