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.

TLV320AIC32X4SW-LINUX: TLV320AIC32X4SW-LINUX:

Part Number: TLV320AIC32X4SW-LINUX
Other Parts Discussed in Thread: TLV320AIC3254, TEST

Hi,

Our device using your TI Codec IC tlv320aic3254, I find tlv320aic32x4.c/tlv320aic32x4.h in currently SDK, could I using this driver for 3254?

If not, could you share tlv320aic3254 driver to me, my linux kerver version is 3.18.44.

Thanks

Will

  • Hello Will,

    Unfortunately, we do not offer driver support for our devices. 

    Here is a thread that might offer some good information.

    Regards,

    Aaron

  • Hi Aaron,

    Thanks for your kindly reply.

    I should update the issue latest status first, 

    TLV320AIC32X4 driver code already merged, from the kernel log, I found it can't work well till now.

    log snippet 1:

    [    0.648491] aic32x4_i2c_probe(): aic32x4_i2c_probe

    [    0.648543] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/soc/i2c@78b8000/tlv320aic32x4_codec@18[0]'

    [    0.648563] tlv320aic32x4-codec 4-0018: Failed getting the mclk. The current implementation does not support the usage of this codec without mclk

    [    0.648615] tlv320aic32x4-codec: probe of 4-0018 failed with error -2

    Discuss with WPI FAE, they share one solution with me, patch link:https://patchwork.kernel.org/patch/6694971/

    Do more once time test, another issue pop-up.

    log snippet 2:

    [    0.648538] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/soc/i2c@78b8000/tlv320aic32x4_codec@18[0]'

    [    0.648556] tlv320aic32x4-codec 4-0018: Failed getting the mclk.

    [    0.648587] 4-0018 supply iov not found, using dummy regulator

    [    0.648643] tlv320aic32x4-codec 4-0018: Missing supply 'dv' or 'ldoin'

    [    0.648654] tlv320aic32x4-codec 4-0018: Failed to setup regulators

     

           Line 744: [   11.209906] mdm9607-asoc-snd soc:sound: ASoC: CODEC DAI tlv320aic32x4-hifi Name: tlv320aic32x4-codec.4-0018, not registered

           Line 744: [   11.209906] mdm9607-asoc-snd soc:sound: ASoC: CODEC DAI tlv320aic32x4-hifi Name: tlv320aic32x4-codec.4-0018, not registered

           Line 746: [   11.214299] mdm9607-asoc-snd soc:sound: ASoC: CODEC DAI tlv320aic32x4-hifi Name: tlv320aic32x4-codec.4-0018, not registered

           Line 746: [   11.214299] mdm9607-asoc-snd soc:sound: ASoC: CODEC DAI tlv320aic32x4-hifi Name: tlv320aic32x4-codec.4-0018, not registered

    It is one serious and block issue for us, could you help us fix it ASAP? 

    Thanks.

    Will

  • Hi Aaron,

    As to  the above issue information, I try to comment out aic32x4_setup_regulators()in aic32x4_i2c_probe(),then the error log disappeared.

           //ret = aic32x4_setup_regulators(&i2c->dev, aic32x4);

           //if (ret) {

           //     dev_err(&i2c->dev, "Failed to setup regulators\n");

           //     return ret;

           //}

     

    Unfortunatelly, there are still error information in kernel massge, except  “not registered” , does it mean codec registe success????

    Log snippet:

    [    0.648446] aic32x4_i2c_probe(): aic32x4_i2c_probe

    [    0.648494] of_get_named_gpiod_flags: ===>propname is reset-gpios, NP name is 'compatible'

    [    0.648505] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/soc/i2c@78b8000/tlv320aic32x4@18[0]'

    [    0.648521] tlv320aic32x4-codec 4-0018: Failed getting the mclk.

    [    0.648546] tlv320aic32x4-codec 4-0018: ===>Failed to read ID: 0

     

     

    PCM devices are registed succed by "ls /dev/snd"

    ~ # ls /dev/snd
    controlC0 hwC0D33 pcmC0D12p pcmC0D17c pcmC0D21c pcmC0D2c pcmC0D7p
    hwC0D10 hwC0D39 pcmC0D13c pcmC0D17p pcmC0D22p pcmC0D2p pcmC0D8c
    hwC0D11 hwC0D40 pcmC0D13p pcmC0D18c pcmC0D23c pcmC0D3c pcmC0D9c
    hwC0D12 hwC0D9 pcmC0D14c pcmC0D18p pcmC0D24p pcmC0D3p timer
    hwC0D13 pcmC0D0c pcmC0D14p pcmC0D19c pcmC0D25c pcmC0D4c
    hwC0D15 pcmC0D0p pcmC0D15c pcmC0D1c pcmC0D26p pcmC0D4p
    hwC0D16 pcmC0D10p pcmC0D16c pcmC0D1p pcmC0D27c pcmC0D5p
    hwC0D32 pcmC0D11c pcmC0D16p pcmC0D20p pcmC0D27p pcmC0D6c

     

    Next step, I try to run audio sample code and verify the codec basic function, but it failed. From the log, we can found some error information, like "set HW parameters"

    /usrdata # ./example_audio play1 demo.wav

    read wav hdr

    get wav hdr offset

    Ql_clt_set_mixer_value, device: SEC_AUX_PCM_RX Audio Mixer MultiMedia1, value: 1

    Ql_clt_set_mixer_value, set mixer: SEC_AUX_PCM_RX Audio Mixer MultiMedia1 sucess

    __ql_pcm_setParams, 401

    cannot set hw params

    __ql_pcm_open:params setting failed

    Ql_AudPlayer_Open:Failed in __ql_pcm_open

    Segmentation fault (core dumped)

    /usrdata #

     

    Double checked the kernel log,the issue caused by the mclk wrong value, till now, I don't know the root cause.

    [   64.162067] Quectel_clean_modemFatalTimes, clean modemFatalError cnt  filp_open fail !

    [   68.608387] aic32x4_get_divs() line is 303: rate is 8000, mclk is 0

    [   68.608406] aic32x4: master clock and sample rate is not supported

    [   68.608415] aic32x4: sampling rate not supported

    [   68.608433] tlv320aic32x4-codec 4-0018: ASoC: can't set tlv320aic32x4-hifi hw params: -22

    Above is my initial analysis, could you help me find the root cause?

    BR
    Will

  • Will, 

    We are unable to provide driver support due to the large variety of systems developed by third parties and the different Linux versions available. We do provide examples based on TI boards that show the three main components that must be configured and linked:

    • Codec driver - This is provided by TI for select codec like TLV320AIC310x
    • Platform driver - This is provided by the Linux system
    • Machine driver - This connects pins, power, and other board level components together

    This Sitara Linux Audio Driver Overview wiki page provides an overview on how to configure the three components.

    This ALSA User Space wiki page shows some of the command line utilities available.

    This Linux Core Audio User's Guide wiki page shows examples of using audio codecs on different TI Linux EVMs.

    These wiki pages should provide a good starting point for development. For further support, contact the third party and appropriate Linux support forums for your system and Linux version.

    best regards,

    -Steve Wilson