• TI thinks resolved

TLV320AIC3106: How to set the TLV320aic3106 to cut down the input through the software setting ?

Part Number: TLV320AIC3106

How to set the TLV320aic3106 to not connected , I use the TLV320AIC3106 as several input switch mode, that inclode 1/ line2r single ended ,2/line2L differential  3/mic3L three mic input ,when i set the register as not connected ,it is could get audio date from audio recorder .such as , i set page0/register17 11111111,it also could get audio date from audio recorder software , if i could cut down the connect through the how could set not connected through software setting? if can not ,how could i cut down the recorder ?

  • Hi Andrew,

    I'm not sure I understand your question.
    If you set page 0 register 17 to 11111111, Mic3L and Mic 3R will be disconnected.
    the inputs can be mixed using R17-R24

    all of the Analog signals get mixed, go through the PGA, and then can be sent directly to the analog outs, but once they go through the ADC the only place they can go is the DOUT.
    so if you want to mix a digital signal from another source, you would have to do that in an external DSP, or something similar. The AIC3106 doesn't support mixing two digital signals

    I hope I understood you correctly, and was able to answer your question, but if not please let me know.
    best regards,
    -Steve Wilson
  • In reply to Steve-Wilson:

    Hi Steve,

    What Andrew mean is we had tried to set page 0 register 17 to 11111111 for Mic3L and Mic 3R, but we found that the input was still work.
    and when we had been disconnected other route just like Line2L , Line2R and so on. The MIc3L and Mic 3R are disconnected successfully. So
    we want to know, if we need to set other registers when disconnecting Mic3L and Mic3R other than set only register 17 to 11111111.
    This problem had been found when we tried to disconnect other input routes.
    so please help analysis this problem.

    best regards
    Fans
  • In reply to user5220335:

    Hello Fans,

    are you certain that you are writing to the correct registers? MIC3L/R is controled with Registers 17 and 18 (left and Right ADC) so you will have to write 0xFF to both if you want to totally disconnect.

    I Just tested on an EVM at my desk and when I set Register 17 and 18 to 0xFF, Mic 3 is off.

    best regards,
    -Steve Wilson
  • In reply to Steve-Wilson:

    Hi Steve,

    If there are some problem on hardware device, today we find some of boards are ok, but some others are not.

    We tried to read the registers from these  boards, the reg value are correct, but the actual results are not.

    Best Regards

    Fans

  • In reply to user5220335:

    Hello Fans,

    I've sent you a connection request, perhaps we can get more details on your application... schematics/layout that sort of thing and see if we can get to the bottom of this. Obviously this is not standard behavior.

    best regards,
    -Steve
  • In reply to Steve-Wilson:

    Fans,

    I wanted to check back in with you regarding your problem, as I have not heard from you. Are you still experiencing the same problem? The way that you have described the problem tells me that there is a problem somewhere, as this is not standard behavior for this device, the more information I can get from you the more likely it is that I can help you solve it. let me know if I can be of assistance.
    best regards,
    -Steve Wilson
  • In reply to Steve-Wilson:

    if you can send me your register configurations I can perhaps find what the problem is.

    best regards,
    -steve
  • In reply to Steve-Wilson:

    Hi Steve,
    the following code is used to set input mode, I disconnect all of the inputs firstly, and then set the required input mode via the parameter "int type" of function setAudioInput.

    Best Regards
    Fans


    151 void resetInput() 152 { 153 int ret = -1; 154 155 i2c_write(17, 0xff); //front mic2 156 i2c_write(18, 0xff); //front mic1 157 i2c_write(19, 0xff); //front mic4 158 i2c_write(20, 0xfc); //micphone 159 i2c_write(22, 0xff); //front mic3 160 i2c_write(23, 0xfc); //line in 161 162 //usb mic 163 ret = init_mixer("2"); 164 if(!ret) 165 { 166 setUsbAISwitch(0); 167 close_mixer(); 168 }
    169 } 170 171 void setAudioInput(int type) 172 { 173 char value[4] = {'\0'}; 174 int ret = -1; 175 176 if(type > 3 || type < 0) 177 { 178 ALOGE("set input type invalid\n"); 179 return; 180 } 181 182 ALOGI("reset all input first\n"); 183 resetInput(); 184 185 ALOGI("start to set input type\n"); 186 switch (type) { 187 188 case USB_MIC: 189 ret = init_mixer("2"); 190 if(!ret) 191 { 192 setUsbAISwitch(1); 193 close_mixer(); 194 } 195 break; 196 case FRONT_MIC: 197 i2c_write(17, 0x0f); //MIC3L MIC2 198 i2c_write(18, 0x0f); //MIC3R MIC1 199 i2c_write(19, 0x07); //LINE1LP MIC4 200 i2c_write(22, 0x07); //LINE1RP MIC3 201 break; 202 case LINE_IN: 203 i2c_write(23, 0x4); //line2r to right adc single_end mode; biased; 204 break; 205 case MICPHONE: 206 i2c_write(20, 0x84); //line2lp & line2lm differential mode; biased; 207 break; 208 default: 209 ALOGE("unknown input type\n"); 210 } 211 212 sprintf(value, "%d", type); 213 property_set("persist.sw.input.type", value); 214 215 }



  • In reply to user5220335:

    Fans,

    There is an Error in your code

    Line 198 should read  i2c_write(18, 0xf0)

    register 17 has controls for both MIC3L and Mic3R.   so if you write 0x0F to register 17,  Mic3L will be connected to the LEFT PGA mix with input gain =0dB and Mic3R will be disconnected from the LEFT PGA mix

    register 18 has controls for both MIC3L and MIC3R.  so if you write 0x0F to register 18  Mic3L will be connected to the Right PGA mix with input gain =0dB and Mic3R will be disconnected from the Right PGA mix

    if you want to turn on and off MIC3R to the Right PGA mix,  you need to write 0xF0 to register 18. 

    does that makes sense?

    best regards, 

    -STeve

  • In reply to Steve-Wilson:

    Hi Steve,

    Ok, I'll modify this error in my code,

    But there is another problem about these audio inputs control. If I tried to turn on another audio input(e.g. LINE_IN input) via coding, then MIC3R and MIC3L would be disconnected via setting i2c registers 17 and 18 to 0xff, but I found MICR and MICL were still work. I'm sure that I had unplugged other physical devices(e.g. LINE_IN input devices) except this mic which had been connected to MIC3R and MIC3L. I tried to read registers 17 and 18 , the values had been set to 0xff, but  I can record audio from it., I don't konw why this mics are still work,

    Best Regards

    Fans