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.

TLV320AIC3104: Not getting audio at HPL and HPR

Part Number: TLV320AIC3104
Other Parts Discussed in Thread: AM5718,

Hi,

We developed a custom board with AM5718 processor and using ti-processor-sdk-linux-am57xx-evm-05.02.00.10, we have an audio codec TLV320AIC3104. when we play an audio file getting MCLK,WCLK,BCLK and DIN and also i2c sclk and sda but not getting audio at HPL and HPR, we are unable to understand what might be the issue please help us to resolve this issue. Please find the davinci-mcasp.c file and dts file attached.

Thanks & Regards
Venkata prasad.P

davinci-mcasp.c&dts.zip

  • Hello Venkata,

    Unfortunately, we don't support any driver related issues or code modification. If you can please provide a register dump so I can see how your device is getting configured, that would greatly help. 

    Regards,

    Aaron

  • Hi Sir,

    Please find the register dump attached.

    Register_dump_aplay.zip

    Thanks & regards,
    Venkata prasad.P

  • Hello Venkata,

    Apologies but I am having a little trouble understanding the Reg_address and Value format. Can you explain how to read this? It does not look like hex or decimal. Some insight would help.

    In the meantime, I can provide some info on possible register configs for you to check. 

    1. Make sure the ASI settings are properly configured. 

    2. Check that the DAC is powered up and not muted

    3. Check that the output is properly configured

    Regards,

    Aaron

  • Hi,

    These are the changes we did for register dump in the davinci-mcasp.c file.

     static void mcasp_start_tx(struct davinci_mcasp *mcasp)

    {

    printk(KERN_INFO "/******McASP3 Config. Register Dump*********/\n");
    mcasp3_base = ioremap(0x48468000 ,4096);
    for(ui_temp = 0; ui_temp<1024;ui_temp++)
    {
        value =  __raw_readl(mcasp3_base + (ui_temp*4));     
        printk(KERN_INFO "Reg_address == %x , value == %x \n ",(0x48468000 +(ui_temp*4)), value);
    }

    }

    Thanks & regards
    Venkata prasad.P

  • Hello Venkata,

    Can you please send over register dump that is hex or decimal format.

    Regards,

    Aaron

  • Hi Sir,

    The register_address and the values are printing in hex format only.

    Thanks & regards
    Venkata prasad.P

  • Hi Sir,
        We  are getting an audio at HPL and HPR out by setting the register values using i2c tools as below.
    I'm Playing an audio file in the background using apply file.wav & and set the below register values then only we are getting the audio signal. where we need to set these values to get an audio by default .

    i2cset -f -y 0 0x18 0x40 0x80    /* DAC_R1is routedto HPROUT. Register 64
    i2cset -f -y 0 0x18 0x3D 0x80   /* DAC_L1is routedto HPROUT. Register 61
    i2cset -f -y 0 0x18 0x33 0x0f    /* HPLOUT OutputLevel Control Register 51
    i2cset -f -y 0 0x18 0x41 0x0f    /* HPROUT OutputLevel Control Register 65
    i2cset -f -y 0 0x18 0x32 0x80   /* DAC_R1is routedto HPLOUT. Register 50
    i2cset -f -y 0 0x18 0x2F 0x80   /*  DAC_L1is routedto HPLOUT Register 47 
    i2cset -f -y 0 0x18 0x2C 0x00   /* The right-DACchannelis not muted. set 0db register 44
    i2cset -f -y 0 0x18 0x2B 0x00   /* The left-DACchannelis not muted. set 0db register 43

    Thanks & Regards
    P. Venkata prasad.

  • Hello Venkata, 

    Thanks for the info!

    Is the LDAC and RDAC getting powered up in register 37?

    Regards,
    Aaron

  • Hi Sir,

    Yes, LDAC and RDAC is in power on only, register 37(0x25) has a value 0xc0.

    we need to write the registers after play a file  then only we are getting the audio. Where we have to set above register values in the driver.

    Below register values we are getting when playing audio file.

    root@am57xx-evm:~# aplay file_example_WAV_1MG.wav &
    [1] 774
    Playing WAVE 'file_example_WAV_1MG.wav' : [  427.646352] Enter davinci_mcasp_set_dai_fmt()
    Signed 16 bit Little Endian, Rate 8000 Hz, Stereo
    [  427.653153] case SND_SOC_DAIFMT_CBM_CFM
    root@am57xx-evm:~# [  427.717523] CM_L4PER2_MCASP3_CLKCTRL  7000002


    root@am57xx-evm:~# i2cget -f -y 0 0x18 0x40
    0xaf
    root@am57xx-evm:~# i2cget -f -y 0 0x18 0x3d
    0x00
    root@am57xx-evm:~# i2cget -f -y 0 0x18 0x33
    0x0b
    root@am57xx-evm:~# i2cget -f -y 0 0x18 0x41
    0x0b
    root@am57xx-evm:~# i2cget -f -y 0 0x18 0x32
    0x00
    root@am57xx-evm:~# i2cget -f -y 0 0x18 0x2f
    0xaf
    root@am57xx-evm:~# i2cget -f -y 0 0x18 0x2c
    0x28
    root@am57xx-evm:~# i2cget -f -y 0 0x18 0x2b
    0x28
    root@am57xx-evm:~#

    Please help us to resolve this.

    Thanks & Regards
    P. Venkata prasad.

  • Hello Venkata,

    It seems as though you found the correct registers to get audio at the output by using the following registers: 

    i2cset -f -y 0 0x18 0x40 0x80    /* DAC_R1is routedto HPROUT. Register 64
    i2cset -f -y 0 0x18 0x3D 0x80   /* DAC_L1is routedto HPROUT. Register 61
    i2cset -f -y 0 0x18 0x33 0x0f    /* HPLOUT OutputLevel Control Register 51
    i2cset -f -y 0 0x18 0x41 0x0f    /* HPROUT OutputLevel Control Register 65
    i2cset -f -y 0 0x18 0x32 0x80   /* DAC_R1is routedto HPLOUT. Register 50
    i2cset -f -y 0 0x18 0x2F 0x80   /*  DAC_L1is routedto HPLOUT Register 47 
    i2cset -f -y 0 0x18 0x2C 0x00   /* The right-DACchannelis not muted. set 0db register 44
    i2cset -f -y 0 0x18 0x2B 0x00   /* The left-DACchannelis not muted. set 0db register 43

    but by default you are getting:

    root@am57xx-evm:~# i2cget -f -y 0 0x18 0x40 0xaf
    root@am57xx-evm:~# i2cget -f -y 0 0x18 0x3d 0x00
    root@am57xx-evm:~# i2cget -f -y 0 0x18 0x33 0x0b
    root@am57xx-evm:~# i2cget -f -y 0 0x18 0x41 0x0b
    root@am57xx-evm:~# i2cget -f -y 0 0x18 0x32 0x00
    root@am57xx-evm:~# i2cget -f -y 0 0x18 0x2f 0xaf
    root@am57xx-evm:~# i2cget -f -y 0 0x18 0x2c 0x28
    root@am57xx-evm:~# i2cget -f -y 0 0x18 0x2b 0x28
    root@am57xx-evm:~#

    and you want to set by default the first set above? Is my understanding correct? If so, then this is a driver/coding issue and unfortunately I cannot help support this. 

    Regards,

    Aaron