Hi Chan,
I have referred to the porting guide document. I also got I2S whitepaper from the VoIP vendor instructing on the parameters needed to interface.
In these 3 months, I have been able to send data from processor (sine signal, ramp, wav file), and it is successfully received at the telephone end of the VoIP DSP after uLaw companding, and going through ALSA software filter, VoIP audio block filter and has no problem of data collision or synchronisation.
The problem is in sending the data back to the processor, when the VoIP chip makes a 8-bit mu law signal at DTX pin and sends it to the processor, the same alsa_minimal_driver which was able to write on the PCM bus (using snd_pcm_writei()), is unable to read off the PCM bus giving the error:
Read from audio interface failed (Invalid argument/ broken pipe)
The driver is initialized using fsl-ssi-dai and the registers (20C8078, 20C8070, 20C8080, 20C8090, 20C401C, 2024028, 20C407C, 20C4060, 2028010, 2028020, 2028024 and 202801C) are set to give proper I2S settings, (I2S_CLK=512kHz, I2S_WS=8kHz) and SSI settings.
The 32-bit word from the PCM channel should be masked out as a 8-bit data and then loopbacked to the same VoIP, and later sent to some other interface.
Best,
Abhijeet