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.

请问tony tang一个多路I2S音频数据接入c6748的问题?

tony tang你好:

           还是我们公司案子,4路codec接入6748。每个codec输出一路I2S信号到DSP。之前和您确认了接入到DSP的数据格式应该是L1L2L3L4 、R1R2R3R4这样的形式。

          我今天写接口的时候发现,如果要按照I2S的形式,solt的个数只能配置成2,但是我有4个i2s,实际上是8路数据输入,这样的话应该是把slot的个数配置成8才对。可是这么配了以后不就是PCM格式的数据了吗,我这点就想不明白了。

          我看了目前DSP做主的配置,LRFS 48K,clk是48*32K。也就是标准的i2s帧时钟和位时钟的配置。我左思右想有点矛盾不知道是不是哪里理解的不正确。

  • yu tao3 说:
    solt的个数只能配置成2,但是我有4个i2s,实际上是8路数据输入,这样的话应该是把slot的个数配置成8才对。可是这么配了以后不就是PCM格式的数据了吗,我这点就想不明白了。

    你把这个slot搞混概念了吧。

    每条线本来就是2个slot。

    8个,其实应该是4个,只是跟配置DMA参数相关,跟配置McASP无关。 

  • 唐工,

    你这么说我好像清楚了一些,那DMA里面的配置和asp的没有太大关系。

    /**

    * \brief   Configures the Transmit Frame Sync signal.

    *

    * \param   baseAddr      Base Address of the McASP Module Registers.

    * \param   fsMode        The mode of Transmission

    * \param   fsWidth       The width of frame sync signal

    * \param   fsSetting     The signal settings for frame sync

    *

    *    fsMode is 0 for burst mode \n

    *    0x1 < fsMode < 0x21 for TDM mode with fsMode number of slots.

    *    Hence, fsMode = 2 for I2S mode \n

    *    fsMode is 384 for 384 slot DIT mode \n

    *

    *    fsWidth can take the values \n

    *         MCASP_TX_FS_WIDTH_BIT \n

    *         MCASP_TX_FS_WIDTH_WORD \n

    *

    *    fsSetting can take the values \n

    *         MCASP_TX_FS_INT_BEGIN_ON_RIS_EDGE - fs source is internal \n

    *         MCASP_TX_FS_INT_BEGIN_ON_FALL_EDGE - fs source is internal \n

    *         MCASP_TX_FS_EXT_BEGIN_ON_RIS_EDGE - fs source is external \n

    *         MCASP_TX_FS_EXT_BEGIN_ON_FALL_EDGE - fs source is external \n

    *  

    * \return  None.

    *

    **/

    void McASPTxFrameSyncCfg(unsigned int baseAddr, unsigned int fsMode,

                            unsigned int fsWidth, unsigned int fsSetting)

    {

       HWREG(baseAddr + MCASP_AFSXCTL) = ((fsMode << MCASP_AFSXCTL_XMOD_SHIFT)

                                          | fsWidth | fsSetting);

    }

    这个是DMA配置的函数,那么现在我有4个i2s信号进DMA,所以应该我的slotNum应该是8,fsWidth应该是8*16 =128bits