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.

Issue while creating TDU instance

Hi,

I am working on C674x elf little endian.
I am trying to integrate VoLib 2.0.0.3 on this by using C64x+ library.

I started off with TDU module by integrating into our project.
As per procedure describe, I am trying to create a TDU instance by determining the memory requirements via tduGetSizes() api,allocating memory for it and calling tduNew().

But the application is crashing(or not coming out of) in tduNew().

I am using the default configurations as mentioned in test example file tduSim.c.

Please find the different modules and its version, that I am using:

bios - 6.33.02.31
biospsp - 3.10.5.0
xdais - 7.21.0.2
XDCtools - 3.23.01.43
VoLib - 2.0.0.3

Please let me know is there any option to enable debug prints in the library api's.

Also, please let me know what am I missing now here.


Regards,
Bharath

  • Dear Eric,

    Thanks for your reply but those threads are of no use to me.

    tduGetSizes() is returning without any error when tduSizeConfig_t::maxSamplesPerFrame is set to 40.
    But when I change it to 80, it is returning with 1(tdu_ERROR), though there is enough memory.
    Also audio samples in my case are 16-bit signed samples. So for a period of 5ms, there will be 80 samples, which will have to be processed.
    So how do I deal with this?

    Please find below, how tduContext looks like in my project(same as defined in tdusim.c):

    tduContext_t tduContext = {
    sysToneDetect,
    #ifdef GG_INCLUDE_BDTEW
    sysBdtEwDetect,
    #else
    NULL,
    #endif
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    sysDebugInfo,
    /* Following data are initialized in tduNew() */
    0, 0, 0, 0,
    NULL,
    NULL,
    NULL,
    0, 0, 0, 0,
    0, 0, 0, 0,
    0, 0, 0, 0,
    0, 0, 0, 0
    }; /* tduContext */

    Here is the printout of the exception which happens in tduNew().

    [C674X_0] A0=0x0 A1=0x0
    [C674X_0] A2=0xe A3=0x3
    [C674X_0] A4=0x9c8f56a8 A5=0x14000103
    [C674X_0] A6=0x0 A7=0xf8
    [C674X_0] A8=0x9c8f56a8 A9=0x0
    [C674X_0] A10=0x9c8a3770 A11=0x4000
    [C674X_0] A12=0x9c8f5140 A13=0x9c8bbf40
    [C674X_0] A14=0x9c8f56a8 A15=0x9c8fa028
    [C674X_0] A16=0x0 A17=0x0
    [C674X_0] A18=0x9c8fae10 A19=0x0
    [C674X_0] A20=0x9c897b0c A21=0x4c
    [C674X_0] A22=0x9c8f56a8 A23=0x0
    [C674X_0] A24=0x0 A25=0x0
    [C674X_0] A26=0x9c8fae10 A27=0x0
    [C674X_0] A28=0x9c897b0c A29=0x20
    [C674X_0] A30=0x0 A31=0x0
    [C674X_0] B0=0x0 B1=0x0
    [C674X_0] B2=0x0 B3=0x9c9284ff
    [C674X_0] B4=0x0 B5=0x2a
    [C674X_0] B6=0x9c08a63c B7=0x0
    [C674X_0] B8=0xc1fd8718 B9=0x2fc5
    [C674X_0] B10=0x11 B11=0x48
    [C674X_0] B12=0x2 B13=0x6
    [C674X_0] B14=0x9c93e094 B15=0x9c08a628

    Please let me know if you need more info on the same.

  • Bharath,

    TDU only supports 5ms frame size, see tdusim.c:  #define TST_MAX_FRAME 40  /* max frame size is 5 ms */.

    Also, the TDU test applications can use A-law/u-law and linear 16-bit PCM. You can see  at void takeFileSamples(). Any A-law/u-law examples are expanded by application into 16-bit linear. The final input to TDU using 16-bit linear in the tx_in_frame buffer ===> tduSendIn (tduInst, tx_in_frame, tdu_TX_ONLY); This buffer is defined as signed short tx_in_frame[TST_MAX_FRAME]; So, for every 5 ms frame, you have 40 samples, each sample is 2 bytes. I don't see why you need to change TST_MAX_FRAME to 80.

    Regards, Eric