TLV320AIC3101: TLV320AIC101 Codec Chip. Issue with MICBIAS.

Part Number: TLV320AIC3101

Tool/software:

Hi
We have in issue to get mic working from long range distance, we are able to capture voice within 10cm only.

Bellow are the register values 
root@imx8mp-lpddr4-evk:~# i2cdump -y -f 2 0x18                                                                                                                                                                    
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 00 00 00 20 04 00 00 0a 00 00 00 c1 f0 00 00 20    ... ?..?...??..
10: 20 ff ff 04 78 78 04 78 78 06 7f fe 00 00 fe 00     ..?xx?xx???..?.
20: 00 00 00 00 cc 00 00 00 40 80 00 80 80 00 00 80    ....?...@?.??..?
30: 00 00 00 9c 00 00 80 00 00 00 9c 00 00 00 00 00    ...?..?...?.....
40: 80 9c 00 00 00 00 00 80 9c 00 00 80 00 00 80 98    ??.....??..?..??
50: 00 00 80 00 00 00 98 00 00 00 00 00 80 98 00 00    ..?...?.....??..
60: 00 00 00 00 00 01 02 00 00 00 00 00 00 00 00 00    .....??.........
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
80: 00 00 00 20 04 00 00 0a 00 00 00 c1 f0 00 00 20    ... ?..?...??..
90: 20 ff ff 04 78 78 04 78 78 06 7f fe 00 00 fe 00     ..?xx?xx???..?.
a0: 00 00 00 00 cc 00 00 00 40 80 00 80 80 00 00 80    ....?...@?.??..?
b0: 00 00 00 9c 00 00 80 00 00 00 9c 00 00 00 00 00    ...?..?...?.....
c0: 80 9c 00 00 00 00 00 80 9c 00 00 80 00 00 80 98    ??.....??..?..??
d0: 00 00 80 00 00 00 98 00 00 00 00 00 80 98 00 00    ..?...?.....??..
e0: 00 00 00 00 00 01 02 00 00 00 00 00 00 00 00 00    .....??.........
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
root@imx8mp-lpddr4-evk:~# 

After setting i2cset -y -f 2 0x18 0x19 0x40  voltage at micbias is 2v 

root@imx8mp-lpddr4-evk:~# i2cdump -y -f 2 0x18
No size specified (using byte-data access)
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 00 00 00 20 04 00 00 0a 00 00 00 f1 f0 00 00 20 ... ?..?...??..
10: 20 ff ff 00 78 78 00 78 78 46 7c fe 00 00 fe 00 ...xx.xxF|?..?.
20: 00 00 00 00 00 c0 00 00 40 80 00 00 00 00 00 80 .....?..@?.....?
30: 00 00 00 9f 00 00 80 00 00 00 9f 00 00 00 00 00 ...?..?...?.....
40: 80 9f 00 00 00 00 00 80 9f 00 00 80 00 00 80 9b ??.....??..?..??
50: 00 00 80 00 00 00 9b 00 00 00 00 00 80 9b fe 0c ..?...?.....????
60: 00 00 00 00 00 01 02 00 00 00 00 00 00 00 00 00 .....??.........
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
80: 00 00 00 20 04 00 00 0a 00 00 00 01 f0 00 00 20 ... ?..?...??..
90: 20 ff ff 00 78 78 00 78 78 46 7c fe 00 00 fe 00 ...xx.xxF|?..?.
a0: 00 00 00 00 00 c0 00 00 40 80 00 00 00 00 00 80 .....?..@?.....?
b0: 00 00 00 9f 00 00 80 00 00 00 9f 00 00 00 00 00 ...?..?...?.....
c0: 80 9f 00 00 00 00 00 80 9f 00 00 80 00 00 80 9b ??.....??..?..??
d0: 00 00 80 00 00 00 9b 00 00 00 00 00 80 9b fe 0c ..?...?.....????
e0: 00 00 00 00 00 01 02 00 00 00 00 00 00 00 00 00 .....??.........
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................



