Other Parts Discussed in Thread: TAS2521, AM3354
In our design MCASP0 of AM3354 is connected with I2S of TAS2521. We connect 8 Ohms speaker at speaker driver of TAS2521. The crystal input for processor is 24MHZ (XTAL_IN pin of AM3354)
We are using davinci MCASP driver which Locates at "sound/soc/davinci/davinci_mcasp.c".AHCLKX, ACLKX, AFSX, AXR1 in AM3354 are configured as outputs.(MCLK, BCLK, WCLK are input to TAS2521)
While testing, the output audio from TAS2521 codec is very noisy.
We verified TAS2521 codec Chip on our board by using TAS2521EVM. In our board MCASP Interface is disconnected from the codec(TAS2521). I2S output signals are fed from TAS2521EVM to TAS2521 codec in our board.Now the speaker is playing the audio file without noise.So there may be problem with the MCASP driver.
Please find the below configuration and attached driver with some changes according to our settings.
mcasp_set_bits(mcasp, DAVINCI_MCASP_ACLKXCTL_REG, ACLKXE | AXCLKDIV);
mcasp_set_bits(mcasp, DAVINCI_MCASP_TXFMCTL_REG, AFSXE | FSXMOD(2)| FSXDUR);
mcasp_set_bits(mcasp, DAVINCI_MCASP_PDIR_REG, ACLKX | AFSX | AXR(3));
Regards,
R.Mahendra kumar