The Multi Channel Audio Seiral Peripheral (MCASP) driver is a generic, full-duplex driver that transmits and receives data using the MCASP interface. This is specially designed to transmit and receive the digital audio data.
To use the MCASP driver to send data over the MCASP interface, the application calls the following APIs:
The McASP driver provides various buffer formats for sending the data to/from the audio device. The differences between these formats arise from the way the audio samples are collected from various serializers and their timeslots and arranged in the system’s memory. This way the application can choose to run audio processing algorithms over the data without the need for re-arranging those data every frame. This section provides an overview of the various formats . In the explanatory diagrams in each section, McASP controller recieves samples in frame intervals denoted by t1,t2..tn. The McASP driver collects these and arranges those samples in the memory in various formats in to the host’s System memory. We have chosen 32 bit samples and 32-bit word addresses throughout for simplicity.
1-Serializer Multi-Slot Interleaved: This is applicable if multiple slots are used with one serializer. The samples from the different timeslots are stored interleaved in the memory as below. Different timeslots’ samples are denoted by different colors and are labelled t1,t2..tn according to the time they arrive at the serializer.
1-Serializer Multi-Slot NonInterleaved: This is applicable if multiple slots are used with one serializer. The samples from the different timeslots are grouped together on the basis of the timeslot and stored in the memory as shown below. Different timeslots’ samples are denoted by different colors and are labelled t1,t2..tn according to the time they arrive at the serializer.
Multi-Serializer Multi-Slot Interleaved Type1: This is applicable if multiple serializers are used and each serializer containing multiple timeslots. The samples are stored in the memory interleaved based on serializer and timeslots as shown below. In this example, there are 3 serializers and 2 timeslots per serializers whose samples are noted by Ln (left) and Rn (right). Different serializers’ samples are denoted by different colors.
Multi-Serializer Multi-Slot Interleaved Type2: This is applicable if multiple serializers are used and each serializer containing multiple timeslots. The samples are grouped based on the serializer and within one serializer, the timeslots are interleaved as shown below. In this example, there are 3 serializers and 2 timeslots per serializers whose samples are noted by Ln (left) and Rn (right).Different serializers’ samples are denoted by different colors.
Mcasp driver allows loopjob enabled/disabled configuration to handle delayed application buffer submission at run time. Loopjob is a default buffer that gets transmitted / received into if the application fails to submit the buffers in time. When loopjob is disabled the last 2 application buffers will be re programmed and re used. The application callback corresponding to the re programmed buffers is not called.
Include the below file to access the APIs
Instance Open Example
Instance Close Example
Start McASP Transfer Example
Stop McASP Transfer Example