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 example problem for LCDKC6748 in Biospsp

 

I have purchased a TMS320C6748 DSP Development Kit (LCDK) and an emulator that working well. LCDKC6748 loopbacks audio from line in to line out well when running mcasp example of C6748_Startware_1_20_03_03.

 

But LCDKC6748 can't loopback the audio from line in to line out when running audio example of biospsp_03_00_01_00.

 

I have changed code as follows:

 

In audio_evmInit.c file, modify the void configureAudio(void) function:

void configureAudio(void)

{

    CSL_SyscfgRegsOvly syscfgRegs = (CSL_SyscfgRegsOvly)CSL_SYSCFG_0_REGS;   

    Uint32 savePinmux0 = 0;

    Uint32 savePinmux1 = 0;

    Uint32 savePinmux4 = 0;

   

#ifdef KICK_REG_ENABLE     

    /*Enable write access to PINMUX and CFG registers in KICK0R and KICK1R    */

    KICK0_REGISTER = KICK0_ENABLE_KEY;

    KICK1_REGISTER = KICK1_ENABLE_KEY;

#endif

 

    savePinmux0 = (syscfgRegs->PINMUX0 &

                  ~(CSL_SYSCFG_PINMUX0_PINMUX0_3_0_MASK  |

                    CSL_SYSCFG_PINMUX0_PINMUX0_7_4_MASK  |

                    CSL_SYSCFG_PINMUX0_PINMUX0_11_8_MASK |

                    CSL_SYSCFG_PINMUX0_PINMUX0_15_12_MASK|

                    CSL_SYSCFG_PINMUX0_PINMUX0_19_16_MASK|

                    CSL_SYSCFG_PINMUX0_PINMUX0_23_20_MASK|

                    CSL_SYSCFG_PINMUX0_PINMUX0_27_24_MASK|

                    CSL_SYSCFG_PINMUX0_PINMUX0_31_28_MASK));

 

    //2013.6.3 wuln

#if 0

    savePinmux1 = (syscfgRegs->PINMUX1 &

                  ~(CSL_SYSCFG_PINMUX1_PINMUX1_15_12_MASK|

                   CSL_SYSCFG_PINMUX1_PINMUX1_19_16_MASK));

#else

    savePinmux1 = (syscfgRegs->PINMUX1 &

                  ~(CSL_SYSCFG_PINMUX1_PINMUX1_7_4_MASK|

                   CSL_SYSCFG_PINMUX1_PINMUX1_11_8_MASK));

#endif

    //end wuln

   

    savePinmux4 = (syscfgRegs->PINMUX4 &

                  ~(CSL_SYSCFG_PINMUX4_PINMUX4_11_8_MASK |

                    CSL_SYSCFG_PINMUX4_PINMUX4_15_12_MASK));

 

    /* write to the pinmux registers to enable the mcasp0 and i2c0            */

    syscfgRegs->PINMUX0 = (savePinmux0 | 0x01111111);

    syscfgRegs->PINMUX1 = (savePinmux1 | 0x00011000);

    syscfgRegs->PINMUX4 = (savePinmux4 | 0x00002200);

}

 

In audioSample_main.c file, modify the void audioUserAic31Init() function:

void audioUserAic31Init()

{

    Aic31_init();

    audioAic31Params = Aic31_PARAMS;

    audioAic31Params.acCtrlBusName = "/i2c0";

 

//2013.6.3 wuln

audioAic31Params.acSerialDataType = ICodec_DataType_I2S;

    //end wuln

}

 

In audioSample_io.c file, configure rx and tx:

Mcasp_HwSetupData mcaspRcvSetup = {

        /* .rmask    = */ 0x0000FFFF, /* All the data bits are to be used     */

        /* .rfmt     = */ 0x00018074, /*

                                       * 1 bit delay from framsync

                                       * MSB first

                                       * No extra bit padding

                                       * Padding bit (ignore)

                                       * slot Size is 16

                                       * Reads from DMA port

                                       * Rotate right by 16 bit positions

                                       */

        /* .afsrctl  = */ 0x00000110, /* I2S mode,

                                       * Frame sync is one word

                                       * Rising edge is start of frame

                                       * externally generated frame sync

                                       */

        /* .rtdm     = */ 0x00000003, /* slot 1 and slot 2 is active (I2S)               */

        /* .rintctl  = */ 0x0000000F, /* sync error, overrun error, clock error and dma error       */

        /* .rstat    = */ 0x000001FF, /* reset any existing status bits       */

        /* .revtctl  = */ 0x00000000, /* DMA request is enabled or disabled   */

        {

             /* .aclkrctl  =  */0x00000000,

             /* .ahclkrctl =  */0x00000000,

             /* .rclkchk   =  */0x00000000

        }

} ;

 

Mcasp_HwSetupData mcaspXmtSetup = {

        /* .xmask    = */ 0x0000FFFF, /* All the data bits are to be used     */

        /* .xfmt     = */ 0x00018074, /*

                                       * 1 bit delay from framsync

                                       * MSB first

                                       * No extra bit padding

                                       * Padding bit (ignore)

                                       * slot Size is 16

                                       * Reads from DMA port

                                       * Rotate right by 16 bit positions

                                       */

        /* .afsxctl  = */ 0x00000110, /* I2S mode,

                                       * Frame sync is one word

                                       * Rising edge is start of frame

                                       * externally generated frame sync

                                       */

        /* .xtdm     = */ 0x00000003, /* slot 1 and slot 2 is active (DSP)               */

        /* .xintctl  = */ 0x0000000F, /* sync error,overrun error,clK error and dma error*/

        /* .xstat    = */ 0x000001FF, /* reset any existing status bits       */

        /* .xevtctl  = */ 0x00000000, /* DMA request is enabled or disabled   */

        {

             /* .aclkxctl  =  */0x00000000,

             /* .ahclkxctl =  */0x00000000,

             /* .xclkchk   =  */0x00000000

        },

 

};

 

Mcasp_ChanParams  mcasp_chanparam[Audio_NUM_CHANS]=

{

    {

        0x0001,                    /* number of serialisers      */

        {Mcasp_SerializerNum_14, }, /* serialiser index           */

        &mcaspRcvSetup,

        TRUE,

        Mcasp_OpMode_TDM,          /* Mode (TDM/DIT)             */

        Mcasp_WordLength_16,

        NULL,

        0,

        NULL,

        NULL,

        2,                        /* number of TDM channels      */

        Mcasp_BufferFormat_1SER_MULTISLOT_NON_INTERLEAVED,

        TRUE,

        TRUE

    },

    {

        0x0001,                   /* number of serialisers       */

        {Mcasp_SerializerNum_13,},

        &mcaspXmtSetup,

        TRUE,

        Mcasp_OpMode_TDM,

        Mcasp_WordLength_16,      /* word width                  */

        NULL,

        0,

        NULL,

        NULL,

        2,                        /* number of TDM channels      */

        Mcasp_BufferFormat_1SER_MULTISLOT_NON_INTERLEAVED,

        TRUE,

        TRUE

    }

};

 

The red above are what I have modified.

 

After all that modified, LCDKC6748 still can’t loopback line in to line out.

 

It has puzzled me several days. Please help! Any suggestion is grateful!