On Friday 19 March 2010 11:28:54 ext Jarkko Nikula wrote:
On Fri, 19 Mar 2010 11:11:19 +0200
Peter Ujfalusi peter.ujfalusi@nokia.com wrote:
Basic support for Left Justified coding for OMAP McBSP.
Signed-off-by: Peter Ujfalusi peter.ujfalusi@nokia.com
sound/soc/omap/omap-mcbsp.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-)
I don't point it out immediately but is the FS polarity correct? According to WM8772 spec, the left/right justified modes has inverted FS polarity from I2S.
Yes, that is correct, and I'm aware of that. However, I have done some testing: I have a sample prepared, which only has data on the left channel, than I did tried I2S and LEFT_J...
With: /* I2S mode */ fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM;
The data line has data when the FS is low (when FS is high, that data line has 0). So this is correct I2S.
Now with: /* Left justified */ fmt = SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_NB_IF | SND_SOC_DAIFMT_CBM_CFM;
The data line has data when the FS is high (when FS is low, that data line has 0). So this is correct Left Justified.
At least it seams that McBSP is actually shifting out the data at the correct place, when it is slave..
Oh, and I can not explain why this is working, but I do trust on my scope, and it shows me that it is correct :o