DTS configuration is bellow 
 152         sound-tlv320aic310x {
 153                 compatible = "simple-audio-card";
 154                 simple-audio-card,name = "sound-tlv320aic310x";
 155                 simple-audio-card,format = "i2s";
 156                 simple-audio-card,bitclock-master = <&cpudai2>;
 157                 simple-audio-card,frame-master = <&cpudai2>;
 158                /* simple-audio-card,mclk-fs = <256>;*/
 159                 simple-audio-card,widgets =
 160                         "Microphone", "Microphone Jack",
 161                         "Line", "Line In Jack",
 162                         "Line", "Line Out Jack",
 163                         "Headphone", "Headphone Jack",
 164                         "Speaker", "Speaker External",
 165                         "Line", "POTS Line In",
 166                         "Line", "External Mic";
 167                 simple-audio-card,routing =
 168                         "Headphone Jack", "HPLOUT",
 169                         "Headphone Jack", "HPROUT",
 170                         "LINE2R", "POTS Line In",
 171                         "Line Out Jack", "LLOUT",
 172                         "Line Out Jack", "RLOUT";
 173
 174                 cpudai2:simple-audio-card,cpu {
 175                                 sound-dai = <&sai3>;
 176                                 clocks = <&clk IMX8MP_CLK_SAI3_ROOT>;
 177                                 dai-tdm-slot-num = <2>;
 178                                 dai-tdm-slot-width = <32>;
 179                                 dai-tdm-slot-tx-mask = <0 0 0 0 0 0 0 0>;
 180                                 dai-tdm-slot-rx-mask = <1 1 1 1 0 0 0 0>;
 181                         };
 182                 simple-audio-card,codec {
 183                                 sound-dai = <&codec>;
 184                                 /*clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIO_BLK_CTRL_SAI3_MCLK1>; */
 185                                 clocks = <&clk IMX8MP_CLK_SAI3_ROOT>;
 186                         };
 187           };
  721           codec: codec@18 {
 722                  #sound-dai-cells=<0>;
 723                  pinctrl-names = "default";
 724                  pinctrl-0 = <&pinctrl_tlv320>;
 725                  compatible = "ti,tlv320aic3x";
 726                  reg = <0x18>;
 727                  reset-gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
 728                  ai31xx-micbias-vg = <MICBIAS_2_0V>;
 729                /*  ai31xx-micbias-vg = <MICBIAS_AVDDV>; */
 730                  IOVDD-supply = <&buck5>;
 731                  DVDD-supply = <&buck5>;
 732                  AVDD-supply = <&buck4>;
 733                  DRVDD-supply = <&buck4>;
 734          };
 735
 930 &sai3 {
 931          #sound-dai-cells = <0>;
 932          pinctrl-names = "default";
 933          pinctrl-0 = <&pinctrl_sai3>;
 934          assigned-clocks = <&clk IMX8MP_CLK_SAI3>;
 935          assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>;
 936          assigned-clock-rates = <24576000>;
 937          clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIO_BLK_CTRL_SAI3_IPG>, <&clk IMX8MP_CLK_DUMMY>,
 938                   <&audio_blk_ctrl IMX8MP_CLK_AUDIO_BLK_CTRL_SAI3_MCLK1>, <&clk IMX8MP_CLK_DUMMY>,
 939                   <&clk IMX8MP_CLK_DUMMY>, <&clk IMX8MP_AUDIO_PLL1_OUT>, <&clk IMX8MP_AUDIO_PLL2_OUT>;
 940          clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3", "pll8k", "pll11k";
 941          fsl,sai-mclk-direction-output;
 942         /*fsl,sai-synchronous-rx;*/
 943          status = "okay";
 944  };
 945
 1304         pinctrl_tlv320: tlv320grp {

1305                   fsl,pins = <
1306                           MX8MP_IOMUXC_GPIO1_IO10__GPIO1_IO10     0x00
1307                   >;
1308           };
1309
1310         pinctrl_sai3: sai3grp {
1311                 fsl,pins = <
1312                         MX8MP_IOMUXC_SAI3_TXFS__AUDIOMIX_SAI3_TX_SYNC   0xd6
1313                         MX8MP_IOMUXC_SAI3_TXC__AUDIOMIX_SAI3_TX_BCLK    0xd6
1314                         MX8MP_IOMUXC_SAI3_RXD__AUDIOMIX_SAI3_RX_DATA00  0xd6
1315                         MX8MP_IOMUXC_SAI3_TXD__AUDIOMIX_SAI3_TX_DATA00  0xd6
1316                         MX8MP_IOMUXC_SAI3_MCLK__AUDIOMIX_SAI3_MCLK      0xd6
1317                         MX8MP_IOMUXC_SAI3_RXFS__GPIO4_IO28              0xd6
1318                         MX8MP_IOMUXC_SAI3_RXC__GPIO4_IO29               0xd6
1319                 >;
1320         };


is there any configuration need to be down to capture from long rang distance.? at least from 25cm. 

  • Hi,

    If it's working at 10cm, it shows the configuration is correct. 

    Is the MIC at 25cm or the source at 25cm, but the MIC is mounted on the board?

    Maybe all is needed is added amplification which you can set in register 15 for PGA Gain.

    Regards.

  • how do i set this in driver tlv320aic3x.c  i2cset -y -f 2 0x18 0x19 0x40 voltage at micbias is 2v

  • when i set the mic-bias with 40,


    with the above setting i am not able get the audio/mic from Bluetooth headphone even it is paired connected.

    is there any wrong  with the register settings? 

     

  • Why do you need to change the micbias voltage? How do you connect your mic? Isn't it working at 10cm?

    The configuration is the same for any distance, so if it's working at 10cm, it should work for 25cm but maybe with lower signal, so it needs amplification.

  • Hi pdjuandi,

    Thank you for your response, Mic issue got resolved. 

    But we have issue with speaker, we have connected two speakers across, right speaker working fine, but left speaker not able listen when i set to full volume some low music able here, below is the ckt and i2c dump.
      

  • Hi,

    You have set 0x2C to 0x10. The MSB of this register controls the mute. You have the right DAC muted while the left channel (0x2B) is unmuted. I'm also noticing you have the left channel directly connected to the HP outputs, but the right channel is going through the volume mixer. I would double check your settings to make the right and left channels have the same settings.

    Best regards,
    Jeff McPherson