-
Notifications
You must be signed in to change notification settings - Fork 133
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
ASoC: SOF: intel: hda: Clean up link DMA for IPC3 during stop #4484
ASoC: SOF: intel: hda: Clean up link DMA for IPC3 during stop #4484
Conversation
beb22a1
to
4f7c4fb
Compare
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.
not following @ranj063
return ret; | ||
|
||
if (cmd == SNDRV_PCM_TRIGGER_STOP) | ||
return hda_link_dma_cleanup(substream, hext_stream, cpu_dai); |
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.
I don't understand how this is compatible with the previous direction to keep the stream tag in 1bf83fa whose commit message included
"In the case of repeated start/stop without involving hw_free, the stream
tag needs to be preserved for the subsequent starts. So, skip performing
the DMA clean up during stop and handle it only during suspend or
hw_free.
"
??
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.
@plbossart that commit was a mistake for IPC3. In the case of IPC3, the post_trigger op frees clears the DMA channel ID and send the DAI_CONFIG to clear the DMA iD in the firmware as well. So we must clean up the link DMA set up so that we can re-assign and do the DAI_CONFIG again during prepare in the case of repeasted hw_params without hw_free.
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.
ah ok, the commit 1bf83fa was for IPC4, makes sense now. Thanks for the clarification.
With IPC3, we reset hw_params during the stop trigger, so we should also clean up the link DMA during the stop trigger. Fixes: 1bf83fa ("ASoC: SOF: Intel: hda-dai: Do not perform DMA cleanup during stop") Closes: thesofproject#4455 Closes: thesofproject#4482 Signed-off-by: Ranjani Sridharan <[email protected]>
4f7c4fb
to
3dfc905
Compare
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.
I guess an alternative way to fix 1bf83fa would be by reverting it for IPC3 - by re-adding that line and surrounding it with #if CONFIG_...
/ #endif
With IPC3, we reset hw_params during the stop trigger, so we should also clean up the link DMA during the stop trigger.
Fixes: 1bf83fa ("ASoC: SOF: Intel: hda-dai: Do not perform DMA cleanup during stop")