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:

Poorly drawn TRRS to USB sound

Play controls on the earset won't work yet, however. This borrowed diagram shows how the play controls are functioning:

One-Step-Beyond cable

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?

  • Why do you have 2 headphones in your diagram labeled USB in and out? Are you referring to the mic and the audio output? Is this going to be driven by two different sound cards? Commented May 18, 2016 at 13:11
  • @MohammadAli sorry poor labelling :) it represents one USB dongle with 2 jack sockets: audio out and mic in
    – NoChecksum
    Commented May 19, 2016 at 21:41

1 Answer 1


The average USB dongle is not going to have the circuitry to detect the control switches that will have the side effect of reducing the microphone output when used - it is likely that the original setup that used those headphones had a circuit that supplied a low DC voltage via a series resistor {electret microphones actually need such a voltage - those are the mikes that need a battery installed to work} and monitored the voltage for a drop of a certain amount - depending on the switch pressed.

So, it seems like you need a little dongle that has a 4 pole socket into which you plug your fancy comms-headset and that has a pair of leads:

  • A) one with a 3-pole "stereo" plug {"audio out" - to headphones} that is wired directly to the tip and two rings on the socket.
  • B) one with a 2-pole "mono" or 3-pole "stereo" plug (I'd use a 3 pole one but only connect the plug's tip but NOT the ring to the sleeve of the 4-pole socket via a capacitor to prevent the DC voltage mentioned below going to the microphone and the plug's sleeve to the second ring on the socket, which is the ground connection) {"audio in" - from microphone}.

Additionally, you will need some circuitry (some "comparators" I suspect) to monitor a 3.3 Volt feed via a 560R resistor to the sleeve on the 4-pole socket and to detect the voltage dropping to around 1.5 volts when the "seek forward" button is pressed, 0.3 when the "seek backwards" is used and 0 volts if the "play-pause" is used - the level being close to 3.3 volts when nothing is pressed... the output from those comparators then being sent to some GPIO pins that you have put aside for this monitor circuit.

  • I recently got a mobile phone which had a similar arrangement for the single socket that provided stereo headset and mono microphone and a single push button (answer/hang-up) - it seems to have a 600ohm microphone that gets shorted to ground by the push-button on the sleeve(mic) and second ring (ground) with the left and right headphones wired as expected (left to tip, right to first ring and common ground to second ring). I need to wire up an adapter (with 560 or 620 ohm between sleeve and second ring so phone detects plug) so I can route the audio out to my Car's audio 3.5mm stereo input...!
    – SlySven
    Commented Jun 16, 2016 at 19:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.