Repository navigation
dw_dma: Suspend DMA channel in stop function - #2396
Conversation
aff4940 to
a787a9e
Compare
There was a problem hiding this comment.
Looking deeper, we could keep the single timeout and say
- host timeout = DW_DMA_TIMEOUT (100uS)
- DAI timeout = period size + DW_DMA_TIMEOUT (i.e. period + 100uS)
What do you think ? Simplifies further and means we are not restricted to 1ms periods.
There was a problem hiding this comment.
Idea to use period size is ok, I introduce it in code, but I'm not sure about timeout value bigger than period size.
When we stand that processing time for whole topology should be up to period value (1ms), and agent will panic when this time grow to 2x period (2ms), then with timeout value bigger than period (1ms) we lead to firmware crash instead of trace warning about timeout -> 1ms for processing + 1.1 ms timeout > 2ms
There was a problem hiding this comment.
Simplest solution will be to change agent timeout value above 2x period (2.5 for example), then timeout up to one period will be ok.
The most complicated is creation of separate component state STOP_BEGIN - quite dirty.
Another one is to separate PAUSE and STOP, because in PAUSE there is no need to wait until FIFO will be empty (because we just stop data draining, DMA is still active).
I think that last option sounds best for me.
There was a problem hiding this comment.
Yep, lets separate pause and stop. If DAI timeout is just for pause and stop then we can have it slightly bigger than remaining data in period (e.g. we can read SAR/DAR). This would guarantee our timeout is based on remaining data in current LLI only.
|
@ktrzcinx any update ? |
|
@lgirdwood I'm waiting for #2364 merge because it could interfere. |
a787a9e to
64441f8
Compare
64441f8 to
bcbfca8
Compare
a12edb8 to
ebc6866
Compare
|
@ktrzcinx can you check internal CI, Jenkins is known issues. |
|
@lgirdwood some issue occurred with internal CI - not related with this PR - so I can't do that at this moment. |
Keep code style consistent. Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Data after pause command should be kept compatible to omit pop noise on output. The solution may be waiting for FIFO empty but it takes to long - up to 1 processing period time. Another - introduced - solution is to stop draining new data from buffer after pause, but keeping dma connection with dai up to release command. In this place waiting for FIFO empty shouldn't take so much time, so system agent won't panic and data will be consistent. Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
ebc6866 to
9aff15c
Compare
|
Jenkins showing legacy is good. |
|
@lgirdwood Looks good to me. |
Suspend flag should be set regardless of draining mode to stop
draining data from source buffer.