User Tools

Site Tools


doc:appunti:linux:audio:audio_recording

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
doc:appunti:linux:audio:audio_recording [2019/04/22 22:39]
niccolo [Wireless UHF microphone]
doc:appunti:linux:audio:audio_recording [2019/05/22 15:51] (current)
niccolo [Electrical compatibility and hardware autodetection]
Line 159: Line 159:
 {{wireless-mic-receiver.jpg?​direct&​240|}} {{wireless-mic-receiver.jpg?​direct&​240|}}
  
-To connect the receiver to the Ugreen ​**USB audio adapter**, we built an adapter cable with a **male jack 3.5 mm TRS**. This is the pinout:+To connect the **UHF receiver** to the **Ugreen ​USB audio adapter**, we built an adapter cable with this pinout:
  
-Male Jack 3.5 mm TRS  ^ Signal ​            ^ Female 1/​4" ​jack  ^ +1/4" TS female jack  ^ Signal ​        ​^ ​3.5 mm TRS male jack  ^ 
-| **Tip** ​              ​| Microphone ​signal  ​| **Tip** ​          ​+| **Tip** ​             | Microphone ​    ​| **Tip** ​              ​
-| **Ring** ​             ​| Not connected ​     |                   +|                      | Not connected  ​| **Ring** ​             | 
-| **Sleeve** ​           | Ground ​            ​| **Sleeve** ​       |+| **Sleeve** ​          ​| Ground ​        ​| **Sleeve** ​           |
  
-===== Wireless ​UHF microphone on Android =====+The **2.6 volt** current provided by the USB adapter on th **jack ring** will go nowhere (not connected). The **2.6 volt** current provided on the **jack tip** is probably not required by the UHF receiver, but **it should not harm**. **No infromation** is available about **microphone ​impedence** expected by the USB adapter, ​on the other hand no information is available about the **impedence of the mic interface** of the UHF receiver.
  
 +Despite all this empirical approach, the **voice registration is quite satisfying**!
 +====== Audio Recording With Android ======
 +
 +Recording audio using an **external microphone** connected to an **Android device** can be a real nightmare. We tried the hard way using a Chinese, no-brand, **wireless UHF microphone**!
 +
 +We can group the problems you can face in three main categories:
 +
 +  * Physical connection
 +  * Electrical compatibility and hardware autodetection
 +  * Software capabilities and settings
 +
 +===== Physical connection =====
 +
 +Most Android devices have a **3.5 mm jack** accepting a **TRRS connector in CTIA standard** and every brand of mobile phones produces **headsets** with their own standard. The vast majority of solutions uses **electret microphones** requiring a **bias current**, but use **some combinations of impedence** to detect the insertion of the microphone and to **handle the headset button** (or buttons).
 +
 +So, connecting an external microphone, can be as simple as making a cable that connects the **ring** and the **sleve** of the **CTIA connector** to (respectively) the **ground** and the **microphone line** of the microphone. The hard part is to guess, or empirically try, if the microphone **requires a bias current**, if the Android device is provinding such a current and if the microphone produces a sufficient **output level** (actually a voltage in the order of the millivolts) that can be used by the device.
 +
 +===== Electrical compatibility and hardware autodetection =====
 +
 +As stated above, the first problem is **powering the microphone** itself, because generally we will use an **electret** one. It is a **common practice** to provide the power on the same line of the microphone signal, so **requiring just two wires** for both power (from the device to the mic) and for signal (from the mic to the device). The power, also called //bias current//, is generally in the range of **2.5** to **5.0 volt**.
 +
 +On a Xiaomi Mi A1 smartphone, which has a **TRRS 3.5 mm jack, CTIA standard**, we measured a bias current of **2.19 volt** between the microphone (sleeve) and the ground (ring).
 +
 +Another parameter which should be considered is the **impedence** FIXME
 +
 +===== Software capabilities and settings =====
 +
 +FIXME Complete the article!
 +
 +Wishing to connect the **UHF microphone** to an **Android smartphone**,​ we prepared an **adapter cable**. From 3.5 mm jack TRRS male to 1/4" jack TS female, with this pinout:
 +
 +^ 1/4" TS female jack  ^ Signal ​        ^ 3.5 mm TRRS male jack (CTIA) ​ ^
 +|                      | Not connected ​ | **Tip** ​                      |
 +|                      | Not connected ​ | **Ring** ​                     |
 +| **Sleeve** ​          | Ground ​        | **Ring** ​                     |
 +| **Tip** ​             | Microphone ​    | **Sleeve** ​                   |
 +
 +The smartphone **did not sensed the microphone**,​ there is not much documentation about it, but it seems that the **autodetection** of the microphone is **based upon the impedence** of the mic itself, if it is too low, it is not detected.
 ===== Web References ===== ===== Web References =====
  
Line 177: Line 215:
   * [[https://​forum.xda-developers.com/​showthread.php?​t=2072612|External Mic on Galaxy Devices]]   * [[https://​forum.xda-developers.com/​showthread.php?​t=2072612|External Mic on Galaxy Devices]]
   * [[https://​stackoverflow.com/​questions/​19255908/​android-forcing-external-microphone-jack-input-3-5mm-to-stay-on|Android:​ Forcing external microphone (jack input 3.5mm) to stay on]]   * [[https://​stackoverflow.com/​questions/​19255908/​android-forcing-external-microphone-jack-input-3-5mm-to-stay-on|Android:​ Forcing external microphone (jack input 3.5mm) to stay on]]
 +  * [[https://​forum.xda-developers.com/​showthread.php?​t=1042051|App that turns off microphone AGC (Auto-Gain Control)?]]
 +  * [[https://​stackoverflow.com/​questions/​47394634/​difference-between-voice-communication-and-mic-in-mediarecorder-audiosource|Difference between VOICE_COMMUNICATION and MIC in MediaRecorder.AudioSource]]
 +  * [[https://​stackoverflow.com/​questions/​47359587/​what-is-the-best-audiosource-setting-for-calls|What is the best audiosource setting for calls?]]
 +  * [[https://​amp.reddit.com/​r/​androidapps/​comments/​4wo8sz/​app_to_force_android_to_use_external_microphone/​|App to force android to use external microphone when one is plugged in]]
doc/appunti/linux/audio/audio_recording.1555965592.txt.gz · Last modified: 2019/04/22 22:39 by niccolo