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.

tlv320aic3106 playback ok but no data when capture

Other Parts Discussed in Thread: TLV320AIC3106, DM3730

Hi forum!

I'm using a custom board with TLV320AIC3106 and igepv2 platform (DM3730 SoC). My system is linux 2.6.37

Basically I'm connecting this signals together:

  • MCLK (in) to crystal 12.0MHz
  • WCLK (out) to omap McBSP3_FSX
  • BCLK (out) to omap McBSP3_CLKX
  • DIN (in) to omap McBSP3_DX
  • DOUT (out) to omap McBSP3_DR

The system is playing flawlessly and mixer seems it is working perfectly. When I try to capture (with a arecord command) I can only see wave header data without audio/raw data. Debugging BCLK and WCLK it's showing that there are no clocks.


Hope someone can help me, some clue on how to debug or go further it would be great.

Regards,

Sergio

  • Hi Sergio,

    If you have the I2C register values you are trying during capture, I can take a look to see what is wrong.

    On the Linux side, you would have to try the DM3730 folks,

    Best Regards,

    dave

  • Thank you dave,


    Sorry if it doesn’t looks correct to you, I'm using this script to get I2C registers.

    Immediately after launch "arecord -Dhw:1,0 -f cd", I run aic31-dump-registers.sh script and it shows:

    PAGE_SELECT[0]: 0x00
    RESET[1]: 0x00
    SAMPLE_RATE_SEL[2]: 0x00
    PLL_PROGA[3]: 0x91
    PLL_PROGB[4]: 0x1c
    PLL_PROGC[5]: 0x52
    PLL_PROGD[6]: 0x40
    CODEC_DATAPATH[7]: 0x8a
    ASD_INTF_CTRLA[8]: 0xc0
    ASD_INTF_CTRLB[9]: 0x00
    ASD_INTF_CTRLC[10]: 0x00
    OVRF_STATUS_AND_PLLR[11]: 0x01
    CODEC_DFILT_CTRL[12]: 0x00
    HEADSET_DETECT_dump_aic_reg[13]: 0x00
    LAGC_CTRL_A[26]: 0x00
    LAGC_CTRL_B[27]: 0xfe
    LAGC_CTRL_C[28]: 0x00
    RAGC_CTRL_A[29]: 0x00
    RAGC_CTRL_B[30]: 0xfe
    RAGC_CTRL_C[31]: 0x00
    DAC_PWR[37]: 0x20
    HPLCOM_CFG[37]: 0x20
    DAC_LINE_MUX[41]: 0xa0
    HPOUT_POP_REDUCTION[42]: 0x00
    LDAC_VOL[43]: 0x00
    RDAC_VOL[44]: 0x00
    LINE2L_2_HPLOUT_VOL[45]: 0x76
    LINE2R_2_HPROUT_VOL[62]: 0xf6
    PGAL_2_HPLOUT_VOL[46]: 0x76
    PGAL_2_HPROUT_VOL[60]: 0x76
    PGAR_2_HPLOUT_VOL[49]: 0x76
    PGAR_2_HPROUT_VOL[63]: 0x76
    DACL1_2_HPLOUT_VOL[47]: 0x76
    DACR1_2_HPROUT_VOL[64]: 0x76
    HPLOUT_CTRL[51]: 0x0c
    HPROUT_CTRL[65]: 0x0f
    LINE2L_2_HPLCOM_VOL[52]: 0x76
    LINE2R_2_HPRCOM_VOL[69]: 0x76
    PGAL_2_HPLCOM_VOL[53]: 0x76
    PGAR_2_HPLCOM_VOL[56]: 0x76
    PGAL_2_HPRCOM_VOL[67]: 0x76
    PGAR_2_HPRCOM_VOL[70]: 0x76
    DACL1_2_HPLCOM_VOL[54]: 0x76
    DACR1_2_HPRCOM_VOL[71]: 0x76
    HPLCOM_CTRL[58]: 0x04
    HPRCOM_CTRL[72]: 0x04
    LINE2L_2_MONOLOPM_VOL[73]: 0x76
    LINE2R_2_MONOLOPM_VOL[76]: 0x76
    PGAL_2_MONOLOPM_VOL[74]: 0x76
    PGAR_2_MONOLOPM_VOL[77]: 0x76
    DACL1_2_MONOLOPM_VOL[75]: 0x76
    DACR1_2_MONOLOPM_VOL[78]: 0x76
    MONOLOPM_CTRL[79]: 0x00
    LINE2L_2_LLOPM_VOL[80]: 0x76
    LINE2L_2_RLOPM_VOL[87]: 0x76
    LINE2R_2_LLOPM_VOL[83]: 0x76
    LINE2R_2_RLOPM_VOL[90]: 0x76
    PGAL_2_LLOPM_VOL[81]: 0x76
    PGAL_2_RLOPM_VOL[88]: 0x76
    PGAR_2_LLOPM_VOL[84]: 0x76
    PGAR_2_RLO[91]: 0x76
    DACL1_2_LLOPM_VOL[82]: 0x76
    DACL1_2_RLOPM_VOL[89]: 0x67
    DACR1_2_RLOPM_VOL[92]: 0x76
    DACR1_2_LLOPM_VOL[85]: 0x76
    LLOPM_CTRL[86]: 0x00
    RLOPM_CTRL[93]: 0x00
    STICKY_IRQ_FLAGS[96]: 0x00
    RT_IRQ_FLAGS[97]: 0x00
    GPIO1[98]: 0x00
    GPIO2[99]: 0x00
    GPIOA[100]: 0x00
    GPIOB[101]: 0xc0
    CLKGEN_CTRL[102]: 0x02

    I hope that this is the correct dump.

    Regards,

    Sergio

  • Hi Dave

    Please,  does the register dump looks correct to you? 

    Sergio

  • Hi TI experts
    In order to debug further I've modified snd_soc_write to capture values currently written to TLV320AIC3106 codec.

    static inline unsigned int snd_soc_write(struct snd_soc_codec *codec,
                         unsigned int reg, unsigned int val)
    {
        if (!strcmp(codec->name, "tlv320aic3x-codec.2-001b"))
            printk (KERN_ERR "reg=%03d, val=%02x\n", reg, val);
        return codec->driver->write(codec, reg, val);
    }

    When I run arecord -f cd -Dhw:1,0 printk shows:

    iPRO:~$ arecord -f cd -Dhw:1,0
    Recording WAVE '[ 1426.422210] +tlv_hw_params(d825b5c0,d5118000) d82bf200, d82a3340, d82a9540
    stdin' : Signed [ 1426.430389] reg=008, val=c0
    16 bit Little En[ 1426.434661] reg=009, val=00
    dian, Rate 44100[ 1426.438995] reg=010, val=00
     Hz, Stereo
    [ 1426.443328] -tlv_hw_params
    [ 1426.447296] reg=009, val=00
    [ 1426.450927] reg=101, val=00
    [ 1426.454559] reg=003, val=91
    [ 1426.458190] reg=007, val=8a
    [ 1426.461822] reg=002, val=00
    [ 1426.465850] reg=003, val=91
    [ 1426.469512] reg=011, val=01
    [ 1426.473144] reg=004, val=1c
    [ 1426.476776] reg=005, val=52
    [ 1426.480407] reg=006, val=40
    [ 1426.485198] reg=043, val=00
    [ 1426.488891] reg=044, val=00
    RIFF$�WAVEfmt D��data�

    I was expecting to see a lot of registers written here. This short list seems correct to you?


    Please, any answer will be very appreciated.

    Best regards,

    Sergio

  • Hi Sergio,

    Sergio Serrano said:
    When I run arecord -f cd -Dhw:1,0 printk shows:

    Please, I need the output of  'aplay -l' and 'arecord -l'

    Best,

    Marcelo

  • Hi Marcelo,

    iPRO:~$ aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: igep [igep], device 0: TWL4030 twl4030-hifi-0 []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 1: playpro [playpro], device 0: AIC3X tlv320aic3x-hifi-0 []
      Subdevices: 1/1
      Subdevice #0: subdevice #0

    iPRO:~$ arecord -l
    **** List of CAPTURE Hardware Devices ****
    card 0: igep [igep], device 0: TWL4030 twl4030-hifi-0 []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 1: playpro [playpro], device 0: AIC3X tlv320aic3x-hifi-0 []
      Subdevices: 1/1
      Subdevice #0: subdevice #0

    Thank you for your interest!

    Sergio