We have a custom board for am335x, use one codec (mcasp0, 1 RX, 1TX)
We set debug info at davinci_pcm_dma_irq(), but when play wav file, never show the debug info.
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
at davinci-pcm.c - davinci_pcm_dma_request()
...
ret = prtd->asp_channel = edma_alloc_channel(params->channel,
davinci_pcm_dma_irq, substream,
prtd->params->asp_chan_q);
davinci_pcm_dma_irq, substream,
prtd->params->asp_chan_q);
...
// Transfer complete interrupt enable
prtd->asp_params.opt |= TCINTEN | EDMA_TCC(EDMA_CHAN_SLOT(prtd->asp_channel));
...
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
try & error, Finally, we changed the asp_chan_q of struct snd_platform_data at board-am335xevm.c
static struct snd_platform_data am335x_evm_snd_data1 = {
.tx_dma_offset = 0x46000000, /* McASP0 0x46000000 */
.rx_dma_offset = 0x46000000,
.op_mode = DAVINCI_MCASP_IIS_MODE,
.num_serializer = ARRAY_SIZE(am335x_iis_serializer_direction1),
.tdm_slots = 2,
.serial_dir = am335x_iis_serializer_direction1,
.asp_chan_q = EVENTQ_0,
//.asp_chan_q = EVENTQ_1, //=> x
//.asp_chan_q = EVENTQ_2, //=> x
//.asp_chan_q = EVENTQ_3, //=> x
//.asp_chan_q = EVENTQ_DEFAULT, // => x
.version = MCASP_VERSION_3,
.txnumevt = 1,
.rxnumevt = 1,
};
.tx_dma_offset = 0x46000000, /* McASP0 0x46000000 */
.rx_dma_offset = 0x46000000,
.op_mode = DAVINCI_MCASP_IIS_MODE,
.num_serializer = ARRAY_SIZE(am335x_iis_serializer_direction1),
.tdm_slots = 2,
.serial_dir = am335x_iis_serializer_direction1,
.asp_chan_q = EVENTQ_0,
//.asp_chan_q = EVENTQ_1, //=> x
//.asp_chan_q = EVENTQ_2, //=> x
//.asp_chan_q = EVENTQ_3, //=> x
//.asp_chan_q = EVENTQ_DEFAULT, // => x
.version = MCASP_VERSION_3,
.txnumevt = 1,
.rxnumevt = 1,
};
Only when asp_chan_q = EVENTQ_0, the callback funtion davinci_pcm_dma_irq() will be executed
Anybody know why?