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.

AM335x McASP0 and AIC34 playback nodes(pcmC0D0p & pcmC0D1p)


    

Hi All,

As shown above AM335x McASP0 is interfaced with AIC34. Here we successfully created two node pcmC0D0p and pcmC0D1p. We are able to play a song one at a time by opening respective node(pcmC0D0p for Ch1 and pcmC0D1p for Ch2). Here we would like to play two songs simultaneously by opening the corresponding node.

When we tried to play Two song using aplay.

aplay -Dhw:0,0 song1.wav &

First song succesfully played.

aplay -Dhw:0,1 song2.wav &

When tried to play second song while first song is playing, we are getting the error as below.

[ 5663.517494] davinci_pcm: Failed to get dma channels
[ 5663.522652] asoc: can't open platform davinci-pcm-audio
aplay: main:622: audio open error: Device or resource busy

Here we understand that the EDMA channel 8 which is used by McASP0 AXEVT0 event is busy in serving node 1. We think we need to modify the driver so that it plays two songs successfully at the same time. Please suggest how to proceed further.

Regards,

Vishwas HC


  • Hi All,

    Adding to above post, We would like to know how to reserve another EDMA3 channel for node 2 and how to associate both EDMA3 channel(node1 and node 2 channel) to single serializer in order to play two song at the same time. 

    Regards,

    Vishwas HC

  • Hi All,

    I understand that we will not be able to associate two EDMA channel with McASP0. Channel 8 of EDMA is associated with AXEVT0. So below is the one of the approach on which I need some pointers.

    On creation of two nodes successfully, driver is allocating separate EDMA buffer for two nodes(In function davinci_pcm_new(), davinci-pcm file).We understand that the opening and writing to particular node will update the data into respective buffer. If two nodes are opened and written, data will be put in the corresponding EDMA buffer.

     For our application, we need to create another EDMA buffer and associate this buffer with the EDMA channel 8 (used for McASP0 AXEVT0) and update this buffer with the data for both nodes and operate McASP in TDM mode of 4 slots, so that on each AXEVT0 event McASP will pick 4 slot data from this buffer and send it through the serializer.

    Our understand is that, we need to modify the davinci-pcm.c file present in the “sound/soc/davinci” folder.

    Is this approach feasible in ASoC framework?. If yes can you please provide us some pointers to do that?

    Above approach is considering single serializer configured as transmitter. How EDMA operates when we use two serializer configured as transmitter for each node(one serializer for each 3106 as one AIC34 is nothing but two 3106)?

    Regards,

    Vishwas HC