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.

TLV320AIC3120EVM-U: Digital configuration in TLV320AIC3120EVM-U

Part Number: TLV320AIC3120EVM-U
Other Parts Discussed in Thread: TLV320AIC3120

Hi,

Currently I am having TLV320AIC3120EVM-U evaluation kit, in which I wanted to configure the clocks and audio interface as per custom board requirements and play the audio file from PC and listen through headphone Jack (J4).

In my custom board, codec is going to be interfaced to Vocoder(AMBE-4020 Full-Duplex BGA), with the following requirements :

Sampling frequency (WCLK) : 8 Khz

I2S format                                : DSP

 CODEC CLK/ PLL:

Please refer to the TLV320AIC31xx sheet from the attached excel for the clock parameters. According to the forum, https://e2e.ti.com/support/audio-group/audio/f/audio-forum/1125513/tlv320aic3100-i2c-configuration-of-tlv320aic3100-for-16-bit-16-khz-and-mono-audio/4195941?tisearch=e2e-sitesearch&keymatch=TLV320AIC3100#4195941, it says that the EVM is programmed only with 44.1KHz Fs. So is there any other possible way to configure the clock parameters as required apart from the solution suggested in the above forum, as currently I am not interfacing the evaluation board with any of the external microcontroller/ processor.

AUDIO INTERFACE:

I wanted to configure EVM to “DSP” format and word length to “16 bits”. When configured the codec interface with these parameters by keeping the clock configurations default and then played an audio file from PC, observed that audio was too noisy and after some time the EVM stopped responding i.e, lights were glown off.

So please suggest a solution where I can configure as per my requirements, play an audio file and listen through headphone jack (J4).

Thanks in Advance.

