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.

Getting Single Values from L138/C6748 Audio Codec

Other Parts Discussed in Thread: OMAPL138

I am using the LCDK development kit for a project. I am currently trying to use the audio codec to manipulate data in a streaming fashion. For the project, I need to get single values from the audio codec once it gets them. I was wondering if there was a way for me to look at audio samples only one value at a time. I know that there are examples for using McASP to get buffers of data, but I really need the values to be on their own.

I wasn't sure where to start or how to go about doing this.

Thanks!

  • Hi Vignesh,

    Thanks for your post.

    To get single value from the audio codec, you need to appropriately configure the sample rate and also need to check the feasibility of this through AIC3106 codec registers configuring through AIC3106 codec datasheet.

    Actually, if you try configuring different sample rate appropriately, you need to set the same thru. CodecRegWrite() API, you need to refer the AIC3106 codec datasheet and check for appropriate codec registers and corresponding values need to set. Please refer the aic3106 codec datasheet as below:

    http://www.ti.com/lit/ds/symlink/tlv320aic3106.pdf

    For the sample rate configuration, if you change the sample rate accordingly, the appropriate fs will be derived from the below equation:

    fs = (PLL_IN * [pllJval.pllDval] * pllRval) /(2048 * pllPval).

    a and appropriately, you need to set the sample rate through codec register API as below:

    /* Set the sample Rate */

    CodecRegWrite(baseAddr, AIC31_P0_REG2, temp);

    CodecRegWrite(baseAddr, AIC31_P0_REG3, 0x80 | pllPval);

    For all the above code, please refer the aic31.c source file from the below installed path:

    ~ti\OMAPL138_StarterWare_1_10_03_03\examples\evmOMAPL138\mcasp\aic31.c

    Also, you could check the starterware audio application DMA buffer handling which is programmed in such a way to work with 4 transmit buffers and 3 receive buffers for DMA buffer handling.

    The RX paRAM set 0 is initialized to receive the first audio sample in the RX buffer-0 and the paRAM set 0 is linked to linked paRAM set 40.  The paRAM set 40 is linked to paRAM set 41, which is initialized to receive data in RX Buffer 1. The paRAM set 41 is linked back to paRAM set 40 and hence the reception paRAM set is initialized as 0-->40-->41-->40, thereby, the linking does not change as the application executes.

    The EDMA PaRAM set initialization and McASP Tx. and Rx. statemachines are well documented in the below wiki:

    http://processors.wiki.ti.com/index.php/StarterWare_Audio_Application

    Thanks & regards,

    Sivaraj K

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.

    -------------------------------------------------------------------------------------------------------