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.

RTOS/EVMK2G: Applying beam former to circular microphone array of 66AK2Gx

Part Number: EVMK2G

Tool/software: TI-RTOS

Hi,

I am stepping through code in Projects 'K2G_bf' of the 66AK2G12 Evaluation board with circular mic array. (Both Projects 'K2G_bf' and 'K2G_bf_rt' execute properly and I can hear the beamformer through earphones.)

I see how the program loads the fraction delay filter coefficients of the beam former in 'bfNew()' function, called from 'sysBfCreate()'. 

However, I can't find in the code where exactly these coefficients are multiplied (convolved) with the 10 ms frames of mic input data. 

It seems like the function 'bf_apply_filter()' called by 'bfProcess()' does this (files in the AER library folder), but I don't see at what step in the code this function (or something like it) is called to beamform the mic data and produce the beam former output.

Also, the debugger in Code Composer 8.0 running on Window OS TI-RTOS, doesn't always step forward one line at a time; sometimes it steps back to a previous line before stepping forward again. Not sure why the weird stepping behavior.

  • Seton,

    The BF process happens at:

    bfProcess(inst_p, (void*)&mics_in[0], (void*)frame_p);
    This is around line 755 in audioSample_io.c

    Does the stepping back happen when entered into a loop?

    Lali
  • Hi Lali,

    I'm using PDK K2G 1.0.10 that is supposed to be used for the Projects 'K2G_bf' and 'K2G_bf_rt'. I see four locations where 'audioSample_io.c' exists within the file structure in the folder 'pdk_k2g_1_0_10', but none of these contain the function 'bfProcess'. I only find this function in the 'aer_c64Px_obj_17_0_0_0' folder, that is used for this board. So I don't think 'audioSample_io.c' ever gets called for the two Projects I am looking at. 

    Does the beamformer actually every get implemented in 'K2G_bf' and 'K2G_bf_rt'? If so, what function does it, and when does it get called?

    The stepping back happen happens within a function 'bfControl', which is used inside a loop. It may be an optimization thing that happens at the assembly level. I noticed it in 'bfControl' function in the folder 'C:\ti\aer_c64Px_obj_17_0_0_0\packages\ti\mas\aer\src\bf'.

    -Seton

  • Seton,

    Did you check mcasp_cfg.c?

    Lali

  • Thanks Lalindra,

    That looks correct. However, I also am trying to figure out how it gets called in the main program? Is it in an Interrupt Service Routine? If so, how is it activated and what triggers the interrupt? I ultimately am trying to write my own beamformer. Can I even modify this function, or does the project used a precompiled version of it from the make file, that can't compile modified versions of this function? Any sections in the programmers manual that can describe this would be very helpful.

    Thanks,

    Seton

  • Seton,

    bfProcess() is part of Audio_echo_Task() which if you look at the .cfg file is a BIOS Task

    Program.global.task0 = Task.create("&Audio_echo_Task", task0Params);

    bfProcess() is part of:
    C:\ti\aer_c64Px_obj_17_0_0_0\packages\ti\mas\aer\src\bf\bfproc.c

    which I believe you can recompile. There's some documentation located at C:\ti\aer_c64Px_obj_17_0_0_0\packages\ti\mas\aer\docs

    Lali