TLV320AIC3105: Playback and record stop working

Part Number: TLV320AIC3105

Hi,

I get the issue with tlv320aic3105 when I test playback and recording. I turn on the audio board, configure the tlv320aic3105, I test playback and recording, and they look good; but after I test playback and recording, tlv320aic3105 stops working, I must reset the tlv320aic3105 to get playback and record to work again. I don’t know why tlv320aic3105 stops working.

Best regards,

Bruce

8 Replies

  • Hi Bruce,

    I'm sorry you're having some problems with the TLV320AIC3105. Im happy to help you, but first lets get some more information.

    1: Are you using the TLV320AIC3105EVM-K? or your own design?

    2: When you say that it stops working, are you able to read/write registers?

    3: what is your process for testing playback/record? I'm just curious because you say that the playback/record works, but then it stops working, so at what point, between the playback works, the record works, does the device stop working?

    best regards,
    -Steve Wilson
  • In reply to Steve-Wilson:

    Hi Steve

    Thanks for your response.

    I am using our own design. I am using aplay/arecord commands to test playback/record.

    When code stops working, I am still able to write/read registers.

    I can playback and record after I power on the board (processor and codec); after a while (couple of minutes or 1~2 hours), the codec stops working, I cannot playback and record any more. I have to shut down the system and restart to get them to work. Also, there is loud noise when I do recording.


    Best regards,
    Bruce
  • In reply to Bruce Gao:

    ok, can you confirm that all of the registers are correct?
    if you are using the PLL, can you share your P, R, J, D settings and PLL_CLK in frequency?

    -read register 11 for ADC/DAC overflow flags.
    - try doing a software reset (write 0x80 to register 0) then reinitialize the codec and see if it works.

    I assume the codec is connected to a DSP or processor of some kind, I just want to see if the Codec or processor is causing the problem.

    best regards,
    -Steve
  • In reply to Steve-Wilson:

    Hi Steve,

    Below are the captured register values:

    Page 0/Register 3: 0x20 (P=8, Q=4, PLL is disabled)

    Page 0/Register 4: 0x04 (J=1)

    Page 0/Register 5: 0x0

    Page 0/Register 6: 0x0 (D=0)

    Page 0/Register 11: 0xC1 (ADC overflow)

    I checked that the system clock is 24576000, FS ref (sample rate) is 48000.

    It looks that ADCs are overflow. I was doing software reset (write 0x80 to page 0/register 1) and it doesn’t work, I must shut down the system (host processor am335x and tlv320aic3105) and restart to get them to work again.

    When the codec playback and record work, record has loud background noise.

     

    Best regards,

    Bruce

  • In reply to Bruce Gao:

    Hi Bruce,

    I have attempted to "split this thread" into the Sitara Processors Forum. I hope that thread will get some traction there.

    In the mean time, see below wiki pages with some suggestions for ALSA driver issues:

    processors.wiki.ti.com/.../AM335x_Audio_Driver's_Guide
    processors.wiki.ti.com/.../Processor_SDK_Linux_Audio
    processors.wiki.ti.com/.../Linux_Core_Audio_User's_Guide

    And see below forum posts with ALSA McASP issues on Sitara Processors
    e2e.ti.com/.../192338 - Use arecord -f CD | aplay for loopback
    e2e.ti.com/.../447311 - Frame sync timings not satisfied

    I am curious about the McASP settings configured by the ALSA driver you are using. I'm interested in the McASP clocking configuration - who is driving the clocks? And if any overrun/underruns are logged by the McASP.

    Regards,
    Mark
  • In reply to Steve-Wilson:

    Hi Steve,

    Below are I2S configuration in device tree:

    /* ping assignments */
    mcasp0_pins_default: mcasp0_pins_default {
    pinctrl-single,pins = <
    0x190 ( PIN_INPUT_PULLUP | MUX_MODE0 ) /* (A13) mcasp0_aclkx.mcasp0_aclkx */
    0x194 ( PIN_INPUT_PULLUP | MUX_MODE0 ) /* (B13) mcasp0_fsx.mcasp0_fsx */

    0x198 ( PIN_INPUT_PULLUP | MUX_MODE0 ) /* (D12) mcasp0_axr0.mcasp0_axr0 */
    0x19c ( PIN_OUTPUT_PULLUP | MUX_MODE2 ) /* (C12) mcasp0_ahclkr.mcasp0_axr2 */

    0x06c ( PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a11.GPIO1_27 */

    >;
    };


    &i2c2 {
    status = "okay";
    tlv320aic3x: tlv320aic3x@18 {
    compatible = "ti,tlv320aic3x";
    reg = <0x18>;
    status = "okay";

    ai3x-micbias-vg = <MICBIAS_AVDDV>;
    /* ai3x-micbias-vg = <0x3>;*/
    /* Regulators */
    AVDD-supply = <&vaudio_3v3>;
    IOVDD-supply = <&vaudio_3v3>;
    DRVDD-supply = <&vaudio_3v3>;
    DVDD-supply = <&vaudio_1v8>;
    };
    };


    &mcasp0 {
    pinctrl-names = "default";
    pinctrl-0 = <&mcasp0_pins_default>;
    status = "okay";
    op-mode = <0>; /* MCASP_IIS_MODE */
    tdm-slots = <2>;
    num-serializer = <16>;
    serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
    2 0 1 0
    0 0 0 0
    0 0 0 0
    0 0 0 0
    >;
    tx-num-evt = <32>;
    rx-num-evt = <32>;
    };

    /* sound card */
    / {
    clk_mcasp0_fixed: clk_mcasp0_fixed {
    #clock-cells = <0>;
    compatible = "fixed-clock";
    clock-frequency = <24576000>;
    };

    clk_mcasp0: clk_mcasp0 {
    #clock-cells = <0>;
    compatible = "gpio-gate-clock";
    clocks = <&clk_mcasp0_fixed>;

    enable-gpios = <&gpio1 27 0>; /* BeagleBone Black Clk enable on GPIO1_27 */
    };


    sound {
    compatible = "ti,da850-evm-audio";
    ti,model = "DA850 EVM";
    ti,audio-codec = <&tlv320aic3x>;
    ti,mcasp-controller = <&mcasp0>;
    ti,audio-routing =
    "Headphone Jack", "HPLOUT",
    "Headphone Jack", "HPROUT",
    "LINE1L", "Line In",
    "LINE1R", "Line In";
    clocks = <&clk_mcasp0_fixed>;
    clock-names = "mclk";
    };
    };

    In davinci-evm.c,
    static struct snd_soc_dai_link da850_evm_dai = {
    .name = "TLV320AIC3X",
    .stream_name = "AIC3X",
    .cpu_dai_name= "davinci-mcasp.0",
    .codec_dai_name = "tlv320aic3x-hifi",
    .codec_name = "tlv320aic3x-codec.1-0018",
    .platform_name = "davinci-mcasp.0",
    .init = evm_aic3x_init,
    .ops = &evm_ops,
    .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBM_CFM |
    SND_SOC_DAIFMT_NB_NF,
    };

    Since I use TX clock for both transmitter and receiver of McASP0, I clear the TX_ASYNC bit of DAVINCI_MCASP_ACLKXCTL_REG to set up synchronous mode in davinci-mcasp.c

    Best regards,
    Bruce
  • In reply to Mark Mckeown:

    Hi Mark,

    Thanks for your help.

    In my case, codec is the master. The issue is: after I run playback or recording, and leave the board alone for a while (half hour ~ 2 hours), playback or recording doesn't work any more. I have to restart codec board to get it to work again.

    Best regards,
    Bruce
  • In reply to Bruce Gao:

    we do have overflow flags on the Codec, can you check the Mcasp too?
    -STeve