Hi,
I'm trying to understand how davinci-mcasp.c send data .... and detect where it goes wrong ... I know that you don't help for no other kernel than TI. But I'm just asking some explanation on how the mcasp work ......
My test program is speaker-test.
I put a lot of printk to understand what is going on ( printk on the driver, but also on the alsa-lib ). With all those printk in the driver and printf in the alsa-lib, I can see that :
The function snd_pcm_plugin_writei is called then snd_pcm_write_areas.
In the function snd_pcm_write_areas :
In the first call , we are in the state SND_PCM_STATE_PREPARED, so the function snd_pcm_hw_start is called !
in the function we check also that the buffer is not full ( snd_pcm_avail_update ).
in my log, the function snd_pcm_plugin_writei is called three times, then the buffer is full and we call the function snd_pcm_wait_nocheck to wait .... .
In the kernel log, I can see that the function mcasp_start_tx is called . BUt nothing on the "TX", why ? How can i detect what is going wrong ? Which function in the kernel can tell me ?
Electrically , I can see the signal MCASP0_AHCLKX, MCASP0_aclk, MCASP0_fsx moving . but no data on MCASP_axr2 & MCASP0_axr0 .
my pin config :
0x1ac (PIN_INPUT_PULLUP | MUX_MODE0) /* BONE_P9_25 mcasp0_ahclkx, OUTPUT | MODE0, Codec MCLK */
0x190 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* BONE_P9_31 mcasp0_aclkx, INPUT | MODE0, Codec BCLK */
0x194 (PIN_OUTPUT_PULLUP | MUX_MODE0) /* BONE_P9_29 mcasp0_fsx, INPUT | MODE0, Codec WCLK */
0x198 0x20 /* BONE_P9_30 mcasp0_axr0, INPUT | MODE0, Codec DOUT */
0x19c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* BONE_P9_28 mcasp0_axr2, INPUT | MODE2, Codec DIN */