-
Notifications
You must be signed in to change notification settings - Fork 618
(Under Verification) [TDM_Dev] os/board/rtl8730e: fix dma buffer interleaving for TDM #6963
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Under Verification) [TDM_Dev] os/board/rtl8730e: fix dma buffer interleaving for TDM #6963
Conversation
Fix DMA interleaving for 8 channel mode when different data format is used in TDM Data format can now be controlled by setting the configuration struct of the i2s tdm device When left-justified mode is used, the BCLK will be inverted, but the slots should be correctly assigned instead of following default mapping
Previously, 1 entire page size is requested for each DMA channel, even when less than page size (N) bytes are requested Initially it was expected that WCLK will stop after page is filled up to N bytes, however it keeps running until entire page is filled The behavior now is that the page is also created up to N bytes. If 2 channels are used, then each page is N/2 size, as they will be combined into 1 output buffer WCLK is now observed to be only as long as N bytes.
…ration TDM sensors may lose their state due to limited buffer if MCLK/BCLK is stopped This commit allows clock to continue being generated to prevent loss of data/state by modifying pause api To stop clock completely, use I2S_PAUSE(i2s, DISABLE);
|
TDM is not correctly working.
describe the result of this commit
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TDM is not correctly working.
Please sugguest the proper configuration to get 100% capturing.
it is possible to change FSYNC activated as Falling Edge ?
1Sudden Stop channels : first 4msec data is correct , but Next data has corrupt
why FSync as high when we choose Rising Edge? Low level is correct without delay .
it has stopped duration for 909.67 usec. BCLK is continuously working but FSync is stopped
describe the result of this commit
first status MCLK ( as Low ) , BLCK ( as LOW ) , FSYNC ( as High ) , DIN0 ( as High )
first BCLK Rising Edge in 2.08 usec from MCLK Rising Edge , MCLK falling Edge at the first Rising Edge of BCLK
first FSYNC Falling Edge 104.74us from the first BCLK Rising Edge
It transfer the available data to start Transfer after the First Rising Edge of FSYNC
the current configuration code is sampling at FALLING Edge for available data.
first 4 msec is okay
FSYNC is stopped during 909.67usec as High Level
. actuall ch.121 data received ( 120 ch is available , 121ch data is corrupted
Next TDM Fram is leaking ( 3.98405 msec from Rising FSync to the end of Rising FSync , Only 6ch are avaliable )
|
I2S can use both ; Falling and Rising Edge Sampling condition. I don't want to argue about what is right or wrong; I just want you to provide the correct answer to my request. In reality, only the first 64 samples are read accurately, and too many samples are lost. Whether there is a 1 clock delay or not, it doesn't matter; the method used is irrelevant, and all transmitted data must be received without any loss. For stable buffering, I want the interrupt and buffer to work properly, and I hope that all data is accurately captured at a lower level before the OS driver transfers the accumulated buffer to the application. |
|
I will close this PR and move changes to #6968 |




Fix DMA interleaving for 8 channel mode when different data format is used in TDM
Data format can now be controlled by setting the configuration struct of the i2s tdm device
When left-justified mode is used, the BCLK will be inverted, but the slots should be correctly assigned instead of following default mapping