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.

TLV320AIC3100 RESET pin issue

Other Parts Discussed in Thread: TLV320AIC3100

Hi,

In our project we are using TLV320AIC3100 and tlv320aic31xx.c codec driver.

We are facing 2 issues listed below.Request you to help us in resolving the same.

1. Error logs in Codec Driver.

[ 5.938458] davinci_evm sound.5: tlv320aic31xx-hifi <-> 48038000.mcasp mapping ok
[ 5.975517] tlv320aic31xx-codec 0-0018: ASoC: mux CM M-Terminal has no paths
[ 6.008417] tlv320aic31xx-codec 0-0018: ASoC: POST_PMD: ADC event failed: -121
[ 6.016411] tlv320aic31xx-codec 0-0018: ASoC: POST_PMD: DAC Right event failed: -121
[ 6.024782] tlv320aic31xx-codec 0-0018: ASoC: POST_PMD: DAC Left event failed: -121

ALSA: Restoring mixer settings...
No state is present for card AM43xEPOSEVM
Found hardware: "AM43x-EPOS-EVM" "" "" "" ""
Hardware is initialized using a generic method
/usr/share/alsa/init/default:193: value write error: Remote I/O error
/usr/share/alsa/init/default:193: value write error: Remote I/O error
No state is present for card AM43xEPOSEVM

2. CODEC Reset Issue:

a. The RESET pin of the codec is connected to a gpio (gpio5_9) pin and In DTS this gpio is configured as Active LOW and the same is taken in Codec driver, but  when probed with DSO, this pin goes HIGH for 600us and then pulled LOW.Hence, Audio  codec is not out of reset. 

b. Once kernel is boots,we are unable to change the output value using SYS GPIO Class for this  GPIO pin(GPIO5_9)

  • The AIC31xx driver code relies on a proper platform integration. We do not have the ability to debug platform integration via E2E.
  • Hi Hartl,

    Please let me know which is the most suitable driver for TLV3100 codec for use on ti-sdk-am437x-evm-07.01.00.00.
  • I would use the one from the official ARM linux GIT repository.
  • Hi, Please provide the name of the more suitable driver available in ti sdk for our use.
  • Hi ,

    The codec reset issue was resolved by fixing a bug(shown below) in the codec driver's device_init() function

    ret = devm_regulator_bulk_get(aic31xx->dev,
    ARRAY_SIZE(aic31xx->supplies),
    aic31xx->supplies);

    if (ret != 0) {
    dev_err(aic31xx->dev, "Failed to request supplies: %d\n", ret);
    goto gpio_free;
    }

    gpio_free:
    if (aic31xx->pdata.gpio_reset)
    gpio_free(aic31xx->pdata.gpio_reset);

    }

    As seen above even if the devm_regulator_bulk_get() function returns Zero , still the gpio is freed causing the codec to be in Reset condition.
    This issue was fixed.

    We have tried to use tlv320aic31xx.c driver for tlv320aic3100 codec and davinci-evm.c as the sound driver ,now the codec and the sound card is succesfully registered. However when I try to play a .wav file using aplay utility the flow hangs at mcasp_start_tx() function.

    Please let me know how to debug further.

  • Hi,

    mcasp_tx() function hangs because of wrong serializer configuration in device tree for mcasp0.
    I have modified it and now we can see Data transmitted from processor to codec.

    In Codec we have configured the HeadPhone Jack , Mic and we can see an analog signal on the oscilloscope on Headphone pin while playing a .wav file.

    But I am not aware how to configure the speaker for tlv320aic3100 .
    tlv320aic3100 has the below pins for speaker.Please let me know how to configure these pins in device tree.

    SPKM 19, 23 O Class-D speaker driver inverting output
    SPKP 22, 26 O Class-D speaker driver noninverting output