4774.Audio_CODEC_ADC_PLL_Calculator.xlsx      

  • Hi,

    -. For different sampling rate from 44.1KHz, you will need to disable I2S mode from the TAS1020 by pulling I2S_ENABLE high on the EVM. You can then program the codec with a different sampling or format besides the standard 44.1KHz 16 bit and I2S format.

    -. Unfortunately the default is just the I2S format, you will need to disable the TAS1020 I2S configuration and use external source to configure the different format.

    Regards.

  • The clock settings in GUI shows that clock input is MCLK, whereas in the initscript it is written that clock input is BCLK. Please provide clarification on clock settings for the TLV320AIC3120 evaluation board

    0601.AIC3120_USB_Init.txt
    #			--------------------------------------------------------------- page 0 is selected 
    w 30 00 00
    #			 s/w reset
    > 01
    #			 PLL_clkin = BCLK,codec_clkin = PLL_CLK
    w 30 04 07
    > 91
    > 20
    > 00
    > 00
    #			 mode is i2s,wordlength is 16
    w 30 1b 00
    #			 NDAC is powered up and set to 4
    w 30 0b 84
    #			 MDAC is powered up and set to 4
    > 84
    w 30 12 84
    > 84
    #			 DOSR = 128, DOSR(9:8) = 0
    > 00
    #			             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
    #			--------------------------------------------------------------- page 1 is selected
    w 30 00 01
    #			 De-pop, Power on = 800 ms, Step time = 4 ms
    w 30 21 4e
    #			 HPL
    w 30 1f c2
    #			 LDAC routed to HPL
    w 30 23 40
    #			 HPL unmute and gain 1db
    w 30 28 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 (soft step disable)
    w 30 3f d6
    #			 UNMUTE DAC
    > 00
    #			 POWERUP ADC channel
    w 30 51 80
    #			 UNMUTE ADC channel
    > 00
    w 30 00 01
    #			 Unmute Class-D Left
    w 30 2a 1c
    #			 Power-up Class-D drivers
    w 30 20 c6
    
    

  • If you are running the initscript then it's set to use BCLK. You can cross check the setting against the register map in the datasheet.

  • Hi,

    Thanks for the response.

    Yes, I am running the initscript to evaluate. So could you kindly tell us the clock generation done for the evaluation board (i.e, input clock frequency of BCLK) and the configuration done for Primary and Secondary Audio Interface Selection when initscript was executed.

  • InitScript sets the device as slave mode so BCLK+WCLK are provided by the controller on the board, BCLK is measured to be 2.8224 MHz and WCLK is 44.1 KHz. You can then use the PLL calculator downloaded from the product folder to verify the setting as shown below.

    Please refer to the register map and the settings in the InitScript to crosscheck what was configured for the interface.

    If they are not set in the script that means the setting is the default and in the case of secondary interface the GPIO by default is not configured for audio interface.

    Regards.

  • Hi,

    Thanks for the response.

    The register configurations done for AOSR (0x14) values doesn’t match with the settings that you have mentioned above i.e, in init_script it was 256, where as in calculation it was 128 because of which sampling rate differs. Please note that in comments it was mentioned as DOSR values for the registers 0x14 and 0x15 but those registers are for ADC AOSR_VAL and ADC IADC_VAL. Please correct me if I am wrong.

    Please find the attachment for which I am referring to.

    8484.AIC3120_USB_Init.txt
    #			--------------------------------------------------------------- page 0 is selected 
    w 30 00 00
    #			 s/w reset
    > 01
    #			 PLL_clkin = BCLK,codec_clkin = PLL_CLK
    w 30 04 07
    > 91
    > 20
    > 00
    > 00
    #			 mode is i2s,wordlength is 16
    w 30 1b 00
    #			 NDAC is powered up and set to 4
    w 30 0b 84
    #			 MDAC is powered up and set to 4
    > 84
    w 30 12 84
    > 84
    #			 DOSR = 128, DOSR(9:8) = 0
    > 00
    #			             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
    #			--------------------------------------------------------------- page 1 is selected
    w 30 00 01
    #			 De-pop, Power on = 800 ms, Step time = 4 ms
    w 30 21 4e
    #			 HPL
    w 30 1f c2
    #			 LDAC routed to HPL
    w 30 23 40
    #			 HPL unmute and gain 1db
    w 30 28 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 (soft step disable)
    w 30 3f d6
    #			 UNMUTE DAC
    > 00
    #			 POWERUP ADC channel
    w 30 51 80
    #			 UNMUTE ADC channel
    > 00
    w 30 00 01
    #			 Unmute Class-D Left
    w 30 2a 1c
    #			 Power-up Class-D drivers
    w 30 20 c6
    
    

  • Hi,

    It looks like some of the lines and comments are not correct.

    I have modified and added comments to make it clearer.

    Updated_AIC3120_USB_Init.txt
    #			----------------- page 0 is selected 
    w 30 00 00
    #			 s/w reset
    > 01
    #			 PLL_clkin = BCLK,codec_clkin = PLL_CLK
    w 30 04 07
    #			 PLL powered up with P=1 and R=1
    > 91
    #			 J=32
    > 20
    #			 D=0
    > 00
    > 00
    #			 mode is i2s,wordlength is 16
    w 30 1b 00
    #			 NDAC is powered up and set to 4
    w 30 0b 84
    #			 MDAC is powered up and set to 4
    > 84
    #			 DOSR = 128, DOSR(9:8) = 0
    > 00
    #			             DOSR(7:0) = 128
    > 80
    #			 NADC is powered up and set to 4
    w 30 12 84
    #			 MADC is powered up and set to 4
    > 84
    #			 AOSR = 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
    #			--------------- page 1 is selected
    w 30 00 01
    #			 De-pop, Power on = 1.22 s, Step time = 3.9 ms
    w 30 21 4e
    #			 HPOUT powered up, 1.35V common mode
    w 30 1f c2
    #			 LDAC routed to Mixer
    w 30 23 40
    #			 HPL unmute and gain 1db
    w 30 28 0e
    #			 No attenuation on HP
    w 30 24 80
    #			 MIC BIAS = AVDD
    w 30 2e 0b
    #			 MICPGA P = MIC1LP 10k
    w 30 30 40
    #			 MICPGA M - CM 10k
    > 40
    #			--------------- page 0 is selected
    w 30 00 00
    #			 select DAC DSP mode 12 & enable adaptive filter
    w 30 3c 0c
    #			--------------- page 8 is selected
    w 30 00 08
    # 			Enable Adaptive Filter
    w 30 01 04
    #			--------------- page 0 is selected
    w 30 00 00
    #			 POWERUP DAC (soft step disable)
    w 30 3f d6
    #			 UNMUTE DAC
    > 00
    #			 POWERUP ADC channel
    w 30 51 80
    #			 UNMUTE ADC channel
    > 00
    #			--------------- page 1 is selected
    w 30 00 01
    #			 Unmute Class-D Left with 6dB
    w 30 2a 04
    #			 Power-up Class-D drivers
    w 30 20 c6
    
    

    Regards.

  • Hi,

    Thanks for the response.

    After initializing the EVM with the init_script, I could listen to the song through headphone which I am playing via PC. Then I tried to change the volume through GUI and could able to observe difference in volume. But when I execute the same register command via command dialog box, I couldn’t observe the change in volume. I also tried with init script command buffer but same observations were noted. In both the cases, when register command was executed, I was able to observe the EVM activity LED going green but then no affect in the output. So then I made the register change in the initscript and ran the script, then I could observe change in volume.

    So why am I not able to execute register command via command dialog box?

  • Which volume are you referring to in the GUI? Remember if the register is in other page other than page 0 you need to write the page number before writing  the register, for example:

    w 30 00 01 (for page 1)

    w 30 24 00 (for page 1 register 36 with data 0)

    Regards.

  • Hi,

    I have done as you suggested above, but then it is not having effect on output.

    Also the evaluation board turns off automatically. Could you please help me out

  • The initscript is the same as running from the command buffer, so which volume are you changing in the GUI?

    I verified on the bench running the initscript on command buffer window, then change the DVol by writing w 30 41 xx on the command buffer and I can hear the effect.