Repository navigation
Ssp rx flush - #3550
Ssp rx flush#3550
Conversation
keyonjie
commented
Oct 23, 2020
|
SOFCI TEST |
|
Looks like this PR fix this issue: #3525 on external loopack. |
|
SOFCI TEST |
Thank you so much @jdrzaszcz ! Hi @lgirdwood good news that we finally got the external normal SSP capture channel swap issue fixed with this PR, please help to review, we could add similar fixes for BYT next. |
|
@keyonjie I have a TGL RVP with external loopback on SSP. This is some example log with: dai_info on "ssp_empty_rx_fifo(), before flushing, entries %d" |
Interesting, so looks there is difference between WHL and TGL, let me debug it more. |
There was a problem hiding this comment.
clock_ticks_per_sample(clock, rate);
There was a problem hiding this comment.
clock_ticks_per_sample(clock, rate);
good, let me change.
There was a problem hiding this comment.
inline comments here explaining usage. I'm assuming we get number of ticks per sample ?
There was a problem hiding this comment.
yep, let me add inline comments.
There was a problem hiding this comment.
Aren't we using rate here ?
I wanted to use it as the total timeout control, now I change my mind to use something like this:
#define SSP_RX_FLUSH_SAMPLE_MAX 16
Will update it in the PR.
4b75f45 to
f8c39ee
Compare
|
@lgirdwood FYI that this is to fix normal SSP capture channel swap issue on cAVS (< 2.5) platforms, for cAVS 2.5+, the solution is still open as there is some IP design change and known limitation there. So let's get this merged first before jumping to the TGL issues. |
|
SOFCI TEST |
There was a problem hiding this comment.
sample_rate is mandatory here. If it's not passed in then return 0
There was a problem hiding this comment.
sample_rate is mandatory here. If it's not passed in then return 0
Fair, let me change.
f8c39ee to
d883e63
Compare
There was a problem hiding this comment.
Btw, why are you committing this ? You are not changing anything in clk. I would have expected to invalidate this before we calculate the ticks ?
There was a problem hiding this comment.
Btw, why are you committing this ? You are not changing anything in clk. I would have expected to invalidate this before we calculate the ticks ?
Indeed, platform_shared_get() should be used to invalidate the clk_info. It was copy-paste from clock_ms_to_ticks(), let me correct it.
Add helper clock_ticks_per_sample() to calculate and return the clock ticks for a specific sample rate. Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
The SSSR_BSY is not necessary for flushing, we need to read out entries every time the FIFO is not empty. This flushing may need take place several rounds, and we need to wait 1 sample time between 2 flushing rounds. Fixes thesofproject#3525 Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
d883e63 to
ec405b1
Compare