Patching Into Android Music Control

Here’s a look at the TRRS cable that Android phones use. [Rich Kappmeier] want to control the music player on his Nexus One while driving. It’s not necessarily a safe endeavor if you’re staring at the screen and poking away with one hand while trying to stay in your lane. A little bit of research helped him figure out how the hardware in a headphone controller worked and he decided to incorporate that into a connector cable for the car.

The control signals rely on a specific resistance between the TRRS function ring and ground. Once he worked out the chart above and targeted the correct resistance values he built a rocker switch for Fast Forward and Reverse, as well as a Play/Pause button into the connector cable. You should be able to use this for more than just music control. Take a look at our Android Development tutorial and see what else you can come up with.

[Thanks Alastair]

26 thoughts on “Patching Into Android Music Control

  1. Not Android, Nexus One. This won’t work on all phones, most likely just htc phones with builtin audio out, if that. The Nexus One has alot of hidden goodies like this, and usb-host, etc.

    So title is wrong.

  2. The iPhone uses basically the same circuit in its headphones, albeit I haven’t checked what resistance values. I’m sure most assumed that, as well as that ring 4 is the mic port as well. But here’s a fun trick: if you insert a normal headset, the phone needs to know that there’s no mic present. It does so by sensing a short from 4 to ground on insertion. Which (on the iphone) is also accomplished by holding the play/pause/skip button. If you hold that button while you plug the headphones in, the mic and buttons are all disabled (ring 4 is disregarded). I have no idea if this works on the nexus one, but I can only assume that it does.

  3. @Alex: yeah i’d bet it works on the Nexus one. That thing also has got to check if theres a mic or not.

    PS: the last time i “played” around with audio jacks, i wasted 3×2.5mm stereo jacks…don’t want to know, what will happen if i try to build this control for my phone.

    PPS: doesn’t the Nexus One support at least double-tapping the play/pause-button as a “next-song”-command? At least it works on my HTC Wildfire. The iPhone also supports this, but it is also capable of triple-tapping for previous song.

  4. @Alex Whittemore
    I’ve been trying to use my apple in ear headphones (w/ remote) since purchasing the Xperia X10 a few months ago. I tried this trick and it works if I continuously hold the play pause button, letting go of it makes the audio sound like its under water.

    That said if anyone else has a similar issue, using a right angled 3.5mm adaptor or 3.5mm splitter should resolve it as it grounds the 3&4 pin together. Obviously the buttons won’t work but at least you can salvage the headphones.

  5. Where do people get the 4 conductor 3.5mm jacks? I have a HAM radio that has a 4 conductor for headphones / mic / ptt and I would like to hack something together. The headphone port is also used for programming so I would like to build a programmer.

  6. I got my 4 connections jackplug at a normal electronics parts store, there are quite a few devices that use them and have used them in the past so they must not be that hard to find, although I also know stores that do not have them, but then you might be able to get a cheap item that uses them and just cut it off for your own use.
    Many cheap radio handsets also come with 4 pin ports for instance, so they might have hands-free headplugs for those available.

  7. Here’s a look at the TRRS cable that Android phones use. [Rich Kappmeier] want to control the music player on his Nexus One while driving. It’s not necessarily a safe endeavor if you’re staring at the screen and poking away with one hand while trying to stay in your lane. A little bit of research

  8. Hi, I know this is quite old, but I built this, instead of 600 ohm i used 620. But the functions are a bit different, instead of next/previous song, it makes volume go up/down.

    Now I have to test what resistors to use for next/previous song. Also, thanks for this.

    1. I just built one as well. It doesn’t skip ahead/back. Instead, it changes the volume on my GS3. Maybe it’s because I haven’t added any speakers yet. I just made it super quick on a breadboard.

  9. Hi,

    I have Samsung Galaxy s2. In this phone one click is play/pause, 2 clicks are for next, 3 clicks are for prev. So only one switch is needed.
    I made this nice hack, without the resistors and switch 2. The problem is that every click produce a terrible “ccrrkkk” noise in the speakers (I think it also damages them).
    Can you assist? what is wrong?

Leave a Reply to WhatnotCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.