Hi Eric,
Em Ter, 2009-06-09 às 17:39 +0800, Eric Miao escreveu:
frame_width = sample_width * channel ( = LRCLK for I2S )
is no longer (and ever) correct.
E.g. the frame width could be 64fs, meaning a whole frame is consisting of 64 bitclks - that's saying, sample width from 1 - 64 are possible, For typical 16-bit sample width I2S format, the envelope for each sample is 32 bitclks, and offseting by 1 bitclk starts the 16-bit sample.
I'm working on supporting I2S right now, and I found some issues with this enveloping thing.
First, it doesn't work on pxa2xx. DMYSTOP on pxa2xx is only 0-3.
Second, is enveloping needed at all? The patch you sent supports 32bits frames for 2*16bits samples or 64bits frames for 2*32bits samples using FSRT.
We already use FSRT for DSP_A, and if this works on littleton I2S we should just stick with FSRT (and frame_width = sample_width * channels) to keep the code simple.
And the TDM mode is actually special for PXA-SSP to emulate the I2S protocol, it's no way generic TDM in a common sense. So talking about set_tdm_slots(), I'd really like to hide into the format setting code of I2S/Left_J to avoid further confusion.
TDM is needed for frames larger than 32 bits on any dai format. Its not something specific to I2S.