Part Number:AM4378
Tool/software: Linux
My problem is that when I run arecord all of the samples in the captured file are 0x0000.
I have a pcm1862 connected to mcasp0 as defined in the .dts file here:
msp0_pcm1862_pins_default: mcasp0_pcm1862_pins_default {
pinctrl-single,pins = <
0x19c ( PIN_INPUT | MUX_MODE0 ) /* (M24) mcasp0_ahclkr.mcasp0_ahclkr */
0x1a0 ( PIN_INPUT | MUX_MODE0 ) /* (L23) mcasp0_aclkr.mcasp0_aclkr */
0x1a4 ( PIN_INPUT | MUX_MODE0 ) /* (K23) mcasp0_fsr.mcasp0_fsr */
0x1ac ( PIN_INPUT | MUX_MODE2 ) /* (L24) mcasp0_ahclkx.mcasp0_axr3 */
>;
};
There are no connections to the other mcasp0 signals. Here are analyzer captures during arecord showing the BCK, LRCK and DATA signals on the i2s bus connected to mcasp0.
I added register reads, writes and printk statements to davinci-mcasp.c to help troubleshoot this problem. The labels should match the names in "AM437x and AMIC120 ARM® Cortex™-A9 ProcessorsTechnical Reference Manual" with the omission of MCASP_. The first captures shows the contents of the registers that I think have an impact prior to writing to them in start_rx.
The next capture shows the contents of the registers after the writes and then when stop_rx is called. Here is the code for the register writes which includes setting bit 6 in ACLKXCTL so that there is no dependency between the TX clocks and RX clocks. Here is code where I write new values to registers:
mcasp_set_reg(mcasp, DAVINCI_MCASP_RXCLKCHK_REG, 0x003F0000);
mcasp_set_reg(mcasp, DAVINCI_MCASP_RXSTAT_REG, 0xFFFFFFFF);
mcasp_set_bits(mcasp, DAVINCI_MCASP_ACLKXCTL_REG, TX_ASYNC);
__davinci_mcasp_set_clkdiv(mcasp, MCASP_CLKDIV_BCLK, 8, 0);
Setting bit 6 of ACLKXCTL got me passed the problem of the interrupt not firing but the captured file is all zeros (except for the header) even though the analyzer trace shows data. I am still getting an RX clock failure indication and I think it might be related to my problem.
I would like to get some direction where to look next. Any help would be appreciated.