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.

McASP TDM slot can slip by one slot on reloading DSP program via SYSLINK

We are trying to track down an issue affecting our use of the McASP peripheral on the L138 from the DSP processor.

The overall system has two external CODECs, an AIC3204 and AIC34, and a bespoke device attached to two PCM highways. The clock master is the AIC3204 and the McASP peripheral is configured to use the external clock.

The SYS/BIOS driver is used to access the McASP with a DEV_CREATE call to use the device and the GIO API to create the two streams representing the two PCM highways.

BCLK is 2MHz and WCLK/FSYNC is 8Khz. 12 slots of the 32 TDM slots are used. All slots are 16bit.

The dsp's role is to take the content of slots on one "incoming" PCM highway, mix the audio in the slots, and then output the mix on slots on the "outgoing" PCM highway.

The issue observed is:

a) boot-up L138 and from Linux load the dsp image. All mix audio is correct - i.e. incoming and outgoing audio is in the correct slots.

b) without rebooting the L138, reload the dsp image. The incoming audio is now rotated by exactly one slot. Ie. Audio which should be heard on slot zero is now at slot one, and so on. However outgoing data is on the correct slots.

Very occasionally, on a reboot the problem outline in b) is observed.

Before dumping configuration data into the forum I'd like to check that this is the correct forum for posing this question.

Thank you.

Duncan.

  • Hi,

    Just try to disable the "Audio Support" & "I2C support" in linux menuconfig and check for the same behavior.

    http://processors.wiki.ti.com/index.php/OMAP-L137_Audio_Drivers_in_the_DSP_%2B_Linux#Adapting_your_Linux_Kernel_to_avoid_conflicts

    Have you tried to run the same project in DSP alone (DSP app) ?

    Could you please provide the steps that followed by you.

    Have you able to load & run the DSP app multiple times with out rebooting ?

  • Hi and thanks for your suggestions.

    I have checked the kernel config and our set up so has audio support disabled but I2C support is enabled. I will rebuild the kernel and retry our tests to see if the PCM slot still slips by one and report back.

    In answer to your remaining questions:

    I have not tried to run the same project as a DSP alone - the DSP application we created uses syslink to receive control messages from a Linux application running on the ARM. Running the DSP application under control of CCS 4.0 rather than it loading via syslink from a Linux application will require me to create a version that doesn't rely on commands but instead starts up in a state so that I can observe whether channel slip occurs by listening to audio outputs.

    Could you clarify your question regarding what steps taken? Do you mean how do we initialise the various peripherals? 

    Also I will answer your last question once I have adapted our standalone DSP application so that it is not loaded by a Linux process over SYSlink.

    Thanks again for your assistance - it really is appreciated.

    Duncan.

  • Hi Duncan,

    Thanks for your update.

    1)

    It is better if you create the DSP project as stand alone instead syslink project.

    If it is syslink, It is bit difficult to narrow down the problem(we have to consider from ARM side too).

    I have checked the kernel config and our set up so has audio support disabled but I2C support is enabled. I will rebuild the kernel and retry our tests to see if the PCM slot still slips by one and report back.

    Try to disable I2C also, since you are using CODEC ICs which communicates through I2C bus (I hope so) for sending commands (initialization)

    Please correct me if I am wrong.

    Could you clarify your question regarding what steps taken? Do you mean how do we initialise the various peripherals?

    No, Just simple steps to invoke the DSP.

    Ex:

    insmod syslink

    ./slaveloader startup DSP xxx.out


    2)

    Please check your syslink project  to check whether the exit/delete/release functions properly got cleared/uninitialized for next run.

  • Thanks for your comments and sorry for the delay in responding.

    We have now rebuilt the kernel without I2C support. This did not fix the issue however this is the correct set-up for the kernel so will will continue to use this kernel build.

    The steps taken to start the dsp application is done via a helper application running under Linux:

    static int load_dsp_image (proc_local_data_t *proc_data)
    {
        int status = STATUS_OK; 
        UInt32 fileId;
        ProcMgr_AttachParams attach_params;
        ProcMgr_StartParams  start_params;
    
        /* 
        ** SysLink initialization 
        */
        SysLink_setup();
    
        if((proc_data->remote_proc_id = MultiProc_getId(REMOTE_PROC_NAME)) == MultiProc_INVALIDID)
        {
            DBG_PRINTLN_ERROR((proc_info->id, 
                               proc_info->proc_name,
                               "MultiProc_getId Failed: Invalid ID: %s",
                               REMOTE_PROC_NAME));    
            status = -1;
            return status;
        }
    
        if((status = ProcMgr_open(&proc_data->handle, proc_data->remote_proc_id)) < 0)
        {
            DBG_PRINTLN_ERROR((proc_info->id, 
                               proc_info->proc_name,
                               "ProcMgr Open  Failed"));    
            return status; 
        }
    
        ProcMgr_getAttachParams(NULL, &attach_params);
        if((status = ProcMgr_attach(proc_data->handle, &attach_params)) < 0)
        {
            DBG_PRINTLN_ERROR((proc_info->id, 
                               proc_info->proc_name, 
                               "ProcMgr Attach  Failed"));    
            return status; 
        }
    
        if((status = ProcMgr_load(proc_data->handle, DSP_IMAGE_PATH, 0, NULL, NULL, &fileId)) < 0)
        {
            DBG_PRINTLN_ERROR((proc_info->id, 
                               proc_info->proc_name, 
                               "ProcMgr Load  Failed"));    
            return status; 
        }
    
        ProcMgr_getStartParams(proc_data->handle, &start_params);
        if((status = ProcMgr_start(proc_data->handle, &start_params)) < 0)
        {
            DBG_PRINTLN_ERROR((proc_info->id, 
                               proc_info->proc_name, 
                               "ProcMgr Start  Failed"));    
            return status; 
        }
    
        if ((status = ProcMgr_close(&proc_data->handle)) < 0) 
        {
            DBG_PRINTLN_ERROR((proc_info->id, 
                               proc_info->proc_name, 
                               "ProcMgr Close Failed"));    
            return status; 
        }
            
        return status;
    }

    I am trying to simplify the dsp application we are using so that it is suitable for being directly run from CCS 4.0 and from the slaveloader.

    I will also investigate the exit/delete/release functions as you suggested.

     

    Thanks for bearing with us.

     

    Duncan.