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.

DSP/BIOS SIO stream with multiple codec devices

Other Parts Discussed in Thread: OMAPL138

Hi,

I am using the OMAPL138 device.  I’m using the DSP McASP interface with 3 AIC31 codecs on the same McASP. Each codec is connected to a different serializer.

I started from the provided PSP 01_30_01 example. It works fine for one codec as in the example.

 

But the problem is to configure the SIO stream for 3 codecs. I need to manage separate TX/RX stream for each codec then using six SIO_create().

 

In the project, I declared one  mcasp_chanparam[]’ structure with 3 McASP serializer for the transmitter and 3 McASP serializer for the receiver. In the *.TCI file, I create 6 dioCodec object with bios.DIO.create. There, I have to provide the audioChanParamsIN/OUT structure. The problem is that structure point to the general ‘mcsp_chanparam[]’ structure common to  all the serializers.

 

My question is I can’t find how to specify to each SIO stream which  McASP serializer to use?

 

Is there any DSP/BIOS example using IOM drivers with multiple codec devices?

 

My configuration is:

DSP/BIOS 5_41_10_36

pspdrivers_01_30_01

Code Generation tool 7.2.0

 

Thanks for your support

Jean

 

  • Hi Jean,

    Jean Belleau said:
    Is there any DSP/BIOS example using IOM drivers with multiple codec devices?

    I do not thik there is any example for using multiple codec devices. Did you try duplicating the "Mcasp_ChanParams" for different codecs?.

    Regarding your other questions, we will get back to you soon..

     

    Best regards,

    Raghavendra

  • Hi Jean,

    Jean Belleau said:
    My question is I can’t find how to specify to each SIO stream which  McASP serializer to use?

    It is not possible to have seperate stream API calls for individual serializers.

    While using the multiple serializers of mcasp, the buffer which we provide to the McASP has to be in such a way that each serializer will be written with the appropriate data. Please refer the omapl138 document section  25.2.4.3.2. It explains how the data written into the McASP will be transmitted over the multiple serializers.

    To configure the multiple serializers in the McASP, as you have explained in your post, add an entry in the  "mcasp_chanparam" and then chose the appropriate buffer format. Refer the OMAPL138_BIOSPSP_Userguide.pdf section 9.3.3 or the Mcasp_edma.c file (function Mcasp_localGetIndicesSyncType()) to get to know the options available for buffer format.

    So in summary, if you want to write to 3 different serializers, then put the data for all the three serializers in a buffer and then submit the buffer to the McASP. Before submitting the buffer, the mcasp/edma has to be configured to read the buffer appropritely to get the data for each and individual seriallizer and send it out. 

    Yuo have mentioned that you are using 3 codecs, are all of them are same codec or they are different?

    Thanks and Regards,

    Sandeep K

  • Hi Sandeep,

    Thanks for your answer.

    I follow the instructions in those documents without succeeding to make it working. I returned in the 1 serializer mode with 2 slot to make it simpler with only one codec AIC31 device.

    There is this comment in the PSP User Guide 9.3.3.3: The size of the IO request is computed as <No of Bytes per Sample> * <No of Samples per Slot>. This value should be given as a size parameter of SIO_submit  ()

    In my advice the size of the IO request should be multiplied also by the number of slot. For example, if I have one serializer, 2 slot, 2 bytes/sample and 512 samples per frame, I should put 2048 (1*2*2*512) to SIO_create() . In the comment it's 1024? Or I missed somthing.

    About your question, the codecs are different AIC31, AIC23 and TAS5012 (amplifier). I should use the I2S mode common for all these devices. 3 serializer and 2 slot mode.

    Thanks

    Jean

     

  • Hi Jean,

    Jean Belleau said:

    There is this comment in the PSP User Guide 9.3.3.3: The size of the IO request is computed as <No of Bytes per Sample> * <No of Samples per Slot>. This value should be given as a size parameter of SIO_submit  ()

    Yes, you are right. The size should have been, <No of Bytes per sample> * <No of Samples per Slot> * <No of slots>. But from the application if you want to receive/transmit smaller data of duration 1/2 msec, that is also possible.

    Jean Belleau said:

    About your question, the codecs are different AIC31, AIC23 and TAS5012 (amplifier). I should use the I2S mode common for all these devices. 3 serializer and 2 slot mode.

    If you are having different codec, then first you need to write codec driver for those. Refer pspdrivers_01_30_01\packages\ti\pspiom\platforms\codec module.

    Then create the driver instances in the *.tci file of the application.

    In the sample application,

               have userinit function for each of the codec Eg: audioUserAic31Init()

               Update the function audioUserAudioInit() to have the audioParams.acNumCodecs = 3 and also audioParams.acDevName[1/2] = "<codec1>"/"<codec2>" (This "<codec1>" and "<codec2>" has to be the name mentioned in the tci file while creating the device).

    Refer Audio and the aic31 codec design documents for further details. 

    I hope this would help you to proceed further.

     

    Thanks and Regards,

    Sandeep K

  • Hi Sandeep,

    I will proceed like this. Thanks for your support

    Jean