Greetings,
I am working on DM814x evaluation board with EZSDK 5.05.02.00 and Linux PSP 4.04. I need to send PCM audio data through McASP0. The bit clock and frame sync for McASP0 (MCA0_ACLKX and MCA0_AFSX) will be provided by an external FPGA. I have applied all the modifications discussed in the following posts:
http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/p/149316/834765.aspx#834765
http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/p/219756/775182.aspx#775182
Namely, I have made the following changes:
/**********************************************************/
/* linux-psp/arch/arm/mach-omap2/devicecs.c */
/**********************************************************/
static struct resource ti81xx_mcasp_resource[] = {
{
.name = "mcasp",
.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,
},
};
void __init ti81xx_register_mcasp(int id, struct snd_platform_data *pdata)
{
if (machine_is_ti8168evm() || machine_is_ti8148evm()) {
ti81xx_mcasp_device.id = 0;
ti81xx_mcasp_device.resource = ti81xx_mcasp_resource;
ti81xx_mcasp_device.num_resources = ARRAY_SIZE(ti81xx_mcasp_resource);
} else if (machine_is_dm385evm()) {
ti81xx_mcasp_device.id = 1;
ti81xx_mcasp_device.resource = dm385_mcasp_resource;
ti81xx_mcasp_device.num_resources = ARRAY_SIZE(dm385_mcasp_resource);
} else {
pr_err("%s: platform not supported\n", __func__);
return;
}
ti81xx_mcasp_device.dev.platform_data = pdata;
platform_device_register(&ti81xx_mcasp_device);
}
/*********************************************************************/
/* linux-psp/arch/arm/mach-omap2/board-ti8148evm.c */
/********************************************************************/
static struct snd_platform_data ti8168_evm_snd_data = {
.tx_dma_offset = 0x46000000,
.rx_dma_offset = 0x46000000,
.op_mode = DAVINCI_MCASP_IIS_MODE,
.num_serializer = ARRAY_SIZE(ti8168_iis_serializer_direction),
.tdm_slots = 2,
.serial_dir = ti8168_iis_serializer_direction,
.asp_chan_q = EVENTQ_2,
.version = MCASP_VERSION_2,
.txnumevt = 1,
.rxnumevt = 1,
};
/********************************************************/
/* linux-psp/sound/soc/davinci/davinci-evm.c */
/********************************************************/
static struct snd_soc_dai_link ti81xx_evm_dai[] = {
//M.K.
{
.name = "TLV320AIC3X",
.stream_name = "AIC3X",
.codec_dai_name = "tlv320aic3x-hifi",
.codec_name = "tlv320aic3x-codec.1-0018",
.platform_name = "davinci-pcm-audio",
.init = evm_aic3x_init,
.ops = &evm_ops,
},
{
.name = "FPGA_LINK",
.stream_name = "fpga",
.codec_dai_name = "FPGA-DAI-CODEC",
.codec_name = "fpga-dummy-codec",
.platform_name = "davinci-pcm-audio",
.ops = &evm_ops,
},
};
static void ti81xx_evm_dai_fixup(void)
{
if (machine_is_ti8168evm() || machine_is_ti8148evm()) {
ti81xx_evm_dai[0].cpu_dai_name = "davinci-mcasp.0";
} else if (machine_is_dm385evm()) {
ti81xx_evm_dai[0].cpu_dai_name = "davinci-mcasp.1";
} else {
ti81xx_evm_dai[0].cpu_dai_name = NULL;
}
}
When I insert the audio modules, the drivers are not hooked up correctly, i.e., it doesn't give the following output:
"asoc:FPGA-DAI-CODEC <-> davinci-mcasp.0 mapping ok"
I found out that the "soc_probe_dai_link" function is not called in "linux-psp/sound/soc/soc-core.c". Please let me know what other changes should be done to send PCM audio data through McASP0. Thank you very much.
Regards,
Mohammad