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.

Is it possible to parallel the audio and processing

I am using the command "DSK6455_AIC23_write32(hCodec, soud_buffer)"  to create the sound on the C6455 DSK.  In the real-time processing, I would like to parallel this command with other processing in the DSP core (the sound can be heard from the C6455 DSK and the DSP core is processing on something else).  Is it possible? Any example code?

  • Since this function is DSP code, it will be the only thing running when it runs. But it is very fast since it just writes a value to a register and then returns. The big time consumption comes when you sit in a while-loop waiting for the TxRDY bit to allow you to write the new data.

    One choice is to configure an interrupt so that you get an interrupt when the McBSP is ready to send another word. You can put this function call in the ISR and return from the interrupt. Then you can be doing other processing while the data is being shifted out to the AIC23. Your other processing code will get interrupted when the next word can go out, then it will return to the place it was running before the interrupt.

    Another option is to use the EDMA. There may be some streaming drivers that can be used for this purpose. Please take a look at the DSP/BIOS documentation to see how it could work for you.

  • Thank you for your reply.  Do you have any example to do it? 

    I would like to give some context of my project: 

    Currently, what I am doing is buffering the sound data to be played block by block, and let them played blk by blk.  The problem is: the sound is not continuous because there is some time intervals (other processing) between the sound blks.   That's why I want to make sure the sound are played continuous without being delayed by other processing so that the sound can be played continuously.

    Examples to do that will be very helpful and appreciated.

     

     

     

  • What you want to do is streaming I/O, and there are DSP/BIOS drivers to help with that. Please take a look at the DSP/BIOS User's Guide and look in chapter 7 for Streaming I/O and Device Drivers.

    SIO and GIO drivers will allow you to capture a block of audio, then continuing to capture another block while processing the first block. Then you can start sending the processed blocks as they become available. The drivers can be configured to use EDMA (what you want) or interrupts (more CPU overhead than EDMA).

  • This is very helpful.  I am reading those part as you suggested.  By the way, is there any existing examples (streaming IO and audio device) which I can follow?

  • I found an example for C6416, "A DSP/BIOS AIC23 Codec Device Driver for the TMS320C6416 DSK", http://www.ti.com/lit/SPRA909, but I can not find the source code of the example in this document.  Where can I find it?

    I did find another example from, "An Audio Example Using DSP/BIOShttp://www.eng.iastate.edu/ee424/labs/C54Docs/spra598.pdf.  But I can not find the source files according to the directory mentioned in the documents? Anybody can help me?

  • Pardon my edit, but your link in the first paragraph above was for the C55x version while the title was for the C6416 version. Both are now C6416.

    The Driver Developer's Kit (DDK) has examples that may include the source described in this document, or at least something similar.

  • Thank you for your link.  I just downloaded the setup file but I found an warning and the setup aborted. "Setup has not found any valid products to update.  Your system may already be up-to-date or you are attempting to install a serial update out of sequence." Is it possible to get the zipped folder somewhere without using the setup file?

  • What version of CCS are you using? If it is a DSK-only version of CCSv3.3 then it may be more difficult to install upgrades, but I would have thought the DDK would not be blocked by that. CCSv4 is free for use on our DSKs and it comes with the device drivers bundled into the PSP for newer devices; I do not know if that includes C6455 or not.

    You may want to post the question of getting DDK for the DSK6455 to the Code Composer Studio forum, but I will see what I can do to get an answer here.

  • I am using C6455 DSK-only version of CCSv3.3.

    By the way, I am trying to figure out how to config the device driver in DSP/BIOS for the audio application using SIO.   In the device drivers, I selected the User-Defined Devices and then inserted a new UDEV.  In the properties, what should I put into the "init function" and "function table ptr"? What kind of library files I need to included? 

  • These should be listed with explanations in the DSP/BIOS User's Guide and DSP/BIOS API Guide. I wish we had better examples that fit exactly what you want to do, and I am still looking for some examples that will have more of the work already done.

    You may want to make a new posting with your new questions onto the Embedded Software -> BIOS Forum to reach the BIOS experts.