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.

TLV320AIC3110 codec with DM8148 Processor

Other Parts Discussed in Thread: TLV320AIC3110

Hi,

In our custom board having DM8148 processor and TLV320AIC3110 codec, the audio record and audio play is working fine, when the recorded audio is played in the board itself.

But when the recorded audio is played off the board using Audacity player ( playing in windows/Linux PC ), we hear only white noise.

What might be reason for this? What should be done to work on both the custom board and outside the board?

  • Could someone please guide to resolve this issue.

    The command used for recording is "arecord -c 1 -t raw -f S16_LE -r 44100 -d 10 sample.raw". The MCLK is at frequency 11.2896.

    The rate_divs value is

    /* 44.1k rate */
            {11289600, 44100, 1, 8, 0, 128, 4, 4, 128, 8, 2, 4},
            {11289600, 44100, 1, 8, 0, 256, 4, 2, 0, 4, 2, 8},

    Code: Linux PSP 04.01.00.07.

    Please find attached the initial register settings.

    /* Reset */
             {RESET, 1},
             {RESET, 0},
             /* Clock settings */
             {CLK_REG_1, CODEC_MUX_VALUE},
             {INTERFACE_SET_REG_1, BCLK_DIR_CTRL},
             {INTERFACE_SET_REG_2, DAC_MOD_CLK_2_BDIV_CLKIN},
            
             {INTERFACE_SET_REG_4, 0x10}, /*old value is 0x12 */
             {INTERFACE_SET_REG_5, 0x00}, /*old value is 0x10 */
             {DOUT_CTRL, 0x12}, /* old value is 0x02 */
                      
     
             /* DAC Channels PWR UP */
             {DAC_CHN_REG, RDAC_2_RCHN | LDAC_2_LCHN}, /*Mistral: setting
                                                         [0][63] to reset value 0x14 (RDAC_2_RCHN | LDAC_2_LCHN)=> DAC
                                                         power=off DAC delta path =left, vol=soft stepping per sample
                                                         period...(31xx).*/ /* Unmute DAC channels */
             {DAC_MUTE_CTRL_REG, 0x0C}, /* DAC are muted by
                                         default...[0][64]...So we manually unmute*/
     
            /* DAC volume setting */
             {LDAC_VOL, DEFAULT_VOL}, /* DAC volume set to default value i.e 0db gain...[0][65]...*/
    
             {RDAC_VOL, DEFAULT_VOL}, /* Only applicable for 31xx...3120
                                         does not have this register [0][66]*/
            /*{HEADSET_DETECT, 0x8F},  *//* Headset detection enabled by default and Debounce 
                                      * programmed to 128 ms for Headset Detection and
                                       * 32ms for Headset button-press Detection */
             {L_ANLOG_VOL_2_HPL, 0x00}, /* Set volume of left Analog HPL to 0db attenuation
                                          [1][36]*/
             {R_ANLOG_VOL_2_HPR, 0x00}, /*Only applicable for 31xx...3120 does not have this register [1][37]*/
             {L_ANLOG_VOL_2_SPL, 0x00}, /*Only applicable for 31xx...3120 does not have this register [1][37]*/
             {R_ANLOG_VOL_2_SPR, 0x00}, /*Only applicable for 31xx...3120 does not have this register [1][37]*/
     
    
             {MICBIAS_CTRL, 0x08},//0x0b changd to 0x0A on 10052012
     
                     /* ADC Setting */
             {ADC_DIG_MIC, 0x10},            /*this value will be altered duing power up
                                               Currently configured to use Digital Microphone Input */
             {CM_SET, 0x00},                 
     
             {AGC_CTRL_1, 0xA0}, 
             {AGC_CTRL_2, 0x42},
             {AGC_CTRL_3, 0x64},/*0x50 was here*/
             {AGC_CTRL_4, 0x70},
             {AGC_CTRL_5, 0xA8},
             {AGC_CTRL_6, 0x00},
             {AGC_CTRL_7, 0x06},/*commented on 10052012*/
             {ADC_PRB_SEL_REG, 0x04},
     
             /* DAC Output Mixer Setting */
             {DAC_MIX_CTRL, RDAC_2_RAMP | LDAC_2_LAMP}, /*For aic31xx this is applicable...enabling DAC
                                                          routing through mixer amplifier individually for left & right
                                                          DAC..[1][35]... */
             /* Coonfigure the Headphone Driver POP Removal Settings */
             {HP_POP_CTRL, (HP_POWER_UP_15_3_MSEC | HP_DRIVER_3_9_MS | CM_VOLTAGE_FROM_AVDD)},
             /* mute HP Driver */
             {SPL_DRIVER, 0x00},
             {SPR_DRIVER, 0x00},
     
             /* ADC Channel Fine Gain */
             {ADC_FGA, 0x80},
             /* ADC channel Coarse Gain */
             {ADC_CGA, 0x68}, /* 0x40 for 0db */
             
             {MIC_GAIN, 0x30},/*reg 48 changed to 20 from 10 on 10052012*/
             {ADC_IP_SEL, 0x00},
     
             {MIC_PGA, 0x80}, 
     
    };
    

  • Karthikeyan,

    This sounds like you are providing a wrong format to Audacity.  SInce you are capturing as RAW, typically you'll be asked on opening the file as to what format it is.  If the playback is fine on the target, I can't see any other reason you won't be able to play it on a PC.

    Regards,

    hari

  • Hi Hari,
    I even tried recording a WAV file and play it back in the Audacity/Windows Media player. I still get only the white noise ( arecord -c 1 -t wav -f S16_LE -r 44100 -d 10 -f cd xyz.wav )

    We got the AIC3110 EVM module today, tested the playback and record. Playback was fine. But the record wasn't. We got the white noise as we get in our custom board.

    Procedure followed:
    1. Open Codec Control software ( downloaded from http://www.ti.com/tool/tlv320aic3110evm-u )
    2. view->Init Script-> Ran the AIC3111_USB_RECORD_Init script.
    3. Opened the Sound recorder in windows, started recording
    4. view->Init Script-> Ran the AIC3111_USB_Init script.
    5. Played the recorded audio using media player.

    Heard only the noise. Please guide.

    Attached are the initialization script.

    #			--------------------------------------------------------------- page 0 is selected 
    w 30 00 00
    #			 s/w reset
    > 01
    #			 PLL_clkin = MCLK,codec_clkin = PLL_CLK
    w 30 04 03
    #			 PLL Power up, P = 1, R = 1
    > 91
    #			 J = 8
    > 08
    #			 D = 0000, D(13:8) = 0
    > 00
    #			           D(7:0) = 0
    > 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
    #			--------------------------------------------------------------- page 1 is selected
    w 30 00 01
    #			 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
    #			 POWERUP ADC channel
    w 30 51 80
    #			 UNMUTE ADC channel
    > 00
    
    #			--------------------------------------------------------------- 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
    #			 DAC => 0 db gain right
    > 00
    #			--------------------------------------------------------------- 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 44
    #			 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
    #			--------------------------------------------------------------- page 1 is selected
    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