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.

OMAP-L137 EVM McASP and audio codec

hello all

we have a problem with the mcasp and codec audio.
We try to generate in the dsp, a dc signal (constant) to send to output line in the codec audio using mcasp. When we try to recover the constant (interconnect a cable from the output to the input audio codec), this signal are not constant.
our program are attached and the output is like that:
 sample ; L ; R
0;18D3CE;1D1705D
1;1881CF;1CBE668
2;190FCE;1C43078
3;149FD7;1C03280
4;1511D6;1B7BC91
5;12F1DA;1B3A499
6;11E3DC;1AD20A6
7;EA5E3;1A66CB3
8;E89E3;1A132BE
9;BA9E9;19BD8C8
10;A39EC;19634D4
11;AEDEA;19004E0
12;8CBEE;18A74EB
13;615F4;185EAF4
14;675F3;17FE300
15;4DBF6;17AFD0A
16;3AFF9;175BF14
17;1B5FD;1713B1E
18;FFFF1A02;16A252C
19;FFFFAC01;1661134
20;FFFDEE04;162513B
21;FFFC3C08;15D2F46
22;FFFA2E0C;1578751
23;FFF91C0E;1528B5B
24;FFF97A0D;14F1562
25;FFF5D614;1495D6D
26;FFF61614;143E578
27;FFF3B819;13F0782
28;FFF34C19;13B6D89
29;FFF2481B;1364393
30;FFF0E21E;132F79A
31;FFEF2E22;12E3DA4
32;FFEF7A21;12A05AC
33;FFEEC222;12679B3
34;FFECE826;12245BB
35;FFEAB02B;11EDDC2
36;FFE92A2E;11B39CA
37;FFE8FE2E;11531D6
38;FFE8CE2E;111DDDC
39;FFE70832;10EC7E2
40;FFE75631;10AF9EA
41;FFE5FC34;106AFF3
42;FFE40438;10279FB
43;FFE2FE3A;FFE800
44;FFE1AA3D;FB7A09
45;FFE2E23A;F61C14
46;FFE14E3D;F53416
47;FFDD7E45;EFB221


what is wrong? The configuration to mcasp's registers are wrong?

  • Victor, this question appears to be one regarding how to use McASP, rather than a TI-RTOS issue.  I have moved this thread over to the device forum in hopes that you will get a faster response there.

  • Hi,

    Thanks for your post.

    I have reviewed the aic3106 line in code and it looks fine to me on McASP register and AIC3106 codec configuration and I think, the sample input dataR & dataL array shouldn't be DC input and i think, the sample input should be analog audio samples.

    To my knowledge, only analog sample input can be feeded to LINEIN of ADC audio codec which can be taken to DSP through McASP, process and transmit the audio output to DAC via LINEOUT. I don't think, DC input signal can be feed to LINEIN of the audio codec and you cannot expect the same constant DC output from the audio codec (DAC output).

    Thanks & regards,

    Sivaraj K

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

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

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

  • Well, but to perform the same experiment with a sine wave, it is not possible to reconstruct this wave with the samples in "sample-L" and "R-sample". These problems arise when trying to configure the codec at 32 bits, not 16 bits where reconstruction is correct.
    In summary:
    The settings in the codec
    EVMOMAPL137_AIC3106_rset(  9, 0x00 );  // 9  Audio Interface Control B       <- [I2S mode][16 bit]
    and McASP:
    mcasp->regs->RFMT       = 0x00008078; // MSB 16bit, 0-delay, no pad, CFGBus

    mcasp->regs->XFMT       = 0x00008078; // MSB 16bit, 0-delay, no pad, CFGBus
    work well, but

    The settings in the codec
    EVMOMAPL137_AIC3106_rset(  9, 0x30 );  // 9  Audio Interface Control B       <- [I2S mode][32 bit]
    and McASP:
     mcasp->regs->RFMT       = 0x000080F8; // MSB 32bit, 0-delay, no pad, CFGBus

     mcasp->regs->RFMT       = 0x000080F8; // MSB 32bit, 0-delay, no pad, CFGBus

    It does not work well. Where can be the error ?,
    Is the codec settings and McASP for 32-bit data is correct?

  • Hi,

    In my opinion, McASP register configuration holds good and I guess, you need to refer the codec datasheet and validate the codec regsiters as per your requirement which would be the better option to move forward.

    Thanks & regards,

    Sivaraj K

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

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

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

  • Possibly the reason why you are not seeing your DC signal at the output is because of the filtering on the EVM itself. The DC component of the signal is filtered at the output; you will only see it briefly before the capacitor at the output charges resulting in a 0V output.


    You can clearly see the effect of the filter if you output a low frequency square wave; you will see rounded edges consistent with RC filtering. The filter is on sheet 22 of the board schematics.