Kinetis SAI/I2S questions

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Kinetis SAI/I2S questions

2,708 次查看
DustyStew
Contributor V

When reading the SAI receiver FIFO, how can one tell whether the sample read is left or right channel? Surely this is written somewhere but I have not found it.

It looks as though the mask register (RMR) can prevent one of the channels from not being stored into the FIFO. Is that right? I presume that 0x0001 would cause left to be ignored, and 0x0002 would cause right to be ignored?

One thing that I find missing from the SAI documentation, is the definition of frame. I assume a frame is one left and one right sample for I2S. Is that right?

Is I2S always stereo? I can't see how it would work otherwise as it requires a pulse on the LRCLK to know what's what. But nowhere have a I found the definitive statement, not even in the Phillips spec.

标记 (3)
0 项奖励
回复
3 回复数

1,902 次查看
Paul_Tian
NXP Employee
NXP Employee

Hi, Thomas

As I know, we do not have such a special register which can tell this 32-bit data is from left channel or right channel. Our SAI module is flexible. After we change from I2S to SAI, our frame length and word size can be flexibly setting. You can set to serial format to match your codec specification.

Philips has this type codec which seems as you need.

Hope my reply can help you.

Best Regards

Paul

0 项奖励
回复

1,902 次查看
DustyStew
Contributor V

Yes good to have this confirmed. Not storing whether the FIFO data is right or left is a design flaw. There is a bit that indicates the beginning of a frame, but that doesn't help when using the FIFO. One could cut the latency down to less that 1/2 a frame period, then the frame start bit would be meaningful. Though that defeats the purpose of having a FIFO.

So far this is not a problem. The input is mono, so only need one channel. I have set a bit in the mask register (RMR) and that seems to create the desired effect.

0 项奖励
回复

1,900 次查看
Paul_Tian
NXP Employee
NXP Employee

Hi, Thomas

Attached picture is a codec communication timing.

Base on I2S communication, SAI can completely match this timing.

Base on FIFO, Kinetis has not such a register to mark which FIFO always be used for which channel, left or right. You have to remember it by himself.

Hope my reply can help you.

Best Regards

Paul

0 项奖励
回复