Hello fellow Stackers,
Is there a way to detect when a 3.5mm jack is placed into\ removed from the audio out that is on board for use in a script?
I also have one of these:
Mounted on a pi2 that I would like to be able to do the same with in the way of detection on its 3.5mm jacks.
I know that most modern computers are capable of this. Are our Pi's able to do this to?
Long version:
This will be so that I can use the Cirrus/Wolfson card outputs to play content from the Pi but pick up when an external source is plugged in (say my phone) and have a script. Be it bash or python etc. Mute the playing content to allow the connected device to play either directly to the speakers or be routed through the pi to the speakers somehow, presumable in the software, without having to use a manual toggle switch somewhere.
EDIT: Raspbian will be my go to distro but if anyone wants to suggest other distros more suited to this task feel free to suggest them. I will probably start out trying the distro listed on the element 14 site and work out form there.