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.

audio test

hello 

where can i find the example about the audio ?

because i want to make a test which do a loopback under the aic33.




Forum: DaVinci™ Digital Media Processors (DSP SoCs)
Posted: Sep 26, 7:49 AM [GMT -5]
Post Subject: Re: Problems with EDMA3
Post author: Gonzalo

Sure! Here is the entire application.

#include "MyXdma.h"

#include <stdio.h>
#include <std.h>
#include <bcache.h>


    typedef struct PARAM{
        unsigned int option;
        unsigned int src;
        unsigned int bcnt_acnt;
        unsigned int dst;
        unsigned int dstbidx_srcbidx;
        unsigned int bcntrld_link;
        unsigned int dstcidx_srccidx;
        unsigned int ccnt;
        }PARAM;    // Tipo Parameter Set


    // buffers in L2
    unsigned char y_mb_L2[16*16];

    // buffers in DDR2
    unsigned char y_mb_DDR2[32*32];


#pragma DATA_SECTION (Params    , ".Params")
#pragma DATA_ALIGN(Params,32)    // g0n - 32 bytes aligned

#pragma DATA_SECTION (y_mb_L2    , ".L2Buffers")

#pragma DATA_SECTION (y_mb_DDR2    , ".DDR2Buffers")

#pragma DATA_ALIGN(y_mb_L2,64)

#pragma DATA_ALIGN(y_mb_DDR2,64)

PARAM Params[4];

   
/* lista de ejemplos de transferencias EDMA3 */
void ddr2_a_L2_2(void);

void main(void)
//void decode_tsk_function(void)
{
    int i;
    int options;


    *(volatile uint *)((uint)DRAE1)=      0xFFFFFFFF;
    *(volatile uint *)((uint)DRAEH1)=     0xFFFFFFFF;
    *(volatile uint *)((uint)QRAE1)=      0x000000FF;   
    *(volatile uint *)((uint)QDMAQNUM)=    0x00000000;
     
   
    /* lanzamos de uno en uno los diferentes ejemplos */

    ddr2_a_L2_2();    // prueba 6   

    while(1);
}

    void ddr2_a_L2_2(void)    // cuatro Y de 8x8 enlazadas params:20-23
    {
        int i, options;


        *(volatile uint *)((uint)QEESR)= (1<<2);                                  // permite eventos del canal 2
        *(volatile uint *)((uint)QCHMAPn+(2<<2))= (23<<5)|(7<<2);    // asociamos canal 2 al param 20



        /* contexto de la transferencia Y1 */
        Params[0].option             = 0x0011F00C;
        Params[0].src                  = (unsigned int)y_mb_DDR2;
        Params[0].bcnt_acnt         = ((8)<<16)|8;
        Params[0].dst                  = (unsigned int)y_mb_L2;
        Params[0].dstbidx_srcbidx    = ((8)<<16)|32;
        Params[0].bcntrld_link        = 0xFFFF;
        Params[0].dstcidx_srccidx    = 0;
        Params[0].ccnt                = 1;
        /* contexto de la transferencia Y2 */
        Params[1].option             = 0x0001F004;
        Params[1].src                = (unsigned int)(y_mb_DDR2+8);
        Params[1].bcnt_acnt            = ((8)<<16)|8;
        Params[1].dst                = (unsigned int)(y_mb_L2+8*8);
        Params[1].dstbidx_srcbidx    = ((8)<<16)|32;
        Params[1].bcntrld_link        = 0x4280;
        Params[1].dstcidx_srccidx    = 0;
        Params[1].ccnt                = 1;
        /* contexto de la transferencia Y3 */
        Params[2].option             = 0x0001F004;
        Params[2].src                = (unsigned int)(y_mb_DDR2+8*32);
        Params[2].bcnt_acnt            = ((8)<<16)|8;
        Params[2].dst                = (unsigned int)(y_mb_L2+8*8*2);
        Params[2].dstbidx_srcbidx    = ((8)<<16)|32;
        Params[2].bcntrld_link        = 0x42A0;
        Params[2].dstcidx_srccidx    = 0;
        Params[2].ccnt                = 1;
        /* contexto de la transferencia Y4 */
        Params[3].option             = 0x0001F004;
        Params[3].src                = (unsigned int)(y_mb_DDR2+8+8*32);
        Params[3].bcnt_acnt            = ((8)<<16)|8;
        Params[3].dst                = (unsigned int)(y_mb_L2+8*8*3);
        Params[3].dstbidx_srcbidx    = ((8)<<16)|32;
        Params[3].bcntrld_link        = 0x42C0;
        Params[3].dstcidx_srccidx    = 0;
        Params[3].ccnt                = 1;


        INIT_CHANNEL_LOW(0x1F);    // borramos el indicador 0x1F

        /* copio param a la tabla y se autodispara QDMA */
        *(volatile uint *)((uint)IDMA0_MASK)=       (uint)0x00000000;    // se enmascaran ...
        *(volatile uint *)((uint)IDMA0_SOURCE)=    (uint)Params;
        *(volatile uint *)((uint)IDMA0_DEST)=      (uint)0x01C04280;     // PaRAM 20-en adelante
        *(volatile uint *)((uint)IDMA0_COUNT)=     (uint)0x00000000;    // trigger IDMA0

        QDMA_WAIT_NOSET_LOW(0x1F);

    }

 

IDMA transfers are not the problem. I tried to execute the same application with QDMA transfers disabled and there were no error message, as expected.

The error "TC Program Set already active" comes just when QDMA transfers start.

The software I am working with is CCS 3.3 (SR10) and DM6437 Little Endian Simulator

 

Regards

 

  • Tomas,

     

            We can best assist you if you could be a little more specific regarding your issue and your desired system. What type of examples are you looking for in regards to audio?  I may not be able to directly answer your quesiton, but I can put you in contact with the correct person if you specify a little more information in regards to your project. I am not sure how your request ties in with the linked thread.

    Drew