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.

tlv320aic325x-codec: Code Firmware Failed

Other Parts Discussed in Thread: TLV320AIC3256, TPA6130A2

Hi All,

We are using tlv320aic325x-codec. After the board is up, If we try to play a .wav file

#aplay Noise.wav

we are getting the below error.
aplay: pcm_write:1540: write error: Input/output error

In the boot up log We see:
    tlv320aic325x-codec tlv320aic325x-codec.0: Code Firmware Failed

The dmesg log:

 params is edb31c00
[  118.877105]  McBSP params setting commented
[  118.877655] tlv320aic325x-codec tlv320aic325x-codec.0: read 1b => c
[  118.877685] gss2 in playback common ioctl5  ed927600 CMD=c25c4111
[  118.885559] tlv320aic325x-codec tlv320aic325x-codec.0: widget Right ADC
[  118.885559]  Right Capture stream Playback event 1
[  118.885589] tlv320aic325x-codec tlv320aic325x-codec.0: widget Left ADC
[  118.885589]  Left Capture stream Playback event 1
[  118.885589] tlv320aic325x-codec tlv320aic325x-codec.0: widget ASIIN
[  118.885589]  ASI Playback stream Playback event 1
[  118.885833] Function: aic325x_mute
[  118.885833] Function: aic325x_mute Exiting
[  123.168548] rproc remoteproc0: error -62 requesting firmware ducati-m3-core0.xem3
[  128.889312] ALSA sound/core/pcm_lib.c:1822 playback write error (DMA or IRQ trouble?)
[  128.893707] Function: aic325x_mute
[  128.893737] Function: aic325x_mute Exiting
[  133.897125] pop wq checking: Playback status: inactive waiting: yes
[  133.897186] tlv320aic325x-codec tlv320aic325x-codec.0: widget Right ADC
[  133.897186]  Right Capture stream Playback event 2
[  133.897216] tlv320aic325x-codec tlv320aic325x-codec.0: widget Left ADC
[  133.897247]  Left Capture stream Playback event 2
[  133.897277] tlv320aic325x-codec tlv320aic325x-codec.0: widget ASIIN
[  133.897277]  ASI Playback stream Playback event 2


Is this because the firware load failed, How to load the firmware on the device.
We have placed the tlv320aic3256_fw_v1.bin in the rootfs folder /lib/firmware, but still its not loaded.

Thanks in Advance,
Raghu

  • Hi Yanko,

    We are using Linux kernel ver 3.4.34.  The link sent by you is the driver source. Can you please share more info on the above issue.

    Thanks,

    Raghu

  • Hello Raghu,

    I investigated your problem.
    At first I suggest you to see following wiki article - https://gitorious.org/ti-codecs/pages/MkCFW6x

    You can also see the example for adding AIC325x codec as follow the guide - http://omappedia.org/wiki/4AI.1.5_OMAP4_ICS_Blaze_AIC_AIC3262_SW_Release3c#Build_and_Usage_of_Firmware_tools_and_Utils

    My suggestions is to add TLC320aic325x in the drivers of your kernel. You must apply following patches in several files:

    drivers/mfd/Kconfig 

    917     config MFD_AIC3XXX
        918     select MFD_CORE
        919     bool
        920    
        921     config MFD_AIC3XXX_I2C
        922     tristate "Support Texas Instruments AIC3XXX platform with I2C"
        923     select MFD_AIC3XXX
        924     select MFD_CORE
        925     # select REGMAP_I2C
        926     depends on I2C
        927     help
        928     Support for the Texas Instruments AIC family of audio SoC
        929     core functionality controlled via I2C.
        930    
        931     config MFD_AIC3XXX_SPI
        932     tristate "Support Texas Instruments AIC3XXX platform with SPI"
        933     select MFD_AIC3XXX
        934     select MFD_CORE
        935     # select REGMAP_SPI
        936     depends on SPI_MASTER
        937     help
        938     Support for the Texas Instruments AIC family of audio SoC
        939     core functionality controlled via SPI.
        940    
        941     config MFD_AIC3256
        942     bool "Support Texas Instruments AIC3256"
        943     depends on MFD_AIC3XXX
        944     help
        945     Support for Texas Instruments AIC3256 low power audio SoC

    drivers/mfd/Makefile -

    obj-$(CONFIG_MFD_AIC3XXX) += tlv320aic3xxx-core.o tlv320aic3xxx-irq.o
    obj-$(CONFIG_MFD_AIC3XXX_SPI) += tlv320aic3xxx-spi.o
    obj-$(CONFIG_MFD_AIC3XXX_I2C) += tlv320aic3xxx-i2c.o

    drivers/mfd/tlv320aic3xxx-core.c

    drivers/mfd/tlv320aic3xxx-i2c.c

    drivers/mfd/tlv320aic3xxx-irq.c

    drivers/mfd/tlv320aic3xxx-spi.c

    include/linux/mfd/tlv320aic3256-registers.h

    include/linux/mfd/tlv320aic3xxx-core.h

    include/linux/mfd/tlv320aic3xxx-registers.h

    sound/soc/codecs/aic3xxx/aic3xxx_cfw.h

    sound/soc/codecs/aic3xxx/aic3xxx_cfw_ops.c

    sound/soc/codecs/aic3xxx/aic3xxx_cfw_ops.h

    sound/soc/codecs/tlv320aic325x.c

    sound/soc/codecs/tlv320aic325x.h

    For all other files apply the sources described in this link:

    https://gitorious.org/ti-codecs/ti-codecs/commit/4b131cdf24467f30503cbb0cdb5d094b1e347489

    sound/soc/codecs/Kconfig

        select SND_SOC_TLV320AIC325X if I2C
        select SND_SOC_TLV320AIC3X if I2C
        select SND_SOC_TPA6130A2 if I2C
         select SND_SOC_TLV320DAC33 if I2C
    …     …    
         depends on SPI
       
         config SND_SOC_TLV320AIC32X4
             tristate
           
         config SND_SOC_TLV320AIC325X

    Best regards,

    Yanko

    917 config MFD_AIC3XXX
    918 select MFD_CORE
    919 bool
    920
    921 config MFD_AIC3XXX_I2C
    922 tristate "Support Texas Instruments AIC3XXX platform with I2C"
    923 select MFD_AIC3XXX
    924 select MFD_CORE
    925 # select REGMAP_I2C
    926 depends on I2C
    927 help
    928 Support for the Texas Instruments AIC family of audio SoC
    929 core functionality controlled via I2C.
    930
    931 config MFD_AIC3XXX_SPI
    932 tristate "Support Texas Instruments AIC3XXX platform with SPI"
    933 select MFD_AIC3XXX
    934 select MFD_CORE
    935 # select REGMAP_SPI
    936 depends on SPI_MASTER
    937 help
    938 Support for the Texas Instruments AIC family of audio SoC
    939 core functionality controlled via SPI.
    940
    941 config MFD_AIC3256
    942 bool "Support Texas Instruments AIC3256"
    943 depends on MFD_AIC3XXX
    944 help
    945 Support for Texas Instruments AIC3256 low power audio SoC