TI E2E Community
OMAP™ Applications Processors
OMAP 4 Forum
How to enable Analog Mic for OMAP 4430 on interfaced with Main Mic.
On OMAP4 platform We are using Analog Mic and it is connected to TWL 6040 Main Mic interface. 3.7 volt supply is given at VDDABIAS pin.we are not getting 2.3 volt at MBIAS pin. Niether we are receiving any signals on the pins MMICP nor MMICN,
How to configure MBIAS pin??
How do we enable Main Mic working?? We are testing the MIC by running sound recorder, we are not receiving the signals on this pins.
Please help me regarding this.
That is because you are not turning on the LDO that goes to MBIAS pin.
Turn on MBIAS by setting bit MMICBENA in the AMICBCTL register.
To enable the LDO we are writing these values in the registers, TWL6040_REG_MICLCTL = 0x0F TWL6040_REG_MICRCTL = 0x0F TWL6040_REG_MICGAIN = 0x24 TWL6040_REG_AMICBCTL = 0x1B Even after writing these values we are not getting voltage on MBIAS. Is these register values written are correct to turn on the LDO ? res = twl6040_write(codec,TWL6040_
To test twl6040 mic I set all this values:
omapconf twl6040 write NCPCTL 0x81omapconf twl6040 write LDOCTL 0x45omapconf twl6040 write LPPLLCTL 0x01omapconf twl6040 write ACCCTL 0x01omapconf twl6040 write AMICBCTL 0x10omapconf twl6040 write MICLCTL 0x0Domapconf twl6040 write MICGAIN 0x00
Are you missing any?
the codec is at sound/soc/codec/twl6040.c in kernel
We have written the register values as mentioned, Once the kernel comes up we are not able to see the voltage on MBIAS pin. We observe that when we write these values we are able to see the voltage is going high on this pin, and comes back to low, We think Power Management for TI may be resetting this LDO? Are there any modules which can reset these registers?
Please find the log attached.
Awaiting your response.
There are two possible causes for this:
1) The audio driver turns it off when it is not needed. If the system boots and then you set the values using something like omapconf it should continue turned on, but if you use an application that tries to record and then close it it will turned off again. All this is calling the driver in the Audio HAL.
2) You are causing a "short circuit". TWL6040 bias has short circuit protections, when it detect something is consuming more current that in the specifications, it will turn it off (See AMICBCTL register bit HMICBSCDIS:3). You can disable that protection, but it is not recommended. If you need more power, you can use the external bias to boost the LDO. See:
4.2 Microphone Bias OutputsTwo LDOs provide an external voltage of 2.1 V to bias analog microphones (MBIAS and HBIAS). Themaximum output current is 2 mA for each analog bias, allowing up to two microphones on one bias. FullPSR performance is not ensured when the battery voltage is less than 2.5 V. If full performance must bemaintained down to the minimum battery level, the supply of these two LDOs can be connected to anexternal boost, also used for other functions.
After setting the values mentioned above we are able to get the voltage on MBIAS pin when we start the recorder application.
But we are not seeing any voltage variations on MMICP and MMICN pins, moreover we are not able to listen any thing from MIC.
Will there be any voltage fluctuations on these pins or not while recording?
Do we foresee any hardware MIC issue here, or do we have to do some more configuration with respect to software for getting the MIC work (Since the voltage is coming on the MBIAS pin )
Really stuck on this, looking forward for your inputs.
Are you measuring the voltage between MMICP and MMICN?, there should be some variations if you have your circuit connected correctly.
The theory is that with the bias you are powering your circuit, then you are able to get some signals in the MMICP/N pins due to the variation on the air pressure in the mic, that signals goes inside the TWL6040 where is amplified and the analog to digital conversion is carried out.
Hi Israel, We are getting the MBAIS voltage but we are not getting the default 1.8 DC voltage high on the MMICP pin, Do we have to configure any registers to get the voltage on this pin also? We checked on the BLAZE board and we are getting the 1.8 Volt DC on MMICP.(Our board is the reference of blaze board) Or just MBIAS voltage configuration is enough to get the voltage on MMICP pin. Looking forward for your response. ThanksAbhijit
MMIP pin is an input, so the voltage you are seeing there is because the external circuitry in the blaze, the way how all this pins are connected is basically with some resistors and capacitors to power the MIC using MBIAS, and from there get some lines that go to MMICP/N pins, those lines has some offset value if you take GND as reference, but what TWL6040 cares is the voltage variation between these pins. For example and values of the external components is better to take a look into TWL6040 datasheet.
Finally Mic is working for us .
Thanks a lot for your valuable inputs.
Good to read that it is working now. Was it the connection?
Also, can you please verify the answer?, that will help us to focus on the post are not resolved yet. Thanks
There was a connection problem but your register values helped a lot.
I am working on DM3730 processor. I need to enable Mic and record voice data.
My speaker is working fine. Speaker and Mic both are connected to TPS65950 chip.
I am using the following command to enable speaker
amixer cset name='HeadsetL Mixer AudioL2' offamixer cset name='HeadsetR Mixer AudioR2' offamixer set HandsfreeL onamixer set HandsfreeR onamixer set 'HandsfreeL Mux' AudioL2amixer set 'HandsfreeR Mux' AudioR2
then aplay file.wav .
Plz help me what is the command to enable Mic and playback recorded data again.
The audio architecture in omap3 is different to the one in omap4, it would be better if you ask in an omap3 forum where there is people that can help you.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.