Use the 3-pin connector... Audio in and out and ground... Use the ground as a switch... Make ground and the circuit powers on... Then, use any of a great many ways to determine audio in, or out. There are audio jacks that are built to mechanically make, or break, a connection, when a plug is inserted... They are not anything special at all...