I would like to connect stereo earbuds with inline mic and play controls to a Pi 2. Sadly for me, the 4-pole TRRS jack on the Pi 2 is for stereo audio and video out :)
A cheap USB sound dongle is working perfectly for audio in and out. With a custom lead (I hope) connecting the earbuds to the USB dongle should be straightforward:
Play controls on the earset won't work yet, however. This borrowed diagram shows how the play controls are functioning:
The diagram shows it using the mic channel and different resistor values for signalling.
Is there a way (software or hardware) to detect these button presses, and ideally distinguish between them, while keeping the mic usable?