This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TWL6041 MIC Enable

Other Parts Discussed in Thread: TWL6040

Hi

I did surf around this forum for similar topic and I did found out one: http://e2e.ti.com/support/omap/f/849/p/187834/681305.aspx#681305

But I do not understand how to apply this modification.

I hope someone can help me for the following:

1. Enable MBIAS ( there is a voltage supply to VDDMBIAS)

2. Enable Primary & Secondary Mic input

The source code I am using is based on 4AI.1.4-P1. Can anyone help me here?

  • Hi,

    I did try to enable by following the above link. and here is my code:

    I was referring to the following values:

    omapconf twl6040 write NCPCTL 0x81
    omapconf twl6040 write LDOCTL 0x45
    omapconf twl6040 write LPPLLCTL 0x01
    omapconf twl6040 write ACCCTL 0x01
    omapconf twl6040 write AMICBCTL 0x10
    omapconf twl6040 write MICLCTL 0x0D
    omapconf twl6040 write MICGAIN 0x00

    sound/soc/codecs/twl6040.c

    /*
    * twl6040 register cache & default register settings
    */
    static const u8 twl6040_reg[TWL6040_CACHEREGNUM] = {
    0x00, /* not used 0x00 */
    0x4B, /* TWL6040_ASICID (ro) 0x01 */
    0x00, /* TWL6040_ASICREV (ro) 0x02 */
    0x00, /* TWL6040_INTID 0x03 */
    0x00, /* TWL6040_INTMR 0x04 */
    //0x00, /* TWL6040_NCPCTRL 0x05 */
    0x81, /* TWL6040_NCPCTRL 0x05 */
    //0x00, /* TWL6040_LDOCTL 0x06 */
    0x45, /* TWL6040_LDOCTL 0x06 */
    0x60, /* TWL6040_HPPLLCTL 0x07 */
    //0x00, /* TWL6040_LPPLLCTL 0x08 */
    0x01, /* TWL6040_LPPLLCTL 0x08 */
    0x4A, /* TWL6040_LPPLLDIV 0x09 */
    //0x00, /* TWL6040_AMICBCTL 0x0A */
    0x10, /* TWL6040_AMICBCTL 0x0A */
    0x00, /* TWL6040_DMICBCTL 0x0B */
    //0x18, /* TWL6040_MICLCTL 0x0C - No input selected on Left Mic */
    0x0D, /* TWL6040_MICLCTL 0x0C
    0x18, /* TWL6040_MICRCTL 0x0D - No input selected on Right Mic */
    0x00, /* TWL6040_MICGAIN 0x0E */

    ....

    0x09, /* TWL6040_ACCCTL 0x2D */


    Please help

  • The driver is dynamically changing the value of the registers, so doing that at code could be complex, I think would be better to use omapconf tool to do it at run time.