On Mon, Jun 22, 2009 at 11:08:27AM +0800, 宋宝华 wrote:
[Please reply in-line, interspersing your new text into the message you're replying to - it makes the discussion much easier to follow.]
Hi Mark, ***For the new DAI format According to I2S spec, it doesn't definite a I2S with TDM as a standard I2S. http://www.nxp.com/acrobat_download/various/I2SBUS.pdf
It's a de facto standard - several other vendors implement TDM in exactly the same fashion. If you think about it this is a natural way to handle TDM in I2S.
It looks like you are admitting this kind of timing into I2S DAI too: http://i3.6.cn/cvbnm/8f/3d/08/268a4560e0daa1b41d69b82419da06e1.jpg I think I can follow it too.
The timing you're showing there is essentially a DSP mode with the left and right channels alternating rather than an I2S style where the polarity of the LRCLK signal indicates if the data transmitted at the same time is for the left or right channel. I'd need to think about it in slightly more detail but probably it is actually a DSP mode - with the DSP modes only one edge of the frame sync is used so the other edge can be anywhere else within the frame.
Due to my test boards, at present, the AD1938 is working in and supporting TDM timing like the diagram: http://i3.6.cn/cvbnm/2f/e2/f2/03ae2b51c4e90749972e70bf887f926f.jpg It looks like DSP mode with TDM, so can I path related codes into SND_SOC_DAIFMT_DSP switch?
Yes, that's DSP mode.
***For volume controls based on stereo pairs Even though DAC1-DAC8 are named as DACL1,DACR1, DACL2,DACR2..., but the DACLx and DACRx are not always in a pair, in fact, they are independent. As a codec supporting 8 channels, it can be configed into 2, 2.1, 4.1, 5.1, 6.1, 7.1, how to handle the pairs?
That's fairly standard and not really a practical problem. Since applications can address each channel of a stereo control independantly they don't loose any control from grouping the channels together. Having the stereo controls just makes it a bit easier when they are used that way.