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.

EVM C6747 Starter Kit - Audio Sample Questions

Hi,

I browsed around the forum but I couldn't find the information I am looking for si I post the questions.  I am using CCS 3.3 Platinum with SR12, BIOS 5.33.05, PSP 1.30.  I was able to modify C:\Program Files\Texas Instruments\pspdrivers_01_30_01\packages\ti\pspiom\examples\evm6747\audio\src\audioSample_io.c to play a wave file continuously.   I don't care for the incoming audio sampling for now.  The Audio_echo_Task() is running in a forever loop with the followings:

1. Get the transmit buffer from SIO_reclaim from outStream:  nmadus = SIO_reclaim(outStream, (Ptr *)&xmt, NULL);

2. Fill the transmit buffer, xmt.

3. Issue full buffer SIO_issue to outstream: SIO_issue(outStream, xmt, BUFSIZE * TX_NUM_SERIALIZER, NULL)

The example repeats these 3 steps continuously and stub with silence.  My questions for my application SW are:

1.  Please direct me to documentations on the application level for SIO audio interface.  I found some audio driver information from C67647 BIOS PSP User Guide but it has the lower layers.

2. What would SIO_reclaim(outStream, (Ptr *)&xmt, NULL) does when my audio task continuously call this function every 5msec without issue the full buffer SIO_issue when there is no audio to be played.  I think there is a problem here and I would like to know if this is a wrong approach.  This way I have no playing audio.

If questions 2 is a wrong approach.  I will try a small state machine to do step 1, 2 and then step 3 when a file to be played.  Otherwise, it will stay in a different state that do nothing.

Thanks,

Dennis

  • Hi,

    After I posted this question, I changed my state machine and the application worked great.

    Thanks,

    Dennis

  • The changes I made to make the application work are in the followings.  Before the changes:

    1. Our team member relied on the sample code and made a lot of assumptions.

    2. The application state machine at idle state is constantly issue SIO_reclaim. When there is a wave file to be played, the application move a to different state and and copy the audio data. This is one thing different than the 3 steps in the sample code.: SIO_reclaim, copy and SIO_issue.

    3. The application has too complex logic to determine when the audio data end and fill with zero for silence.

    I made the following changes to make the playing wave file work:

    1. Use the working sample code and call directly to our audio functions.  I created a compiler switch to go back and forth between the working sample and non-working audio functions.  Eventually, I want to have a working sample with all my audio functions.

    2. I found the application audioChanParamsOUT percent gain for codec was configure at 10% and sample code has 70%.  Changed to 70%.

    3. Changed audio application state machine to issue SIO_reclaim only when there is a wave file to play.

    4. Simplified the logic to move the audio data by zero the buffer first and fill as much as audio data availabe.

    Dennis