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.

TLV320AIC3111: Analog In to speaker out with miniDSP

Part Number: TLV320AIC3111
Other Parts Discussed in Thread: TLV320AIC3254

Tool/software:

Hi :

I want to use TLV320AIC3111 to achieve audio flow below:

As I confirmed with datasheet, It should be OK.

But I have some question to confirm:

1. I think flow 1 &3 can use MIniDSP, but can flow 2.2 use MiniDSP too? If not, Do TI have any codec support this?

2. Flow 2.1(analog in to i2s out) should be mono for TLV320AIC3111. If I want to stereo, can TLV320AIC3254 + AMP achieve same flow(1+2.1+2.2+3)?

3. It will be better flow1 flow2.1 flow2.2 flow3 can use MiniDSP and flow1 flow2.1 flow2.2 flow3 is stereo, Do TI have any codec support this?

I use one cell battery(4.2V max) for my system and it will better that battery connect to codec directly.

  • Hi,

    You should not need miniDSP for any of your flows here. Our codecs typically work by converting analog audio in to I2S out and I2S in to analog out - this device has an integrated speaker driver so you can do I2S in to speaker out. This codec also has a path to send mic input directly to the speaker or headphone out mixes, this is called an analog bypass because it bypasses the ADC/DAC and sends the analog input directly to an analog output with no digital conversion. You would only use miniDSP to integrate effects and real time DSP you needed on the digital audio, or if you wanted to do a digital bypass (I2S in to I2S out, without using direct wire connections to do this). So, to configure your different flows, you can do I2C writes. I would recommend that you use the SLAC289 EVM software https://www.ti.com/tool/download/SLAC289 to configure and write the I2C for you, or check the datasheet. The speaker driver on the AIC3111 is stereo, so your flow 3 will work in stereo as well.

    Your 4.2V battery should be fine for the speaker driver power (SPLVDD/SPRVDD) but will be too high for AVDD, DVDD, and IOVDD, as shown in the datasheet here. You might be able to implement a voltage divider or other power circuit to power those with their expected voltages as well if you wanted.

    Let me know if you have more questions or need help with the specific config.

    Best,
    Mir

  • Hi :

    I will use DCDC to generate 3.3V(MCU and other peripheral devices will use this too) and LDO for 1.8V, is it OK?

    I need MIniDSP to calculate input level(for lighting) and make PEQ for both I2S in and analog in. Also, I need detect environmental noise, that is why I need flow1 flow2.2 flow3 can use MiniDSP, so do you mean flow2.2 can't use MiniDSP?

    I have used 3111 EVM and SLAC289 to configure flow, and it seems fine. but I want to get higher performance, so can you confirm question below again:

    2. Flow 2.1(analog in to i2s out) should be mono for TLV320AIC3111. If I want to stereo, can TLV320AIC3254 + AMP achieve same flow(1+2.1+2.2+3)?

    3. It will be better flow1 flow2.1 flow2.2 flow3 can use MiniDSP and flow1 flow2.1 flow2.2 flow3 is stereo, Do TI have any codec support this?

  • Hi,

    Yes that power will be alright. Makes sense if you need to calculate things with miniDSP, sorry I didn't know. The AIC3254 should work for stereo ADC use case, and yes another chip for the amp, TI has many low power class D amps that you could use here. And, the AIC3254 has miniDSP as well. 

    If you wanted a stereo one-chip solution to getting your three flows including a speaker amplifier and miniDSP, you can look into the AIC3262, AIC3263, or AIC3268. These would be the only other chips with stereo ADC, miniDSP, and a speaker amplifier. However, these are bigger parts with more pins and features. The AIC3254 is the only other chip that is 32 pin and supports miniDSP and stereo ADC, but lacking the speaker amp. Your desired flows should work on any of these chips.

    Best,
    Mir

  • Hi :

    We don't want to use AIC3262, AIC3263 because of the BGA package.

    So do you mean flow2.2 can use MiniDSP with AIC3254/3268 while AIC3111 can't?

    If so, which input and output should I use in PurePath Studio for flow2.2?

  • Hi,

    I think the AIC3111 should be able to use MiniDSP - you got it working already, right? The issue was that it only supports mono ADC. But it does have a stereo speaker output. The AIC3254 does not have a speaker amplifier so you would need to connect the line outputs to another amplifier. The flow would look like this in PPS:

    However, keep in mind that this is how a normal DAC output would work, so unless you are using any other DSP algorithms, I would recommend not using PPS and just writing the registers for DAC operation. This would be easier for your config.

    Best,
    Mir

  • Hi :

    I know MIC1LM to I2S OUT can use MiniDSP, I2S IN to SPLP/SPLM/SPRP/SPRM can also use MiniDSP.

    But what about MIC1LP/RP to SPLP/SPLM/SPRP/SPRM?

    Can this use MiniDSP too?

    If yes, what should I choose in PurePath Studio for input?

  • Hi,

    Mir is out of office and can continue the thread next week

  • Hi,

    I do not think there is an analog bypass setting in PPS since it is intended for use of processing digital signals - you would configure this analog bypass mode with I2C manually. You can add I2C commands to your PPS configuration with the SystemSettingsCode section of the GUI. The formatting may be different than I wrote out, but these are the registers and values you should set to set up the 2.2 path (all in hex):

    w a0 00 01 #page 1
    w a0 23 30 #MIC1LP and MIC1RP input are routed to left channel mixer amplifier
    w a0 26 80 #left channel gain for SPL = 0dB
    w a0 27 80 #right channel gain for SPR = 0dB
    w a0 2a 04 #SPL driver not muted, output stage gain = 6dB
    w a0 2b 04 #SPR driver not muted, output stage gain = 6dB
    w a0 20 c6 #SPL and SPR drivers powered up
    

    You will also need I2C for configuring the other inputs and outputs. You can go through the datasheet to learn more about this - and if you need help making the script I can help. But I would need more specifics of what device you are using and which of your configurations you want.

    Best,
    Mir

  • Hi :

    I know how to switch to this 2.2 flow.

    But I want to know, if I use this flow, can I use PPS module to process music, such as Digital Peak Detector?

    If I can, which module should I choose in these input?

  • Hi,

    It would probably look something like this:

    Sorry, earlier I was assuming you would want analog bypass, so disregard the register 0x23 setting I had earlier. This should take an analog input, convert to I2S out, take digital peak, then send it back out the analog output.

    Let me know if you need more help.

    Best,
    Mir

  • Hi :

    I think the flow you give should be MIC IN to SPLP/SPLM/SPRP/SPRM(red line(4) below):

    So do you mean flow 2.2 can only use analog bypass? Which means  PPS modules are not available?

  • Hi Zhou,

    Mir is out of office so I will help here briefly,

    I agree with his flow. He is disregarding the analog bypass as it was a misunderstanding. The flow does not use analog bypass.

    Best regards,
    Jeff McPherson

  • Hi :

    Have you returned to the office?

    Can you help confirm my question?

  • Hi,

    Yes, the red line would be what my PPS screenshot was, flows 1, 2.1, 2.2, and 3 will not need PPS since they are standard ways that the ADC and DAC work. If you want to use any digital effects or analysis with PPS, you can, and yes it would be as you expect. You can use 2.2 with PPS with digital blocks, as shown here:

    Send me a screenshot of your flow if you have more specific questions. You will still need to configure which inputs and outputs you use in the SystemSettingsCode, as well as making sure SynchMode is on so that the ADC and DAC clocks are synchronized and you can pass ADC and DAC data between each other in the blocks like "DSP_A_DSP_D". I am happy to help with your script or double check any configs you have.

    Best,
    Mir

  • Hi :

    So it is impossible for flow2.2 to satisfy both stereo and using PPS with digital blocks, isn't it? which means:

    1. If I want to use stereo, I should use analog bypass

    2. If I want to use PPS with digital blocks, I should use MIC1xx to ADC then using in PPS.

    If I use AIC3254, is it also the case that either mic in or analog in  can use PPS, but not both?

  • Hi,

    The AIC3111 only has one ADC, so it can only do mono input. It can do stereo output if that is desired, just choose "Int8xOut" instead of the mono output, and use a splitter as shown:

    You do have to configure the inputs in SystemSettingsCode (where you put the I2C commands for the device) in PPS, because yes the "Dec In" or "Int Out" blocks are for the ADC and DAC so that is internal to the device. I2C is used to route the input pins to the ADC, and DAC to the output pins on the device.

    As for the AIC3254, it has stereo input available since it has 2 ADCs. Mic and analog in can be configured with I2C, PPS just uses the data that makes it to the ADC.

    Let me know if you have more questions.

    Best,
    Mir

  • Hi :

    I think the flow you provide is 2 mono output, not stereo output, is that right?

    And does TI have any codec that can support analog in and mic in use PPS at same time? I want to detect music in analog in and record data in mic in.

  • Hi,

    Since the input is only able to be mono, then yes the output there is just a doubled version of the input. The AIC3111 only has one ADC so it could only process one input stream at a time. We had discussed the AIC3254 earlier, it has stereo input with 2 ADCs that could process different signals at the same time, but note that it does not have a built in speaker amplifier so you would need another amp chip like the TPA2011 or something similar if you still also need to drive a speaker (with higher wattage than the headphone output would allow).

    You could do something like this screenshot as an example, it would do music detect on only the left input ADC and then pass the right one directly to I2S out which could be used for recording in your MCU or computer.

    Let me know what else you need help with.

    Best,
    Mir

  • Hi :

    I think Dec4xIn_1 can only be either analog in or mic in, right?

  • Hi,

    The Dec4xIn is the ADC block, so the left outlet is the output of the left ADC, and the right outlet is the output of the right ADC, as shown here in the block diagram of the AIC3254: 

    So, you can choose what goes into the left and right ADC, these go through a PGA (programmable gain amplifier) which is the triangle you see before the ADC blocks. You could have a mic in to the left ADC and a line input into the right ADC, for example. Then you can process the left and right signals separately in PPS.

    Best,
    Mir

  • Hi :

    Thank you for your reply.

    I think I understand the situation.