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.

TLV320AIC3120: Need Audio Driver Code for Merging CC2650 controller with TLV320AIC3120 part.

Part Number: TLV320AIC3120
Other Parts Discussed in Thread: TLV320AIC3254, TLV320AIC3111, CC2650

hi Team,

can you please help me with TLV320AIC3120 Audio codec?

1) I m selecting an ST Digital mic MP34DT01-M

and I need to connect it with above Audio codec. Can i do that? what software changes are required?

2) I've fixed my schematic with CC2650 and TLV320AIC3120, but I missed to check for Compatibility or software support required. Can you please provide me the Driver code?

3) Can you please provide me an application note for TLV320AIC3120 with single 4ohm (smd)Speaker and smd digital mic. how much will analog mic design vary ?

Thanks & Regards,

Sachin

  • Hi, Sachin,

    1) The TLV320AIC3120 supports digital microphone function. So, this feature can be done with this device. You would need to configure the necessary registers to use GPIO1 as ADC_MOD_CLK and DIN as DIG_MIC_IN. Please take a look at the 7.3.10.6 Digital Microphone Function section for details.

    2) As mentioned in the datasheet, you would need to set specific registers to get the digital microphone function correctly configured. I recommend to take a look at the GPIO and DIN registers in order to get these pins working as digital microphone pins.

    3) In this case, I think that the speaker couldn't be used. As you may notice, the digital mic pin is DIN pin. So, when the digital microphone is in use, the DAC cannot be used. The digital microphone function works for record-only applications. If you also require a playback, you would need another audio codec with more capabilities such the TLV320AIC3254.

    Best regards,
    Luis Fernando Rodríguez S.

  • Hi Luis, for the point 3 :- Can I directly use an Analog Microphone an use speaker. how much will analog mic vary. can i connect one amplifier after analog mic and provide to Codec IC. I have already procured the coded IC but not the Mic and speaker.

  • Hi Luis,

    Can you please confirm me if I can use TLV320AIC3111? I need an Audio Codec with Digital Mic support, Direct speaker connection with internal Class D amplifier.
    If I can use it, then can you please share the required files with us?

    Regards,
    Sachin Attri
  • Hi, Sachin,

    Yes, the analog microphone can be directly routed to the speaker output. You also may connect an amplifier after the analog mic if you require additional gain.

    Regarding you digital mic and direct speaker connection requirements, unfortunately the TLV320AIC31xx family devices that support digital mic require the DIN to work. You would need another device with different digital mic input in order to use the speaker output. You would need a device such the TLV320AIC32x4 or TLV320AIC32x2.

    Best regards,
    Luis Fernando Rodríguez S.
  • Hi, Sachin,

    Yes, the analog microphone can be directly routed to the speaker output. You also may connect an amplifier after the analog mic if you require additional gain.

    >>>>>Thanks for Suggestion Luis.

    I will use 1left and 1 right Mic Analog, connect directly to CODEC without PreAmp and use it. i hope i dont need intermediate Pre- amplification. 

    Kindly Suggest Here.

    Thanks,

    Sachin

  • Hi, Sachin,

    Yes, the analog mics can be connected directly to the CODEC analog inputs. You may base your design in the pictures below. The connection would depend of the kind of microphone that you are using (single-ended or differential).

    Single-ended connection:

    Differential connection:

    You may configure the TLV320AIC3120 internal PGA or ADC gain if you require additional amplification.

    Best regards,
    Luis Fernando Rodríguez S.

  • Hi Luis, thanks for the help.

    Can you please tell me if you have the Driver Code for the Audio Codec IC and CC2650 Controller?
    What are the other dependencies required ?

    Regards,
    Parveen
  • Hi Parvee,

    Thanks for Asking.

    Luis, Can you please tell us the software dependencies for the Audio codec interfacing with CC2650 uC?

    Thanks & Regards,

    Sachin Attri

  • Hi Sachin.

    Thanks for Asking, Even i'm using the same codec IC+ Analog MIC and trying to code in CC2650. 

    @Luis..Can you please send supported driver code to me also.

    Regards,

    Parveen

  • Hi, Parveen,

    Unfortunately, we don't have a driver code for the CCxxxx microcontrollers. However, I attached a reference script that you may use to configure the audio codec via I2C. It is in the hex format w (write) 30 (I2C address) xx (register) yy (register data).

    #			--------------------------------------------------------------- page 0 is selected 
    w 30 00 00
    #			 s/w reset
    > 01
    #			 PLL_clkin = BCLK,codec_clkin = PLL_CLK
    w 30 04 07
    > 92
    > 10
    > 00
    > 00
    #			 mode is i2s,wordlength is 16
    w 30 1b 00
    #			 NDAC is powered up and set to 4
    w 30 0b 82
    #			 MDAC is powered up and set to 4
    > 88
    w 30 12 88
    > 82
    #			 DOSR = 128, DOSR(9:8) = 0
    > 80
    #			             DOSR(7:0) = 128
    > 80
    #			 DAC => volume control thru pin disable 
    w 30 74 00
    #			 DAC => drc disable, th and hy
    w 30 44 00
    #			 DAC => 0 db gain left
    w 30 41 00
    #			 DAC => 0 db gain right
    > 00
    #			--------------------------------------------------------------- page 3 (touch screen) is selected
    #			 SAR configuration
    w 30 00 03
    w 30 02 18
    w 30 06 80
    w 30 03 01
    w 30 11 00
    w 30 13 10
    w 30 03 25
    #			--------------------------------------------------------------- page 1 is selected
    w 30 00 01
    #			 De-pop, Power on = 800 ms, Step time = 4 ms
    w 30 21 4e
    #			 HPL and HPR powered up
    w 30 1f c2
    #			 LDAC routed to HPL, RDAC routed to HPR
    w 30 23 88
    #			 HPL unmute and gain 1db
    w 30 28 0e
    #			 HPR unmute and gain 1db
    > 0e
    #			 No attenuation on HP
    w 30 24 00
    w 30 25 00
    
    #			 MIC BIAS = AVDD
    w 30 2e 0b
    #			 MICPGA P = MIC 10k
    w 30 30 40
    #			 MICPGA M - CM 10k
    > 40
    #			--------------------------------------------------------------- page 0 is selected
    w 30 00 00
    #			 select DAC DSP mode 11 & enable adaptive filter
    w 30 3c 0b
    w 30 00 08
    w 30 01 04
    w 30 00 00
    #			 POWERUP DAC left and right channels (soft step disable)
    w 30 3f d6
    #			 UNMUTE DAC left and right channels
    > 00
    #			 POWERUP ADC channel
    w 30 51 80
    #			 UNMUTE ADC channel
    > 00
    w 30 00 01
    w 30 23 08
    w 30 23 00
    w 30 26 00
    w 30 27 00
    w 30 23 40
    w 30 23 44
    w 30 26 b0
    w 30 27 b0
    w 30 2a 0d
    w 30 2b 0d
    w 30 00 01
    #			 Unmute Class-D Left
    w 30 2a 1c
    #			 Unmute Class-D Right
    w 30 2b 1c
    #			 Power-up Class-D drivers
    w 30 20 c6
    w 30 24 30
    w 30 25 30
    w 30 31 00
    

    Best regards,
    Luis Fernando Rodríguez S.

  • Thank you for help.. Luis.

    I'm following ADC setup steps given in datasheet section 7.3.10.8.