Skip to content
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

dw-dma: use done bit for linked list transfers #142

Merged
merged 1 commit into from Jul 24, 2018

Conversation

tlauda
Copy link
Contributor

@tlauda tlauda commented Jul 23, 2018

Changes settings of GPDMA linked lists transfers
to use done bit to let the DMA know, that the next
data block is ready to be sent/received. This way
we are sure, that there will be no additional data
transferred between receiving interrupt and disabling
GPDMA channel.

Signed-off-by: Tomasz Lauda tomasz.lauda@linux.intel.com

Changes settings of GPDMA linked lists transfers
to use done bit to let the DMA know, that the next
data block is ready to be sent/received. This way
we are sure, that there will be no additional data
transferred between receiving interrupt and disabling
GPDMA channel.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
@RanderWang
Copy link
Collaborator

I test it on BDW and it is ok

@lgirdwood lgirdwood merged commit 5ea5d5b into thesofproject:master Jul 24, 2018
@RanderWang
Copy link
Collaborator

@tlauda @lgirdwood @keyonjie

Hi tomasz, I have a question about this change. Is this patch for pause-release case?

My understanding is that: DMA engine would be halted and wait for DONE bit cleared in IRQ
function then go on copying data to SSP. Before DONE bit is cleared, no data is copied to SSP,
but SSP is still sending data to codec. So SSP is halted or sending some invalidate data to codec.

This would do negative effect to sound quality. And I think pause-release is a corner case for enjoying
music, it is not worth doing so.

@tlauda
Copy link
Contributor Author

tlauda commented Sep 7, 2018

@RanderWang It's the other way around. DMA transfers the first linked list item and waits for DONE to transfer the next one. If we are going to press pause, then we are stopping both DMA and SSP in the middle of the transfer, so there won't be any problems with invalid data. The only potential issue I can see is data inconsistency after pause/release. There is a high probability, that the part of the linked list item data will be lost, because after release we are going to start from the next lli, but I will try to deal with it later.

@RanderWang
Copy link
Collaborator

@tlauda yes, I get your idea. Actually, I don't care about pause-release case. I just want to know whether it affect normal case, just playback.

@tlauda tlauda deleted the topic/dw_dma_use_done branch November 22, 2019 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants