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.

Audio loopback sample modification in VAYU BSP for multi-serializers

Expert 7150 points


Hello,

 

My customer is using audio loop back sample in bsp_01_06_00_12 and confirmed it works fine on TDA2x EVM. Then they changed mcasp_chanparam to use multi-serializers (MCASP_BUFFERFORMAT_MULTISER_MULTISLOT_SEMI_INTERLEAVED_1) for input and output. They are seeing Mcasp_localIsrSwiFxn is repeatedly called because of McASP underrun/overrun just after start of Frame Sync Generator in Mcasp_localActivateSmFsForXmt().

 

Are there any other parameters they need to change?

Best regards,

Ken

  • Hi,

    There are three fields from Mcasp_ChanParams which set up the serializer configuration for the McASP channel:

    1. noOfSerRequested - tells the driver how many serializers are being used
    2. indexOfSersRequested[] - tells the driver which serializers are used for this channel
    3. dataFormat - uses Mcasp_BufferFormat to program EDMA PaRAM

    It sounds like 3 has been completed but 1 and 2 are missing.

    Also, please closely analyze the number of TDM slots used per serializer.  The loopback example configures for 2 TDM slots (I2S) mode.  If the configuration requires a different TDM mode, then also please cross check the necessary TDM options in both Mcasp_ChanParams and Mcasp_HwSetupData.

  • Hi Stephen,

    They have compeleted 1-3 as follows.

    1) 0x0002 for both input and output.

    2) For input

         {MCASP_SERIALIZERNUM_0, 
          MCASP_SERIALIZERNUM_1, }

        For output

         {MCASP_SERIALIZERNUM_2, 
          MCASP_SERIALIZERNUM_3, }

    3) MCASP_BUFFERFORMAT_MULTISER_MULTISLOT_SEMI_INTERLEAVED_1 for both input and output.

    The number of TDM slots is 2 for input and output. They also set Pinmux correctly. Are there any other places they need to modify?

    Best regards,

    Ken

  • Hi Fukushima-san,

    A few other questions and things to check:

    • Are they changing noOfChannels for Mcasp_ChanParams?  Note that this parameter refers to number of audio channels after frame sync pulse, not total number of audio channels.  So for the 4-channel configuration over 2 serializers, noOfChannels should still be 2.
    • Is enableHwFifo set to TRUE for both Rx and Tx?  If so, can you see if the behavior persists with this set to FALSE?  This is more of a test rather than a solution.

    Thanks,

    Stephen

  • Hi Stephen,

    Regarding noOfChannels, it is 2 as they are using I2S mode. I will ask them what happens when enableHwFifo = FALSE.

    Best regards,

    Fukushima

  • Hi Fukushima-san,

    Just following up on the forum since you have confirmed that disabling the FIFO seems to resolve the issue.  Looking into the code a bit more, please make sure the loopjob buffer is also the correct size as well.  The loopjob buffer should be the (word width * number of slots * number of serializers).  For the 32-bit, single serializer I2S case, this is 8 bytes.  For multiple serializers with the same data format, the application needs to increase the size.

    Thanks,

    Stephen

  • Hi Stephen,

    Okay, I will tell them to change the size accordingly.

    Best regards,

    Fukushima