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.

TLV320AIC3256: Switching between ADC processing blocks on the TLV320AIC3256

Part Number: TLV320AIC3256

Hello,

I am working on the following design where I have an analog mic and a digital mic interfaced to the codec. I am sampling both the mics at 32kHz. Currently I am making use of the LeftAGC registers to implement AGC for the analog mic  and using miniDSP SW AGC block (via PPS model) for the digital mic AGC. For the analog mic, I am using PRB_R2 and for the digital mic I am using miniDSP_A. In my design, I switch between the mics and for that I am switching between ADC processing blocks in my code. The digital mic seems to work well since I am getting audio recorded and the AGC works as well. However the analog mic nor the AGC is functional.
I would like to know if switching between processing blocks is something that is possible (would require more details on this), considering factors like reprogramming time.

Thank you!

Best,

Santhosh

  • Hi Santhosh,

    Switching between two processing blocks is allowed but would need some reprogramming, as you suspected.

    The sequence would be to power down the ADC, update the processing mode and any other coefficient writes associated with the processing mode and then power up the ADC.

    The coefficients would have to be reprogrammed because different the coefficient memory is shared across different processing blocks.

    If you need a run-time switch between the two channels, then you would have to use a process flow with both channels enabled and mux to select the output at run-time. It can be done with a single coefficient update and so the switching can be done with minimal delay.

    Diljith

  • Hi Diljith,

    Thank you for confirming that. I am following the said sequence and updating the required coefficients.  I have a couple of follow up questions to this.

    1. I need the flow where my left input channel (analog mic) is directly routed to the I2S LEFT output and the right input channel (digital mic) is routed to the I2S RIGHT after passing through SW AGC block.  In such a scenario, would we still be able to make use of the hardware AGC registers for performing AGC? 

    2. Follow up question : If I am to attempt run-time switching, would I be using a mono mix (2:1) where the output is always coming out of the left I2Schannel? If yes, which coefficient would I be updating. I attempted a process flow where I routed my left and right input channels to a mono mix and connected it to the mono I2S out. I attempted switching by reprogramming the miniDSP coefficients ( because I observed 2 differences in the generated code when having different mux input selected). For some reason, only the analog mic seems to work but not the digital mic in this case.

      Please let me know if any more information is required.

    Best,

    Santhosh

  • Hi Santhosh,

    The hardware AGC can be used with the analog microphones but not with the digital microphone. The hardware AGC modulates the PGA to keep the signal level constant and the PGA is only available in the analog microphone path. For digital mics software AGC is the only option. For analog microphones either of the two AGCs can be selected.

    Do you have a working process flow with analog mic routed to left I2S channel and digital microphone routed to right I2S channel? Adding the mux and S/W AGC on top of this flow would be relatively easy once you have the above mentioned flow working. 

    Diljith

  • Hi Diljith, 
                  I now have a working process flow with a SW AGC on the digital mic (right input) routed to the right I2S output  channel and the analog mic (left input) routed to the left I2S output channel. My earlier implementation had a bug and I fixed it. With this, the process block change and mic switching is working.

     At this stage, my only concern is the down time/artifacts when switching between mics. I am observing some artifacts when disconnecting the analog mic and connecting it fora bout 0.5 to 1.5s worst case.

    Would the run time switch using a mux help to decrease this and apart from adding the mux, what should be done (which coefficients must be handled/changed ? and which mux is to be used ?). Thank you!

    Best,

    Santhosh

  • Hi Santhosh,

    Run time switch can eliminate the artifacts. You can put a digital volume control at the output of the left and right channels. The MUX (a 2:1 mux would suit this purpose) can be placed after Volume control. You can use the following sequence from the host to eliminate the artifacts.

    Mute the currently active channel --> delay --> switch mux --> unmute the new channel.

    This will ensure that there are no transients in any channel while switching the mux.

    Diljith