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.

playback write error (DMA or IRQ trouble?)

Other Parts Discussed in Thread: TLV320AIC3104, TVP5158

Hi All,

 

We use tlv320aic3104 connect to mcasp0, the difference between our board and 8148 EVM is that 8148 EVM connect to the mcasp2.

The following is my change

    1. sound/soc/davinci/davinci-evm.c

     (1)   static struct snd_soc_dai_link ti81xx_evm_dai[] = {

              {

                  .name = "TLV320AIC3X",

                 .stream_name = "AIC3X",

            /* .cpu_dai_name = "davinci-mcasp.2", */

            .cpu_dai_name = "davinci-mcasp.0", //change

                  .codec_dai_name = "tlv320aic3x-hifi",

                  .codec_name = "tlv320aic3x-codec.1-0018",

                  .platform_name = "davinci-pcm-audio",

                  .init = evm_aic3x_init,

                  .ops = &evm_ops,

              },

    

        (2)   static int __init evm_init(void)

           {

            ......

             else if (machine_is_ti8168evm() || machine_is_ti8148evm()) {

                   evm_snd_dev_data = &ti81xx_snd_soc_card;

             /* evm_snd_dev_data_tvp5158 = &ti81xx_snd_soc_card_tvp5158; */ //change

                   index = 0;

                }

            ......              

        

       2./arch/arm/mach-omap2/devices.c

         void __init ti81xx_register_mcasp(int id, struct snd_platform_data *pdata)

      {

          /******change

       ti81xx_mcasp_device.dev.platform_data = pdata;

       platform_device_register(&ti81xx_mcasp_device);

       ti81xx_mcasp0_device.dev.platform_data = &ti8148_evm_snd_data_tvp5158;

       platform_device_register(&ti81xx_mcasp0_device);

          *******/

          ti81xx_mcasp0_device.dev.platform_data = pdata;

       platform_device_register(&ti81xx_mcasp0_device);

      }

        

       then "run aplay -vv ldh.wav", folow is my log:

          Plug PCM: Hardware PCM card 0 'TI81XX EVM' device 0 subdevice 0

              Its setup is:

              stream       : PLAYBACK

              access       : RW_INTERLEAVED

              format       : S16_LE

              subformat    : STD

              channels     : 2

              rate         : 44100

              exact rate   : 44100 (44100/1)

              msbits       : 16

              buffer_size  : 32768

              period_size  : 2048

              period_time  : 46439

              tstamp_mode  : NONE

              period_step  : 1

              avail_min    : 2048

              period_event : 0

              start_threshold  : 32768

              stop_threshold   : 32768

              silence_threshold: 0

              silence_size : 0

              boundary     : 1073741824

              appl_ptr     : 0

              hw_ptr       : 0

              ###############       +                            | 42%

 

    playback write error (DMA or IRQ trouble?)

    aplay: pcm_write:1528: write error: Input/output error

      

       Now I don't know where is the problem, the hope can get you help

      

Thank you very much