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 multi-serializer(RX_MODE and TX_MODE) for DM8107

Other Parts Discussed in Thread: DM8107, TVP5158

HI,

I have a pending issue need your guys help, it is about the 

multi-serializer in transmit mode<AXR0 to AXR1> and receive mode<AXR2 to AXR3>.

Individually they work correctly, such as AXR0 for transmit and AXR2 for receive or AXR1 for transmit and AXR3

 for receive. But something wrong happens when I use AXR0AXR1 for transmit and AXR2AXR3 for receive simultaneously.

My application is based on ALSA lib + DVRRDK_04.00.00.03<DM8107>, When i capture audio data by call snd_pcm_readi , 

It will be blocked on this function, What can be done to solve this issue?

Please someone help me check the driver modification.

static u8 tvp5158_iis_serializer_direction[] = {
        TX_MODE, TX_MODE, RX_MODE, RX_MODE,
        INACTIVE_MODE,  INACTIVE_MODE,  INACTIVE_MODE,  INACTIVE_MODE,
        INACTIVE_MODE,  INACTIVE_MODE,  INACTIVE_MODE,  INACTIVE_MODE,
        INACTIVE_MODE,  INACTIVE_MODE,  INACTIVE_MODE,  INACTIVE_MODE,
}; 

static struct snd_platform_data tvp5158_snd_data = {
        .tx_dma_offset  = 0x46000000,
        .rx_dma_offset  = 0x46000000,
        .asp_chan_q   = EVENTQ_0,
        .tdm_slots      = 2, /* number of channels */
        .op_mode        = DAVINCI_MCASP_IIS_MODE,
        .num_serializer = ARRAY_SIZE(tvp5158_iis_serializer_direction),
        .serial_dir     = tvp5158_iis_serializer_direction,
        .version        = MCASP_VERSION_2,
    /* 
          * Having Max number of channels as mcasp fifo / edma read depth.
          * For 4ch this granularity is still 16 which is ok 
          */
        .txnumevt       = 2, 
        .rxnumevt       = 2,    
        /* McASP21_AHCLKX out to feed CODEC CLK*/
        .clk_input_pin        = MCASP_AHCLKX_OUT,  
};

static struct resource ti81xx_mcasp0_resource[] = {
        {
                .name = "mcasp0",
                .start = TI81XX_ASP0_BASE,
                .end = TI81XX_ASP0_BASE + (SZ_1K * 12) - 1,
                .flags = IORESOURCE_MEM,
        },
        /* TX event */
        {
                .start = TI81XX_DMA_MCASP0_AXEVT,
                .end = TI81XX_DMA_MCASP0_AXEVT,
                .flags = IORESOURCE_DMA,
        },
        /* RX event */
        {
                .start = TI81XX_DMA_MCASP0_AREVT,
                .end = TI81XX_DMA_MCASP0_AREVT,
                .flags = IORESOURCE_DMA,
        },
};

static struct platform_device ti81xx_mcasp_tvp5158_device = {
        .name = "davinci-mcasp", /* driver name */
        .id = 0,
        .dev = {
                .platform_data = &tvp5158_snd_data,
                },
        .num_resources = ARRAY_SIZE(ti81xx_mcasp0_resource),
        .resource = ti81xx_mcasp0_resource,
};

Regards,

tfg