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.

McASP doesn't generate dma events when more than one serializer is active

Other Parts Discussed in Thread: TMS320DM8168

Hi,

I've got a problem with McASP on TMS320DM8168 chip. I'm using ALSA davinci-mcasp driver. My goal is to capture audio on four serializers simultaneously (pins AXR0,1,2,3). I've successfully got capture on one serializer at time working, but when I try to use more than one serializer at the same time (at least two configured as recieviers), then I get no EDMA events from McASP. The following is a my platform_data for McASP:

static u8 my_mcasp0_serializer_direction[] = {

RX_MODE, RX_MODE, RX_MODE,

RX_MODE, INACTIVE_MODE, INACTIVE_MODE

};

static struct snd_platform_data my_mcasp0_data = {

.tx_dma_offset = 0x46000000,

.rx_dma_offset = 0x46000000,

.op_mode = DAVINCI_MCASP_IIS_MODE,

.num_serializer = ARRAY_SIZE(my_mcasp0_serializer_direction),

.tdm_slots = 4,

.serial_dir = my_mcasp0_serializer_direction,

.asp_chan_q = EVENTQ_2,

.version = MCASP_VERSION_2,

.txnumevt = 1,

.rxnumevt = 1,

};

 

Have anyone got similar problem, or have any ideas on that?

Thanks in advance and best regards.

Michal.

  • Hi,

    Multi-serializer mode is not supported at the moment.

    However there are a few things you can check:

    1. From the changes you have done, it appears you are using McASP0. Since the EVM uses McASP2, just to double-check... when you say you have capture on 1 serializer working, this was on McASP0 with the same driver?
    2. Can you also check that the pin-muxing of all the serializers has been taken care of and that the correct EDMA event no. is being used.

    Regards,

    Vaibhav

  • Hi Vaibhav,

    Thank you for your reply. 

    Quick answers:

    1. Yes, I got McASP0 with one serializer working properly. Also McASP1 that I use for audio playback works fine with one serializer.

    2. Yes, the pin-muxing and EDMA events are set correctly. 

    I had to modify a bit McASP driver to achieve the above, but not in the area of DMA events. I've already found out why I didn't get DMA events before. It was because of wrong DMA transfers length set by the McASP driver, which doesn't take into account the fact of using more than one serializer. Unfortunately, as you've said a multi-serializer mode is not supported and a simple change to DMA transfer length is not enough to get another serializer working simultaneously. McASP driver needs more changes.

    Regards,

    Michal.

  • Hello Michal,

    i have the same issue.

    Do you have any update?

     

    I need to use 2 rx_mode serializer simultaneously on MCASP0 (dm6467).

    individually they work correctly.

     

    Regards

    Claudio

  • Hi Michal/Claudio,

    Can you please share the buffer size change done to make single channel works.

    For me it is hanging when trying to read.

    First DMA transaction itself is not happening.

    Thanks and Regards,

    Nitish James

  • Hi Michal/Claudio,

     

    You have to set the FIFO depth inline with your DMA settings. DMA acount should b equal to WORD size, bcount should be equal to FIFO depth (Numbe of Events X Number of DMA or Serializers, please check the FIFOCTL register of McASP) and the transfer size should be divided by FIFO depth i.e. ccount. Also set the DMA to operat in AB sync mode.

    I hope this should solve the problem.

     

    Regards,

    ~Ajit