Stereo MIC Audio Input

Is it possible to use MIC2_P and MIC3_P at the same time as stereo input, also are they capable of taking Line-in rather than being attached to a mic?

The basic difference between a line in and a microphone in is the presence of a bias voltage on the microphone that isn’t present on the line.

Now going completely from memory here (I haven’t worked on a db410 in a couple of years), the bias is provided on a separate pin on the audio header rather than actually being connected. That would mean that they actually are configured as line in rather than microphone… But test with a voltmeter or check the schematics to confirm.

The one other thing to check on is the voltage level that the pins can safely receive. If they aren’t configured to be able to take a full line level then you may need some resistors or you will get some really bad clipping.

For your other question… The answer is ultimately yes, you can use two mono inputs as stereo. But depending on how the sound drivers are designed, they could be set up as separate inputs, in which case you may need to do some Alsa magic to join them together as a stereo source.

Hi @ric96

I will agree with what @doitright has said.

A true audio input is designed to receive up to 2Volts RMS signals, these signals swing between -1.6V and +1.6V, and most stereo equipment is designed to accept signals between +2V and -2V. The nominal impedance of an audio input is typically 47k Ohms, but sometimes as high as 100k Ohms, and sometimes as low as 22k Ohms.

The audio inputs on the PM8916 chip are designed to accept signals centered at 0.9Volts and with a swing of about 10 millivolts and the expected impedance of the microphone circuit is about 1.1k Ohms. You can reduce the microphone gain to allow the PM8916 to accept signals of about 300millivolts, but in general the PM8916 cannot directly accept the full line level input range.

Fortunately it is quite simple to create a circuit that will 1) reduce the voltage level, 2) shift the DC level, and 3) present the acceptable impedances to both sides of the circuit. Bias_Circuit

All we need to do is select the values of the resistors and the capacitor.

First we compute the the maximum the signal could be reduced, this is from 2Volts down to 10millivolts or a ratio of 200 to one, of course less reduction would be better to keep the signal level up and help reject noise. The minimum reduction we can live with is 2V down to 300mV or 6 to one. Any reduction in this range is acceptable.

Next we need to compute resistors R2 and R3, this is easy, any two equal value resistors would present a 0.9V DC level into the PM8916 and if we were to select 2.2k Ohms then the 1.1k Ohms input impedance would be almost exactly right (the 1.1k will be slightly reduced by R1). Since we know that the impedance will be slightly reduced by R1 we should select the next standard value higher than 2.2k Ohms, this is 2.7k Ohms. giving a input impedance of less than 1.35k Ohms to the PMIC.

Next compute R1, ideally we would like a 47k Ohms input impedance. If we select a 47kOhm resistor for R1 then the input impedance will be 47k+1.35k=48.35k Ohms which is very close to our target. The voltage division ratio ratio will be 47/1.35 = 34.8 to one which is inside the acceptable range. However it is better to lower the input impedance for two reasons 1) to reduce the thermal noise from the resistors, and 2) to keep the input signals as high as possible to reduce noise pickup. For these reasons I am going to suggest that selecting 22kOhms for R1 would be better, it still presents a reasonable impedance to the line input (23.35k Ohms) and improves the division ratio to 22k/1.35k = 16.3 to one.

Finally we need to select a value for C1. The resistors and C1 form a classic RC highpass filter, for audio we would normally select a corner frequency for the filter of just under 20Hz. The resistance in the RC filter is 23.35k Ohms, and the formula is Fc = 2 Pi /RC, where Fc is the cutoff frequency, Pi is the well known constant, and R is 23.35k. Solving for C we find a value of 13.5uF would work well, any larger capacitance would lower the cutoff frequency which acceptable. The closest standard value is 15uF, although 22uF would also be fine.

For the resistors, almost any composition resistor is fine for audio, however metal foil are usually considered best because their thermal noise levels are closest to the theoretical minimum. For the capacitor it is cheapest to use a non-polarized electrolytic capacitor, a ceramic capacitor is acceptable, a metalized polymer capacitor is best, and a tantalum capacitor is not recommended in this application.

Full Disclosure: I am currently an employee of Qualcomm Canada and any opinions I may have left in this or any other post do not necessarily match the opinions of my employer. As of May 22nd/2018 I will no longer be employed by Qualcomm Canada. Currently looking for new opportunities, you can contact my personal email through the forums at 96Boards.

1 Like

@ljking Man… THANKS for the detailed reply. Really helpful. This should make for a good project and what I have in mind. I’ll get to trying this solution and get back.

THIS WORKS!!! better than expected…
there is some minimal background noise, but i suspect thats just the audio source itself…
I’ve just tried the mono mic input but, stereo input should be easy.
Thanks again! :slight_smile:

1 Like