10

How do I force the Android system to select the 3.5mm Jack as my microphone source? I am using the AudioRecord class to do the recording.

I am using an external Microphone. When it is detected all works well, but sometimes the external microphone is not detected automatically. A TRRS splitter (cheap $3 thing) is used to split the 3.5mm Jack into separate Mic and Headphone jacks (I need simultaneous recording and playback).

The AudioManager.setWiredHeadsetOn() is deprecated and instructions say not to use it.

1) Do I maybe need additional external hardware to provide the correct microphone impedance?

2) Can I force the input in code?

3) Can a custom ROM archive audio control at this level - maybe this is the best option?

Thanks

user2819360
  • 113
  • 1
  • 1
  • 5
  • It could be the hardware issue. Please try if it works well and stable with a stock phone's headset. TTRS plugs differ in many cases (different leght of rings) and this leads to connection problems. – XorOrNor Oct 08 '13 at 19:15
  • The stock headphones work well....(the TRRS jack looks exactly like the headset jack). The problem is likely hardware related. I need to use a specific external microphone and therefore have to force the jack on irrespective of the external hardware setup. – user2819360 Oct 09 '13 at 07:54
  • Depending on how bad the hardware issue is, it might be possible to counter by modifying the headset detection driver. I'm afraid I can't provide any information on how you'd go about doing that, since it isn't something I've ever attempted myself. – Michael Oct 09 '13 at 13:03

1 Answers1

5

It is very likely a hardware issue. Samsung phones seem to require a microphone with impedance of around 1.0k - 1.5k Ohm. Try modifying the input mic line by adding a series resistor to raise the impedance. Check out this link for details on how to do this: xdadevelopers - External mic on Galaxy devices

user2861759
  • 176
  • 1
  • 8
  • Good link. I will try this out and let you know tomorrow. Thanks. – user2819360 Oct 09 '13 at 17:09
  • 2
    This works. While it is not quite the answer to the question -forcing phone to select jack - which would probably require driver mods as indicated by Michael above. The device automatically detects a microphone with a correct impedance. I soldered a 1k5 Ohm resistor into the mic line and it works great. – user2819360 Oct 10 '13 at 06:42
  • i have been using an [external lavalier][1] with 1000 ohms impedance using TRRS adapter (attention to CTIA and OMTP standards). I have had no problems on samsung s2 (kitkat) and samsung duos (marshmallow, i think). I have not managed to make it work on Windows phones and have not tested on iPhone. [1]: http://www.audio-technica.com/cms/wired_mics/742fb06dd066b3ec/ – tony gil Jul 09 '16 at 12:07